diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/README.md" index ecf22e2795eb2536111488e103ba5ee60bc314d2..e267d78710dec294a6ea6e7cc1b9ac016fb05d46 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/README.md" @@ -1,3 +1,69 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e856292613701611e5ed2bc8833ca457af6901dab5eb340e93eadf7d2b828c0b -size 3397 +# vscode-html-languageservice +HTML language service extracted from VSCode to be reused, e.g in the Monaco editor. + +[![npm Package](https://img.shields.io/npm/v/vscode-html-languageservice.svg?style=flat-square)](https://www.npmjs.org/package/vscode-html-languageservice) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-html-languageservice.svg)](https://npmjs.org/package/vscode-html-languageservice) +[![Build Status](https://github.com/microsoft/vscode-html-languageservice/actions/workflows/node.js.yml/badge.svg)](https://github.com/microsoft/vscode-html-languageservice/actions) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) + +Why? +---- + +The _vscode-html-languageservice_ contains the language smarts behind the HTML editing experience of Visual Studio Code +and the Monaco editor. + + - *doComplete* / *doComplete2* (async) provide completion proposals for a given location. + - *setCompletionParticipants* allows participant to provide suggestions for specific tokens. + - *doHover* provides hover information at a given location. + + - *format* formats the code at the given range. + - *findDocumentLinks* finds all links in the document. + - *findDocumentSymbols* finds all the symbols in the document. + - *getFoldingRanges* return folding ranges for the given document. + - *getSelectionRanges* return the selection ranges for the given document. + ... + + For the complete API see [htmlLanguageService.ts](./src/htmlLanguageService.ts) and [htmlLanguageTypes.ts](./src/htmlLanguageTypes.ts) + +Installation +------------ + + npm install --save vscode-html-languageservice + +Development +----------- + +- clone this repo, run `npm i`` +- `npm test` to compile and run tests + + +How can I run and debug the service? + +- open the folder in VSCode. +- set breakpoints, e.g. in `htmlCompletion.ts` +- run the Unit tests from the run viewlet and wait until a breakpoint is hit: +![image](https://user-images.githubusercontent.com/6461412/94239202-bdad4e80-ff11-11ea-99c3-cb9dbeb1c0b2.png) + + +How can I run and debug the service inside an instance of VSCode? + +- run VSCode out of sources setup as described here: https://github.com/Microsoft/vscode/wiki/How-to-Contribute +- link the folder of the `vscode-html-languageservice` repo to `vscode/extensions/html-language-features/server` to run VSCode with the latest changes from that folder: + - cd `vscode-html-languageservice`, `npm link` + - cd `vscode/extensions/html-language-features/server`, `npm link vscode-html-languageservice` +- run VSCode out of source (`vscode/scripts/code.sh|bat`) and open a `.html` file +- in VSCode window that is open on the `vscode-html-languageservice` sources, run command `Debug: Attach to Node process` and pick the `code-oss` process with the `html-language-features` path +![image](https://user-images.githubusercontent.com/6461412/94239296-dfa6d100-ff11-11ea-8e30-6444cf5defb8.png) +- set breakpoints, e.g. in `htmlCompletion.ts` +- in the instance run from sources, invoke code completion in the `.html` file + + +License +------- + +(MIT License) + +Copyright 2016-2023, Microsoft + +`src/languageFacts/data/webCustomData.ts` (shipped as `lib/esm/languageFacts/data/webCustomData.ts` and `lib/umd/languageFacts/data/webCustomData.ts`) +are built upon content from [Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web) and distributed under CC BY-SA 2.5. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/SECURITY.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/SECURITY.md" index dffdea487032c75c7f9b01273a461d4d628c8b37..e138ec5d6a77c5e6e09346a69cbdc90c85a3806f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/SECURITY.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/SECURITY.md" @@ -1,3 +1,41 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:430987b8c5f30c366ecd501bc344c8b29b6280e8a10174376a769f7443a187cd -size 2757 + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). + + diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/LICENSE.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/LICENSE.md" index 19f0a8b9ff8b9e53af92488d51e4c778a1468641..29db530db43fe178f97f0bb244e79fa3f7e27745 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/LICENSE.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/LICENSE.md" @@ -1,3 +1,9 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c669138cb1eb01fbb745e8e460b291e4f2869c14a40061390b6095d845ed4c82 -size 1070 +The MIT License (MIT) + +Copyright (c) Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/README.md" index 8f452e84a77f84082a071296355c2fdb6a3fff4d..ee7b725b5998290c3adcbed96edfc679c18827ff 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/README.md" @@ -1,3 +1,67 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:39ad66715504e292bd71b6b258d0bdba95be22e3a539a280ef2534be0525218e -size 2475 +## vscode-uri + +[![Build Status](https://travis-ci.org/Microsoft/vscode-uri.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-uri) + +This module contains the URI implementation that is used by VS Code and its extensions. +It has support for parsing a string into `scheme`, `authority`, `path`, `query`, and +`fragment` URI components as defined in: http://tools.ietf.org/html/rfc3986 + +``` + foo://example.com:8042/over/there?name=ferret#nose + \_/ \______________/\_________/ \_________/ \__/ + | | | | | +scheme authority path query fragment + | _____________________|__ + / \ / \ + urn:example:animal:ferret:nose +``` + +## Usage + +```js +import { URI } from 'vscode-uri' + +// parse an URI from string + +let uri = URI.parse('https://code.visualstudio.com/docs/extensions/overview#frag') + +assert.ok(uri.scheme === 'https'); +assert.ok(uri.authority === 'code.visualstudio.com'); +assert.ok(uri.path === '/docs/extensions/overview'); +assert.ok(uri.query === ''); +assert.ok(uri.fragment === 'frag'); +assert.ok(uri.toString() === 'https://code.visualstudio.com/docs/extensions/overview#frag') + + +// create an URI from a fs path + +let uri = URI.file('/users/me/c#-projects/'); + +assert.ok(uri.scheme === 'file'); +assert.ok(uri.authority === ''); +assert.ok(uri.path === '/users/me/c#-projects/'); +assert.ok(uri.query === ''); +assert.ok(uri.fragment === ''); +assert.ok(uri.toString() === 'file:///users/me/c%23-projects/') +``` + +## Usage: Util + +This module also exports a `Utils` package which is an extension, not part of `vscode.Uri`, and useful for path-math. There is: + +* `Utils.joinPath(URI, paths): URI` +* `Utils.resolvePath(URI, paths): URI` +* `Utils.dirname(URI): string` +* `Utils.basename(URI): string` +* `Utils.extname(URI): string` + +All util use posix path-math as defined by the node.js path module. + + +## Contributing + +The source of this module is taken straight from the [vscode](https://github.com/microsoft/vscode)-sources and because of that issues and pull request should be created in that repository. Thanks and Happy Coding! + +## Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/SECURITY.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/SECURITY.md" index dffdea487032c75c7f9b01273a461d4d628c8b37..e138ec5d6a77c5e6e09346a69cbdc90c85a3806f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/SECURITY.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/SECURITY.md" @@ -1,3 +1,41 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:430987b8c5f30c366ecd501bc344c8b29b6280e8a10174376a769f7443a187cd -size 2757 + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). + + diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/lib/umd/utils.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/lib/umd/utils.d.ts" index 35a843864288a0ec3dc68953da034aac771c82f7..26ed5e6501878ef9c4440275fed08df1aca105a2 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/lib/umd/utils.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/lib/umd/utils.d.ts" @@ -1,3 +1,58 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bad1bc59cf9ba7f2b8efc0f7342b141843cbf3d3d791fa13df4ff9b86db26df9 -size 2861 +import { URI } from './uri'; +export declare namespace Utils { + /** + * Joins one or more input paths to the path of URI. + * '/' is used as the directory separation character. + * + * The resolved path will be normalized. That means: + * - all '..' and '.' segments are resolved. + * - multiple, sequential occurences of '/' are replaced by a single instance of '/'. + * - trailing separators are preserved. + * + * @param uri The input URI. + * @param paths The paths to be joined with the path of URI. + * @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI. + */ + function joinPath(uri: URI, ...paths: string[]): URI; + /** + * Resolves one or more paths against the path of a URI. + * '/' is used as the directory separation character. + * + * The resolved path will be normalized. That means: + * - all '..' and '.' segments are resolved. + * - multiple, sequential occurences of '/' are replaced by a single instance of '/'. + * - trailing separators are removed. + * + * @param uri The input URI. + * @param paths The paths to resolve against the path of URI. + * @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI. + */ + function resolvePath(uri: URI, ...paths: string[]): URI; + /** + * Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The orignal URI is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The last segment of the URIs path. + */ + function dirname(uri: URI): URI; + /** + * Returns the last segment of the path of a URI, similar to the Unix basename command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The empty string is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The base name of the URIs path. + */ + function basename(uri: URI): string; + /** + * Returns the extension name of the path of a URI, similar to the Unix extname command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The empty string is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The extension name of the URIs path. + */ + function extname(uri: URI): string; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/lib/umd/utils.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/lib/umd/utils.js" index 83efe6b9c8707bbd6324afa744fdcfe91cee46b2..c683b4cb5f93533fe407a785a2fc49050b6888be 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/lib/umd/utils.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/lib/umd/utils.js" @@ -1,3 +1,123 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9f9b8f431890c158e48c2d7d2eb509898efb88d2d20d46351f015dbce4439ed9 -size 5552 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Utils = void 0; +const nodePath = __importStar(require("path")); +const posixPath = nodePath.posix || nodePath; +const slash = '/'; +var Utils; +(function (Utils) { + /** + * Joins one or more input paths to the path of URI. + * '/' is used as the directory separation character. + * + * The resolved path will be normalized. That means: + * - all '..' and '.' segments are resolved. + * - multiple, sequential occurences of '/' are replaced by a single instance of '/'. + * - trailing separators are preserved. + * + * @param uri The input URI. + * @param paths The paths to be joined with the path of URI. + * @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI. + */ + function joinPath(uri, ...paths) { + return uri.with({ path: posixPath.join(uri.path, ...paths) }); + } + Utils.joinPath = joinPath; + /** + * Resolves one or more paths against the path of a URI. + * '/' is used as the directory separation character. + * + * The resolved path will be normalized. That means: + * - all '..' and '.' segments are resolved. + * - multiple, sequential occurences of '/' are replaced by a single instance of '/'. + * - trailing separators are removed. + * + * @param uri The input URI. + * @param paths The paths to resolve against the path of URI. + * @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI. + */ + function resolvePath(uri, ...paths) { + let path = uri.path; + let slashAdded = false; + if (path[0] !== slash) { + path = slash + path; // make the path abstract: for posixPath.resolve the first segments has to be absolute or cwd is used. + slashAdded = true; + } + let resolvedPath = posixPath.resolve(path, ...paths); + if (slashAdded && resolvedPath[0] === slash && !uri.authority) { + resolvedPath = resolvedPath.substring(1); + } + return uri.with({ path: resolvedPath }); + } + Utils.resolvePath = resolvePath; + /** + * Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The orignal URI is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The last segment of the URIs path. + */ + function dirname(uri) { + if (uri.path.length === 0 || uri.path === slash) { + return uri; + } + let path = posixPath.dirname(uri.path); + if (path.length === 1 && path.charCodeAt(0) === 46 /* CharCode.Period */) { + path = ''; + } + return uri.with({ path }); + } + Utils.dirname = dirname; + /** + * Returns the last segment of the path of a URI, similar to the Unix basename command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The empty string is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The base name of the URIs path. + */ + function basename(uri) { + return posixPath.basename(uri.path); + } + Utils.basename = basename; + /** + * Returns the extension name of the path of a URI, similar to the Unix extname command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The empty string is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The extension name of the URIs path. + */ + function extname(uri) { + return posixPath.extname(uri.path); + } + Utils.extname = extname; +})(Utils || (exports.Utils = Utils = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/package.json" index f6d52d484b26e8e314d90989ee0a2a1e8ba964bd..3cf2ab720e4f7962e0d61128f859ef2d2a735129 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/node_modules/vscode-uri/package.json" @@ -1,3 +1,43 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d09b69a9f81addcaf2e162ab64bba0496726b7dd7cca17985163795eb7601633 -size 1214 +{ + "name": "vscode-uri", + "author": "Microsoft", + "version": "3.0.8", + "description": "The URI implementation that is used by VS Code and its extensions", + "main": "./lib/umd/index.js", + "typings": "./lib/umd/index", + "exports": { + "import": "./lib/esm/index.mjs", + "require": "./lib/umd/index.js", + "types": "./lib/umd/index.d.ts", + "browser": "./lib/esm/index.mjs" + }, + "sideEffects": false, + "scripts": { + "clean": "rimraf lib", + "pack-production": "webpack --mode=production", + "pack-dev": "webpack", + "compile": "tsc -p ./src", + "prepublish": "npm run pack-production", + "test": "tsc -p ./src && npm run pack-dev && mocha" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/microsoft/vscode-uri.git" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/microsoft/vscode-uri/issues" + }, + "homepage": "https://github.com/microsoft/vscode-uri#readme", + "devDependencies": { + "@types/mocha": "^10.0.2", + "@types/node": "16.x", + "mocha": "^10.2.0", + "path-browserify": "^1.0.1", + "rimraf": "^5.0.5", + "ts-loader": "^9.4.4", + "typescript": "^5.2.2", + "webpack": "^5.88.2", + "webpack-cli": "^5.1.4" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/package.json" index d0df13e25cf4197220fce47f68457c2ab2f802a4..08737bdc8d7818e249387d3b6a2ae97fcf321980 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/package.json" @@ -1,3 +1,50 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d69d368802bc08f580d26738c1c61c8afeec5656f61dddce8335ddf09ff4304d -size 2007 +{ + "name": "vscode-html-languageservice", + "version": "5.2.0", + "description": "Language service for HTML", + "main": "./lib/umd/htmlLanguageService.js", + "typings": "./lib/umd/htmlLanguageService", + "module": "./lib/esm/htmlLanguageService.js", + "author": "Microsoft Corporation", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-html-languageservice" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/Microsoft/vscode-html-languageservice" + }, + "devDependencies": { + "@types/mocha": "^10.0.6", + "@types/node": "16.x", + "@typescript-eslint/eslint-plugin": "^6.21.0", + "@typescript-eslint/parser": "^6.21.0", + "@vscode/web-custom-data": "^0.4.9", + "eslint": "^8.57.0", + "js-beautify": "^1.15.1", + "mocha": "^10.3.0", + "rimraf": "^5.0.5", + "typescript": "^5.3.3" + }, + "dependencies": { + "@vscode/l10n": "^0.0.18", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-languageserver-types": "^3.17.5", + "vscode-uri": "^3.0.8" + }, + "scripts": { + "prepack": "npm run clean && npm run compile-esm && npm run test && npm run remove-sourcemap-refs", + "compile": "tsc -p ./src && npm run copy-jsbeautify", + "compile-esm": "tsc -p ./src/tsconfig.esm.json", + "watch": "tsc -w -p ./src && npm run copy-jsbeautify", + "clean": "rimraf lib", + "remove-sourcemap-refs": "node ./build/remove-sourcemap-refs.js", + "test": "npm run compile && mocha --timeout 5000 ./lib/umd/test/*.js && npm run lint", + "lint": "eslint src/**/*.ts", + "install-types-next": "npm i vscode-languageserver-types@next -f -S && npm i vscode-languageserver-textdocument@next -f -S", + "copy-jsbeautify": "node ./build/copy-jsbeautify.js", + "update-jsbeautify": "npm i js-beautify && node ./build/update-jsbeautify.js", + "update-jsbeautify-next": "npm i js-beautify@next && node ./build/update-jsbeautify.js", + "update-data": "npm i @vscode/web-custom-data -D && node ./build/generateData.js" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/thirdpartynotices.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/thirdpartynotices.txt" index de52404a52b8564159f576086ea4ef86b18bd0c4..e61bd398490feb3201ebfbdb17611cc045925b6b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/thirdpartynotices.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-html-languageservice/thirdpartynotices.txt" @@ -1,3 +1,49 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6fac688548f02e656a57234c7f0cb4a74bd8645b4ef2c7a33f5117861b9f3de0 -size 2961 +THIRD-PARTY SOFTWARE NOTICES AND INFORMATION + +vscode-html-languageservice incorporates third party material from the projects listed below. The original copyright +notice and the license under which Microsoft received such third party material are set forth below. Microsoft +reserves all other rights not expressly granted, whether by implication, estoppel or otherwise. + +1. JS Beautifier (https://github.com/beautify-web/js-beautify) + +The MIT License (MIT) + +Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +2. HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/) + +%% HTML 5.1 W3C Working Draft NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright © 2015 W3C® (MIT, ERCIM, Keio, Beihang). This software or document includes material copied +from or derived from HTML 5.1 W3C Working Draft (http://www.w3.org/TR/2015/WD-html51-20151008/.) + +THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT +NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF +THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY +PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. + +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE +DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF. + +The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to this document or its contents +without specific, written prior permission. Title to copyright in this document will at all times remain with copyright holders. +========================================= +END OF HTML 5.1 W3C Working Draft NOTICES AND INFORMATION \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/dist/node/jsonServerMain.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/dist/node/jsonServerMain.js" index 06848a203d28fa82620edc219c6a87cbee4d6923..7db542065235a59b975bd21714b7254262b3229b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/dist/node/jsonServerMain.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/dist/node/jsonServerMain.js" @@ -1,3 +1,2 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:833304665859ce74c169b8d35952311d0da82849f615d5641b86bdf1380a7543 -size 334705 +(()=>{var e={5747:(e,t,n)=>{"use strict";var r,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,c={};((e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})})(c,{config:()=>f,t:()=>h}),e.exports=(r=c,((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of s(t))a.call(e,n)||undefined===n||o(e,n,{get:()=>t[n],enumerable:!(r=i(t,n))||r.enumerable});return e})(o({},"__esModule",{value:!0}),r));var u,l=n(9896),d=n(1943);function f(e){if("contents"in e)u="string"==typeof e.contents?JSON.parse(e.contents):e.contents;else if("fsPath"in e){const n=(t=e.fsPath,(0,l.readFileSync)(t,"utf8")),r=JSON.parse(n);u=g(r)?r.contents.bundle:r}else{var t;if(e.uri){let t=e.uri;return"string"==typeof e.uri&&(t=new URL(e.uri)),new Promise(((e,n)=>{(async function(e){if("file:"===e.protocol)return await(0,d.readFile)(e,"utf8");if("http:"===e.protocol||"https:"===e.protocol){const t=await fetch(e.toString(),{headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"},redirect:"follow"});if(!t.ok){let n=`Unexpected ${t.status} response while trying to read ${e}`;try{n+=`: ${await t.text()}`}catch{}throw new Error(n)}return await t.text()}throw new Error("Unsupported protocol")})(t).then((t=>{try{const n=JSON.parse(t);u=g(n)?n.contents.bundle:n,e()}catch(e){n(e)}})).catch((e=>{n(e)}))}))}}}function h(...e){const t=e[0];let n,r,o;if("string"==typeof t)n=t,r=t,e.splice(0,1),o=e&&"object"==typeof e[0]?e[0]:e;else{if(t instanceof Array){const n=e.slice(1);if(t.length!==n.length+1)throw new Error("expected a string as the first argument to l10n.t");let r=t[0];for(let e=1;e0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),o=t.args??{}}const i=u?.[n];return i?"string"==typeof i?m(i,o):i.comment?m(i.message,o):m(r,o):m(r,o)}var p=/{([^}]+)}/g;function m(e,t){return 0===Object.keys(t).length?e:e.replace(p,((e,n)=>t[n]??e))}function g(e){return!("object"!=typeof e?.contents?.bundle||"string"!=typeof e?.version)}},9323:(e,t,n)=>{(()=>{var e={46:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,{signal:n}={}){return new Promise(((r,o)=>{function i(){null==n||n.removeEventListener("abort",i),e.removeListener(t,s),e.removeListener("error",a)}function s(...e){i(),r(e)}function a(e){i(),o(e)}null==n||n.addEventListener("abort",i),e.on(t,s),e.on("error",a)}))}},54:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const o=n(361),i=r(n(374)),s=r(n(304)),a=i.default("agent-base");function c(){const{stack:e}=new Error;return"string"==typeof e&&e.split("\n").some((e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:")))}function u(e,t){return new u.Agent(e,t)}!function(e){class t extends o.EventEmitter{constructor(e,t){super();let n=t;"function"==typeof e?this.callback=e:e&&(n=e),this.timeout=null,n&&"number"==typeof n.timeout&&(this.timeout=n.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:c()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:c()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,n){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){const n=Object.assign({},t);"boolean"!=typeof n.secureEndpoint&&(n.secureEndpoint=c()),null==n.host&&(n.host="localhost"),null==n.port&&(n.port=n.secureEndpoint?443:80),null==n.protocol&&(n.protocol=n.secureEndpoint?"https:":"http:"),n.host&&n.path&&delete n.path,delete n.agent,delete n.hostname,delete n._defaultAgent,delete n.defaultPort,delete n.createConnection,e._last=!0,e.shouldKeepAlive=!1;let r=!1,o=null;const i=n.timeout||this.timeout,u=t=>{e._hadError||(e.emit("error",t),e._hadError=!0)},l=()=>{o=null,r=!0;const e=new Error(`A "socket" was not created for HTTP request before ${i}ms`);e.code="ETIMEOUT",u(e)},d=e=>{r||(null!==o&&(clearTimeout(o),o=null),u(e))},f=t=>{if(r)return;if(null!=o&&(clearTimeout(o),o=null),i=t,Boolean(i)&&"function"==typeof i.addRequest)return a("Callback returned another Agent instance %o",t.constructor.name),void t.addRequest(e,n);var i;if(t)return t.once("free",(()=>{this.freeSocket(t,n)})),void e.onSocket(t);const s=new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``);u(s)};if("function"==typeof this.callback){this.promisifiedCallback||(this.callback.length>=3?(a("Converting legacy callback function to promise"),this.promisifiedCallback=s.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof i&&i>0&&(o=setTimeout(l,i)),"port"in n&&"number"!=typeof n.port&&(n.port=Number(n.port));try{a("Resolving socket for %o request: %o",n.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,n)).then(f,d)}catch(e){Promise.reject(e).catch(d)}}else u(new Error("`callback` is not defined"))}freeSocket(e,t){a("Freeing socket %o %o",e.constructor.name,t),e.destroy()}destroy(){a("Destroying agent %o",this.constructor.name)}}e.Agent=t,e.prototype=e.Agent.prototype}(u||(u={})),e.exports=u},304:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n){return new Promise(((r,o)=>{e.call(this,t,n,((e,t)=>{e?o(e):r(t)}))}))}}},370:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(n(808)),s=o(n(404)),a=o(n(310)),c=o(n(374)),u=o(n(46)),l=n(54),d=(0,c.default)("http-proxy-agent");class f extends l.Agent{constructor(e){let t;if(t="string"==typeof e?a.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");d("Creating new HttpProxyAgent instance: %o",t),super(t);const n=Object.assign({},t);var r;this.secureProxy=t.secureProxy||"string"==typeof(r=n.protocol)&&/^https:?$/i.test(r),n.host=n.hostname||n.host,"string"==typeof n.port&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,t){return r(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:r}=this,o=a.default.parse(e.path);let c;if(o.protocol||(o.protocol="http:"),o.hostname||(o.hostname=t.hostname||t.host||null),null==o.port&&(t.port,1)&&(o.port=String(t.port)),"80"===o.port&&(o.port=""),e.path=a.default.format(o),n.auth&&e.setHeader("Proxy-Authorization",`Basic ${Buffer.from(n.auth).toString("base64")}`),r?(d("Creating `tls.Socket`: %o",n),c=s.default.connect(n)):(d("Creating `net.Socket`: %o",n),c=i.default.connect(n)),e._header){let t,n;d("Regenerating stored HTTP header string for request"),e._header=null,e._implicitHeader(),e.output&&e.output.length>0?(d("Patching connection write() output buffer with updated header"),t=e.output[0],n=t.indexOf("\r\n\r\n")+4,e.output[0]=e._header+t.substring(n),d("Output buffer: %o",e.output)):e.outputData&&e.outputData.length>0&&(d("Patching connection write() output buffer with updated header"),t=e.outputData[0].data,n=t.indexOf("\r\n\r\n")+4,e.outputData[0].data=e._header+t.substring(n),d("Output buffer: %o",e.outputData[0].data))}return yield(0,u.default)(c,"connect"),c}))}}t.default=f},201:function(e,t,n){"use strict";const r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(370));function o(e){return new r.default(e)}!function(e){e.HttpProxyAgent=r.default,e.prototype=r.default.prototype}(o||(o={})),e.exports=o},146:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(n(808)),s=o(n(404)),a=o(n(310)),c=o(n(491)),u=o(n(374)),l=n(54),d=o(n(829)),f=u.default("https-proxy-agent:agent");class h extends l.Agent{constructor(e){let t;if(t="string"==typeof e?a.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");f("creating new HttpsProxyAgent instance: %o",t),super(t);const n=Object.assign({},t);var r;this.secureProxy=t.secureProxy||"string"==typeof(r=n.protocol)&&/^https:?$/i.test(r),n.host=n.hostname||n.host,"string"==typeof n.port&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in n)&&(n.ALPNProtocols=["http 1.1"]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,t){return r(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:r}=this;let o;r?(f("Creating `tls.Socket`: %o",n),o=s.default.connect(n)):(f("Creating `net.Socket`: %o",n),o=i.default.connect(n));const a=Object.assign({},n.headers);let u=`CONNECT ${t.host}:${t.port} HTTP/1.1\r\n`;n.auth&&(a["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`);let{host:l,port:h,secureEndpoint:m}=t;(function(e,t){return Boolean(!t&&80===e||t&&443===e)})(h,m)||(l+=`:${h}`),a.Host=l,a.Connection="close";for(const e of Object.keys(a))u+=`${e}: ${a[e]}\r\n`;const g=d.default(o);o.write(`${u}\r\n`);const{statusCode:y,buffered:b}=yield g;if(200===y){if(e.once("socket",p),t.secureEndpoint){f("Upgrading socket connection to TLS");const e=t.servername||t.host;return s.default.connect(Object.assign(Object.assign({},function(e,...t){const n={};let r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}(t,"host","hostname","path","port")),{socket:o,servername:e}))}return o}o.destroy();const v=new i.default.Socket({writable:!1});return v.readable=!0,e.once("socket",(e=>{f("replaying proxy buffer for failed request"),c.default(e.listenerCount("data")>0),e.push(b),e.push(null)})),v}))}}function p(e){e.resume()}t.default=h},18:function(e,t,n){"use strict";const r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(146));function o(e){return new r.default(e)}!function(e){e.HttpsProxyAgent=r.default,e.prototype=r.default.prototype}(o||(o={})),e.exports=o},829:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(374)).default("https-proxy-agent:parse-proxy-response");t.default=function(e){return new Promise(((t,n)=>{let r=0;const i=[];function s(){const n=e.read();n?function(e){i.push(e),r+=e.length;const n=Buffer.concat(i,r);if(-1===n.indexOf("\r\n\r\n"))return o("have not received end of HTTP headers yet..."),void s();const a=n.toString("ascii",0,n.indexOf("\r\n")),c=+a.split(" ")[1];o("got proxy server response: %o",a),t({statusCode:c,buffered:n})}(n):e.once("readable",s)}function a(e){o("onclose had error %o",e)}function c(){o("onend")}e.on("error",(function t(r){e.removeListener("end",c),e.removeListener("error",t),e.removeListener("close",a),e.removeListener("readable",s),o("onerror %o",r),n(r)})),e.on("close",a),e.on("end",c),s()}))}},539:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=300&&r.statusCode<400&&e.followRedirects&&e.followRedirects>0&&r.headers.location){var i=r.headers.location;i.startsWith("/")&&(i=(0,c.format)({protocol:o.protocol,hostname:o.hostname,port:o.port,pathname:i})),n(y(function(e){for(var t=[],n=1;n=100&&s<200||204===s||304===s))){var h={flush:l.constants.Z_SYNC_FLUSH,finishFlush:l.constants.Z_SYNC_FLUSH};if("gzip"===f){var m=l.createGunzip(h);a.pipe(m),u=m}else if("deflate"===f){var g=l.createInflate(h);a.pipe(g),u=g}}var y=[];u.on("data",(function(e){return y.push(e)})),u.on("end",(function(){if(!d){if(d=!0,e.followRedirects>0&&(a.statusCode>=300&&a.statusCode<=303||307===a.statusCode)){var n=a.headers.location;if(n.startsWith("/")){var i=(0,c.parse)(e.url);n=(0,c.format)({protocol:i.protocol,hostname:i.hostname,port:i.port,pathname:n})}if(n){var s={type:e.type,url:n,user:e.user,password:e.password,headers:e.headers,timeout:e.timeout,followRedirects:e.followRedirects-1,data:e.data,token:e.token};return void(0,t.xhr)(s).then(r,o)}}var u=Buffer.concat(y),l={responseText:u.toString(),body:u,status:a.statusCode,headers:a.headers||{}};a.statusCode>=200&&a.statusCode<300||1223===a.statusCode?r(l):o(l)}})),u.on("error",(function(t){var n;n=b.is(t)?t:{responseText:p("error","Unable to access {0}. Error: {1}",e.url,t.message),body:Buffer.concat(y),status:500,headers:{}},d=!0,o(n)})),e.token&&(e.token.isCancellationRequested&&u.destroy(new b),e.token.onCancellationRequested((function(){u.destroy(new b)})))}))}),(function(t){var n;return n=b.is(t)?t:{responseText:e.agent?p("error.cannot.connect.proxy","Unable to connect to {0} through a proxy. Error: {1}",e.url,t.message):p("error.cannot.connect","Unable to connect to {0}. Error: {1}",e.url,t.message),body:Buffer.concat([]),status:404,headers:{}},Promise.reject(n)}))},t.getErrorStatusDescription=function(e){if(!(e<400))switch(e){case 400:return p("status.400","Bad request. The request cannot be fulfilled due to bad syntax.");case 401:return p("status.401","Unauthorized. The server is refusing to respond.");case 403:return p("status.403","Forbidden. The server is refusing to respond.");case 404:return p("status.404","Not Found. The requested location could not be found.");case 405:return p("status.405","Method not allowed. A request was made using a request method not supported by that location.");case 406:return p("status.406","Not Acceptable. The server can only generate a response that is not accepted by the client.");case 407:return p("status.407","Proxy Authentication Required. The client must first authenticate itself with the proxy.");case 408:return p("status.408","Request Timeout. The server timed out waiting for the request.");case 409:return p("status.409","Conflict. The request could not be completed because of a conflict in the request.");case 410:return p("status.410","Gone. The requested page is no longer available.");case 411:return p("status.411",'Length Required. The "Content-Length" is not defined.');case 412:return p("status.412","Precondition Failed. The precondition given in the request evaluated to false by the server.");case 413:return p("status.413","Request Entity Too Large. The server will not accept the request, because the request entity is too large.");case 414:return p("status.414","Request-URI Too Long. The server will not accept the request, because the URL is too long.");case 415:return p("status.415","Unsupported Media Type. The server will not accept the request, because the media type is not supported.");case 500:return p("status.500","Internal Server Error.");case 501:return p("status.501","Not Implemented. The server either does not recognize the request method, or it lacks the ability to fulfill the request.");case 502:return p("status.502","Bad Gateway. The upstream server did not respond.");case 503:return p("status.503","Service Unavailable. The server is currently unavailable (overloaded or down).");default:return p("status.416","HTTP status code {0}",e)}};var b=function(e){function t(){var n=e.call(this,"The user aborted a request")||this;return n.name="AbortError",Object.setPrototypeOf(n,t.prototype),n}return o(t,e),t.is=function(e){return e instanceof t},t}(Error)},800:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.localize=t.format=t.setPseudo=t.isPseudo=t.isDefined=t.BundleFormat=t.MessageFormat=void 0;var r,o,i,s=n(926);function a(e){return void 0!==e}function c(e,n){return t.isPseudo&&(e="["+e.replace(/[aouei]/g,"$&$&")+"]"),0===n.length?e:e.replace(/\{(\d+)\}/g,(function(e,t){var r=t[0],o=n[r],i=e;return"string"==typeof o?i=o:"number"!=typeof o&&"boolean"!=typeof o&&null!=o||(i=String(o)),i}))}(i=t.MessageFormat||(t.MessageFormat={})).file="file",i.bundle="bundle",i.both="both",(o=t.BundleFormat||(t.BundleFormat={})).standalone="standalone",o.languagePack="languagePack",function(e){e.is=function(e){var t=e;return t&&a(t.key)&&a(t.comment)}}(r||(r={})),t.isDefined=a,t.isPseudo=!1,t.setPseudo=function(e){t.isPseudo=e},t.format=c,t.localize=function(e,t){for(var n=[],r=2;r{"use strict";var n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},472:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.BundleFormat=t.MessageFormat=void 0;var r=n(17),o=n(147),i=n(926),s=n(800),a=n(800);Object.defineProperty(t,"MessageFormat",{enumerable:!0,get:function(){return a.MessageFormat}}),Object.defineProperty(t,"BundleFormat",{enumerable:!0,get:function(){return a.BundleFormat}});var c,u,l=Object.prototype.toString;function d(e){return"[object String]"===l.call(e)}function f(e){return JSON.parse(o.readFileSync(e,"utf8"))}function h(e){return function(t,n){for(var r=[],o=2;o=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: ".concat(new Error("").stack)):(0,s.format)(e[t],r):d(n)?(console.warn("Message ".concat(n," didn't get externalized correctly.")),(0,s.format)(n,r)):void console.error("Broken localize call found. Stacktrace is\n: ".concat(new Error("").stack))}}function p(e,t){return c[e]=t,t}function m(e){try{return function(e){var t=f(r.join(e,"nls.metadata.json")),n=Object.create(null);for(var o in t){var i=t[o];n[o]=i.messages}return n}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function g(e,t){var n;if(!0===u.languagePackSupport&&void 0!==u.cacheRoot&&void 0!==u.languagePackId&&void 0!==u.translationsConfigFile&&void 0!==u.translationsConfig)try{n=function(e,t){var n,i,s,a=r.join(u.cacheRoot,"".concat(e.id,"-").concat(e.hash,".json")),c=!1,l=!1;try{return n=JSON.parse(o.readFileSync(a,{encoding:"utf8",flag:"r"})),i=a,s=new Date,o.utimes(i,s,s,(function(){})),n}catch(e){if("ENOENT"===e.code)l=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: ".concat(e.message,".")),o.unlink(a,(function(e){e&&console.error("Deleting corrupted bundle ".concat(a," failed."))})),c=!0}}if(n=function(e,t){var n=u.translationsConfig[e.id];if(n){var o=f(n).contents,i=f(r.join(t,"nls.metadata.json")),s=Object.create(null);for(var a in i){var c=i[a],l=o["".concat(e.outDir,"/").concat(a)];if(l){for(var h=[],p=0;p0?t.substring(0,i):void 0}if(void 0===t&&(n=r.join(e,"nls.bundle.json"),o.existsSync(n)))return n}(t);if(i)try{return f(i)}catch(e){console.log("Loading in the box message bundle failed.",e)}n=m(t)}return n}function y(e){if(!e)return s.localize;var t=r.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.bundle){var n=function(e){for(var t,n=r.dirname(e);t=r.join(n,"nls.metadata.header.json"),!o.existsSync(t);){var i=r.dirname(n);if(i===n){t=void 0;break}n=i}return t}(e);if(n){var i=r.dirname(n),a=c[i];if(void 0===a)try{var l=JSON.parse(o.readFileSync(n,"utf8"));try{var d=g(l,i);a=p(i,d?{header:l,nlsBundle:d}:null)}catch(e){console.error("Failed to load nls bundle",e),a=p(i,null)}}catch(e){console.error("Failed to read header file",e),a=p(i,null)}if(a){var m=e.substr(i.length+1).replace(/\\/g,"/"),y=a.nlsBundle[m];return void 0===y?(console.error("Messages for file ".concat(e," not found. See console for details.")),function(){return"Messages not found."}):h(y)}}}if(u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.file)try{var b=f(function(e){var t;if(u.cacheLanguageResolution&&t);else{if(s.isPseudo||!u.language)t=".nls.json";else for(var n=u.language;n;){var r=".nls."+n+".json";if(o.existsSync(e+r)){t=r;break}var i=n.lastIndexOf("-");i>0?n=n.substring(0,i):(t=".nls.json",n=null)}u.cacheLanguageResolution}return e+t}(e));return Array.isArray(b)?h(b):(0,s.isDefined)(b.messages)&&(0,s.isDefined)(b.keys)?h(b.messages):(console.error("String bundle '".concat(e,"' uses an unsupported format.")),function(){return"File bundle has unsupported format. See console for details"})}catch(e){"ENOENT"!==e.code&&console.error("Failed to load single file bundle",e)}return console.error("Failed to load message bundle for file ".concat(e)),function(){return"Failed to load message bundle. See console for details."}}function b(e){return e&&(d(e.locale)&&(u.locale=e.locale.toLowerCase(),u.language=u.locale,c=Object.create(null)),void 0!==e.messageFormat&&(u.messageFormat=e.messageFormat),e.bundleFormat===s.BundleFormat.standalone&&!0===u.languagePackSupport&&(u.languagePackSupport=!1)),(0,s.setPseudo)("pseudo"===u.locale),y}!function(){if(u={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:s.MessageFormat.bundle},d(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0;if(e.availableLanguages){var n=e.availableLanguages["*"];d(n)&&(t=n)}if(d(e.locale)&&(u.locale=e.locale.toLowerCase()),void 0===t?u.language=u.locale:"en"!==t&&(u.language=t),function(e){return!0===e||!1===e}(e._languagePackSupport)&&(u.languagePackSupport=e._languagePackSupport),d(e._cacheRoot)&&(u.cacheRoot=e._cacheRoot),d(e._languagePackId)&&(u.languagePackId=e._languagePackId),d(e._translationsConfigFile)){u.translationsConfigFile=e._translationsConfigFile;try{u.translationsConfig=f(u.translationsConfigFile)}catch(t){if(e._corruptedFile){var i=r.dirname(e._corruptedFile);o.exists(i,(function(t){t&&o.writeFile(e._corruptedFile,"corrupted","utf8",(function(e){console.error(e)}))}))}}}}catch(e){}(0,s.setPseudo)("pseudo"===u.locale),c=Object.create(null)}(),t.loadMessageBundle=y,t.config=b,i.default.install(Object.freeze({loadMessageBundle:y,config:b}))},374:(e,t)=>{function n(){}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return n}},491:e=>{"use strict";e.exports=n(2613)},361:e=>{"use strict";e.exports=n(4434)},147:e=>{"use strict";e.exports=n(9896)},685:e=>{"use strict";e.exports=n(8611)},687:e=>{"use strict";e.exports=n(5692)},808:e=>{"use strict";e.exports=n(9278)},17:e=>{"use strict";e.exports=n(6928)},404:e=>{"use strict";e.exports=n(4756)},310:e=>{"use strict";e.exports=n(7016)},796:e=>{"use strict";e.exports=n(3106)}},r={},o=function t(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return e[n].call(i.exports,i,i.exports,t),i.exports}(539),i=t;for(var s in o)i[s]=o[s];o.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})()},7547:(e,t,n)=>{"use strict";function r(e,t=!1){const n=e.length;let r=0,a="",c=0,u=16,l=0,d=0,f=0,h=0,p=0;function m(t,n){let o=0,i=0;for(;o=48&&t<=57)i=16*i+t-48;else if(t>=65&&t<=70)i=16*i+t-65+10;else{if(!(t>=97&&t<=102))break;i=16*i+t-97+10}r++,o++}return o=n)return c=n,u=17;let t=e.charCodeAt(r);if(o(t)){do{r++,a+=String.fromCharCode(t),t=e.charCodeAt(r)}while(o(t));return u=15}if(i(t))return r++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,a+="\n"),l++,f=r,u=14;switch(t){case 123:return r++,u=1;case 125:return r++,u=2;case 91:return r++,u=3;case 93:return r++,u=4;case 58:return r++,u=6;case 44:return r++,u=5;case 34:return r++,a=function(){let t="",o=r;for(;;){if(r>=n){t+=e.substring(o,r),p=2;break}const s=e.charCodeAt(r);if(34===s){t+=e.substring(o,r),r++;break}if(92!==s){if(s>=0&&s<=31){if(i(s)){t+=e.substring(o,r),p=2;break}p=6}r++}else{if(t+=e.substring(o,r),r++,r>=n){p=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=m(4,!0);e>=0?t+=String.fromCharCode(e):p=4;break;default:p=5}o=r}}return t}(),u=10;case 47:const o=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;rr,scan:t?function(){let e;do{e=g()}while(e>=12&&e<=15);return e}:g,getToken:()=>u,getTokenValue:()=>a,getTokenOffset:()=>c,getTokenLength:()=>r-c,getTokenStartLine:()=>d,getTokenStartCharacter:()=>c-h,getTokenError:()=>p}}function o(e){return 32===e||9===e}function i(e){return 10===e||13===e}function s(e){return e>=48&&e<=57}var a;n.r(t),n.d(t,{ClientCapabilities:()=>Ze,CodeAction:()=>De,CodeActionContext:()=>Ce,CodeActionKind:()=>Te,Color:()=>E,ColorInformation:()=>N,ColorPresentation:()=>M,Command:()=>V,CompletionItem:()=>ue,CompletionItemKind:()=>re,CompletionItemTag:()=>ie,CompletionList:()=>le,Diagnostic:()=>$,DiagnosticSeverity:()=>L,DocumentHighlight:()=>ge,DocumentHighlightKind:()=>me,DocumentLink:()=>Pe,DocumentSymbol:()=>Se,DocumentUri:()=>R,ErrorCode:()=>Ge,FoldingRange:()=>q,FoldingRangeKind:()=>A,Hover:()=>fe,InsertTextFormat:()=>oe,Location:()=>_,MarkedString:()=>de,MarkupContent:()=>ne,MarkupKind:()=>te,Position:()=>w,Range:()=>P,SchemaDraft:()=>Ye,SelectionRange:()=>_e,SymbolInformation:()=>ve,SymbolKind:()=>ye,TextDocument:()=>Xe,TextDocumentEdit:()=>z,TextEdit:()=>W,VersionedTextDocumentIdentifier:()=>Z,WorkspaceEdit:()=>G,getLanguageService:()=>_n}),function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(a||(a={}));const c=new Array(20).fill(0).map(((e,t)=>" ".repeat(t))),u=200,l={" ":{"\n":new Array(u).fill(0).map(((e,t)=>"\n"+" ".repeat(t))),"\r":new Array(u).fill(0).map(((e,t)=>"\r"+" ".repeat(t))),"\r\n":new Array(u).fill(0).map(((e,t)=>"\r\n"+" ".repeat(t)))},"\t":{"\n":new Array(u).fill(0).map(((e,t)=>"\n"+"\t".repeat(t))),"\r":new Array(u).fill(0).map(((e,t)=>"\r"+"\t".repeat(t))),"\r\n":new Array(u).fill(0).map(((e,t)=>"\r\n"+"\t".repeat(t)))}},d=["\n","\r","\r\n"];function f(e,t){let n="";for(let r=0;re(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter()):()=>!0}function a(e){return e?()=>e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter(),(()=>i.slice())):()=>!0}function c(e){return e?t=>e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter()):()=>!0}function u(e){return e?t=>e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter(),(()=>i.slice())):()=>!0}const l=a(t.onObjectBegin),d=u(t.onObjectProperty),f=s(t.onObjectEnd),h=a(t.onArrayBegin),m=s(t.onArrayEnd),g=u(t.onLiteralValue),y=c(t.onSeparator),b=s(t.onComment),v=c(t.onError),k=n&&n.disallowComments,S=n&&n.allowTrailingComma;function T(){for(;;){const e=o.scan();switch(o.getTokenError()){case 4:R(14);break;case 5:R(15);break;case 3:R(13);break;case 1:k||R(11);break;case 2:R(12);break;case 6:R(16)}switch(e){case 12:case 13:k?R(10):b();break;case 16:R(1);break;case 15:case 14:break;default:return e}}}function R(e,t=[],n=[]){if(v(e),t.length+n.length>0){let e=o.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){T();break}if(-1!==n.indexOf(e))break;e=T()}}}function C(e){const t=o.getTokenValue();return e?g(t):(d(t),i.push(t)),T(),!0}T(),17===o.getToken()?!!n.allowEmptyContent||R(4,[],[]):function e(){switch(o.getToken()){case 3:return function(){h(),T();let t=!0,n=!1;for(;4!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(n||R(4,[],[]),y(","),T(),4===o.getToken()&&S)break}else n&&R(6,[],[]);t?(i.push(0),t=!1):i[i.length-1]++,e()||R(4,[],[4,5]),n=!0}return m(),t||i.pop(),4!==o.getToken()?R(8,[4],[]):T(),!0}();case 1:return function(){l(),T();let t=!1;for(;2!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(t||R(4,[],[]),y(","),T(),2===o.getToken()&&S)break}else t&&R(6,[],[]);(10!==o.getToken()?(R(3,[],[2,5]),0):(C(!1),6===o.getToken()?(y(":"),T(),e()||R(4,[],[2,5])):R(5,[],[2,5]),i.pop(),1))||R(4,[],[2,5]),t=!0}return f(),2!==o.getToken()?R(7,[2],[]):T(),!0}();case 10:return C(!0);default:return function(){switch(o.getToken()){case 11:const e=o.getTokenValue();let t=Number(e);isNaN(t)&&(R(2),t=0),g(t);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return T(),!0}()}}()?17!==o.getToken()&&R(9,[],[]):R(4,[],[])}(e,{onObjectBegin:()=>{const e={};a(e),s.push(i),i=e,o=null},onObjectProperty:e=>{o=e},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const e=[];a(e),s.push(i),i=e,o=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),i[0]},v=function e(t,n,r=!1){if(function(e,t,n=!1){return t>=e.offset&&t0?e.lastIndexOf(t)===n:0===n&&e===t}function st(e){let t="";(function(e,t){if(e.length<4)return!1;for(let n=0;n<4;n++)if(e[n]!==t[n])return!1;return!0})(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch(n){try{return new RegExp(e,t)}catch(e){return}}}function at(e){let t=0;for(let n=0;n0&&(r.arguments=n),r},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.title)&&Je.string(t.command)}}(V||(V={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.string(t.newText)&&P.is(t.range)}}(W||(W={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.string(t.label)&&(Je.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Je.string(t.description)||void 0===t.description)}}(U||(U={})),function(e){e.is=function(e){const t=e;return Je.string(t)}}(H||(H={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return W.is(t)&&(U.is(t.annotationId)||H.is(t.annotationId))}}(B||(B={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Je.defined(t)&&Q.is(t.textDocument)&&Array.isArray(t.edits)}}(z||(z={})),function(e){e.create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"create"===t.kind&&Je.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Je.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Je.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||H.is(t.annotationId))}}(K||(K={})),function(e){e.create=function(e,t,n,r){let o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==r&&(o.annotationId=r),o},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Je.string(t.oldUri)&&Je.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Je.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Je.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||H.is(t.annotationId))}}(J||(J={})),function(e){e.create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Je.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Je.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Je.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||H.is(t.annotationId))}}(X||(X={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Je.string(e.kind)?K.is(e)||J.is(e)||X.is(e):z.is(e))))}}(G||(G={})),function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.uri)}}(Y||(Y={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.uri)&&Je.integer(t.version)}}(Z||(Z={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.uri)&&(null===t.version||Je.integer(t.version))}}(Q||(Q={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.uri)&&Je.string(t.languageId)&&Je.integer(t.version)&&Je.string(t.text)}}(ee||(ee={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(te||(te={})),function(e){e.is=function(e){const t=e;return Je.objectLiteral(e)&&te.is(t.kind)&&Je.string(t.value)}}(ne||(ne={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(re||(re={})),function(e){e.PlainText=1,e.Snippet=2}(oe||(oe={})),function(e){e.Deprecated=1}(ie||(ie={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Je.string(t.newText)&&P.is(t.insert)&&P.is(t.replace)}}(se||(se={})),function(e){e.asIs=1,e.adjustIndentation=2}(ae||(ae={})),function(e){e.is=function(e){const t=e;return t&&(Je.string(t.detail)||void 0===t.detail)&&(Je.string(t.description)||void 0===t.description)}}(ce||(ce={})),function(e){e.create=function(e){return{label:e}}}(ue||(ue={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(le||(le={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Je.string(t)||Je.objectLiteral(t)&&Je.string(t.language)&&Je.string(t.value)}}(de||(de={})),function(e){e.is=function(e){let t=e;return!!t&&Je.objectLiteral(t)&&(ne.is(t.contents)||de.is(t.contents)||Je.typedArray(t.contents,de.is))&&(void 0===e.range||P.is(e.range))}}(fe||(fe={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(he||(he={})),function(e){e.create=function(e,t,...n){let r={label:e};return Je.defined(t)&&(r.documentation=t),Je.defined(n)?r.parameters=n:r.parameters=[],r}}(pe||(pe={})),function(e){e.Text=1,e.Read=2,e.Write=3}(me||(me={})),function(e){e.create=function(e,t){let n={range:e};return Je.number(t)&&(n.kind=t),n}}(ge||(ge={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(ye||(ye={})),function(e){e.Deprecated=1}(be||(be={})),function(e){e.create=function(e,t,n,r,o){let i={name:e,kind:t,location:{uri:r,range:n}};return o&&(i.containerName=o),i}}(ve||(ve={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(ke||(ke={})),function(e){e.create=function(e,t,n,r,o,i){let s={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==i&&(s.children=i),s},e.is=function(e){let t=e;return t&&Je.string(t.name)&&Je.number(t.kind)&&P.is(t.range)&&P.is(t.selectionRange)&&(void 0===t.detail||Je.string(t.detail))&&(void 0===t.deprecated||Je.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(Se||(Se={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(Te||(Te={})),function(e){e.Invoked=1,e.Automatic=2}(Re||(Re={})),function(e){e.create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){let t=e;return Je.defined(t)&&Je.typedArray(t.diagnostics,$.is)&&(void 0===t.only||Je.typedArray(t.only,Je.string))&&(void 0===t.triggerKind||t.triggerKind===Re.Invoked||t.triggerKind===Re.Automatic)}}(Ce||(Ce={})),function(e){e.create=function(e,t,n){let r={title:e},o=!0;return"string"==typeof t?(o=!1,r.kind=t):V.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},e.is=function(e){let t=e;return t&&Je.string(t.title)&&(void 0===t.diagnostics||Je.typedArray(t.diagnostics,$.is))&&(void 0===t.kind||Je.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||V.is(t.command))&&(void 0===t.isPreferred||Je.boolean(t.isPreferred))&&(void 0===t.edit||G.is(t.edit))}}(De||(De={})),function(e){e.create=function(e,t){let n={range:e};return Je.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Je.defined(t)&&P.is(t.range)&&(Je.undefined(t.command)||V.is(t.command))}}(xe||(xe={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Je.defined(t)&&Je.uinteger(t.tabSize)&&Je.boolean(t.insertSpaces)}}(we||(we={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Je.defined(t)&&P.is(t.range)&&(Je.undefined(t.target)||Je.string(t.target))}}(Pe||(Pe={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Je.objectLiteral(n)&&P.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(_e||(_e={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(Oe||(Oe={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(Ee||(Ee={})),function(e){e.is=function(e){const t=e;return Je.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(Ne||(Ne={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&P.is(t.range)&&Je.string(t.text)}}(Me||(Me={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&P.is(t.range)&&Je.boolean(t.caseSensitiveLookup)&&(Je.string(t.variableName)||void 0===t.variableName)}}(Ae||(Ae={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&P.is(t.range)&&(Je.string(t.expression)||void 0===t.expression)}}(qe||(qe={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Je.defined(t)&&P.is(e.stoppedLocation)}}(je||(je={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(Le||(Le={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&(void 0===t.tooltip||Je.string(t.tooltip)||ne.is(t.tooltip))&&(void 0===t.location||_.is(t.location))&&(void 0===t.command||V.is(t.command))}}(Ie||(Ie={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return Je.objectLiteral(t)&&w.is(t.position)&&(Je.string(t.label)||Je.typedArray(t.label,Ie.is))&&(void 0===t.kind||Le.is(t.kind))&&void 0===t.textEdits||Je.typedArray(t.textEdits,W.is)&&(void 0===t.tooltip||Je.string(t.tooltip)||ne.is(t.tooltip))&&(void 0===t.paddingLeft||Je.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Je.boolean(t.paddingRight))}}(Fe||(Fe={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}($e||($e={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(Ve||(Ve={})),function(e){e.create=function(e){return{items:e}}}(We||(We={})),function(e){e.Invoked=0,e.Automatic=1}(Ue||(Ue={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(He||(He={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(Be||(Be={})),function(e){e.is=function(e){const t=e;return Je.objectLiteral(t)&&C.is(t.uri)&&Je.string(t.name)}}(ze||(ze={})),function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,o=e.slice(0,r),i=e.slice(r);t(o,n),t(i,n);let s=0,a=0,c=0;for(;s{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),i=r.length;for(let t=o.length-1;t>=0;t--){let n=o[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+n.newText+r.substring(a,r.length),i=s}return r}}(Ke||(Ke={}));class ct{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return w.create(0,e);for(;ne?r=o:n=o+1}let o=n-1;return w.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1e?r=o:n=o+1}let o=n-1;return{line:o,character:e-t[o]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function ht(e){const t=ft(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new ut(e,t,n,r)},e.update=function(e,t,n){if(e instanceof ut)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){let n=e.getText(),r=lt(t.map(ht),((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),o=0;const i=[];for(const t of r){let r=e.offsetAt(t.range.start);if(ro&&i.push(n.substring(o,r)),t.newText.length&&i.push(t.newText),o=e.offsetAt(t.range.end)}return i.push(n.substr(o)),i.join("")}}(Xe||(Xe={})),function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",e[e.SchemaResolveError=768]="SchemaResolveError",e[e.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature"}(Ge||(Ge={})),function(e){e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v6=6]="v6",e[e.v7=7]="v7",e[e.v2019_09=19]="v2019_09",e[e.v2020_12=20]="v2020_12"}(Ye||(Ye={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[te.Markdown,te.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}}(Ze||(Ze={}));var pt=n(5747);const mt={"color-hex":{errorMessage:pt.t("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:pt.t("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:pt.t("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:pt.t("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:pt.t("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:pt.t("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:pt.t("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:pt.t("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}};class gt{constructor(e,t,n=0){this.offset=t,this.length=n,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}}class yt extends gt{constructor(e,t){super(e,t),this.type="null",this.value=null}}class bt extends gt{constructor(e,t,n){super(e,n),this.type="boolean",this.value=t}}class vt extends gt{constructor(e,t){super(e,t),this.type="array",this.items=[]}get children(){return this.items}}class kt extends gt{constructor(e,t){super(e,t),this.type="number",this.isInteger=!0,this.value=Number.NaN}}class St extends gt{constructor(e,t,n){super(e,t,n),this.type="string",this.value=""}}class Tt extends gt{constructor(e,t,n){super(e,t),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}}class Rt extends gt{constructor(e,t){super(e,t),this.type="object",this.properties=[]}get children(){return this.properties}}function Ct(e){return nt(e)?e?{}:{not:{}}:e}var Dt;!function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"}(Dt||(Dt={}));const xt={"http://json-schema.org/draft-03/schema#":Ye.v3,"http://json-schema.org/draft-04/schema#":Ye.v4,"http://json-schema.org/draft-06/schema#":Ye.v6,"http://json-schema.org/draft-07/schema#":Ye.v7,"https://json-schema.org/draft/2019-09/schema":Ye.v2019_09,"https://json-schema.org/draft/2020-12/schema":Ye.v2020_12};class wt{constructor(e){this.schemaDraft=e}}class Pt{constructor(e=-1,t){this.focusOffset=e,this.exclude=t,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(-1===this.focusOffset||Mt(e,this.focusOffset))&&e!==this.exclude}newSub(){return new Pt(-1,this.exclude)}}class _t{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}}_t.instance=new _t;class Ot{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches+=e.propertiesMatches,this.propertiesValueMatches+=e.propertiesValueMatches,this.mergeProcessedProperties(e)}mergeEnumValues(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(const e of this.problems)e.code===Ge.EnumValueMismatch&&(e.message=pt.t("Value is not accepted. Valid values: {0}.",this.enumValues.map((e=>JSON.stringify(e))).join(", ")))}}mergePropertyMatch(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach((e=>this.processedProperties.add(e)))}compare(e){const t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}}function Et(e){return S(e)}function Nt(e){return k(e)}function Mt(e,t,n=!1){return t>=e.offset&&t{let r=e(n);const o=n.children;if(Array.isArray(o))for(let e=0;e{const r=P.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return $.create(r,t.message,t.severity??n,t.code)}))}}getMatchingSchemas(e,t=-1,n){if(this.root&&e){const r=new Pt(t,n),o=qt(e),i=new wt(o);return jt(this.root,e,new Ot,r,i),r.schemas}return[]}}function qt(e,t=Ye.v2020_12){let n=e.$schema;return n?xt[n]??t:t}function jt(e,t,n,r,o){if(!e||!r.include(e))return;if("property"===e.type)return jt(e.valueNode,t,n,r,o);const i=e;switch(function(){function e(e){return i.type===e||"integer"===e&&"number"===i.type&&i.isInteger}if(Array.isArray(t.type)?t.type.some(e)||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||pt.t("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(e(t.type)||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||pt.t('Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(const e of t.allOf){const t=new Ot,s=r.newSub();jt(i,Ct(e),t,s,o),n.merge(t),r.merge(s)}const s=Ct(t.not);if(s){const e=new Ot,a=r.newSub();jt(i,s,e,a,o),e.hasProblems()||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||pt.t("Matches a schema that is not allowed.")});for(const e of a.schemas)e.inverted=!e.inverted,r.add(e)}const a=(e,t)=>{const s=[];let a;for(const n of e){const e=Ct(n),c=new Ot,u=r.newSub();if(jt(i,e,c,u,o),c.hasProblems()||s.push(e),a)if(t||c.hasProblems()||a.validationResult.hasProblems()){const t=c.compare(a.validationResult);t>0?a={schema:e,validationResult:c,matchingSchemas:u}:0===t&&(a.matchingSchemas.merge(u),a.validationResult.mergeEnumValues(c))}else a.matchingSchemas.merge(u),a.validationResult.propertiesMatches+=c.propertiesMatches,a.validationResult.propertiesValueMatches+=c.propertiesValueMatches,a.validationResult.mergeProcessedProperties(c);else a={schema:e,validationResult:c,matchingSchemas:u}}return s.length>1&&t&&n.problems.push({location:{offset:i.offset,length:1},message:pt.t("Matches multiple schemas when only one must validate.")}),a&&(n.merge(a.validationResult),r.merge(a.matchingSchemas)),s.length};Array.isArray(t.anyOf)&&a(t.anyOf,!1),Array.isArray(t.oneOf)&&a(t.oneOf,!0);const c=e=>{const t=new Ot,s=r.newSub();jt(i,Ct(e),t,s,o),n.merge(t),r.merge(s)},u=Ct(t.if);if(u&&((e,t,s)=>{const a=Ct(e),u=new Ot,l=r.newSub();jt(i,a,u,l,o),r.merge(l),n.mergeProcessedProperties(u),u.hasProblems()?s&&c(s):t&&c(t)})(u,Ct(t.then),Ct(t.else)),Array.isArray(t.enum)){const e=Et(i);let r=!1;for(const n of t.enum)if(Qe(e,n)){r=!0;break}n.enumValues=t.enum,n.enumValueMatch=r,r||n.problems.push({location:{offset:i.offset,length:i.length},code:Ge.EnumValueMismatch,message:t.errorMessage||pt.t("Value is not accepted. Valid values: {0}.",t.enum.map((e=>JSON.stringify(e))).join(", "))})}tt(t.const)&&(Qe(Et(i),t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:i.offset,length:i.length},code:Ge.EnumValueMismatch,message:t.errorMessage||pt.t("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]);let l=t.deprecationMessage;if(l||t.deprecated){l=l||pt.t("Value is deprecated");let e="property"===i.parent?.type?i.parent:i;n.problems.push({location:{offset:e.offset,length:e.length},severity:L.Warning,message:l,code:Ge.Deprecated})}}(),i.type){case"object":!function(e){const i=Object.create(null),s=new Set;for(const t of e.properties){const e=t.keyNode.value;i[e]=t.valueNode,s.add(e)}if(Array.isArray(t.required))for(const r of t.required)if(!i[r]){const t=e.parent&&"property"===e.parent.type&&e.parent.keyNode,o=t?{offset:t.offset,length:t.length}:{offset:e.offset,length:1};n.problems.push({location:o,message:pt.t('Missing property "{0}".',r)})}const a=e=>{s.delete(e),n.processedProperties.add(e)};if(t.properties)for(const e of Object.keys(t.properties)){a(e);const s=t.properties[e],c=i[e];if(c)if(nt(s))if(s)n.propertiesMatches++,n.propertiesValueMatches++;else{const r=c.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||pt.t("Property {0} is not allowed.",e)})}else{const e=new Ot;jt(c,s,e,r,o),n.mergePropertyMatch(e)}}if(t.patternProperties)for(const e of Object.keys(t.patternProperties)){const c=st(e);if(c){const u=[];for(const a of s)if(c.test(a)){u.push(a);const s=i[a];if(s){const i=t.patternProperties[e];if(nt(i))if(i)n.propertiesMatches++,n.propertiesValueMatches++;else{const e=s.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||pt.t("Property {0} is not allowed.",a)})}else{const e=new Ot;jt(s,i,e,r,o),n.mergePropertyMatch(e)}}}u.forEach(a)}}const c=t.additionalProperties;if(void 0!==c)for(const e of s){a(e);const s=i[e];if(s)if(!1===c){const r=s.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||pt.t("Property {0} is not allowed.",e)})}else if(!0!==c){const e=new Ot;jt(s,c,e,r,o),n.mergePropertyMatch(e)}}const u=t.unevaluatedProperties;if(void 0!==u){const e=[];for(const a of s)if(!n.processedProperties.has(a)){e.push(a);const s=i[a];if(s)if(!1===u){const e=s.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||pt.t("Property {0} is not allowed.",a)})}else if(!0!==u){const e=new Ot;jt(s,u,e,r,o),n.mergePropertyMatch(e)}}e.forEach(a)}if(et(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Object has more properties than limit of {0}.",t.maxProperties)}),et(t.minProperties)&&e.properties.length=Ye.v2020_12?(i=t.prefixItems,s=Array.isArray(t.items)?void 0:t.items):(i=Array.isArray(t.items)?t.items:void 0,s=Array.isArray(t.items)?t.additionalItems:t.items);let a=0;if(void 0!==i){const l=Math.min(i.length,e.items.length);for(;a=Ye.v2020_12&&n.processedProperties.add(String(g)))}0!==m||et(t.minContains)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||pt.t("Array does not contain required item.")}),et(t.minContains)&&mt.maxContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||pt.t("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}const u=t.unevaluatedItems;if(void 0!==u)for(let v=0;vt.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Array has too many items. Expected {0} or fewer.",t.maxItems)}),!0===t.uniqueItems){const S=Et(e);function T(){for(let e=0;et.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("String is longer than the maximum length of {0}.",t.maxLength)}),rt(t.pattern)){const r=st(t.pattern);r?.test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||pt.t('String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":{let r;if(e.value){const n=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);n?n[2]||"uri"!==t.format||(r=pt.t("URI with a scheme is expected.")):r=pt.t("URI is expected.")}else r=pt.t("URI expected.");r&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||pt.t("String is not a URI: {0}",r)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":const r=mt[t.format];e.value&&r.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||r.errorMessage})}}(i);break;case"number":!function(e){const r=e.value;function o(e){const t=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(e.toString());return t&&{value:Number(t[1]+(t[2]||"")),multiplier:(t[2]?.length||0)-(parseInt(t[3])||0)}}if(et(t.multipleOf)){let i=-1;if(Number.isInteger(t.multipleOf))i=r%t.multipleOf;else{let e=o(t.multipleOf),n=o(r);if(e&&n){const t=10**Math.abs(n.multiplier-e.multiplier);n.multiplier=c&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Value is above the exclusive maximum of {0}.",c)});const u=s(t.minimum,t.exclusiveMinimum);et(u)&&rl&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Value is above the maximum of {0}.",l)})}(i)}r.add({node:i,schema:t})}function Lt(e,t,n){if(null!==e&&"object"==typeof e){const r=t+"\t";if(Array.isArray(e)){if(0===e.length)return"[]";let o="[\n";for(let t=0;t=0;t--){const n=this.contributions[t].resolveCompletion;if(n){const t=n(e);if(t)return t}}return this.promiseConstructor.resolve(e)}doComplete(e,t,n){const r={items:[],isIncomplete:!1},o=e.getText(),i=e.offsetAt(t);let s=n.getNodeFromOffset(i,!0);if(this.isInComment(e,s?s.offset:0,i))return Promise.resolve(r);if(s&&i===s.offset+s.length&&i>0){const e=o[i-1];("object"===s.type&&"}"===e||"array"===s.type&&"]"===e)&&(s=s.parent)}const a=this.getCurrentWord(e,i);let c;if(!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type){let n=i-a.length;n>0&&'"'===o[n-1]&&n--,c=P.create(e.positionAt(n),t)}else c=P.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length));const u=new Map,l={add:e=>{let t=e.label;const n=u.get(t);if(n)n.documentation||(n.documentation=e.documentation),n.detail||(n.detail=e.detail),n.labelDetails||(n.labelDetails=e.labelDetails);else{if(t=t.replace(/[\n]/g,"↵"),t.length>60){const e=t.substr(0,57).trim()+"...";u.has(e)||(t=e)}e.textEdit=W.replace(c,e.insertText),e.label=t,u.set(t,e),r.items.push(e)}},setAsIncomplete:()=>{r.isIncomplete=!0},error:e=>{console.error(e)},getNumberOfProposals:()=>r.items.length};return this.schemaService.getSchemaForResource(e.uri,n).then((t=>{const d=[];let f,h=!0,p="";if(s&&"string"===s.type){const e=s.parent;e&&"property"===e.type&&e.keyNode===s&&(h=!e.valueNode,f=e,p=o.substr(s.offset+1,s.length-2),e&&(s=e.parent))}if(s&&"object"===s.type){if(s.offset===i)return r;s.properties.forEach((e=>{f&&f===e||u.set(e.keyNode.value,ue.create("__"))}));let m="";h&&(m=this.evaluateSeparatorAfter(e,e.offsetAt(c.end))),t?this.getPropertyCompletions(t,n,s,h,m,l):this.getSchemaLessPropertyCompletions(n,s,p,l);const g=Nt(s);this.contributions.forEach((t=>{const n=t.collectPropertyCompletions(e.uri,g,a,h,""===m,l);n&&d.push(n)})),!t&&a.length>0&&'"'!==o.charAt(i-a.length-1)&&(l.add({kind:re.Property,label:this.getLabelForValue(a),insertText:this.getInsertTextForProperty(a,void 0,!1,m),insertTextFormat:oe.Snippet,documentation:""}),l.setAsIncomplete())}const m={};return t?this.getValueCompletions(t,n,s,i,e,l,m):this.getSchemaLessValueCompletions(n,s,i,e,l),this.contributions.length>0&&this.getContributedValueCompletions(n,s,i,e,l,d),this.promiseConstructor.all(d).then((()=>{if(0===l.getNumberOfProposals()){let t=i;!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type||(t=s.offset+s.length);const n=this.evaluateSeparatorAfter(e,t);this.addFillerValueCompletions(m,n,l)}return r}))}))}getPropertyCompletions(e,t,n,r,o,i){t.getMatchingSchemas(e.schema,n.offset).forEach((e=>{if(e.node===n&&!e.inverted){const t=e.schema.properties;t&&Object.keys(t).forEach((e=>{const n=t[e];if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const t={kind:re.Property,label:e,insertText:this.getInsertTextForProperty(e,n,r,o),insertTextFormat:oe.Snippet,filterText:this.getFilterTextForValue(e),documentation:this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(t.sortText=n.suggestSortText),t.insertText&&it(t.insertText,`$1${o}`)&&(t.command={title:"Suggest",command:"editor.action.triggerSuggest"}),i.add(t)}}));const n=e.schema.propertyNames;if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const e=(e,t=void 0)=>{const s={kind:re.Property,label:e,insertText:this.getInsertTextForProperty(e,void 0,r,o),insertTextFormat:oe.Snippet,filterText:this.getFilterTextForValue(e),documentation:t||this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(s.sortText=n.suggestSortText),s.insertText&&it(s.insertText,`$1${o}`)&&(s.command={title:"Suggest",command:"editor.action.triggerSuggest"}),i.add(s)};if(n.enum)for(let t=0;t{e.properties.forEach((e=>{const t=e.keyNode.value;r.add({kind:re.Property,label:t,insertText:this.getInsertTextForValue(t,""),insertTextFormat:oe.Snippet,filterText:this.getFilterTextForValue(t),documentation:""})}))};if(t.parent)if("property"===t.parent.type){const n=t.parent.keyNode.value;e.visit((e=>("property"===e.type&&e!==t.parent&&e.keyNode.value===n&&e.valueNode&&"object"===e.valueNode.type&&o(e.valueNode),!0)))}else"array"===t.parent.type&&t.parent.items.forEach((e=>{"object"===e.type&&e!==t&&o(e)}));else"object"===t.type&&r.add({kind:re.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:oe.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,t,n,r,o){let i=n;if(!t||"string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(i=t.offset+t.length,t=t.parent),!t)return o.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:oe.Snippet,documentation:""}),void o.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:oe.Snippet,documentation:""});const s=this.evaluateSeparatorAfter(r,i),a=e=>{e.parent&&!Mt(e.parent,n,!0)&&o.add({kind:this.getSuggestionKind(e.type),label:this.getLabelTextForMatchingNode(e,r),insertText:this.getInsertTextForMatchingNode(e,r,s),insertTextFormat:oe.Snippet,documentation:""}),"boolean"===e.type&&this.addBooleanValueCompletion(!e.value,s,o)};if("property"===t.type&&n>(t.colonOffset||0)){const r=t.valueNode;if(r&&(n>r.offset+r.length||"object"===r.type||"array"===r.type))return;const i=t.keyNode.value;e.visit((e=>("property"===e.type&&e.keyNode.value===i&&e.valueNode&&a(e.valueNode),!0))),"$schema"===i&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(s,o)}if("array"===t.type)if(t.parent&&"property"===t.parent.type){const n=t.parent.keyNode.value;e.visit((e=>("property"===e.type&&e.keyNode.value===n&&e.valueNode&&"array"===e.valueNode.type&&e.valueNode.items.forEach(a),!0)))}else t.items.forEach(a)}getValueCompletions(e,t,n,r,o,i,s){let a,c,u=r;if(!n||"string"!==n.type&&"number"!==n.type&&"boolean"!==n.type&&"null"!==n.type||(u=n.offset+n.length,c=n,n=n.parent),n){if("property"===n.type&&r>(n.colonOffset||0)){const e=n.valueNode;if(e&&r>e.offset+e.length)return;a=n.keyNode.value,n=n.parent}if(n&&(void 0!==a||"array"===n.type)){const l=this.evaluateSeparatorAfter(o,u),d=t.getMatchingSchemas(e.schema,n.offset,c);for(const e of d)if(e.node===n&&!e.inverted&&e.schema){if("array"===n.type&&e.schema.items){let t=i;if(e.schema.uniqueItems){const e=new Set;n.children.forEach((t=>{"array"!==t.type&&"object"!==t.type&&e.add(this.getLabelForValue(Et(t)))})),t={...i,add(t){e.has(t.label)||i.add(t)}}}if(Array.isArray(e.schema.items)){const i=this.findItemAtOffset(n,o,r);i(t.colonOffset||0)){const e=t.keyNode.value,s=t.valueNode;if((!s||n<=s.offset+s.length)&&t.parent){const n=Nt(t.parent);this.contributions.forEach((t=>{const s=t.collectValueCompletions(r.uri,n,e,o);s&&i.push(s)}))}}}else this.contributions.forEach((e=>{const t=e.collectDefaultCompletions(r.uri,o);t&&i.push(t)}))}addSchemaValueCompletions(e,t,n,r){"object"==typeof e&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),Array.isArray(e.allOf)&&e.allOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,r))),Array.isArray(e.anyOf)&&e.anyOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,r))),Array.isArray(e.oneOf)&&e.oneOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,r))))}addDefaultValueCompletions(e,t,n,r=0){let o=!1;if(tt(e.default)){let i=e.type,s=e.default;for(let e=r;e>0;e--)s=[s],i="array";const a={kind:this.getSuggestionKind(i),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,t),insertTextFormat:oe.Snippet};this.doesSupportsLabelDetails()?a.labelDetails={description:pt.t("Default value")}:a.detail=pt.t("Default value"),n.add(a),o=!0}Array.isArray(e.examples)&&e.examples.forEach((i=>{let s=e.type,a=i;for(let e=r;e>0;e--)a=[a],s="array";n.add({kind:this.getSuggestionKind(s),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,t),insertTextFormat:oe.Snippet}),o=!0})),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach((i=>{let s,a,c=e.type,u=i.body,l=i.label;if(tt(u)){let n=e.type;for(let e=r;e>0;e--)u=[u],n="array";s=this.getInsertTextForSnippetValue(u,t),a=this.getFilterTextForSnippetValue(u),l=l||this.getLabelForSnippetValue(u)}else{if("string"!=typeof i.bodyText)return;{let e="",n="",o="";for(let t=r;t>0;t--)e=e+o+"[\n",n=n+"\n"+o+"]",o+="\t",c="array";s=e+o+i.bodyText.split("\n").join("\n"+o)+n+t,l=l||s,a=s.replace(/[\n]/g,"")}}n.add({kind:this.getSuggestionKind(c),label:l,documentation:this.fromMarkup(i.markdownDescription)||i.description,insertText:s,insertTextFormat:oe.Snippet,filterText:a}),o=!0})),!o&&"object"==typeof e.items&&!Array.isArray(e.items)&&r<5&&this.addDefaultValueCompletions(e.items,t,n,r+1)}addEnumValueCompletions(e,t,n){if(tt(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:oe.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let r=0,o=e.enum.length;rt[e]=!0)):n&&(t[n]=!0)}addFillerValueCompletions(e,t,n){e.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},t),insertTextFormat:oe.Snippet,detail:pt.t("New object"),documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:oe.Snippet,detail:pt.t("New array"),documentation:""})}addBooleanValueCompletion(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:oe.Snippet,documentation:""})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:oe.Snippet,documentation:""})}addDollarSchemaCompletions(e,t){this.schemaService.getRegisteredSchemaIds((e=>"http"===e||"https"===e)).forEach((n=>{n.startsWith("http://json-schema.org/draft-")&&(n+="#"),t.add({kind:re.Module,label:this.getLabelForValue(n),filterText:this.getFilterTextForValue(n),insertText:this.getInsertTextForValue(n,e),insertTextFormat:oe.Snippet,documentation:""})}))}getLabelForValue(e){return JSON.stringify(e)}getValueFromLabel(e){return JSON.parse(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,t){const n=JSON.stringify(e,null,"\t");return"{}"===n?"{$1}"+t:"[]"===n?"[$1]"+t:this.getInsertTextForPlainText(n+t)}getInsertTextForSnippetValue(e,t){return Lt(e,"",(e=>"string"==typeof e&&"^"===e[0]?e.substr(1):JSON.stringify(e)))+t}getInsertTextForGuessedValue(e,t){switch(typeof e){case"object":return null===e?"${1:null}"+t:this.getInsertTextForValue(e,t);case"string":let n=JSON.stringify(e);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+t;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)}getSuggestionKind(e){if(Array.isArray(e)){const t=e;e=t.length>0?t[0]:void 0}if(!e)return re.Value;switch(e){case"string":default:return re.Value;case"object":return re.Module;case"property":return re.Property}}getLabelTextForMatchingNode(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:return t.getText().substr(e.offset,e.length)}}getInsertTextForMatchingNode(e,t,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:const r=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(r)}}getInsertTextForProperty(e,t,n,r){const o=this.getInsertTextForValue(e,"");if(!n)return o;const i=o+": ";let s,a=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){const e=t.defaultSnippets[0].body;tt(e)&&(s=this.getInsertTextForSnippetValue(e,""))}a+=t.defaultSnippets.length}if(t.enum&&(s||1!==t.enum.length||(s=this.getInsertTextForGuessedValue(t.enum[0],"")),a+=t.enum.length),tt(t.const)&&(s||(s=this.getInsertTextForGuessedValue(t.const,"")),a++),tt(t.default)&&(s||(s=this.getInsertTextForGuessedValue(t.default,"")),a++),Array.isArray(t.examples)&&t.examples.length&&(s||(s=this.getInsertTextForGuessedValue(t.examples[0],"")),a+=t.examples.length),0===a){let e=Array.isArray(t.type)?t.type[0]:t.type;switch(e||(t.properties?e="object":t.items&&(e="array")),e){case"boolean":s="$1";break;case"string":s='"$1"';break;case"object":s="{$1}";break;case"array":s="[$1]";break;case"number":case"integer":s="${1:0}";break;case"null":s="${1:null}";break;default:return o}}}return(!s||a>1)&&(s="$1"),i+s+r}getCurrentWord(e,t){let n=t-1;const r=e.getText();for(;n>=0&&-1===' \t\n\r\v":{[,]}'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t)}evaluateSeparatorAfter(e,t){const n=m(e.getText(),!0);switch(n.setPosition(t),n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,t,n){const r=m(t.getText(),!0),o=e.items;for(let e=o.length-1;e>=0;e--){const t=o[e];if(n>t.offset+t.length)return r.setPosition(t.offset+t.length),5===r.scan()&&n>=r.getTokenOffset()+r.getTokenLength()?e+1:e;if(n>=t.offset)return e}return 0}isInComment(e,t,n){const r=m(e.getText(),!1);r.setPosition(t);let o=r.scan();for(;17!==o&&r.getTokenOffset()+r.getTokenLength()o.offset+1&&r({contents:e,range:s}),c=Nt(o);for(let t=this.contributions.length-1;t>=0;t--){const n=this.contributions[t].getInfoContribution(e.uri,c);if(n)return n.then((e=>a(e)))}return this.schemaService.getSchemaForResource(e.uri,n).then((e=>{if(e&&o){let r,i,s,c;n.getMatchingSchemas(e.schema,o.offset).every((e=>{if(e.node===o&&!e.inverted&&e.schema&&(r=r||e.schema.title,i=i||e.schema.markdownDescription||$t(e.schema.description),e.schema.enum)){const t=e.schema.enum.indexOf(Et(o));e.schema.markdownEnumDescriptions?s=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(s=$t(e.schema.enumDescriptions[t])),s&&(c=e.schema.enum[t],"string"!=typeof c&&(c=JSON.stringify(c)))}return!0}));let u="";return r&&(u=$t(r)),i&&(u.length>0&&(u+="\n\n"),u+=i),s&&(u.length>0&&(u+="\n\n"),u+=`\`${t=c,-1!==t.indexOf("`")?"`` "+t+" ``":t}\`: ${s}`),a([u])}var t;return null}))}}function $t(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3").replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}class Vt{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=!1!==e.validate,this.commentSeverity=e.allowComments?void 0:L.Error)}doValidation(e,t,n,r){if(!this.validationEnabled)return this.promise.resolve([]);const o=[],i={},s=e=>{const t=e.range.start.line+" "+e.range.start.character+" "+e.message;i[t]||(i[t]=!0,o.push(e))},a=r=>{let i=n?.trailingCommas?Bt(n.trailingCommas):L.Error,a=n?.comments?Bt(n.comments):this.commentSeverity,c=n?.schemaValidation?Bt(n.schemaValidation):L.Warning,u=n?.schemaRequest?Bt(n.schemaRequest):L.Warning;if(r){const o=(n,r)=>{if(t.root&&u){const o=t.root,i="object"===o.type?o.properties[0]:void 0;if(i&&"$schema"===i.keyNode.value){const t=i.valueNode||i,o=P.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));s($.create(o,n,u,r))}else{const t=P.create(e.positionAt(o.offset),e.positionAt(o.offset+1));s($.create(t,n,u,r))}}};if(r.errors.length)o(r.errors[0],Ge.SchemaResolveError);else if(c){for(const e of r.warnings)o(e,Ge.SchemaUnsupportedFeature);const i=t.validate(e,r.schema,c,n?.schemaDraft);i&&i.forEach(s)}Ut(r.schema)&&(a=void 0),Ht(r.schema)&&(i=void 0)}for(const e of t.syntaxErrors){if(e.code===Ge.TrailingComma){if("number"!=typeof i)continue;e.severity=i}s(e)}if("number"==typeof a){const e=pt.t("Comments are not permitted in JSON.");t.comments.forEach((t=>{s($.create(t,e,a,Ge.CommentNotPermitted))}))}return o};if(r){const e=r.id||"schemaservice://untitled/"+Wt++;return this.jsonSchemaService.registerExternalSchema({uri:e,schema:r}).getResolvedSchema().then((e=>a(e)))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then((e=>a(e)))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}}let Wt=0;function Ut(e){if(e&&"object"==typeof e){if(nt(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const e=Ut(t);if(nt(e))return e}}}function Ht(e){if(e&&"object"==typeof e){if(nt(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(nt(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(const t of e.allOf){const e=Ht(t);if(nt(e))return e}}}function Bt(e){switch(e){case"error":return L.Error;case"warning":return L.Warning;case"ignore":return}}const zt=48,Kt=57,Jt=65,Xt=97,Gt=102;function Yt(e){return e=Xt&&e<=Gt?e-Xt+10:0)}function Zt(e){if("#"===e[0])switch(e.length){case 4:return{red:17*Yt(e.charCodeAt(1))/255,green:17*Yt(e.charCodeAt(2))/255,blue:17*Yt(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*Yt(e.charCodeAt(1))/255,green:17*Yt(e.charCodeAt(2))/255,blue:17*Yt(e.charCodeAt(3))/255,alpha:17*Yt(e.charCodeAt(4))/255};case 7:return{red:(16*Yt(e.charCodeAt(1))+Yt(e.charCodeAt(2)))/255,green:(16*Yt(e.charCodeAt(3))+Yt(e.charCodeAt(4)))/255,blue:(16*Yt(e.charCodeAt(5))+Yt(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*Yt(e.charCodeAt(1))+Yt(e.charCodeAt(2)))/255,green:(16*Yt(e.charCodeAt(3))+Yt(e.charCodeAt(4)))/255,blue:(16*Yt(e.charCodeAt(5))+Yt(e.charCodeAt(6)))/255,alpha:(16*Yt(e.charCodeAt(7))+Yt(e.charCodeAt(8)))/255}}}class Qt{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let o=n.resultLimit||Number.MAX_VALUE;const i=e.uri;if(("vscode://defaultsettings/keybindings.json"===i||it(i.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){const t=[];for(const s of r.items)if("object"===s.type)for(const r of s.properties)if("key"===r.keyNode.value&&r.valueNode){const a=_.create(e.uri,en(e,s));if(t.push({name:tn(r.valueNode),kind:ye.Function,location:a}),o--,o<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),t}return t}const s=[{node:r,containerName:""}];let a=0,c=!1;const u=[],l=(t,n)=>{"array"===t.type?t.items.forEach((e=>{e&&s.push({node:e,containerName:n})})):"object"===t.type&&t.properties.forEach((t=>{const r=t.valueNode;if(r)if(o>0){o--;const i=_.create(e.uri,en(e,t)),a=n?n+"."+t.keyNode.value:t.keyNode.value;u.push({name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),location:i,containerName:n}),s.push({node:r,containerName:a})}else c=!0}))};for(;a{"array"===t.type?t.items.forEach(((t,r)=>{if(t)if(o>0){o--;const i=en(e,t),s=i,c={name:String(r),kind:this.getSymbolKind(t.type),range:i,selectionRange:s,children:[]};n.push(c),a.push({result:c.children,node:t})}else u=!0})):"object"===t.type&&t.properties.forEach((t=>{const r=t.valueNode;if(r)if(o>0){o--;const i=en(e,t),s=en(e,t.keyNode),c=[],u={name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),range:i,selectionRange:s,children:c,detail:this.getDetail(r)};n.push(u),a.push({result:c,node:r})}else u=!0}))};for(;c{const o=[];if(r){let i=n&&"number"==typeof n.resultLimit?n.resultLimit:Number.MAX_VALUE;const s=t.getMatchingSchemas(r.schema),a={};for(const t of s)if(!t.inverted&&t.schema&&("color"===t.schema.format||"color-hex"===t.schema.format)&&t.node&&"string"===t.node.type){const r=String(t.node.offset);if(!a[r]){const s=Zt(Et(t.node));if(s){const n=en(e,t.node);o.push({color:s,range:n})}if(a[r]=!0,i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),o}}}return o}))}getColorPresentations(e,t,n,r){const o=[],i=Math.round(255*n.red),s=Math.round(255*n.green),a=Math.round(255*n.blue);function c(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}let u;return u=1===n.alpha?`#${c(i)}${c(s)}${c(a)}`:`#${c(i)}${c(s)}${c(a)}${c(Math.round(255*n.alpha))}`,o.push({label:u,textEdit:W.replace(r,JSON.stringify(u))}),o}}function en(e,t){return P.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function tn(e){return Et(e)||pt.t("")}const nn={schemaAssociations:[],schemas:{"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},rn={id:pt.t("A unique identifier for the schema."),$schema:pt.t("The schema to verify this document against."),title:pt.t("A descriptive title of the element."),description:pt.t("A long description of the element. Used in hover menus and suggestions."),default:pt.t("A default value. Used by suggestions."),multipleOf:pt.t("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:pt.t("The maximum numerical value, inclusive by default."),exclusiveMaximum:pt.t("Makes the maximum property exclusive."),minimum:pt.t("The minimum numerical value, inclusive by default."),exclusiveMinimum:pt.t("Makes the minimum property exclusive."),maxLength:pt.t("The maximum length of a string."),minLength:pt.t("The minimum length of a string."),pattern:pt.t("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:pt.t("For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:pt.t("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:pt.t("The maximum number of items that can be inside an array. Inclusive."),minItems:pt.t("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:pt.t("If all of the items in the array must be unique. Defaults to false."),maxProperties:pt.t("The maximum number of properties an object can have. Inclusive."),minProperties:pt.t("The minimum number of properties an object can have. Inclusive."),required:pt.t("An array of strings that lists the names of all properties required on this object."),additionalProperties:pt.t("Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:pt.t("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:pt.t("A map of property names to schemas for each property."),patternProperties:pt.t("A map of regular expressions on property names to schemas for matching properties."),dependencies:pt.t("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:pt.t("The set of literal values that are valid."),type:pt.t("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:pt.t("Describes the format expected for the value."),allOf:pt.t("An array of schemas, all of which must match."),anyOf:pt.t("An array of schemas, where at least one must match."),oneOf:pt.t("An array of schemas, exactly one of which must match."),not:pt.t("A schema which must not match."),$id:pt.t("A unique identifier for the schema."),$ref:pt.t("Reference a definition hosted on any location."),$comment:pt.t("Comments from schema authors to readers or maintainers of the schema."),readOnly:pt.t("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:pt.t("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:pt.t('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:pt.t("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:pt.t("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:pt.t("Describes the media type of a string property."),contentEncoding:pt.t("Describes the content encoding of a string property."),if:pt.t('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:pt.t('The "if" subschema is used for validation when the "if" subschema succeeds.'),else:pt.t('The "else" subschema is used for validation when the "if" subschema fails.')};for(const e in nn.schemas){const t=nn.schemas[e];for(const e in t.properties){let n=t.properties[e];"boolean"==typeof n&&(n=t.properties[e]={});const r=rn[e];r&&(n.description=r)}}var on=n(7608);function sn(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");const n=String(e);let r="";const o=!!t&&!!t.extended,i=!!t&&!!t.globstar;let s=!1;const a=t&&"string"==typeof t.flags?t.flags:"";let c;for(let e=0,t=n.length;e1)||"/"!==t&&void 0!==t&&"{"!==t&&","!==t||"/"!==u&&void 0!==u&&","!==u&&"}"!==u?r+="([^/]*)":("/"===u?e++:"/"===t&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+=".*";break;default:r+=c}return a&&~a.indexOf("g")||(r="^"+r+"$"),new RegExp(r,a)}class an{constructor(e,t,n){this.folderUri=t,this.uris=n,this.globWrappers=[];try{for(let t of e){const e="!"!==t[0];e||(t=t.substring(1)),t.length>0&&("/"===t[0]&&(t=t.substring(1)),this.globWrappers.push({regexp:sn("**/"+t,{extended:!0,globstar:!0}),include:e}))}t&&((t=pn(t)).endsWith("/")||(t+="/"),this.folderUri=t)}catch(e){this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let t=!1;for(const{regexp:n,include:r}of this.globWrappers)n.test(e)&&(t=r);return t}getURIs(){return this.uris}}class cn{constructor(e,t,n){this.service=e,this.uri=t,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new un(n)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then((e=>this.service.resolveSchemaContent(e,this)))),this.resolvedSchema}clearSchema(){const e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}}class un{constructor(e,t=[]){this.schema=e,this.errors=t}}class ln{constructor(e,t=[],n=[],r){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=r}getSection(e){const t=this.getSectionRecursive(e,this.schema);if(t)return Ct(t)}getSectionRecursive(e,t){if(!t||"boolean"==typeof t||0===e.length)return t;const n=e.shift();if(t.properties&&(t.properties[n],1))return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties)for(const r of Object.keys(t.patternProperties)){const o=st(r);if(o?.test(n))return this.getSectionRecursive(e,t.patternProperties[r])}else{if("object"==typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+"))if(Array.isArray(t.items)){const r=parseInt(n,10);if(!isNaN(r)&&t.items[r])return this.getSectionRecursive(e,t.items[r])}else if(t.items)return this.getSectionRecursive(e,t.items)}}}class dn{constructor(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter((t=>{const n=on.URI.parse(t).scheme;return"schemaservice"!==n&&(!e||e(n))}))}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let t=!1;const n=[e=hn(e)],r=Object.keys(this.schemasById).map((e=>this.schemasById[e]));for(;n.length;){const e=n.pop();for(let o=0;o{if(!t){const t=pt.t("Unable to load schema from '{0}': No content.",mn(e));return new un({},[t])}const n=[];65279===t.charCodeAt(0)&&(n.push(pt.t("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",mn(e))),t=t.trimStart());let r={};const o=[];return r=b(t,o),o.length&&n.push(pt.t("Unable to parse content from '{0}': Parse error at offset {1}.",mn(e),o[0].offset)),new un(r,n)}),(t=>{let n=t.toString();const r=t.toString().split("Error: ");return r.length>1&&(n=r[1]),it(n,".")&&(n=n.substr(0,n.length-1)),new un({},[pt.t("Unable to load schema from '{0}': {1}.",mn(e),n)])}))}resolveSchemaContent(e,t){const n=e.errors.slice(0),r=e.schema;let o=r.$schema?hn(r.$schema):void 0;if("http://json-schema.org/draft-03/schema"===o)return this.promise.resolve(new ln({},[pt.t("Draft-03 schemas are not supported.")],[],o));let i=new Set;const s=this.contextService,a=(e,t,r,o)=>{let i;i=void 0===o||0===o.length?t:"/"===o.charAt(0)?((e,t)=>{t=decodeURIComponent(t);let n=e;return"/"===t[0]&&(t=t.substring(1)),t.split("/").some((e=>(e=e.replace(/~1/g,"/").replace(/~0/g,"~"),n=n[e],!n))),n})(t,o):((e,t,n)=>(t.anchors||(t.anchors=l(e)),t.anchors.get(n)))(t,r,o),i?((e,t)=>{for(const n in t)t.hasOwnProperty(n)&&"id"!==n&&"$id"!==n&&(e[n]=t[n])})(e,i):n.push(pt.t("$ref '{0}' in '{1}' can not be resolved.",o||"",r.uri))},c=(e,t,r,o)=>{s&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(t)&&(t=s.resolveRelativePath(t,o.uri)),t=hn(t);const i=this.getOrAddSchemaHandle(t);return i.getUnresolvedSchema().then((s=>{if(o.dependencies.add(t),s.errors.length){const e=r?t+"#"+r:t;n.push(pt.t("Problems loading reference '{0}': {1}",e,s.errors[0]))}return a(e,s.schema,i,r),u(e,s.schema,i)}))},u=(e,t,n)=>{const r=[];return this.traverseNodes(e,(e=>{const o=new Set;for(;e.$ref;){const i=e.$ref,s=i.split("#",2);if(delete e.$ref,s[0].length>0)return void r.push(c(e,s[0],s[1],n));if(!o.has(i)){const r=s[1];a(e,t,n,r),o.add(i)}}e.$recursiveRef&&i.add("$recursiveRef"),e.$dynamicRef&&i.add("$dynamicRef")})),this.promise.all(r)},l=e=>{const t=new Map;return this.traverseNodes(e,(e=>{const r=e.$id||e.id,o=rt(r)&&"#"===r.charAt(0)?r.substring(1):e.$anchor;o&&(t.has(o)?n.push(pt.t("Duplicate anchor declaration: '{0}'",o)):t.set(o,e)),e.$recursiveAnchor&&i.add("$recursiveAnchor"),e.$dynamicAnchor&&i.add("$dynamicAnchor")})),t};return u(r,r,t).then((e=>{let t=[];return i.size&&t.push(pt.t("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(i.keys()).join(", "))),new ln(r,n,t,o)}))}traverseNodes(e,t){if(!e||"object"!=typeof e)return Promise.resolve(null);const n=new Set,r=(...e)=>{for(const t of e)ot(t)&&a.push(t)},o=(...e)=>{for(const t of e)if(ot(t))for(const e in t){const n=t[e];ot(n)&&a.push(n)}},i=(...e)=>{for(const t of e)if(Array.isArray(t))for(const e of t)ot(e)&&a.push(e)},s=e=>{if(Array.isArray(e))for(const t of e)ot(t)&&a.push(t);else ot(e)&&a.push(e)},a=[e];let c=a.pop();for(;c;)n.has(c)||(n.add(c),t(c),r(c.additionalItems,c.additionalProperties,c.not,c.contains,c.propertyNames,c.if,c.then,c.else,c.unevaluatedItems,c.unevaluatedProperties),o(c.definitions,c.$defs,c.properties,c.patternProperties,c.dependencies,c.dependentSchemas),i(c.anyOf,c.allOf,c.oneOf,c.prefixItems),s(c.items)),c=a.pop()}getSchemaFromProperty(e,t){if("object"===t.root?.type)for(const n of t.root.properties)if("$schema"===n.keyNode.value&&"string"===n.valueNode?.type){let t=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(t)&&(t=this.contextService.resolveRelativePath(t,e)),t}}getAssociatedSchemas(e){const t=Object.create(null),n=[],r=pn(e);for(const e of this.filePatternAssociations)if(e.matchesPattern(r))for(const r of e.getURIs())t[r]||(n.push(r),t[r]=!0);return n}getSchemaURIsForResource(e,t){let n=t&&this.getSchemaFromProperty(e,t);return n?[n]:this.getAssociatedSchemas(e)}getSchemaForResource(e,t){if(t){let n=this.getSchemaFromProperty(e,t);if(n){const e=hn(n);return this.getOrAddSchemaHandle(e).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;const n=this.getAssociatedSchemas(e),r=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:r},r}createCombinedSchema(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);{const n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map((e=>({$ref:e})))};return this.addSchemaHandle(n,r)}}getMatchingSchemas(e,t,n){if(n){const e=n.id||"schemaservice://untitled/matchingSchemas/"+fn++;return this.addSchemaHandle(e,n).getResolvedSchema().then((e=>t.getMatchingSchemas(e.schema).filter((e=>!e.inverted))))}return this.getSchemaForResource(e.uri,t).then((e=>e?t.getMatchingSchemas(e.schema).filter((e=>!e.inverted)):[]))}}let fn=0;function hn(e){try{return on.URI.parse(e).toString(!0)}catch(t){return e}}function pn(e){try{return on.URI.parse(e).with({fragment:null,query:null}).toString(!0)}catch(t){return e}}function mn(e){try{const t=on.URI.parse(e);if("file"===t.scheme)return t.fsPath}catch(e){}return e}function gn(e,t){const n=[],r=[],o=[];let i=-1;const s=m(e.getText(),!1);let a=s.scan();function c(e){n.push(e),r.push(o.length)}for(;17!==a;){switch(a){case 1:case 3:{const t=e.positionAt(s.getTokenOffset()).line,n={startLine:t,endLine:t,kind:1===a?"object":"array"};o.push(n);break}case 2:case 4:{const t=2===a?"object":"array";if(o.length>0&&o[o.length-1].kind===t){const t=o.pop(),n=e.positionAt(s.getTokenOffset()).line;t&&n>t.startLine+1&&i!==t.startLine&&(t.endLine=n-1,c(t),i=t.startLine)}break}case 13:{const t=e.positionAt(s.getTokenOffset()).line,n=e.positionAt(s.getTokenOffset()+s.getTokenLength()).line;1===s.getTokenError()&&t+1=0&&o[e].kind!==A.Region;)e--;if(e>=0){const t=o[e];o.length=e,n>t.startLine&&i!==t.startLine&&(t.endLine=n,c(t),i=t.startLine)}}}break}}a=s.scan()}const u=t&&t.rangeLimit;if("number"!=typeof u||n.length<=u)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);const l=[];for(let e of r)e<30&&(l[e]=(l[e]||0)+1);let d=0,f=0;for(let e=0;eu){f=e;break}d+=t}}const h=[];for(let e=0;e=e&&o<=t&&a.push(r(e,t)),a.push(r(s.offset,s.offset+s.length));break;case"number":case"boolean":case"null":case"property":a.push(r(s.offset,s.offset+s.length))}if("property"===s.type||s.parent&&"array"===s.parent.type){const e=i(s.offset+s.length,5);-1!==e&&a.push(r(s.offset,e))}s=s.parent}let c;for(let e=a.length-1;e>=0;e--)c=_e.create(a[e],c);return c||(c=_e.create(P.create(t,t))),c}))}function bn(e,t,n){let o;if(n){const t=e.offsetAt(n.start);o={offset:t,length:e.offsetAt(n.end)-t}}const i={tabSize:t?t.tabSize:4,insertSpaces:!0===t?.insertSpaces,insertFinalNewline:!0===t?.insertFinalNewline,eol:"\n",keepLines:!0===t?.keepLines};return function(e,t,n){return function(e,t,n){let o,i,s,a,u;if(t){for(a=t.offset,u=a+t.length,s=a;s>0&&!h(e,s-1);)s--;let r=u;for(;r1)return f(p,y)+f(g,o+b);const e=g.length*(o+b);return!m||e>l[v][p].length?p+f(g,o+b):e<=0?p:l[v][p][e]}function R(){let e=k.scan();for(y=0;15===e||14===e;)14===e&&n.keepLines?y+=1:14===e&&(y=1),e=k.scan();return S=16===e||0!==k.getTokenError(),e}const C=[];function D(n,r,o){S||t&&!(ra)||e.substring(r,o)===n||C.push({offset:r,length:o-r,content:n})}let x=R();if(n.keepLines&&y>0&&D(f(p,y),0,0),17!==x){let e=k.getTokenOffset()+s;D(g.length*o<20&&n.insertSpaces?c[g.length*o]:f(g,o),s,e)}for(;17!==x;){let e=k.getTokenOffset()+k.getTokenLength()+s,t=R(),r="",o=!1;for(;0===y&&(12===t||13===t);){let n=k.getTokenOffset()+s;D(c[1],e,n),e=k.getTokenOffset()+k.getTokenLength()+s,o=12===t,r=o?T():"",t=R()}if(2===t)1!==x&&b--,n.keepLines&&y>0||!n.keepLines&&1!==x?r=T():n.keepLines&&(r=c[1]);else if(4===t)3!==x&&b--,n.keepLines&&y>0||!n.keepLines&&3!==x?r=T():n.keepLines&&(r=c[1]);else{switch(x){case 3:case 1:b++,r=n.keepLines&&y>0||!n.keepLines?T():c[1];break;case 5:r=n.keepLines&&y>0||!n.keepLines?T():c[1];break;case 12:r=T();break;case 13:y>0?r=T():o||(r=c[1]);break;case 6:n.keepLines&&y>0?r=T():o||(r=c[1]);break;case 10:n.keepLines&&y>0?r=T():6!==t||o||(r="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&y>0?r=T():12!==t&&13!==t||o?5!==t&&17!==t&&(S=!0):r=c[1];break;case 16:S=!0}y>0&&(12===t||13===t)&&(r=T())}17===t&&(r=n.keepLines&&y>0?T():n.insertFinalNewline?p:""),D(r,e,k.getTokenOffset()+s),x=t}return C}(e,t,n)}(e.getText(),o,i).map((t=>W.replace(P.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content)))}var vn;!function(e){e[e.Object=0]="Object",e[e.Array=1]="Array"}(vn||(vn={}));class kn{constructor(e,t){this.propertyName=e??"",this.beginningLineNumber=t,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let t=0;t=e.noKeyName?this.childrenProperties.length:function(e,t,n){const r=t.propertyName.toLowerCase(),o=e[0].propertyName.toLowerCase(),i=e[e.length-1].propertyName.toLowerCase();if(ri)return e.length;let s=0,a=e.length-1;for(;s<=a;){let r=a+s>>1,o=n(t,e[r]);if(o>0)s=r+1;else{if(!(o<0))return r;a=r-1}}return-s-1}(this.childrenProperties,e,Sn),t<0&&(t=-1*t-1),this.childrenProperties.splice(t,0,e)}else this.childrenProperties.push(e);return e}}function Sn(e,t){const n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return nr?1:0}function Tn(e,t,n){if(0!==t.childrenProperties.length)if(t.type===vn.Object){let r=1/0;for(const e of t.childrenProperties)e.beginningLineNumber{if("property"===r.type&&"$ref"===r.keyNode.value&&"string"===r.valueNode?.type){const o=r.valueNode.value,i=function(e,t){const n=function(e){return"#"===e?[]:"#"!==e[0]||"/"!==e[1]?null:e.substring(2).split(/\//).map(Pn)}(t);return n?wn(n,e.root):null}(t,o);if(i){const t=e.positionAt(i.offset);n.push({target:`${e.uri}#${t.line+1},${t.character+1}`,range:xn(e,r.valueNode)})}}return!0})),Promise.resolve(n)}function xn(e,t){return P.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function wn(e,t){if(!t)return null;if(0===e.length)return t;const n=e.shift();if(t&&"object"===t.type){const r=t.properties.find((e=>e.keyNode.value===n));return r?wn(e,r.valueNode):null}if(t&&"array"===t.type&&n.match(/^(0|[1-9][0-9]*)$/)){const r=Number.parseInt(n),o=t.items[r];return o?wn(e,o):null}return null}function Pn(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function _n(e){const t=e.promiseConstructor||Promise,n=new dn(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(nn);const r=new It(n,e.contributions,t,e.clientCapabilities),o=new Ft(n,e.contributions,t),i=new Qt(n),s=new Vt(n,t);return{configure:e=>{n.clearExternalSchemas(),e.schemas?.forEach(n.registerExternalSchema.bind(n)),s.configure(e)},resetSchema:e=>n.onResourceChange(e),doValidation:s.doValidation.bind(s),getLanguageStatus:s.getLanguageStatus.bind(s),parseJSONDocument:e=>function(e,t){const n=[];let r=-1;const o=e.getText(),i=m(o,!1),s=t&&t.collectComments?[]:void 0;function a(){for(;;){const t=i.scan();switch(l(),t){case 12:case 13:Array.isArray(s)&&s.push(P.create(e.positionAt(i.getTokenOffset()),e.positionAt(i.getTokenOffset()+i.getTokenLength())));break;case 15:case 14:break;default:return t}}}function c(t,o,i,s,a=L.Error){if(0===n.length||i!==r){const c=P.create(e.positionAt(i),e.positionAt(s));n.push($.create(c,t,a,o,e.languageId)),r=i}}function u(e,t,n=void 0,r=[],s=[]){let u=i.getTokenOffset(),l=i.getTokenOffset()+i.getTokenLength();if(u===l&&u>0){for(u--;u>0&&/\s/.test(o.charAt(u));)u--;l=u+1}if(c(e,t,u,l),n&&d(n,!1),r.length+s.length>0){let e=i.getToken();for(;17!==e;){if(-1!==r.indexOf(e)){a();break}if(-1!==s.indexOf(e))break;e=a()}}return n}function l(){switch(i.getTokenError()){case 4:return u(pt.t("Invalid unicode sequence in string."),Ge.InvalidUnicode),!0;case 5:return u(pt.t("Invalid escape character in string."),Ge.InvalidEscapeCharacter),!0;case 3:return u(pt.t("Unexpected end of number."),Ge.UnexpectedEndOfNumber),!0;case 1:return u(pt.t("Unexpected end of comment."),Ge.UnexpectedEndOfComment),!0;case 2:return u(pt.t("Unexpected end of string."),Ge.UnexpectedEndOfString),!0;case 6:return u(pt.t("Invalid characters in string. Control characters must be escaped."),Ge.InvalidCharacter),!0}return!1}function d(e,t){return e.length=i.getTokenOffset()+i.getTokenLength()-e.offset,t&&a(),e}const f=new St(void 0,0,0);function h(t,n){const r=new Tt(t,i.getTokenOffset(),f);let o=p(r);if(!o){if(16!==i.getToken())return;{u(pt.t("Property keys must be doublequoted"),Ge.PropertyKeysMustBeDoublequoted);const e=new St(r,i.getTokenOffset(),i.getTokenLength());e.value=i.getTokenValue(),o=e,a()}}if(r.keyNode=o,"//"!==o.value){const e=n[o.value];e?(c(pt.t("Duplicate object key"),Ge.DuplicateKey,r.keyNode.offset,r.keyNode.offset+r.keyNode.length,L.Warning),ot(e)&&c(pt.t("Duplicate object key"),Ge.DuplicateKey,e.keyNode.offset,e.keyNode.offset+e.keyNode.length,L.Warning),n[o.value]=!0):n[o.value]=r}if(6===i.getToken())r.colonOffset=i.getTokenOffset(),a();else if(u(pt.t("Colon expected"),Ge.ColonExpected),10===i.getToken()&&e.positionAt(o.offset+o.length).linefunction(e,t=[]){return new At(e,t,[])}(e,t),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findDocumentSymbols2.bind(i),findDocumentColors:i.findDocumentColors.bind(i),getColorPresentations:i.getColorPresentations.bind(i),doHover:o.doHover.bind(o),getFoldingRanges:gn,getSelectionRanges:yn,findDefinition:()=>Promise.resolve([]),findLinks:Dn,format:(e,t,n)=>bn(e,n,t),sort:(e,t)=>function(e,t){const n={...t,keepLines:!1},r=Xe.applyEdits(e,bn(e,n,void 0)),o=Xe.create("test://test.json","json",0,r),i=function(e){const t=e.getText(),n=m(t,!1);let r,o,i,s=new kn,a=s,c=s,u=s,l=0,d=0,f=-1,h=-1,p=0,g=0,y=[],b=!1,v=!1;for(;17!==(r=n.scan());){if(!0===b&&14!==r&&15!==r&&12!==r&&13!==r&&void 0===c.endLineNumber){let e=n.getTokenStartLine();2===i||4===i?u.endLineNumber=e-1:c.endLineNumber=e-1,p=e,b=!1}if(!0===v&&14!==r&&15!==r&&12!==r&&13!==r&&(p=n.getTokenStartLine(),v=!1),n.getTokenStartLine()!==l){for(let t=l;t0;){const t=r.shift(),o=t.propertyTreeArray;let i=t.beginningLineNumber;for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.TraceValue=t.Trace=void 0;const r=n(6177);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return r.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const o=n(3352);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return o.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return o.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return o.Touch}});const i=n(4019);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return i.Disposable}});const s=n(2676);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return s.Emitter}});const a=n(9850);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return a.CancellationToken}});const c=n(4996);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return c.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return c.SharedArrayReceiverStrategy}});const u=n(9085);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return u.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return u.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return u.ReadableStreamMessageReader}});const l=n(3193);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return l.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return l.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return l.WriteableStreamMessageWriter}});const d=n(9244);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const f=n(577);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return f.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return f.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return f.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return f.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return f.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return f.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return f.Trace}}),Object.defineProperty(t,"TraceValue",{enumerable:!0,get:function(){return f.TraceValue}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return f.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return f.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return f.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return f.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return f.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return f.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return f.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return f.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return f.MessageStrategy}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return f.TraceValues}});const h=n(9590);t.RAL=h.default},9850:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(9590),o=n(8585),i=n(2676);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||o.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s||(t.CancellationToken=s={}));const a=Object.freeze((function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class c{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new i.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=s.None}}},577:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.TraceValue=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const r=n(9590),o=n(8585),i=n(6177),s=n(3352),a=n(2676),c=n(9850);var u,l,d,f,h,p,m,g,y,b,v,k,S,T,R,C,D,x,w;!function(e){e.type=new i.NotificationType("$/cancelRequest")}(u||(u={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(l||(t.ProgressToken=l={})),function(e){e.type=new i.NotificationType("$/progress")}(d||(d={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return o.func(e)}}(f||(f={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(h||(t.Trace=h={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(p||(t.TraceValue=p={})),t.TraceValues=p,function(e){e.fromString=function(t){if(!o.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(h||(t.Trace=h={})),function(e){e.Text="text",e.JSON="json"}(m||(t.TraceFormat=m={})),function(e){e.fromString=function(t){return o.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(m||(t.TraceFormat=m={})),function(e){e.type=new i.NotificationType("$/setTrace")}(g||(t.SetTraceNotification=g={})),function(e){e.type=new i.NotificationType("$/logTrace")}(y||(t.LogTraceNotification=y={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(b||(t.ConnectionErrors=b={}));class P extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,P.prototype)}}t.ConnectionError=P,function(e){e.is=function(e){const t=e;return t&&o.func(t.cancelUndispatched)}}(v||(t.ConnectionStrategy=v={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&o.func(t.createCancellationTokenSource)&&(void 0===t.dispose||o.func(t.dispose))}}(k||(t.IdCancellationReceiverStrategy=k={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&o.func(t.createCancellationTokenSource)&&(void 0===t.dispose||o.func(t.dispose))}}(S||(t.RequestCancellationReceiverStrategy=S={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){return k.is(e)||S.is(e)}}(T||(t.CancellationReceiverStrategy=T={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(u.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&o.func(t.sendCancellation)&&o.func(t.cleanup)}}(R||(t.CancellationSenderStrategy=R={})),function(e){e.Message=Object.freeze({receiver:T.Message,sender:R.Message}),e.is=function(e){const t=e;return t&&T.is(t.receiver)&&R.is(t.sender)}}(C||(t.CancellationStrategy=C={})),function(e){e.is=function(e){const t=e;return t&&o.func(t.handleMessage)}}(D||(t.MessageStrategy=D={})),function(e){e.is=function(e){const t=e;return t&&(C.is(t.cancellationStrategy)||v.is(t.connectionStrategy)||D.is(t.messageStrategy)||o.number(t.maxParallelism))}}(x||(t.ConnectionOptions=x={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(w||(w={})),t.createMessageConnection=function(e,n,p,v){const S=void 0!==p?p:t.NullLogger;let T=0,R=0,x=0;const _="2.0",O=v?.maxParallelism??-1;let E,N=0;const M=new Map;let A;const q=new Map,j=new Map;let L,I,F=new s.LinkedMap,$=new Map,V=new Set,W=new Map,U=h.Off,H=m.Text,B=w.New;const z=new a.Emitter,K=new a.Emitter,J=new a.Emitter,X=new a.Emitter,G=new a.Emitter,Y=v&&v.cancellationStrategy?v.cancellationStrategy:C.Message;function Z(e){}function Q(){return B===w.Listening}function ee(){return B===w.Closed}function te(){return B===w.Disposed}function ne(){B!==w.New&&B!==w.Listening||(B=w.Closed,K.fire(void 0))}function re(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function oe(){L||0===F.size||-1!==O&&N>=O||(L=(0,r.default)().timer.setImmediate((async()=>{if(L=void 0,0===F.size)return;if(-1!==O&&N>=O)return;const e=F.shift();let t;try{N++;const n=v?.messageStrategy;t=D.is(n)?n.handleMessage(e,ie):ie(e)}catch(e){S.error(`Processing message queue failed: ${e.toString()}`)}finally{t instanceof Promise?t.then((()=>{N--,oe()})).catch((e=>{S.error(`Processing message queue failed: ${e.toString()}`)})):N--,oe()}})))}async function ie(e){return i.Message.isRequest(e)?async function(e){if(te())return Promise.resolve();function t(t,r,o){const s={jsonrpc:_,id:e.id};return t instanceof i.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,ue(s,r,o),n.write(s)}function r(t,r,o){const i={jsonrpc:_,id:e.id,error:t.toJson()};return ue(i,r,o),n.write(i)}!function(e){if(U!==h.Off&&I)if(H===m.Text){let t;U!==h.Verbose&&U!==h.Compact||!e.params||(t=`Params: ${ce(e.params)}\n\n`),I.log(`Received request '${e.method} - (${e.id})'.`,t)}else de("receive-request",e)}(e);const s=M.get(e.method);let a,c;s&&(a=s.type,c=s.handler);const u=Date.now();if(c||E){const n=e.id??String(Date.now()),s=k.is(Y.receiver)?Y.receiver.createCancellationTokenSource(n):Y.receiver.createCancellationTokenSource(e);null!==e.id&&V.has(e.id)&&s.cancel(),null!==e.id&&W.set(n,s);try{let n;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return r(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but received none.`),e.method,u);n=c(s.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===i.ParameterStructures.byName)return r(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);n=c(...e.params,s.token)}else{if(void 0!==a&&a.parameterStructures===i.ParameterStructures.byPosition)return r(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);n=c(e.params,s.token)}else E&&(n=E(e.method,e.params,s.token));const o=await n;await t(o,e.method,u)}catch(n){n instanceof i.ResponseError?await t(n,e.method,u):n&&o.string(n.message)?await r(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,u):await r(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}finally{W.delete(n)}}else await r(new i.ResponseError(i.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}(e):i.Message.isNotification(e)?async function(e){if(te())return;let t,n;if(e.method===u.type.method){const t=e.params.id;return V.delete(t),void le(e)}{const r=q.get(e.method);r&&(n=r.handler,t=r.type)}if(n||A)try{if(le(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==i.ParameterStructures.byName&&S.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),await n();else if(Array.isArray(e.params)){const r=e.params;e.method===d.type.method&&2===r.length&&l.is(r[0])?await n({token:r[0],value:r[1]}):(void 0!==t&&(t.parameterStructures===i.ParameterStructures.byName&&S.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&S.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${r.length} arguments`)),await n(...r))}else void 0!==t&&t.parameterStructures===i.ParameterStructures.byPosition&&S.error(`Notification ${e.method} defines parameters by position but received parameters by name`),await n(e.params);else A&&await A(e.method,e.params)}catch(t){t.message?S.error(`Notification handler '${e.method}' failed with message: ${t.message}`):S.error(`Notification handler '${e.method}' failed unexpectedly.`)}else J.fire(e)}(e):i.Message.isResponse(e)?ae(e):function(e){if(!e)return void S.error("Received empty message.");S.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(o.string(t.id)||o.number(t.id)){const e=t.id,n=$.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(ne),e.onError((function(e){z.fire([e,void 0,void 0])})),n.onClose(ne),n.onError((function(e){z.fire(e)}));const se=e=>{try{if(i.Message.isNotification(e)&&e.method===u.type.method){const t=e.params.id,r=re(t),o=F.get(r);if(i.Message.isRequest(o)){const i=v?.connectionStrategy,s=i&&i.cancelUndispatched?i.cancelUndispatched(o,Z):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return F.delete(r),W.delete(t),s.id=o.id,ue(s,e.method,Date.now()),void n.write(s).catch((()=>S.error("Sending response for canceled message failed.")))}const s=W.get(t);if(void 0!==s)return s.cancel(),void le(e);V.add(t)}!function(e,t){var n;i.Message.isRequest(t)?e.set(re(t.id),t):i.Message.isResponse(t)?-1===O?e.set(null===(n=t.id)?"res-unknown-"+(++x).toString():"res-"+n.toString(),t):ae(t):e.set("not-"+(++R).toString(),t)}(F,e)}finally{oe()}};function ae(e){if(!te())if(null===e.id)e.error?S.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):S.error("Received response message without id. No further error information provided.");else{const t=e.id,n=$.get(t);if(function(e,t){if(U!==h.Off&&I)if(H===m.Text){let n;if(U!==h.Verbose&&U!==h.Compact||(e.error&&e.error.data?n=`Error data: ${ce(e.error.data)}\n\n`:e.result?n=`Result: ${ce(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";I.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else I.log(`Received response ${e.id} without active response promise.`,n)}else de("receive-response",e)}(e,n),void 0!==n){$.delete(t);try{if(e.error){const t=e.error;n.reject(new i.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(e){e.message?S.error(`Response handler '${n.method}' failed with message: ${e.message}`):S.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}function ce(e){if(null!=e)switch(U){case h.Verbose:return JSON.stringify(e,null,4);case h.Compact:return JSON.stringify(e);default:return}}function ue(e,t,n){if(U!==h.Off&&I)if(H===m.Text){let r;U!==h.Verbose&&U!==h.Compact||(e.error&&e.error.data?r=`Error data: ${ce(e.error.data)}\n\n`:e.result?r=`Result: ${ce(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),I.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else de("send-response",e)}function le(e){if(U!==h.Off&&I&&e.method!==y.type.method)if(H===m.Text){let t;U!==h.Verbose&&U!==h.Compact||(t=e.params?`Params: ${ce(e.params)}\n\n`:"No parameters provided.\n\n"),I.log(`Received notification '${e.method}'.`,t)}else de("receive-notification",e)}function de(e,t){if(!I||U===h.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};I.log(n)}function fe(){if(ee())throw new P(b.Closed,"Connection is closed.");if(te())throw new P(b.Disposed,"Connection is disposed.")}function he(e){return void 0===e?null:e}function pe(e){return null===e?void 0:e}function me(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ge(e,t){switch(e){case i.ParameterStructures.auto:return me(t)?pe(t):[he(t)];case i.ParameterStructures.byName:if(!me(t))throw new Error("Received parameters by name but param is not an object literal.");return pe(t);case i.ParameterStructures.byPosition:return[he(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function ye(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=ge(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e{let r,s;if(fe(),o.string(e)){r=e;const n=t[0];let o=0,a=i.ParameterStructures.auto;i.ParameterStructures.is(n)&&(o=1,a=n);const c=t.length,u=c-o;switch(u){case 0:s=void 0;break;case 1:s=ge(a,t[o]);break;default:if(a===i.ParameterStructures.byName)throw new Error(`Received ${u} parameters for 'by Name' notification parameter structure.`);s=t.slice(o,c).map((e=>he(e)))}}else{const n=t;r=e.method,s=ye(e,n)}const a={jsonrpc:_,method:r,params:s};return function(e){if(U!==h.Off&&I)if(H===m.Text){let t;U!==h.Verbose&&U!==h.Compact||(t=e.params?`Params: ${ce(e.params)}\n\n`:"No parameters provided.\n\n"),I.log(`Sending notification '${e.method}'.`,t)}else de("send-notification",e)}(a),n.write(a).catch((e=>{throw S.error("Sending notification failed."),e}))},onNotification:(e,t)=>{let n;return fe(),o.func(e)?A=e:t&&(o.string(e)?(n=e,q.set(e,{type:void 0,handler:t})):(n=e.method,q.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?q.delete(n):A=void 0}}},onProgress:(e,t,n)=>{if(j.has(t))throw new Error(`Progress handler for token ${t} already registered`);return j.set(t,n),{dispose:()=>{j.delete(t)}}},sendProgress:(e,t,n)=>be.sendNotification(d.type,{token:t,value:n}),onUnhandledProgress:X.event,sendRequest:(e,...t)=>{function r(e,t){const n=Y.sender.sendCancellation(e,t);void 0===n?S.log(`Received no promise from cancellation strategy when cancelling id ${t}`):n.catch((()=>{S.log(`Sending cancellation messages for id ${t} failed.`)}))}let s,a,u;if(fe(),function(){if(!Q())throw new Error("Call listen() first.")}(),o.string(e)){s=e;const n=t[0],r=t[t.length-1];let o=0,l=i.ParameterStructures.auto;i.ParameterStructures.is(n)&&(o=1,l=n);let d=t.length;c.CancellationToken.is(r)&&(d-=1,u=r);const f=d-o;switch(f){case 0:a=void 0;break;case 1:a=ge(l,t[o]);break;default:if(l===i.ParameterStructures.byName)throw new Error(`Received ${f} parameters for 'by Name' request parameter structure.`);a=t.slice(o,d).map((e=>he(e)))}}else{const n=t;s=e.method,a=ye(e,n);const r=e.numberOfParams;u=c.CancellationToken.is(n[r])?n[r]:void 0}const l=T++;let d,f=!1;void 0!==u&&(u.isCancellationRequested?f=!0:d=u.onCancellationRequested((()=>{r(be,l)})));const p={jsonrpc:_,id:l,method:s,params:a};return function(e){if(U!==h.Off&&I)if(H===m.Text){let t;U!==h.Verbose&&U!==h.Compact||!e.params||(t=`Params: ${ce(e.params)}\n\n`),I.log(`Sending request '${e.method} - (${e.id})'.`,t)}else de("send-request",e)}(p),"function"==typeof Y.sender.enableCancellation&&Y.sender.enableCancellation(p),new Promise((async(e,t)=>{const o={method:s,timerStart:Date.now(),resolve:t=>{e(t),Y.sender.cleanup(l),d?.dispose()},reject:e=>{t(e),Y.sender.cleanup(l),d?.dispose()}};try{await n.write(p),$.set(l,o),f&&r(be,l)}catch(e){throw S.error("Sending request failed."),o.reject(new i.ResponseError(i.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),e}}))},onRequest:(e,t)=>{fe();let n=null;return f.is(e)?(n=void 0,E=e):o.string(e)?(n=null,void 0!==t&&(n=e,M.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,M.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?M.delete(n):E=void 0)}}},hasPendingResponse:()=>$.size>0,trace:async(e,t,n)=>{let r=!1,i=m.Text;void 0!==n&&(o.boolean(n)?r=n:(r=n.sendNotification||!1,i=n.traceFormat||m.Text)),U=e,H=i,I=U===h.Off?void 0:t,!r||ee()||te()||await be.sendNotification(g.type,{value:h.toString(e)})},onError:z.event,onClose:K.event,onUnhandledNotification:J.event,onDispose:G.event,end:()=>{n.end()},dispose:()=>{if(te())return;B=w.Disposed,G.fire(void 0);const t=new i.ResponseError(i.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of $.values())e.reject(t);$=new Map,W=new Map,V=new Set,F=new s.LinkedMap,o.func(n.dispose)&&n.dispose(),o.func(e.dispose)&&e.dispose()},listen:()=>{fe(),function(){if(Q())throw new P(b.AlreadyListening,"Connection is already listening")}(),B=w.Listening,e.listen(se)},inspect:()=>{(0,r.default)().console.log("inspect")}};return be.onNotification(y.type,(e=>{if(U===h.Off||!I)return;const t=U===h.Verbose||U===h.Compact;I.log(e.message,t?e.verbose:void 0)})),be.onNotification(d.type,(async e=>{const t=j.get(e.token);t?await t(e.value):X.fire(e)})),be}},4019:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(e){e.create=function(e){return{dispose:e}}}(n||(t.Disposable=n={}))},2676:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(9590);var o;!function(e){const t={dispose(){}};e.None=function(){return t}}(o||(t.Event=o={}));class i{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,o=this._callbacks.length;r{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=s._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=s,s._noop=function(){}},8585:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))}},3352:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(r||(t.Touch=r={}));class o{constructor(){this[n]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}before(e){const t=this._map.get(e);return t?t.previous?.value:void 0}after(e){const t=this._map.get(e);return t?t.next?.value:void 0}has(e){return this._map.has(e)}get(e,t=r.None){const n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let o=this._map.get(e);if(o)o.value=t,n!==r.None&&this.touch(o,n);else{switch(o={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(o);break;case r.First:this.addItemFirst(o);break;case r.Last:default:this.addItemLast(o)}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===r.First||t===r.Last)if(t===r.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===r.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=o,t.LRUCache=class extends o{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},9244:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,n=0,r=0,o=0;e:for(;nthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const r=this._chunks[0];if(r.byteLength>e){const o=r.slice(0,e);t.set(o,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}},9085:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const r=n(9590),o=n(8585),i=n(2676),s=n(4323);var a,c;!function(e){e.is=function(e){const t=e;return t&&o.func(t.listen)&&o.func(t.dispose)&&o.func(t.onError)&&o.func(t.onClose)&&o.func(t.onPartialMessage)}}(a||(t.MessageReader=a={}));class u{constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter,this.partialMessageEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${o.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=u,function(e){e.fromOptions=function(e){let t,n;const o=new Map;let i;const s=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,o.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)o.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(i=e.contentTypeDecoder,s.set(i.name,i)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)s.set(t.name,t)}return void 0===i&&(i=(0,r.default)().applicationJson.decoder,s.set(i.name,i)),{charset:t,contentDecoder:n,contentDecoders:o,contentTypeDecoder:i,contentTypeDecoders:s}}}(c||(c={})),t.ReadableStreamMessageReader=class extends u{constructor(e,t){super(),this.readable=e,this.options=c.fromOptions(t),this.buffer=(0,r.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new s.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData((e=>{this.onData(e)}));return this.readable.onError((e=>this.fireError(e))),this.readable.onClose((()=>this.fireClose())),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const n=parseInt(t);if(isNaN(n))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock((async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)})).catch((e=>{this.fireError(e)}))}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,r.default)().timer.setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},3193:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const r=n(9590),o=n(8585),i=n(4323),s=n(2676);var a,c;!function(e){e.is=function(e){const t=e;return t&&o.func(t.dispose)&&o.func(t.onClose)&&o.func(t.onError)&&o.func(t.write)}}(a||(t.MessageWriter=a={}));class u{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${o.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=u,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,r.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,r.default)().applicationJson.encoder}}}(c||(c={})),t.WriteableStreamMessageWriter=class extends u{constructor(e,t){super(),this.writable=e,this.options=c.fromOptions(t),this.errorCount=0,this.writeSemaphore=new i.Semaphore(1),this.writable.onError((e=>this.fireError(e))),this.writable.onClose((()=>this.fireClose()))}async write(e){return this.writeSemaphore.lock((async()=>this.options.contentTypeEncoder.encode(e,this.options).then((e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e)).then((t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)}),(e=>{throw this.fireError(e),e}))))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},6177:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const r=n(8585);var o,i;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(o||(t.ErrorCodes=o={}));class s extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:o.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,s.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=s;class a{constructor(e){this.kind=e}static is(e){return e===a.auto||e===a.byName||e===a.byPosition}toString(){return this.kind}}t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");class c{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return a.auto}}t.AbstractMessageSignature=c,t.RequestType0=class extends c{constructor(e){super(e,0)}},t.RequestType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends c{constructor(e){super(e,2)}},t.RequestType3=class extends c{constructor(e){super(e,3)}},t.RequestType4=class extends c{constructor(e){super(e,4)}},t.RequestType5=class extends c{constructor(e){super(e,5)}},t.RequestType6=class extends c{constructor(e){super(e,6)}},t.RequestType7=class extends c{constructor(e){super(e,7)}},t.RequestType8=class extends c{constructor(e){super(e,8)}},t.RequestType9=class extends c{constructor(e){super(e,9)}},t.NotificationType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends c{constructor(e){super(e,0)}},t.NotificationType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends c{constructor(e){super(e,2)}},t.NotificationType3=class extends c{constructor(e){super(e,3)}},t.NotificationType4=class extends c{constructor(e){super(e,4)}},t.NotificationType5=class extends c{constructor(e){super(e,5)}},t.NotificationType6=class extends c{constructor(e){super(e,6)}},t.NotificationType7=class extends c{constructor(e){super(e,7)}},t.NotificationType8=class extends c{constructor(e){super(e,8)}},t.NotificationType9=class extends c{constructor(e){super(e,9)}},function(e){e.isRequest=function(e){const t=e;return t&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},e.isNotification=function(e){const t=e;return t&&r.string(t.method)&&void 0===e.id},e.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(r.string(t.id)||r.number(t.id)||null===t.id)}}(i||(t.Message=i={}))},9590:(e,t)=>{"use strict";let n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},4323:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const r=n(9590);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,r.default)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},4996:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const r=n(9850);var o;!function(e){e.Continue=0,e.Cancelled=1}(o||(o={})),t.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=o.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const n=this.buffers.get(t);if(void 0===n)return;const r=new Int32Array(n,0,1);Atomics.store(r,0,o.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class i{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===o.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class s{constructor(e){this.token=new i(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new r.CancellationTokenSource:new s(t)}}},7123:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.createServerSocketTransport=t.createClientSocketTransport=t.createServerPipeTransport=t.createClientPipeTransport=t.generateRandomPipeName=t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.PortMessageWriter=t.PortMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;const i=n(9571);i.default.install();const s=n(6928),a=n(857),c=n(9896),u=n(6982),l=n(9278),d=n(3281);o(n(3281),t);class f extends d.AbstractMessageReader{constructor(e){super(),this.process=e;const t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose()))}listen(e){return this.process.on("message",e),d.Disposable.create((()=>this.process.off("message",e)))}}t.IPCMessageReader=f;class h extends d.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;const t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose))}write(e){try{return"function"==typeof this.process.send&&this.process.send(e,void 0,void 0,(t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0})),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.IPCMessageWriter=h;class p extends d.AbstractMessageReader{constructor(e){super(),this.onData=new d.Emitter,e.on("close",(()=>this.fireClose)),e.on("error",(e=>this.fireError(e))),e.on("message",(e=>{this.onData.fire(e)}))}listen(e){return this.onData.event(e)}}t.PortMessageReader=p;class m extends d.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.on("close",(()=>this.fireClose())),e.on("error",(e=>this.fireError(e)))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.PortMessageWriter=m;class g extends d.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,i.default)().stream.asReadableStream(e),t)}}t.SocketMessageReader=g;class y extends d.WriteableStreamMessageWriter{constructor(e,t){super((0,i.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=y;class b extends d.ReadableStreamMessageReader{constructor(e,t){super((0,i.default)().stream.asReadableStream(e),t)}}t.StreamMessageReader=b;class v extends d.WriteableStreamMessageWriter{constructor(e,t){super((0,i.default)().stream.asWritableStream(e),t)}}t.StreamMessageWriter=v;const k=process.env.XDG_RUNTIME_DIR,S=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function(){if("win32"===process.platform)return`\\\\.\\pipe\\lsp-${(0,u.randomBytes)(16).toString("hex")}-sock`;let e=32;const t=c.realpathSync(k??a.tmpdir()),n=S.get(process.platform);if(void 0!==n&&(e=Math.min(n-t.length-9,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);const r=(0,u.randomBytes)(Math.floor(e/2)).toString("hex");return s.join(t,`lsp-${r}.sock`)},t.createClientPipeTransport=function(e,t="utf-8"){let n;const r=new Promise(((e,t)=>{n=e}));return new Promise(((o,i)=>{const s=(0,l.createServer)((e=>{s.close(),n([new g(e,t),new y(e,t)])}));s.on("error",i),s.listen(e,(()=>{s.removeListener("error",i),o({onConnected:()=>r})}))}))},t.createServerPipeTransport=function(e,t="utf-8"){const n=(0,l.createConnection)(e);return[new g(n,t),new y(n,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let n;const r=new Promise(((e,t)=>{n=e}));return new Promise(((o,i)=>{const s=(0,l.createServer)((e=>{s.close(),n([new g(e,t),new y(e,t)])}));s.on("error",i),s.listen(e,"127.0.0.1",(()=>{s.removeListener("error",i),o({onConnected:()=>r})}))}))},t.createServerSocketTransport=function(e,t="utf-8"){const n=(0,l.createConnection)(e,"127.0.0.1");return[new g(n,t),new y(n,t)]},t.createMessageConnection=function(e,t,n,r){n||(n=d.NullLogger);const o=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new b(e):e,i=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new v(t):t;return d.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,d.createMessageConnection)(o,i,n,r)}},9571:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9023),o=n(3281);class i extends o.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return i.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new r.TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}i.emptyBuffer=Buffer.allocUnsafe(0);class s{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),o.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),o.Disposable.create((()=>this.stream.off("end",e)))}onData(e){return this.stream.on("data",e),o.Disposable.create((()=>this.stream.off("data",e)))}}class a{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),o.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),o.Disposable.create((()=>this.stream.off("end",e)))}write(e,t){return new Promise(((n,r)=>{const o=e=>{null==e?n():r(e)};"string"==typeof e?this.stream.write(e,t,o):this.stream.write(e,o)}))}end(){this.stream.end()}}const c=Object.freeze({messageBuffer:Object.freeze({create:e=>new i(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new r.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(e)}}})}),stream:Object.freeze({asReadableStream:e=>new s(e),asWritableStream:e=>new a(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){const r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){const n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){const r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function u(){return c}!function(e){e.install=function(){o.RAL.install(c)}}(u||(u={})),t.default=u},2067:(e,t,n)=>{"use strict";e.exports=n(7123)},8766:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,o(n(7123),t),o(n(4292),t),o(n(372),t),o(n(1560),t);var i,s=n(1580);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(i||(t.LSPErrorCodes=i={}))},1580:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(7123);t.createProtocolConnection=function(e,t,n,o){return r.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,r.createMessageConnection)(e,t,n,o)}},372:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const r=n(7123);var o;!function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"}(o||(t.MessageDirection=o={})),t.RegistrationType=class{constructor(e){this.method=e}};class i extends r.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=i;class s extends r.RequestType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolRequestType=s;class a extends r.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=a;class c extends r.NotificationType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolNotificationType=c},8765:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(372);var o,i,s;!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.CallHierarchyPrepareRequest=o={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.CallHierarchyIncomingCallsRequest=i={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.CallHierarchyOutgoingCallsRequest=s={}))},7672:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(372);var o,i;!function(e){e.method="textDocument/documentColor",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.DocumentColorRequest=o={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.ColorPresentationRequest=i={}))},1660:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const r=n(372);var o;!function(e){e.method="workspace/configuration",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(o||(t.ConfigurationRequest=o={}))},6914:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/declaration",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.DeclarationRequest=o={}))},6011:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const r=n(7123),o=n(8598),i=n(372);var s,a,c,u,l;!function(e){e.is=function(e){const t=e;return t&&o.boolean(t.retriggerRequest)}}(s||(t.DiagnosticServerCancellationData=s={})),function(e){e.Full="full",e.Unchanged="unchanged"}(a||(t.DocumentDiagnosticReportKind=a={})),function(e){e.method="textDocument/diagnostic",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.partialResult=new r.ProgressType}(c||(t.DocumentDiagnosticRequest=c={})),function(e){e.method="workspace/diagnostic",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.partialResult=new r.ProgressType}(u||(t.WorkspaceDiagnosticRequest=u={})),function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(l||(t.DiagnosticRefreshRequest=l={}))},9840:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const r=n(372);var o,i,s,a,c,u,l;!function(e){e.file="file",e.folder="folder"}(o||(t.FileOperationPatternKind=o={})),function(e){e.method="workspace/willCreateFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.WillCreateFilesRequest=i={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(s||(t.DidCreateFilesNotification=s={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(a||(t.WillRenameFilesRequest=a={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(c||(t.DidRenameFilesNotification=c={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(u||(t.DidDeleteFilesNotification=u={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(l||(t.WillDeleteFilesRequest=l={}))},2874:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const r=n(372);var o,i;!function(e){e.method="textDocument/foldingRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.FoldingRangeRequest=o={})),function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(i||(t.FoldingRangeRefreshRequest=i={}))},9574:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/implementation",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.ImplementationRequest=o={}))},7752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const r=n(372);var o,i,s;!function(e){e.method="textDocument/inlayHint",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.InlayHintRequest=o={})),function(e){e.method="inlayHint/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.InlayHintResolveRequest=i={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(s||(t.InlayHintRefreshRequest=s={}))},3307:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/inlineCompletion",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.InlineCompletionRequest=o={}))},3124:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const r=n(372);var o,i;!function(e){e.method="textDocument/inlineValue",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.InlineValueRequest=o={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(i||(t.InlineValueRefreshRequest=i={}))},1560:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.RegularExpressionEngineKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=t.WorkspaceSymbolRequest=void 0,t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=t.MonikerRequest=void 0;const r=n(372),o=n(4292),i=n(8598),s=n(9574);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return s.ImplementationRequest}});const a=n(8461);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});const c=n(9935);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return c.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return c.DidChangeWorkspaceFoldersNotification}});const u=n(1660);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return u.ConfigurationRequest}});const l=n(7672);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return l.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return l.ColorPresentationRequest}});const d=n(2874);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return d.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return d.FoldingRangeRefreshRequest}});const f=n(6914);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return f.DeclarationRequest}});const h=n(3487);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return h.SelectionRangeRequest}});const p=n(2687);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return p.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return p.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return p.WorkDoneProgressCancelNotification}});const m=n(8765);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return m.CallHierarchyPrepareRequest}});const g=n(2478);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return g.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return g.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return g.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return g.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return g.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return g.SemanticTokensRegistrationType}});const y=n(908);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return y.ShowDocumentRequest}});const b=n(5316);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return b.LinkedEditingRangeRequest}});const v=n(9840);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return v.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return v.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return v.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return v.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return v.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return v.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return v.WillDeleteFilesRequest}});const k=n(9047);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return k.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return k.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return k.MonikerRequest}});const S=n(645);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return S.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return S.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return S.TypeHierarchySupertypesRequest}});const T=n(3124);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return T.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return T.InlineValueRefreshRequest}});const R=n(7752);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return R.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return R.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return R.InlayHintRefreshRequest}});const C=n(6011);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return C.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return C.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return C.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return C.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return C.DiagnosticRefreshRequest}});const D=n(3557);Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return D.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return D.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return D.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return D.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return D.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return D.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return D.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return D.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return D.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return D.DidCloseNotebookDocumentNotification}});const x=n(3307);var w,P,_,O,E,N,M,A,q,j,L,I,F,$,V,W,U,H,B,z,K,J,X,G,Y,Z,Q,ee,te,ne,re,oe,ie,se,ae,ce,ue,le,de,fe,he,pe,me,ge,ye,be,ve,ke,Se,Te,Re,Ce,De,xe,we,Pe,_e,Oe,Ee,Ne,Me,Ae,qe,je,Le,Ie;Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return x.InlineCompletionRequest}}),function(e){e.is=function(e){const t=e;return i.string(t)||i.string(t.language)||i.string(t.scheme)||i.string(t.pattern)}}(w||(t.TextDocumentFilter=w={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(i.string(t.notebookType)||i.string(t.scheme)||i.string(t.pattern))}}(P||(t.NotebookDocumentFilter=P={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(i.string(t.notebook)||P.is(t.notebook))&&(void 0===t.language||i.string(t.language))}}(_||(t.NotebookCellTextDocumentFilter=_={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(const t of e)if(!i.string(t)&&!w.is(t)&&!_.is(t))return!1;return!0}}(O||(t.DocumentSelector=O={})),function(e){e.method="client/registerCapability",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(E||(t.RegistrationRequest=E={})),function(e){e.method="client/unregisterCapability",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(N||(t.UnregistrationRequest=N={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(M||(t.ResourceOperationKind=M={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(A||(t.FailureHandlingKind=A={})),function(e){e.ES2020="ES2020"}(q||(t.RegularExpressionEngineKind=q={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}(j||(t.PositionEncodingKind=j={})),function(e){e.hasId=function(e){const t=e;return t&&i.string(t.id)&&t.id.length>0}}(L||(t.StaticRegistrationOptions=L={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||O.is(t.documentSelector))}}(I||(t.TextDocumentRegistrationOptions=I={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(void 0===t.workDoneProgress||i.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&i.boolean(t.workDoneProgress)}}(F||(t.WorkDoneProgressOptions=F={})),function(e){e.method="initialize",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}($||(t.InitializeRequest=$={})),function(e){e.unknownProtocolVersion=1}(V||(t.InitializeErrorCodes=V={})),function(e){e.method="initialized",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(W||(t.InitializedNotification=W={})),function(e){e.method="shutdown",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType0(e.method)}(U||(t.ShutdownRequest=U={})),function(e){e.method="exit",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType0(e.method)}(H||(t.ExitNotification=H={})),function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(B||(t.DidChangeConfigurationNotification=B={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5}(z||(t.MessageType=z={})),function(e){e.method="window/showMessage",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(K||(t.ShowMessageNotification=K={})),function(e){e.method="window/showMessageRequest",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(J||(t.ShowMessageRequest=J={})),function(e){e.method="window/logMessage",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(X||(t.LogMessageNotification=X={})),function(e){e.method="telemetry/event",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(G||(t.TelemetryEventNotification=G={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(Y||(t.TextDocumentSyncKind=Y={})),function(e){e.method="textDocument/didOpen",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(Z||(t.DidOpenTextDocumentNotification=Z={})),function(e){e.isIncremental=function(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(Q||(t.TextDocumentContentChangeEvent=Q={})),function(e){e.method="textDocument/didChange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(ee||(t.DidChangeTextDocumentNotification=ee={})),function(e){e.method="textDocument/didClose",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(te||(t.DidCloseTextDocumentNotification=te={})),function(e){e.method="textDocument/didSave",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(ne||(t.DidSaveTextDocumentNotification=ne={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(re||(t.TextDocumentSaveReason=re={})),function(e){e.method="textDocument/willSave",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(oe||(t.WillSaveTextDocumentNotification=oe={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ie||(t.WillSaveTextDocumentWaitUntilRequest=ie={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(se||(t.DidChangeWatchedFilesNotification=se={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(ae||(t.FileChangeType=ae={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(o.URI.is(t.baseUri)||o.WorkspaceFolder.is(t.baseUri))&&i.string(t.pattern)}}(ce||(t.RelativePattern=ce={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(ue||(t.WatchKind=ue={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(le||(t.PublishDiagnosticsNotification=le={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(de||(t.CompletionTriggerKind=de={})),function(e){e.method="textDocument/completion",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(fe||(t.CompletionRequest=fe={})),function(e){e.method="completionItem/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(he||(t.CompletionResolveRequest=he={})),function(e){e.method="textDocument/hover",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(pe||(t.HoverRequest=pe={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(me||(t.SignatureHelpTriggerKind=me={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ge||(t.SignatureHelpRequest=ge={})),function(e){e.method="textDocument/definition",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ye||(t.DefinitionRequest=ye={})),function(e){e.method="textDocument/references",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(be||(t.ReferencesRequest=be={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ve||(t.DocumentHighlightRequest=ve={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ke||(t.DocumentSymbolRequest=ke={})),function(e){e.method="textDocument/codeAction",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Se||(t.CodeActionRequest=Se={})),function(e){e.method="codeAction/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Te||(t.CodeActionResolveRequest=Te={})),function(e){e.method="workspace/symbol",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Re||(t.WorkspaceSymbolRequest=Re={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ce||(t.WorkspaceSymbolResolveRequest=Ce={})),function(e){e.method="textDocument/codeLens",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(De||(t.CodeLensRequest=De={})),function(e){e.method="codeLens/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(xe||(t.CodeLensResolveRequest=xe={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(we||(t.CodeLensRefreshRequest=we={})),function(e){e.method="textDocument/documentLink",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Pe||(t.DocumentLinkRequest=Pe={})),function(e){e.method="documentLink/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(_e||(t.DocumentLinkResolveRequest=_e={})),function(e){e.method="textDocument/formatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Oe||(t.DocumentFormattingRequest=Oe={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ee||(t.DocumentRangeFormattingRequest=Ee={})),function(e){e.method="textDocument/rangesFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ne||(t.DocumentRangesFormattingRequest=Ne={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Me||(t.DocumentOnTypeFormattingRequest=Me={})),function(e){e.Identifier=1}(Ae||(t.PrepareSupportDefaultBehavior=Ae={})),function(e){e.method="textDocument/rename",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(qe||(t.RenameRequest=qe={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(je||(t.PrepareRenameRequest=je={})),function(e){e.method="workspace/executeCommand",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Le||(t.ExecuteCommandRequest=Le={})),function(e){e.method="workspace/applyEdit",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType("workspace/applyEdit")}(Ie||(t.ApplyWorkspaceEditRequest=Ie={}))},5316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.LinkedEditingRangeRequest=o={}))},9047:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const r=n(372);var o,i,s;!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(o||(t.UniquenessLevel=o={})),function(e){e.$import="import",e.$export="export",e.local="local"}(i||(t.MonikerKind=i={})),function(e){e.method="textDocument/moniker",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.MonikerRequest=s={}))},3557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const r=n(4292),o=n(8598),i=n(372);var s,a,c,u,l,d,f,h,p,m;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(s||(t.NotebookCellKind=s={})),function(e){e.create=function(e,t){const n={executionOrder:e};return!0!==t&&!1!==t||(n.success=t),n},e.is=function(e){const t=e;return o.objectLiteral(t)&&r.uinteger.is(t.executionOrder)&&(void 0===t.success||o.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(a||(t.ExecutionSummary=a={})),function(e){function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(typeof e!=typeof n)return!1;if("object"!=typeof e)return!1;const r=Array.isArray(e),i=Array.isArray(n);if(r!==i)return!1;if(r&&i){if(e.length!==n.length)return!1;for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const r=n(7123),o=n(372);var i,s,a;!function(e){e.type=new r.ProgressType,e.is=function(t){return t===e.type}}(i||(t.WorkDoneProgress=i={})),function(e){e.method="window/workDoneProgress/create",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method)}(s||(t.WorkDoneProgressCreateRequest=s={})),function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(a||(t.WorkDoneProgressCancelNotification=a={}))},3487:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/selectionRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.SelectionRangeRequest=o={}))},2478:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const r=n(372);var o,i,s,a,c,u;!function(e){e.Relative="relative"}(o||(t.TokenFormat=o={})),function(e){e.method="textDocument/semanticTokens",e.type=new r.RegistrationType(e.method)}(i||(t.SemanticTokensRegistrationType=i={})),function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=i.method}(s||(t.SemanticTokensRequest=s={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=i.method}(a||(t.SemanticTokensDeltaRequest=a={})),function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=i.method}(c||(t.SemanticTokensRangeRequest=c={})),function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(u||(t.SemanticTokensRefreshRequest=u={}))},908:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const r=n(372);var o;!function(e){e.method="window/showDocument",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(o||(t.ShowDocumentRequest=o={}))},8461:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/typeDefinition",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.TypeDefinitionRequest=o={}))},645:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const r=n(372);var o,i,s;!function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.TypeHierarchyPrepareRequest=o={})),function(e){e.method="typeHierarchy/supertypes",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.TypeHierarchySupertypesRequest=i={})),function(e){e.method="typeHierarchy/subtypes",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.TypeHierarchySubtypesRequest=s={}))},9935:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const r=n(372);var o,i;!function(e){e.method="workspace/workspaceFolders",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(o||(t.WorkspaceFoldersRequest=o={})),function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(i||(t.DidChangeWorkspaceFoldersNotification=i={}))},8598:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},7354:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const i=n(2067);o(n(2067),t),o(n(8766),t),t.createProtocolConnection=function(e,t,n,r){return(0,i.createMessageConnection)(e,t,n,r)}},948:(e,t,n)=>{"use strict";e.exports=n(7354)},2861:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.NotebookDocuments=t.TextDocuments=t.SemanticTokensBuilder=void 0;const i=n(2655);Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return i.SemanticTokensBuilder}});const s=n(1276);o(n(7354),t);const a=n(1662);Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return a.TextDocuments}});const c=n(20);var u;Object.defineProperty(t,"NotebookDocuments",{enumerable:!0,get:function(){return c.NotebookDocuments}}),o(n(7874),t),function(e){e.all={__brand:"features",languages:s.InlineCompletionFeature}}(u||(t.ProposedFeatures=u={}))},3918:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const r=n(7354);t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(r.CallHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))),onIncomingCalls:e=>{const t=r.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onOutgoingCalls:e=>{const t=r.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},8491:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const r=n(7354),o=n(8867);t.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?o.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){const t={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(r.ConfigurationRequest.type,t).then((t=>Array.isArray(t)?Array.isArray(e)?t:t[0]:Array.isArray(e)?[]:null))}}},493:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=void 0;const r=n(7354);t.DiagnosticFeature=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(r.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(r.DocumentDiagnosticRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r.DocumentDiagnosticRequest.partialResult,t)))),onWorkspace:e=>this.connection.onRequest(r.WorkspaceDiagnosticRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r.WorkspaceDiagnosticRequest.partialResult,t))))}}}},2697:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;const r=n(7354);t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){return this.connection.onNotification(r.DidCreateFilesNotification.type,(t=>e(t)))}onDidRenameFiles(e){return this.connection.onNotification(r.DidRenameFilesNotification.type,(t=>e(t)))}onDidDeleteFiles(e){return this.connection.onNotification(r.DidDeleteFilesNotification.type,(t=>e(t)))}onWillCreateFiles(e){return this.connection.onRequest(r.WillCreateFilesRequest.type,((t,n)=>e(t,n)))}onWillRenameFiles(e){return this.connection.onRequest(r.WillRenameFilesRequest.type,((t,n)=>e(t,n)))}onWillDeleteFiles(e){return this.connection.onRequest(r.WillDeleteFilesRequest.type,((t,n)=>e(t,n)))}}},6007:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const r=n(7354);t.FoldingRangeFeature=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(r.FoldingRangeRefreshRequest.type),on:e=>{const t=r.FoldingRangeRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},4635:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintFeature=void 0;const r=n(7354);t.InlayHintFeature=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(r.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(r.InlayHintRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t)))),resolve:e=>this.connection.onRequest(r.InlayHintResolveRequest.type,((t,n)=>e(t,n)))}}}},1276:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionFeature=void 0;const r=n(7354);t.InlineCompletionFeature=e=>class extends e{get inlineCompletion(){return{on:e=>this.connection.onRequest(r.InlineCompletionRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t))))}}}},1815:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const r=n(7354);t.InlineValueFeature=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(r.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(r.InlineValueRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t))))}}}},8517:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;const r=n(7354);t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){return this.connection.onRequest(r.LinkedEditingRangeRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0)))}}},2936:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;const r=n(7354);t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=r.MonikerRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},20:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocuments=t.NotebookSyncFeature=void 0;const r=n(7354),o=n(1662);t.NotebookSyncFeature=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(r.DidOpenNotebookDocumentNotification.type,(t=>e(t))),onDidChangeNotebookDocument:e=>this.connection.onNotification(r.DidChangeNotebookDocumentNotification.type,(t=>e(t))),onDidSaveNotebookDocument:e=>this.connection.onNotification(r.DidSaveNotebookDocumentNotification.type,(t=>e(t))),onDidCloseNotebookDocument:e=>this.connection.onNotification(r.DidCloseNotebookDocumentNotification.type,(t=>e(t)))}}};class i{onDidOpenTextDocument(e){return this.openHandler=e,r.Disposable.create((()=>{this.openHandler=void 0}))}openTextDocument(e){return this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,r.Disposable.create((()=>{this.changeHandler=e}))}changeTextDocument(e){return this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,r.Disposable.create((()=>{this.closeHandler=void 0}))}closeTextDocument(e){return this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return i.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return i.NULL_DISPOSE}onDidSaveTextDocument(){return i.NULL_DISPOSE}}i.NULL_DISPOSE=Object.freeze({dispose:()=>{}}),t.NotebookDocuments=class{constructor(e){e instanceof o.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new o.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new r.Emitter,this._onDidChange=new r.Emitter,this._onDidSave=new r.Emitter,this._onDidClose=new r.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){const t=this.notebookCellMap.get(e);return t&&t[0]}findNotebookDocumentForCell(e){const t="string"==typeof e?e:e.document,n=this.notebookCellMap.get(t);return n&&n[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){const t=new i,n=[];return n.push(this.cellTextDocuments.listen(t)),n.push(e.notebooks.synchronization.onDidOpenNotebookDocument((async e=>{this.notebookDocuments.set(e.notebookDocument.uri,e.notebookDocument);for(const n of e.cellTextDocuments)await t.openTextDocument({textDocument:n});this.updateCellMap(e.notebookDocument),this._onDidOpen.fire(e.notebookDocument)}))),n.push(e.notebooks.synchronization.onDidChangeNotebookDocument((async e=>{const n=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0===n)return;n.version=e.notebookDocument.version;const r=n.metadata;let o=!1;const i=e.change;void 0!==i.metadata&&(o=!0,n.metadata=i.metadata);const s=[],a=[],c=[],u=[];if(void 0!==i.cells){const e=i.cells;if(void 0!==e.structure){const r=e.structure.array;if(n.cells.splice(r.start,r.deleteCount,...void 0!==r.cells?r.cells:[]),void 0!==e.structure.didOpen)for(const n of e.structure.didOpen)await t.openTextDocument({textDocument:n}),s.push(n.uri);if(e.structure.didClose)for(const n of e.structure.didClose)await t.closeTextDocument({textDocument:n}),a.push(n.uri)}if(void 0!==e.data){const t=new Map(e.data.map((e=>[e.document,e])));for(let e=0;e<=n.cells.length;e++){const r=t.get(n.cells[e].document);if(void 0!==r){const o=n.cells.splice(e,1,r);if(c.push({old:o[0],new:r}),t.delete(r.document),0===t.size)break}}}if(void 0!==e.textContent)for(const n of e.textContent)await t.changeTextDocument({textDocument:n.document,contentChanges:n.changes}),u.push(n.document.uri)}this.updateCellMap(n);const l={notebookDocument:n};o&&(l.metadata={old:r,new:n.metadata});const d=[];for(const e of s)d.push(this.getNotebookCell(e));const f=[];for(const e of a)f.push(this.getNotebookCell(e));const h=[];for(const e of u)h.push(this.getNotebookCell(e));(d.length>0||f.length>0||c.length>0||h.length>0)&&(l.cells={added:d,removed:f,changed:{data:c,textContent:h}}),void 0===l.metadata&&void 0===l.cells||this._onDidChange.fire(l)}))),n.push(e.notebooks.synchronization.onDidSaveNotebookDocument((e=>{const t=this.notebookDocuments.get(e.notebookDocument.uri);void 0!==t&&this._onDidSave.fire(t)}))),n.push(e.notebooks.synchronization.onDidCloseNotebookDocument((async e=>{const n=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0!==n){this._onDidClose.fire(n);for(const n of e.cellTextDocuments)await t.closeTextDocument({textDocument:n});this.notebookDocuments.delete(e.notebookDocument.uri);for(const e of n.cells)this.notebookCellMap.delete(e.document)}}))),r.Disposable.create((()=>{n.forEach((e=>e.dispose()))}))}updateCellMap(e){for(const t of e.cells)this.notebookCellMap.set(t.document,[t,e])}}},2938:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attachPartialResult=t.ProgressFeature=t.attachWorkDone=void 0;const r=n(7354),o=n(6116);class i{constructor(e,t){this._connection=e,this._token=t,i.Instances.set(this._token,this)}begin(e,t,n,o){const i={kind:"begin",title:e,message:n,cancellable:o};"number"==typeof t&&(i.percentage=Math.round(t)),this._connection.sendProgress(r.WorkDoneProgress.type,this._token,i)}report(e,t){const n={kind:"report"};"number"==typeof e?(n.percentage=Math.round(e),void 0!==t&&(n.message=t)):n.message=e,this._connection.sendProgress(r.WorkDoneProgress.type,this._token,n)}done(){i.Instances.delete(this._token),this._connection.sendProgress(r.WorkDoneProgress.type,this._token,{kind:"end"})}}i.Instances=new Map;class s extends i{constructor(e,t){super(e,t),this._source=new r.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class a{constructor(){}begin(){}report(){}done(){}}class c extends a{constructor(){super(),this._source=new r.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}var u;t.attachWorkDone=function(e,t){if(void 0===t||void 0===t.workDoneToken)return new a;const n=t.workDoneToken;return delete t.workDoneToken,new i(e,n)},t.ProgressFeature=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),!0===e?.window?.workDoneProgress&&(this._progressSupported=!0,this.connection.onNotification(r.WorkDoneProgressCancelNotification.type,(e=>{const t=i.Instances.get(e.token);(t instanceof s||t instanceof c)&&t.cancel()})))}attachWorkDoneProgress(e){return void 0===e?new a:new i(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=(0,o.generateUuid)();return this.connection.sendRequest(r.WorkDoneProgressCreateRequest.type,{token:e}).then((()=>new s(this.connection,e)))}return Promise.resolve(new c)}},function(e){e.type=new r.ProgressType}(u||(u={}));class l{constructor(e,t){this._connection=e,this._token=t}report(e){this._connection.sendProgress(u.type,this._token,e)}}t.attachPartialResult=function(e,t){if(void 0===t||void 0===t.partialResultToken)return;const n=t.partialResultToken;return delete t.partialResultToken,new l(e,n)}},2655:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensDiff=t.SemanticTokensFeature=void 0;const r=n(7354);t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(r.SemanticTokensRefreshRequest.type),on:e=>{const t=r.SemanticTokensRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onDelta:e=>{const t=r.SemanticTokensDeltaRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onRange:e=>{const t=r.SemanticTokensRangeRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}};class o{constructor(e,t){this.originalSequence=e,this.modifiedSequence=t}computeDiff(){const e=this.originalSequence.length,t=this.modifiedSequence.length;let n=0;for(;n=n&&o>=n&&this.originalSequence[r]===this.modifiedSequence[o];)r--,o--;(r0&&(i-=this._prevLine,0===i&&(s-=this._prevChar)),this._data[this._dataLen++]=i,this._data[this._dataLen++]=s,this._data[this._dataLen++]=n,this._data[this._dataLen++]=r,this._data[this._dataLen++]=o,this._prevLine=e,this._prevChar=t}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return void 0!==this._prevData}buildEdits(){return void 0!==this._prevData?{resultId:this.id,edits:new o(this._prevData,this._data).computeDiff()}:this.build()}}},7874:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.combineFeatures=t.combineNotebooksFeatures=t.combineLanguagesFeatures=t.combineWorkspaceFeatures=t.combineWindowFeatures=t.combineClientFeatures=t.combineTracerFeatures=t.combineTelemetryFeatures=t.combineConsoleFeatures=t._NotebooksImpl=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=void 0;const r=n(7354),o=n(8867),i=n(6116),s=n(2938),a=n(8491),c=n(2112),u=n(3918),l=n(2655),d=n(8817),f=n(2697),h=n(8517),p=n(5026),m=n(1815),g=n(6007),y=n(4635),b=n(493),v=n(20),k=n(2936);function S(e){if(null!==e)return e}t.ErrorMessageTracker=class{constructor(){this._messages=Object.create(null)}add(e){let t=this._messages[e];t||(t=0),t++,this._messages[e]=t}sendErrors(e){Object.keys(this._messages).forEach((t=>{e.window.showErrorMessage(t)}))}};class T{constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(r.MessageType.Error,e)}warn(e){this.send(r.MessageType.Warning,e)}info(e){this.send(r.MessageType.Info,e)}log(e){this.send(r.MessageType.Log,e)}debug(e){this.send(r.MessageType.Debug,e)}send(e,t){this._rawConnection&&this._rawConnection.sendNotification(r.LogMessageNotification.type,{type:e,message:t}).catch((()=>{(0,r.RAL)().console.error("Sending log message failed")}))}}const R=(0,d.ShowDocumentFeature)((0,s.ProgressFeature)(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...t){const n={type:r.MessageType.Error,message:e,actions:t};return this.connection.sendRequest(r.ShowMessageRequest.type,n).then(S)}showWarningMessage(e,...t){const n={type:r.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(r.ShowMessageRequest.type,n).then(S)}showInformationMessage(e,...t){const n={type:r.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(r.ShowMessageRequest.type,n).then(S)}}));var C,D;!function(e){e.create=function(){return new x}}(C||(t.BulkRegistration=C={}));class x{constructor(){this._registrations=[],this._registered=new Set}add(e,t){const n=o.string(e)?e:e.method;if(this._registered.has(n))throw new Error(`${n} is already added to this registration`);const r=i.generateUuid();this._registrations.push({id:r,method:n,registerOptions:t||{}}),this._registered.add(n)}asRegistrationParams(){return{registrations:this._registrations}}}!function(e){e.create=function(){return new w(void 0,[])}}(D||(t.BulkUnregistration=D={}));class w{constructor(e,t){this._connection=e,this._unregistrations=new Map,t.forEach((e=>{this._unregistrations.set(e.method,e)}))}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){const e=[];for(const t of this._unregistrations.values())e.push(t);const t={unregisterations:e};this._connection.sendRequest(r.UnregistrationRequest.type,t).catch((()=>{this._connection.console.info("Bulk unregistration failed.")}))}disposeSingle(e){const t=o.string(e)?e:e.method,n=this._unregistrations.get(t);if(!n)return!1;const i={unregisterations:[n]};return this._connection.sendRequest(r.UnregistrationRequest.type,i).then((()=>{this._unregistrations.delete(t)}),(e=>{this._connection.console.info(`Un-registering request handler for ${n.id} failed.`)})),!0}}class P{attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,t,n){return e instanceof x?this.registerMany(e):e instanceof w?this.registerSingle1(e,t,n):this.registerSingle2(e,t)}registerSingle1(e,t,n){const s=o.string(t)?t:t.method,a=i.generateUuid(),c={registrations:[{id:a,method:s,registerOptions:n||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(r.RegistrationRequest.type,c).then((t=>(e.add({id:a,method:s}),e)),(e=>(this.connection.console.info(`Registering request handler for ${s} failed.`),Promise.reject(e))))}registerSingle2(e,t){const n=o.string(e)?e:e.method,s=i.generateUuid(),a={registrations:[{id:s,method:n,registerOptions:t||{}}]};return this.connection.sendRequest(r.RegistrationRequest.type,a).then((e=>r.Disposable.create((()=>{this.unregisterSingle(s,n).catch((()=>{this.connection.console.info(`Un-registering capability with id ${s} failed.`)}))}))),(e=>(this.connection.console.info(`Registering request handler for ${n} failed.`),Promise.reject(e))))}unregisterSingle(e,t){const n={unregisterations:[{id:e,method:t}]};return this.connection.sendRequest(r.UnregistrationRequest.type,n).catch((()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)}))}registerMany(e){const t=e.asRegistrationParams();return this.connection.sendRequest(r.RegistrationRequest.type,t).then((()=>new w(this._connection,t.registrations.map((e=>({id:e.id,method:e.method}))))),(e=>(this.connection.console.info("Bulk registration failed."),Promise.reject(e))))}}const _=(0,f.FileOperationsFeature)((0,c.WorkspaceFoldersFeature)((0,a.ConfigurationFeature)(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){const t=(n=e)&&n.edit?e:{edit:e};var n;return this.connection.sendRequest(r.ApplyWorkspaceEditRequest.type,t)}})));class O{constructor(){this._trace=r.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,t){this._trace!==r.Trace.Off&&this.connection.sendNotification(r.LogTraceNotification.type,{message:e,verbose:this._trace===r.Trace.Verbose?t:void 0}).catch((()=>{}))}}class E{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(r.TelemetryEventNotification.type,e).catch((()=>{this.connection.console.log("Sending TelemetryEventNotification failed")}))}}class N{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,s.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,s.attachPartialResult)(this.connection,t)}}t._LanguagesImpl=N;const M=(0,g.FoldingRangeFeature)((0,k.MonikerFeature)((0,b.DiagnosticFeature)((0,y.InlayHintFeature)((0,m.InlineValueFeature)((0,p.TypeHierarchyFeature)((0,h.LinkedEditingRangeFeature)((0,l.SemanticTokensFeature)((0,u.CallHierarchyFeature)(N)))))))));class A{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,s.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,s.attachPartialResult)(this.connection,t)}}t._NotebooksImpl=A;const q=(0,v.NotebookSyncFeature)(A);function j(e,t){return function(n){return t(e(n))}}function L(e,t){return function(n){return t(e(n))}}function I(e,t){return function(n){return t(e(n))}}function F(e,t){return function(n){return t(e(n))}}function $(e,t){return function(n){return t(e(n))}}function V(e,t){return function(n){return t(e(n))}}function W(e,t){return function(n){return t(e(n))}}function U(e,t){return function(n){return t(e(n))}}t.combineConsoleFeatures=j,t.combineTelemetryFeatures=L,t.combineTracerFeatures=I,t.combineClientFeatures=F,t.combineWindowFeatures=$,t.combineWorkspaceFeatures=V,t.combineLanguagesFeatures=W,t.combineNotebooksFeatures=U,t.combineFeatures=function(e,t){function n(e,t,n){return e&&t?n(e,t):e||t}return{__brand:"features",console:n(e.console,t.console,j),tracer:n(e.tracer,t.tracer,I),telemetry:n(e.telemetry,t.telemetry,L),client:n(e.client,t.client,F),window:n(e.window,t.window,$),workspace:n(e.workspace,t.workspace,V),languages:n(e.languages,t.languages,W),notebooks:n(e.notebooks,t.notebooks,U)}},t.createConnection=function(e,t,n){const i=n&&n.console?new(n.console(T)):new T,a=e(i);i.rawAttach(a);const c=n&&n.tracer?new(n.tracer(O)):new O,u=n&&n.telemetry?new(n.telemetry(E)):new E,l=n&&n.client?new(n.client(P)):new P,d=n&&n.window?new(n.window(R)):new R,f=n&&n.workspace?new(n.workspace(_)):new _,h=n&&n.languages?new(n.languages(M)):new M,p=n&&n.notebooks?new(n.notebooks(q)):new q,m=[i,c,u,l,d,f,h,p];let g,y,b;const v={listen:()=>a.listen(),sendRequest:(e,...t)=>a.sendRequest(o.string(e)?e:e.method,...t),onRequest:(e,t)=>a.onRequest(e,t),sendNotification:(e,t)=>{const n=o.string(e)?e:e.method;return a.sendNotification(n,t)},onNotification:(e,t)=>a.onNotification(e,t),onProgress:a.onProgress,sendProgress:a.sendProgress,onInitialize:e=>(y=e,{dispose:()=>{y=void 0}}),onInitialized:e=>a.onNotification(r.InitializedNotification.type,e),onShutdown:e=>(g=e,{dispose:()=>{g=void 0}}),onExit:e=>(b=e,{dispose:()=>{b=void 0}}),get console(){return i},get telemetry(){return u},get tracer(){return c},get client(){return l},get window(){return d},get workspace(){return f},get languages(){return h},get notebooks(){return p},onDidChangeConfiguration:e=>a.onNotification(r.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>a.onNotification(r.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>a.onNotification(r.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>a.onNotification(r.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>a.onNotification(r.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>a.onNotification(r.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>a.onRequest(r.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>a.onNotification(r.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>a.sendNotification(r.PublishDiagnosticsNotification.type,e),onHover:e=>a.onRequest(r.HoverRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onCompletion:e=>a.onRequest(r.CompletionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCompletionResolve:e=>a.onRequest(r.CompletionResolveRequest.type,e),onSignatureHelp:e=>a.onRequest(r.SignatureHelpRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDeclaration:e=>a.onRequest(r.DeclarationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDefinition:e=>a.onRequest(r.DefinitionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onTypeDefinition:e=>a.onRequest(r.TypeDefinitionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onImplementation:e=>a.onRequest(r.ImplementationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onReferences:e=>a.onRequest(r.ReferencesRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentHighlight:e=>a.onRequest(r.DocumentHighlightRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentSymbol:e=>a.onRequest(r.DocumentSymbolRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onWorkspaceSymbol:e=>a.onRequest(r.WorkspaceSymbolRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onWorkspaceSymbolResolve:e=>a.onRequest(r.WorkspaceSymbolResolveRequest.type,e),onCodeAction:e=>a.onRequest(r.CodeActionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCodeActionResolve:e=>a.onRequest(r.CodeActionResolveRequest.type,((t,n)=>e(t,n))),onCodeLens:e=>a.onRequest(r.CodeLensRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCodeLensResolve:e=>a.onRequest(r.CodeLensResolveRequest.type,((t,n)=>e(t,n))),onDocumentFormatting:e=>a.onRequest(r.DocumentFormattingRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDocumentRangeFormatting:e=>a.onRequest(r.DocumentRangeFormattingRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDocumentOnTypeFormatting:e=>a.onRequest(r.DocumentOnTypeFormattingRequest.type,((t,n)=>e(t,n))),onRenameRequest:e=>a.onRequest(r.RenameRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onPrepareRename:e=>a.onRequest(r.PrepareRenameRequest.type,((t,n)=>e(t,n))),onDocumentLinks:e=>a.onRequest(r.DocumentLinkRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentLinkResolve:e=>a.onRequest(r.DocumentLinkResolveRequest.type,((t,n)=>e(t,n))),onDocumentColor:e=>a.onRequest(r.DocumentColorRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onColorPresentation:e=>a.onRequest(r.ColorPresentationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onFoldingRanges:e=>a.onRequest(r.FoldingRangeRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onSelectionRanges:e=>a.onRequest(r.SelectionRangeRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onExecuteCommand:e=>a.onRequest(r.ExecuteCommandRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),dispose:()=>a.dispose()};for(const e of m)e.attach(v);return a.onRequest(r.InitializeRequest.type,(e=>{t.initialize(e),o.string(e.trace)&&(c.trace=r.Trace.fromString(e.trace));for(const t of m)t.initialize(e.capabilities);if(y){const t=y(e,(new r.CancellationTokenSource).token,(0,s.attachWorkDone)(a,e),void 0);return(n=t,n instanceof Promise?n:o.thenable(n)?new Promise(((e,t)=>{n.then((t=>e(t)),(e=>t(e)))})):Promise.resolve(n)).then((e=>{if(e instanceof r.ResponseError)return e;let t=e;t||(t={capabilities:{}});let n=t.capabilities;n||(n={},t.capabilities=n),void 0===n.textDocumentSync||null===n.textDocumentSync?n.textDocumentSync=o.number(v.__textDocumentSync)?v.__textDocumentSync:r.TextDocumentSyncKind.None:o.number(n.textDocumentSync)||o.number(n.textDocumentSync.change)||(n.textDocumentSync.change=o.number(v.__textDocumentSync)?v.__textDocumentSync:r.TextDocumentSyncKind.None);for(const e of m)e.fillServerCapabilities(n);return t}))}{const e={capabilities:{textDocumentSync:r.TextDocumentSyncKind.None}};for(const t of m)t.fillServerCapabilities(e.capabilities);return e}var n})),a.onRequest(r.ShutdownRequest.type,(()=>(t.shutdownReceived=!0,g?g((new r.CancellationTokenSource).token):void 0))),a.onNotification(r.ExitNotification.type,(()=>{try{if(b)return b()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}})),a.onNotification(r.SetTraceNotification.type,(e=>{c.trace=r.Trace.fromString(e.value)})),v}},8817:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;const r=n(7354);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(r.ShowDocumentRequest.type,e)}}},1662:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocuments=void 0;const r=n(7354);t.TextDocuments=class{constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new r.Emitter,this._onDidOpen=new r.Emitter,this._onDidClose=new r.Emitter,this._onDidSave=new r.Emitter,this._onWillSave=new r.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=r.TextDocumentSyncKind.Incremental;const t=[];return t.push(e.onDidOpenTextDocument((e=>{const t=e.textDocument,n=this._configuration.create(t.uri,t.languageId,t.version,t.text);this._syncedDocuments.set(t.uri,n);const r=Object.freeze({document:n});this._onDidOpen.fire(r),this._onDidChangeContent.fire(r)}))),t.push(e.onDidChangeTextDocument((e=>{const t=e.textDocument,n=e.contentChanges;if(0===n.length)return;const{version:r}=t;if(null==r)throw new Error(`Received document change event for ${t.uri} without valid version identifier`);let o=this._syncedDocuments.get(t.uri);void 0!==o&&(o=this._configuration.update(o,n,r),this._syncedDocuments.set(t.uri,o),this._onDidChangeContent.fire(Object.freeze({document:o})))}))),t.push(e.onDidCloseTextDocument((e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&(this._syncedDocuments.delete(e.textDocument.uri),this._onDidClose.fire(Object.freeze({document:t})))}))),t.push(e.onWillSaveTextDocument((e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onWillSave.fire(Object.freeze({document:t,reason:e.reason}))}))),t.push(e.onWillSaveTextDocumentWaitUntil(((e,t)=>{const n=this._syncedDocuments.get(e.textDocument.uri);return void 0!==n&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:n,reason:e.reason}),t):[]}))),t.push(e.onDidSaveTextDocument((e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onDidSave.fire(Object.freeze({document:t}))}))),r.Disposable.create((()=>{t.forEach((e=>e.dispose()))}))}}},5026:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const r=n(7354);t.TypeHierarchyFeature=e=>class extends e{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(r.TypeHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))),onSupertypes:e=>{const t=r.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onSubtypes:e=>{const t=r.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},8867:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return"function"==typeof e}function o(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=r,t.array=o,t.stringArray=function(e){return o(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&r(e.then)}},6116:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class n{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class r extends n{static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return r._oneOf(r._chars)}constructor(){super([r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-","4",r._randomHex(),r._randomHex(),r._randomHex(),"-",r._oneOf(r._timeHighBits),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex()].join(""))}}function o(){return new r}r._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],r._timeHighBits=["8","9","a","b"],t.empty=new n("00000000-0000-0000-0000-000000000000"),t.v4=o;const i=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return i.test(e)}t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new n(e)},t.generateUuid=function(){return o().asHex()}},2112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;const r=n(7354);t.WorkspaceFoldersFeature=e=>class extends e{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);const t=e.workspace;t&&t.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new r.Emitter,this.connection.onNotification(r.DidChangeWorkspaceFoldersNotification.type,(e=>{this._onDidChangeWorkspaceFolders.fire(e.event)})))}fillServerCapabilities(e){super.fillServerCapabilities(e);const t=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=!0===t||"string"==typeof t}getWorkspaceFolders(){return this.connection.sendRequest(r.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return this._notificationIsAutoRegistered||this._unregistration||(this._unregistration=this.connection.client.register(r.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}},3911:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveModulePath=t.FileSystem=t.resolveGlobalYarnPath=t.resolveGlobalNodePath=t.resolve=t.uriToFilePath=void 0;const r=n(7016),o=n(6928),i=n(9896),s=n(5317);function a(){return"win32"===process.platform}function c(e,t,n,r){const a="NODE_PATH",c=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise(((u,l)=>{const d=process.env,f=Object.create(null);Object.keys(d).forEach((e=>f[e]=d[e])),t&&i.existsSync(t)&&(f[a]?f[a]=t+o.delimiter+f[a]:f[a]=t,r&&r(`NODE_PATH value is: ${f[a]}`)),f.ELECTRON_RUN_AS_NODE="1";try{const t=(0,s.fork)("",[],{cwd:n,env:f,execArgv:["-e",c]});if(void 0===t.pid)return void l(new Error(`Starting process to resolve node module ${e} failed`));t.on("error",(e=>{l(e)})),t.on("message",(n=>{"r"===n.c&&(t.send({c:"e"}),n.s?u(n.r):l(new Error(`Failed to resolve module: ${e}`)))}));const r={c:"rs",a:e};t.send(r)}catch(e){l(e)}}))}function u(e){let t="npm";const n=Object.create(null);Object.keys(process.env).forEach((e=>n[e]=process.env[e])),n.NO_UPDATE_NOTIFIER="true";const r={encoding:"utf8",env:n};a()&&(t="npm.cmd",r.shell=!0);const i=()=>{};try{process.on("SIGPIPE",i);const n=(0,s.spawnSync)(t,["config","get","prefix"],r).stdout;if(!n)return void(e&&e("'npm config get prefix' didn't return a value."));const c=n.trim();return e&&e(`'npm config get prefix' value is: ${c}`),c.length>0?a()?o.join(c,"node_modules"):o.join(c,"lib","node_modules"):void 0}catch(e){return}finally{process.removeListener("SIGPIPE",i)}}var l;t.uriToFilePath=function(e){const t=r.parse(e);if("file:"!==t.protocol||!t.path)return;const n=t.path.split("/");for(let e=0,t=n.length;e1){const e=n[0],t=n[1];0===e.length&&t.length>1&&":"===t[1]&&n.shift()}return o.normalize(n.join("/"))},t.resolve=c,t.resolveGlobalNodePath=u,t.resolveGlobalYarnPath=function(e){let t="yarn";const n={encoding:"utf8"};a()&&(t="yarn.cmd",n.shell=!0);const r=()=>{};try{process.on("SIGPIPE",r);const i=(0,s.spawnSync)(t,["global","dir","--json"],n),a=i.stdout;if(!a)return void(e&&(e("'yarn global dir' didn't return a value."),i.stderr&&e(i.stderr)));const c=a.trim().split(/\r?\n/);for(const e of c)try{const t=JSON.parse(e);if("log"===t.type)return o.join(t.data,"node_modules")}catch(e){}return}catch(e){return}finally{process.removeListener("SIGPIPE",r)}},function(e){let t;function n(){return void 0!==t||(t=!("win32"===process.platform||i.existsSync(__filename.toUpperCase())&&i.existsSync(__filename.toLowerCase()))),t}e.isCaseSensitive=n,e.isParent=function(e,t){return n()?0===o.normalize(t).indexOf(o.normalize(e)):0===o.normalize(t).toLowerCase().indexOf(o.normalize(e).toLowerCase())}}(l||(t.FileSystem=l={})),t.resolveModulePath=function(e,t,n,r){return n?(o.isAbsolute(n)||(n=o.join(e,n)),c(t,n,n,r).then((e=>l.isParent(n,e)?e:Promise.reject(new Error(`Failed to load ${t} from node path location.`)))).then(void 0,(n=>c(t,u(r),e,r)))):c(t,u(r),e,r)}},1327:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.Files=void 0;const i=n(7975),s=n(8867),a=n(7874),c=n(3911),u=n(948);var l;function d(){0}o(n(948),t),o(n(2861),t),function(e){e.uriToFilePath=c.uriToFilePath,e.resolveGlobalNodePath=c.resolveGlobalNodePath,e.resolveGlobalYarnPath=c.resolveGlobalYarnPath,e.resolve=c.resolve,e.resolveModulePath=c.resolveModulePath}(l||(t.Files=l={}));let f,h=!1;!function(){const e="--clientProcessId";function t(e){try{const t=parseInt(e);isNaN(t)||(f=setInterval((()=>{try{process.kill(t,0)}catch(e){d(),process.exit(h?0:1)}}),3e3))}catch(e){}}for(let n=2;n{const t=e.processId;s.number(t)&&void 0===f&&setInterval((()=>{try{process.kill(t,0)}catch(e){process.exit(h?0:1)}}),3e3)},get shutdownReceived(){return h},set shutdownReceived(e){h=e},exit:e=>{d(),process.exit(e)}};t.createConnection=function(e,t,n,r){let o,c,l,f;return void 0!==e&&"features"===e.__brand&&(o=e,e=t,t=n,n=r),u.ConnectionStrategy.is(e)||u.ConnectionOptions.is(e)?f=e:(c=e,l=t,f=n),function(e,t,n,r){let o=!1;if(!e&&!t&&process.argv.length>2){let n,r;const i=process.argv.slice(2);for(let s=0;s{d(),process.exit(h?0:1)})),t.on("close",(()=>{d(),process.exit(h?0:1)}))}return(0,a.createConnection)((r=>{const s=(0,u.createProtocolConnection)(e,t,r,n);return o&&function(e){function t(e){return e.map((e=>"string"==typeof e?e:(0,i.inspect)(e))).join(" ")}const n=new Map;console.assert=function(n,...r){if(!n)if(0===r.length)e.error("Assertion failed");else{const[n,...o]=r;e.error(`Assertion failed: ${n} ${t(o)}`)}},console.count=function(t="default"){const r=String(t);let o=n.get(r)??0;o+=1,n.set(r,o),e.log(`${r}: ${r}`)},console.countReset=function(e){void 0===e?n.clear():n.delete(String(e))},console.debug=function(...n){e.log(t(n))},console.dir=function(t,n){e.log((0,i.inspect)(t,n))},console.log=function(...n){e.log(t(n))},console.error=function(...n){e.error(t(n))},console.trace=function(...n){const r=(new Error).stack.replace(/(.+\n){2}/,"");let o="Trace";0!==n.length&&(o+=`: ${t(n)}`),e.log(`${o}\n${r}`)},console.warn=function(...n){e.warn(t(n))}}(r),s}),p,r)}(c,l,f,o)}},5663:(e,t,n)=>{"use strict";e.exports=n(1327)},872:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startServer=function(e,t){function n(n=["https","http","file"]){const r={};for(const e of n)"file"===e?r[e]=t.file:"http"!==e&&"https"!==e||(r[e]=t.http);return t=>{const n=t.substr(0,t.indexOf(":")),o=r[n];return o?o.getContent(t):e.sendRequest(d.type,t).then((e=>e),(e=>Promise.reject(e.message)))}}let c=(0,s.getLanguageService)({workspaceContext:g,contributions:[],clientCapabilities:s.ClientCapabilities.LATEST});const b=new r.TextDocuments(s.TextDocument);b.listen(e);let v,k=!1,S=!1,T=!1,R=Number.MAX_VALUE,C=Number.MAX_VALUE,D=Number.MAX_VALUE,x=Number.MAX_VALUE,w=Number.MAX_VALUE,P=Number.MAX_VALUE,_=Number.MAX_VALUE;e.onInitialize((o=>{const a=o.initializationOptions||{},u=a?.handledSchemaProtocols;function l(e,t){const n=e.split(".");let r=o.capabilities;for(let e=0;r&&e{e.schemas.push({uri:n,fileMatch:[t]})}))}O&&O.forEach(((t,n)=>{let r=t.url;!r&&t.schema&&(r=t.schema.id||`vscode://schemas/custom/${n}`),r&&e.schemas.push({uri:r,fileMatch:t.fileMatch,schema:t.schema,folderUri:t.folderUri})})),c.configure(e),v?.requestRefresh()}async function j(e){if(0===e.getText().length)return[];const t=I(e),n="jsonc"===e.languageId?{comments:"ignore",trailingCommas:"warning"}:{comments:"error",trailingCommas:"error"};return await c.doValidation(e,t,n)}e.onDidChangeConfiguration((n=>{const o=n.settings;t.configureHttpRequests?.(o?.http?.proxy,!!o.http?.proxyStrictSSL),O=o.json?.schemas,M=!!o.json?.validate?.enable,A=o.json?.keepLines?.enable||!1,q();const i=e=>Math.trunc(Math.max(e,0));if(C=i(o.json?.resultLimit||Number.MAX_VALUE),D=i(o.json?.jsonFoldingLimit||R),x=i(o.json?.jsoncFoldingLimit||R),w=i(o.json?.jsonColorDecoratorLimit||Number.MAX_VALUE),P=i(o.json?.jsoncColorDecoratorLimit||Number.MAX_VALUE),S){const t=o.json?.format?.enable;if(t){if(!N){const t=[{language:"json"},{language:"jsonc"}];N=[e.client.register(r.DocumentRangeFormattingRequest.type,{documentSelector:t}),e.client.register(r.DocumentFormattingRequest.type,{documentSelector:t})]}}else N&&(N.forEach((e=>e.then((e=>e.dispose())))),N=null)}})),e.onNotification(l.type,(e=>{E=e,q()})),e.onNotification(f.type,(e=>{let t=!1;if(Array.isArray(e))for(const n of e)c.resetSchema(n)&&(t=!0);else t=c.resetSchema(e);t&&v?.requestRefresh()})),e.onRequest(h.type,(async e=>{const t=b.get(e);return t?(q(),await j(t)):[]})),e.onRequest(p.type,(async e=>{const t=b.get(e);if(t){const e=I(t);return c.getLanguageStatus(t,e)}return{schemas:[]}})),e.onRequest(m.type,(async e=>{const t=e.uri,n=e.options,r=b.get(t);return r?c.sort(r,n):[]})),e.onDidChangeWatchedFiles((e=>{let t=!1;e.changes.forEach((e=>{c.resetSchema(e.uri)&&(t=!0)})),t&&v?.requestRefresh()}));const L=(0,a.getLanguageModelCache)(10,60,(e=>c.parseJSONDocument(e)));function I(e){return L.get(e)}function F(e,t,n){n.keepLines=A;const o=b.get(e.uri);if(o){const e=c.format(o,t??y(o),n);if(e.length>_){const t=s.TextDocument.applyEdits(o,e);return[r.TextEdit.replace(y(o),t)]}return e}return[]}b.onDidClose((e=>{L.onDocumentRemoved(e.document)})),e.onShutdown((()=>{L.dispose()})),e.onCompletion(((e,n)=>(0,o.runSafeAsync)(t,(async()=>{const t=b.get(e.textDocument.uri);if(t){const n=I(t);return c.doComplete(t,e.position,n)}return null}),null,`Error while computing completions for ${e.textDocument.uri}`,n))),e.onHover(((e,n)=>(0,o.runSafeAsync)(t,(async()=>{const t=b.get(e.textDocument.uri);if(t){const n=I(t);return c.doHover(t,e.position,n)}return null}),null,`Error while computing hover for ${e.textDocument.uri}`,n))),e.onDocumentSymbol(((e,n)=>(0,o.runSafe)(t,(()=>{const t=b.get(e.textDocument.uri);if(t){const e=I(t);return T?c.findDocumentSymbols2(t,e,{resultLimit:C}):c.findDocumentSymbols(t,e,{resultLimit:C})}return[]}),[],`Error while computing document symbols for ${e.textDocument.uri}`,n))),e.onCodeAction(((e,n)=>(0,o.runSafeAsync)(t,(async()=>{if(b.get(e.textDocument.uri)){const e=r.CodeAction.create("Sort JSON",r.CodeActionKind.Source.concat(".sort",".json"));return e.command={command:"json.sort",title:u.t("Sort JSON")},[e]}return[]}),[],`Error while computing code actions for ${e.textDocument.uri}`,n))),e.onDocumentRangeFormatting(((e,n)=>(0,o.runSafe)(t,(()=>F(e.textDocument,e.range,e.options)),[],`Error while formatting range for ${e.textDocument.uri}`,n))),e.onDocumentFormatting(((e,n)=>(0,o.runSafe)(t,(()=>F(e.textDocument,void 0,e.options)),[],`Error while formatting ${e.textDocument.uri}`,n))),e.onDocumentColor(((e,n)=>(0,o.runSafeAsync)(t,(async()=>{const t=b.get(e.textDocument.uri);if(t){const e=I(t),n="jsonc"===t.languageId?P:w;return c.findDocumentColors(t,e,{resultLimit:n})}return[]}),[],`Error while computing document colors for ${e.textDocument.uri}`,n))),e.onColorPresentation(((e,n)=>(0,o.runSafe)(t,(()=>{const t=b.get(e.textDocument.uri);if(t){const n=I(t);return c.getColorPresentations(t,n,e.color,e.range)}return[]}),[],`Error while computing color presentations for ${e.textDocument.uri}`,n))),e.onFoldingRanges(((e,n)=>(0,o.runSafe)(t,(()=>{const t=b.get(e.textDocument.uri);if(t){const e="jsonc"===t.languageId?x:D;return c.getFoldingRanges(t,{rangeLimit:e})}return null}),null,`Error while computing folding ranges for ${e.textDocument.uri}`,n))),e.onSelectionRanges(((e,n)=>(0,o.runSafe)(t,(()=>{const t=b.get(e.textDocument.uri);if(t){const n=I(t);return c.getSelectionRanges(t,e.positions,n)}return[]}),[],`Error while computing selection ranges for ${e.textDocument.uri}`,n))),e.onDocumentLinks(((e,n)=>(0,o.runSafeAsync)(t,(async()=>{const t=b.get(e.textDocument.uri);if(t){const e=I(t);return c.findLinks(t,e)}return[]}),[],`Error while computing links for ${e.textDocument.uri}`,n))),e.listen()};const r=n(1327),o=n(170),i=n(9531),s=n(7547),a=n(749),c=n(7608),u=n(5747);var l,d,f,h,p,m;!function(e){e.type=new r.NotificationType("json/schemaAssociations")}(l||(l={})),function(e){e.type=new r.RequestType("vscode/content")}(d||(d={})),function(e){e.type=new r.NotificationType("json/schemaContent")}(f||(f={})),function(e){e.type=new r.RequestType("json/validate")}(h||(h={})),function(e){e.type=new r.RequestType("json/languageStatus")}(p||(p={})),function(e){e.type=new r.RequestType("json/sort")}(m||(m={}));const g={resolveRelativePath:(e,t)=>{const n=t.substring(0,t.lastIndexOf("/")+1);return c.Utils.resolvePath(c.URI.parse(n),e).toString()}};function y(e){return s.Range.create(s.Position.create(0,0),e.positionAt(e.getText().length))}},749:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLanguageModelCache=function(e,t,n){let r,o={},i=0;return t>0&&(r=setInterval((()=>{const e=Date.now()-1e3*t,n=Object.keys(o);for(const t of n)o[t].cTime{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5663),o=n(170),i=n(872),s=n(9323),a=n(7608),c=n(9896),u=(0,r.createConnection)();console.log=u.console.log.bind(u.console),console.error=u.console.error.bind(u.console),process.on("unhandledRejection",(e=>{u.console.error((0,o.formatError)("Unhandled exception",e))}));const l={timer:{setImmediate(e,...t){const n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setTimeout(e,t,...n){const r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}}},file:{getContent:(e,t)=>new Promise(((n,r)=>{const o=a.URI.parse(e);c.readFile(o.fsPath,t,((e,t)=>{if(e)return r(e);n(t.toString())}))}))},http:{getContent:(e,t)=>(0,s.xhr)({url:e,followRedirects:5,headers:{"Accept-Encoding":"gzip, deflate"}}).then((e=>e.responseText),(e=>Promise.reject(e.responseText||(0,s.getErrorStatusDescription)(e.status)||e.toString())))},configureHttpRequests:s.configure};(0,i.startServer)(u,l)},170:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatError=o,t.runSafeAsync=function(e,t,n,r,s){return new Promise((a=>{e.timer.setImmediate((()=>{if(!s.isCancellationRequested)return t().then((e=>{s.isCancellationRequested?a(i()):a(e)}),(e=>{console.error(o(r,e)),a(n)}));a(i())}))}))},t.runSafe=function(e,t,n,r,s){return new Promise((a=>{e.timer.setImmediate((()=>{if(s.isCancellationRequested)a(i());else try{const e=t();if(s.isCancellationRequested)return void a(i());a(e)}catch(e){console.error(o(r,e)),a(n)}}))}))};const r=n(1327);function o(e,t){if(t instanceof Error){const n=t;return`${e}: ${n.message}\n${n.stack}`}return"string"==typeof t?`${e}: ${t}`:t?`${e}: ${t.toString()}`:e}function i(){return console.log("cancelled"),new r.ResponseError(r.LSPErrorCodes.RequestCancelled,"Request cancelled")}},9531:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerDiagnosticsPushSupport=function(e,t,n,r){const i={},s=[];function a(e){const t=i[e.uri];t&&(t.dispose(),delete i[e.uri])}function c(e){a(e);const s=i[e.uri]=n.timer.setTimeout((async()=>{if(s===i[e.uri])try{const n=await r(e);s===i[e.uri]&&t.sendDiagnostics({uri:e.uri,diagnostics:n}),delete i[e.uri]}catch(n){t.console.error((0,o.formatError)(`Error while validating ${e.uri}`,n))}}),500)}return e.onDidChangeContent((e=>{c(e.document)}),void 0,s),e.onDidClose((e=>{a(e.document),t.sendDiagnostics({uri:e.document.uri,diagnostics:[]})}),void 0,s),{requestRefresh:()=>{e.all().forEach(c)},dispose:()=>{s.forEach((e=>e.dispose())),s.length=0;const e=Object.keys(i);for(const t of e)i[t].dispose(),delete i[t]}}},t.registerDiagnosticsPullSupport=function(e,t,n,i){function s(e){return{kind:r.DocumentDiagnosticReportKind.Full,items:e}}const a=t.languages.diagnostics.on((async(t,r)=>(0,o.runSafeAsync)(n,(async()=>{const n=e.get(t.textDocument.uri);return s(n?await i(n):[])}),s([]),`Error while computing diagnostics for ${t.textDocument.uri}`,r)));return{requestRefresh:function(){t.languages.diagnostics.refresh()},dispose:()=>{a.dispose()}}};const r=n(1327),o=n(170)},2613:e=>{"use strict";e.exports=require("assert")},5317:e=>{"use strict";e.exports=require("child_process")},6982:e=>{"use strict";e.exports=require("crypto")},4434:e=>{"use strict";e.exports=require("events")},9896:e=>{"use strict";e.exports=require("fs")},1943:e=>{"use strict";e.exports=require("fs/promises")},8611:e=>{"use strict";e.exports=require("http")},5692:e=>{"use strict";e.exports=require("https")},9278:e=>{"use strict";e.exports=require("net")},7975:e=>{"use strict";e.exports=require("node:util")},857:e=>{"use strict";e.exports=require("os")},6928:e=>{"use strict";e.exports=require("path")},4756:e=>{"use strict";e.exports=require("tls")},7016:e=>{"use strict";e.exports=require("url")},9023:e=>{"use strict";e.exports=require("util")},3106:e=>{"use strict";e.exports=require("zlib")},4292:(e,t,n)=>{"use strict";var r,o,i,s,a,c,u,l,d,f,h,p,m,g,y,b,v,k,S,T,R,C,D,x,w,P,_,O,E,N,M,A,q,j,L,I,F,$,V,W,U,H,B,z,K,J,X,G,Y,Z,Q,ee,te,ne,re,oe,ie,se,ae,ce,ue,le,de,fe,he,pe,me,ge,ye,be,ve,ke,Se,Te,Re,Ce,De,xe,we,Pe;n.r(t),n.d(t,{AnnotatedTextEdit:()=>D,ChangeAnnotation:()=>R,ChangeAnnotationIdentifier:()=>C,CodeAction:()=>ae,CodeActionContext:()=>se,CodeActionKind:()=>oe,CodeActionTriggerKind:()=>ie,CodeDescription:()=>v,CodeLens:()=>ce,Color:()=>d,ColorInformation:()=>f,ColorPresentation:()=>h,Command:()=>S,CompletionItem:()=>B,CompletionItemKind:()=>F,CompletionItemLabelDetails:()=>H,CompletionItemTag:()=>V,CompletionList:()=>z,CreateFile:()=>w,DeleteFile:()=>_,Diagnostic:()=>k,DiagnosticRelatedInformation:()=>g,DiagnosticSeverity:()=>y,DiagnosticTag:()=>b,DocumentHighlight:()=>Z,DocumentHighlightKind:()=>Y,DocumentLink:()=>le,DocumentSymbol:()=>re,DocumentUri:()=>r,EOL:()=>Ne,FoldingRange:()=>m,FoldingRangeKind:()=>p,FormattingOptions:()=>ue,Hover:()=>J,InlayHint:()=>Se,InlayHintKind:()=>ve,InlayHintLabelPart:()=>ke,InlineCompletionContext:()=>we,InlineCompletionItem:()=>Re,InlineCompletionList:()=>Ce,InlineCompletionTriggerKind:()=>De,InlineValueContext:()=>be,InlineValueEvaluatableExpression:()=>ye,InlineValueText:()=>me,InlineValueVariableLookup:()=>ge,InsertReplaceEdit:()=>W,InsertTextFormat:()=>$,InsertTextMode:()=>U,LanguageKind:()=>q,Location:()=>u,LocationLink:()=>l,MarkedString:()=>K,MarkupContent:()=>I,MarkupKind:()=>L,OptionalVersionedTextDocumentIdentifier:()=>A,ParameterInformation:()=>X,Position:()=>a,Range:()=>c,RenameFile:()=>P,SelectedCompletionInfo:()=>xe,SelectionRange:()=>de,SemanticTokenModifiers:()=>he,SemanticTokenTypes:()=>fe,SemanticTokens:()=>pe,SignatureInformation:()=>G,SnippetTextEdit:()=>E,StringValue:()=>Te,SymbolInformation:()=>te,SymbolKind:()=>Q,SymbolTag:()=>ee,TextDocument:()=>Me,TextDocumentEdit:()=>x,TextDocumentIdentifier:()=>N,TextDocumentItem:()=>j,TextEdit:()=>T,URI:()=>o,VersionedTextDocumentIdentifier:()=>M,WorkspaceChange:()=>Ee,WorkspaceEdit:()=>O,WorkspaceFolder:()=>Pe,WorkspaceSymbol:()=>ne,integer:()=>i,uinteger:()=>s}),function(e){e.is=function(e){return"string"==typeof e}}(r||(r={})),function(e){e.is=function(e){return"string"==typeof e}}(o||(o={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(i||(i={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=s.MAX_VALUE),t===Number.MAX_VALUE&&(t=s.MAX_VALUE),{line:e,character:t}},e.is=function(e){const t=e;return Ae.objectLiteral(t)&&Ae.uinteger(t.line)&&Ae.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,r){if(Ae.uinteger(e)&&Ae.uinteger(t)&&Ae.uinteger(n)&&Ae.uinteger(r))return{start:a.create(e,t),end:a.create(n,r)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},e.is=function(e){const t=e;return Ae.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(c||(c={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){const t=e;return Ae.objectLiteral(t)&&c.is(t.range)&&(Ae.string(t.uri)||Ae.undefined(t.uri))}}(u||(u={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){const t=e;return Ae.objectLiteral(t)&&c.is(t.targetRange)&&Ae.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||Ae.undefined(t.originSelectionRange))}}(l||(l={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){const t=e;return Ae.objectLiteral(t)&&Ae.numberRange(t.red,0,1)&&Ae.numberRange(t.green,0,1)&&Ae.numberRange(t.blue,0,1)&&Ae.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return Ae.objectLiteral(t)&&c.is(t.range)&&d.is(t.color)}}(f||(f={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return Ae.objectLiteral(t)&&Ae.string(t.label)&&(Ae.undefined(t.textEdit)||T.is(t))&&(Ae.undefined(t.additionalTextEdits)||Ae.typedArray(t.additionalTextEdits,T.is))}}(h||(h={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(p||(p={})),function(e){e.create=function(e,t,n,r,o,i){const s={startLine:e,endLine:t};return Ae.defined(n)&&(s.startCharacter=n),Ae.defined(r)&&(s.endCharacter=r),Ae.defined(o)&&(s.kind=o),Ae.defined(i)&&(s.collapsedText=i),s},e.is=function(e){const t=e;return Ae.objectLiteral(t)&&Ae.uinteger(t.startLine)&&Ae.uinteger(t.startLine)&&(Ae.undefined(t.startCharacter)||Ae.uinteger(t.startCharacter))&&(Ae.undefined(t.endCharacter)||Ae.uinteger(t.endCharacter))&&(Ae.undefined(t.kind)||Ae.string(t.kind))}}(m||(m={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){const t=e;return Ae.defined(t)&&u.is(t.location)&&Ae.string(t.message)}}(g||(g={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(y||(y={})),function(e){e.Unnecessary=1,e.Deprecated=2}(b||(b={})),function(e){e.is=function(e){const t=e;return Ae.objectLiteral(t)&&Ae.string(t.href)}}(v||(v={})),function(e){e.create=function(e,t,n,r,o,i){const s={range:e,message:t};return Ae.defined(n)&&(s.severity=n),Ae.defined(r)&&(s.code=r),Ae.defined(o)&&(s.source=o),Ae.defined(i)&&(s.relatedInformation=i),s},e.is=function(e){var t;const n=e;return Ae.defined(n)&&c.is(n.range)&&Ae.string(n.message)&&(Ae.number(n.severity)||Ae.undefined(n.severity))&&(Ae.integer(n.code)||Ae.string(n.code)||Ae.undefined(n.code))&&(Ae.undefined(n.codeDescription)||Ae.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Ae.string(n.source)||Ae.undefined(n.source))&&(Ae.undefined(n.relatedInformation)||Ae.typedArray(n.relatedInformation,g.is))}}(k||(k={})),function(e){e.create=function(e,t,...n){const r={title:e,command:t};return Ae.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){const t=e;return Ae.defined(t)&&Ae.string(t.title)&&(void 0===t.tooltip||Ae.string(t.tooltip))&&Ae.string(t.command)}}(S||(S={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Ae.objectLiteral(t)&&Ae.string(t.newText)&&c.is(t.range)}}(T||(T={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return Ae.objectLiteral(t)&&Ae.string(t.label)&&(Ae.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Ae.string(t.description)||void 0===t.description)}}(R||(R={})),function(e){e.is=function(e){const t=e;return Ae.string(t)}}(C||(C={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return T.is(t)&&(R.is(t.annotationId)||C.is(t.annotationId))}}(D||(D={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){const t=e;return Ae.defined(t)&&A.is(t.textDocument)&&Array.isArray(t.edits)}}(x||(x={})),function(e){e.create=function(e,t,n){const r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){const t=e;return t&&"create"===t.kind&&Ae.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Ae.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ae.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(w||(w={})),function(e){e.create=function(e,t,n,r){const o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==r&&(o.annotationId=r),o},e.is=function(e){const t=e;return t&&"rename"===t.kind&&Ae.string(t.oldUri)&&Ae.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Ae.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ae.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(P||(P={})),function(e){e.create=function(e,t,n){const r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){const t=e;return t&&"delete"===t.kind&&Ae.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Ae.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Ae.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(_||(_={})),function(e){e.is=function(e){const t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Ae.string(e.kind)?w.is(e)||P.is(e)||_.is(e):x.is(e))))}}(O||(O={}));class _e{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,o;if(void 0===n?r=T.insert(e,t):C.is(n)?(o=n,r=D.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=D.insert(e,t,o)),this.edits.push(r),void 0!==o)return o}replace(e,t,n){let r,o;if(void 0===n?r=T.replace(e,t):C.is(n)?(o=n,r=D.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=D.replace(e,t,o)),this.edits.push(r),void 0!==o)return o}delete(e,t){let n,r;if(void 0===t?n=T.del(e):C.is(t)?(r=t,n=D.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=D.del(e,r)),this.edits.push(n),void 0!==r)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}}!function(e){e.is=function(e){const t=e;return Ae.objectLiteral(t)&&c.is(t.range)&&Te.isSnippet(t.snippet)&&(void 0===t.annotationId||R.is(t.annotationId)||C.is(t.annotationId))}}(E||(E={}));class Oe{constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(C.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error(`Id ${n} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}}class Ee{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Oe(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((e=>{if(x.is(e)){const t=new _e(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}}))):e.changes&&Object.keys(e.changes).forEach((t=>{const n=new _e(e.changes[t]);this._textEditChanges[t]=n}))):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(A.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let n=this._textEditChanges[t.uri];if(!n){const e=[],r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r),n=new _e(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){const n=[];this._workspaceEdit.changes[e]=n,t=new _e(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Oe,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,o,i;if(R.is(t)||C.is(t)?r=t:n=t,void 0===r?o=w.create(e,n):(i=C.is(r)?r:this._changeAnnotations.manage(r),o=w.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i}renameFile(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let o,i,s;if(R.is(n)||C.is(n)?o=n:r=n,void 0===o?i=P.create(e,t,r):(s=C.is(o)?o:this._changeAnnotations.manage(o),i=P.create(e,t,r,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s}deleteFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,o,i;if(R.is(t)||C.is(t)?r=t:n=t,void 0===r?o=_.create(e,n):(i=C.is(r)?r:this._changeAnnotations.manage(r),o=_.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i}}!function(e){e.create=function(e){return{uri:e}},e.is=function(e){const t=e;return Ae.defined(t)&&Ae.string(t.uri)}}(N||(N={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){const t=e;return Ae.defined(t)&&Ae.string(t.uri)&&Ae.integer(t.version)}}(M||(M={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){const t=e;return Ae.defined(t)&&Ae.string(t.uri)&&(null===t.version||Ae.integer(t.version))}}(A||(A={})),function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"}(q||(q={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){const t=e;return Ae.defined(t)&&Ae.string(t.uri)&&Ae.string(t.languageId)&&Ae.integer(t.version)&&Ae.string(t.text)}}(j||(j={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(L||(L={})),function(e){e.is=function(e){const t=e;return Ae.objectLiteral(e)&&L.is(t.kind)&&Ae.string(t.value)}}(I||(I={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(F||(F={})),function(e){e.PlainText=1,e.Snippet=2}($||($={})),function(e){e.Deprecated=1}(V||(V={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Ae.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(W||(W={})),function(e){e.asIs=1,e.adjustIndentation=2}(U||(U={})),function(e){e.is=function(e){const t=e;return t&&(Ae.string(t.detail)||void 0===t.detail)&&(Ae.string(t.description)||void 0===t.description)}}(H||(H={})),function(e){e.create=function(e){return{label:e}}}(B||(B={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(z||(z={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Ae.string(t)||Ae.objectLiteral(t)&&Ae.string(t.language)&&Ae.string(t.value)}}(K||(K={})),function(e){e.is=function(e){const t=e;return!!t&&Ae.objectLiteral(t)&&(I.is(t.contents)||K.is(t.contents)||Ae.typedArray(t.contents,K.is))&&(void 0===e.range||c.is(e.range))}}(J||(J={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(X||(X={})),function(e){e.create=function(e,t,...n){const r={label:e};return Ae.defined(t)&&(r.documentation=t),Ae.defined(n)?r.parameters=n:r.parameters=[],r}}(G||(G={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Y||(Y={})),function(e){e.create=function(e,t){const n={range:e};return Ae.number(t)&&(n.kind=t),n}}(Z||(Z={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Q||(Q={})),function(e){e.Deprecated=1}(ee||(ee={})),function(e){e.create=function(e,t,n,r,o){const i={name:e,kind:t,location:{uri:r,range:n}};return o&&(i.containerName=o),i}}(te||(te={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(ne||(ne={})),function(e){e.create=function(e,t,n,r,o,i){const s={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==i&&(s.children=i),s},e.is=function(e){const t=e;return t&&Ae.string(t.name)&&Ae.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||Ae.string(t.detail))&&(void 0===t.deprecated||Ae.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(re||(re={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"}(oe||(oe={})),function(e){e.Invoked=1,e.Automatic=2}(ie||(ie={})),function(e){e.create=function(e,t,n){const r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){const t=e;return Ae.defined(t)&&Ae.typedArray(t.diagnostics,k.is)&&(void 0===t.only||Ae.typedArray(t.only,Ae.string))&&(void 0===t.triggerKind||t.triggerKind===ie.Invoked||t.triggerKind===ie.Automatic)}}(se||(se={})),function(e){e.create=function(e,t,n){const r={title:e};let o=!0;return"string"==typeof t?(o=!1,r.kind=t):S.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return t&&Ae.string(t.title)&&(void 0===t.diagnostics||Ae.typedArray(t.diagnostics,k.is))&&(void 0===t.kind||Ae.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||S.is(t.command))&&(void 0===t.isPreferred||Ae.boolean(t.isPreferred))&&(void 0===t.edit||O.is(t.edit))}}(ae||(ae={})),function(e){e.create=function(e,t){const n={range:e};return Ae.defined(t)&&(n.data=t),n},e.is=function(e){const t=e;return Ae.defined(t)&&c.is(t.range)&&(Ae.undefined(t.command)||S.is(t.command))}}(ce||(ce={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){const t=e;return Ae.defined(t)&&Ae.uinteger(t.tabSize)&&Ae.boolean(t.insertSpaces)}}(ue||(ue={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){const t=e;return Ae.defined(t)&&c.is(t.range)&&(Ae.undefined(t.target)||Ae.string(t.target))}}(le||(le={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){const n=t;return Ae.objectLiteral(n)&&c.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(de||(de={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(fe||(fe={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(he||(he={})),function(e){e.is=function(e){const t=e;return Ae.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(pe||(pe={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&Ae.string(t.text)}}(me||(me={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&Ae.boolean(t.caseSensitiveLookup)&&(Ae.string(t.variableName)||void 0===t.variableName)}}(ge||(ge={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&(Ae.string(t.expression)||void 0===t.expression)}}(ye||(ye={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Ae.defined(t)&&c.is(e.stoppedLocation)}}(be||(be={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(ve||(ve={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Ae.objectLiteral(t)&&(void 0===t.tooltip||Ae.string(t.tooltip)||I.is(t.tooltip))&&(void 0===t.location||u.is(t.location))&&(void 0===t.command||S.is(t.command))}}(ke||(ke={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return Ae.objectLiteral(t)&&a.is(t.position)&&(Ae.string(t.label)||Ae.typedArray(t.label,ke.is))&&(void 0===t.kind||ve.is(t.kind))&&void 0===t.textEdits||Ae.typedArray(t.textEdits,T.is)&&(void 0===t.tooltip||Ae.string(t.tooltip)||I.is(t.tooltip))&&(void 0===t.paddingLeft||Ae.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Ae.boolean(t.paddingRight))}}(Se||(Se={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}},e.isSnippet=function(e){const t=e;return Ae.objectLiteral(t)&&"snippet"===t.kind&&Ae.string(t.value)}}(Te||(Te={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(Re||(Re={})),function(e){e.create=function(e){return{items:e}}}(Ce||(Ce={})),function(e){e.Invoked=1,e.Automatic=2}(De||(De={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(xe||(xe={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(we||(we={})),function(e){e.is=function(e){const t=e;return Ae.objectLiteral(t)&&o.is(t.uri)&&Ae.string(t.name)}}(Pe||(Pe={}));const Ne=["\n","\r\n","\r"];var Me,Ae;!function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,o=e.slice(0,r),i=e.slice(r);t(o,n),t(i,n);let s=0,a=0,c=0;for(;s{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));let i=r.length;for(let t=o.length-1;t>=0;t--){const n=o[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+n.newText+r.substring(a,r.length),i=s}return r}}(Me||(Me={}));class qe{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){const e=[],t=this._content;let n=!0;for(let r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let n=0,r=t.length;if(0===r)return a.create(0,e);for(;ne?r=o:n=o+1}const o=n-1;return a.create(o,e-t[o])}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line],r=e.line+1{"use strict";var r;n.r(t),n.d(t,{URI:()=>o,Utils:()=>i}),(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",o=0,i=-1,s=0,a=0;a<=e.length;++a){if(a2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),i=a,s=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=a,s=0;continue}t&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+e.slice(i+1,a):r=e.slice(i+1,a),o=a-i-1;i=a,s=0}else 46===n&&-1!==s?++s:s=-1}return r}var r={resolve:function(){for(var e,r="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var s;i>=0?s=arguments[i]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(r=s+"/"+r,o=47===s.charCodeAt(0))}return r=n(r,!o),o?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&o&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var o=1;ou){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else s>u&&(47===e.charCodeAt(o+d)?l=d:0===d&&(l=0));break}var f=e.charCodeAt(o+d);if(f!==n.charCodeAt(a+d))break;47===f&&(l=d)}var h="";for(d=o+l+1;d<=i;++d)d!==i&&47!==e.charCodeAt(d)||(0===h.length?h+="..":h+="/..");return h.length>0?h+n.slice(a+l):(a+=l,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,o=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!i){o=s;break}}else i=!1;return-1===o?r?"/":".":r&&1===o?"//":e.slice(0,o)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,o=0,i=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!s){o=r+1;break}}else-1===c&&(s=!1,c=r+1),a>=0&&(u===n.charCodeAt(a)?-1==--a&&(i=r):(a=-1,i=c))}return o===i?i=c:-1===i&&(i=e.length),e.slice(o,i)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){o=r+1;break}}else-1===i&&(s=!1,i=r+1);return-1===i?"":e.slice(o,i)},extname:function(e){t(e);for(var n=-1,r=0,o=-1,i=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===o&&(i=!1,o=a+1),46===c?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!i){r=a+1;break}}return-1===n||-1===o||0===s||1===s&&n===o-1&&n===r+1?"":e.slice(n,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,o=e.charCodeAt(0),i=47===o;i?(n.root="/",r=1):r=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=r;--l)if(47!==(o=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===o?-1===s?s=l:1!==d&&(d=1):-1!==s&&(d=-1);else if(!u){a=l+1;break}return-1===s||-1===c||0===d||1===d&&s===c-1&&s===a+1?-1!==c&&(n.base=n.name=0===a&&i?e.slice(1,c):e.slice(a,c)):(0===a&&i?(n.name=e.slice(1,s),n.base=e.slice(1,c)):(n.name=e.slice(a,s),n.base=e.slice(a,c)),n.ext=e.slice(s,c)),a>0?n.dir=e.slice(0,a-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{let e;if(n.r(o),n.d(o,{URI:()=>l,Utils:()=>C}),"object"==typeof process)e="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,r=/^\//,i=/^\/\//;function s(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.test(e.path))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')}else if(i.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const a="",c="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class l{static isUri(e){return e instanceof l||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,o,i=!1){"object"==typeof e?(this.scheme=e.scheme||a,this.authority=e.authority||a,this.path=e.path||a,this.query=e.query||a,this.fragment=e.fragment||a):(this.scheme=function(e,t){return e||t?e:"file"}(e,i),this.authority=t||a,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,n||a),this.query=r||a,this.fragment=o||a,s(this,i))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:o,fragment:i}=e;return void 0===t?t=this.scheme:null===t&&(t=a),void 0===n?n=this.authority:null===n&&(n=a),void 0===r?r=this.path:null===r&&(r=a),void 0===o?o=this.query:null===o&&(o=a),void 0===i?i=this.fragment:null===i&&(i=a),t===this.scheme&&n===this.authority&&r===this.path&&o===this.query&&i===this.fragment?this:new f(t,n,r,o,i)}static parse(e,t=!1){const n=u.exec(e);return n?new f(n[2]||a,k(n[4]||a),k(n[5]||a),k(n[7]||a),k(n[9]||a),t):new f(a,a,a,a,a)}static file(t){let n=a;if(e&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const e=t.indexOf(c,2);-1===e?(n=t.substring(2),t=c):(n=t.substring(2,e),t=t.substring(e)||c)}return new f("file",n,t,a,a)}static from(e){const t=new f(e.scheme,e.authority,e.path,e.query,e.fragment);return s(t,!0),t}toString(e=!1){return y(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof l)return e;{const t=new f(e);return t._formatted=e.external,t._fsPath=e._sep===d?e.fsPath:null,t}}return e}}const d=e?1:void 0;class f extends l{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=g(this,!1)),this._fsPath}toString(e=!1){return e?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const h={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function p(e,t,n){let r,o=-1;for(let i=0;i=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||n&&91===s||n&&93===s||n&&58===s)-1!==o&&(r+=encodeURIComponent(e.substring(o,i)),o=-1),void 0!==r&&(r+=e.charAt(i));else{void 0===r&&(r=e.substr(0,i));const t=h[s];void 0!==t?(-1!==o&&(r+=encodeURIComponent(e.substring(o,i)),o=-1),r+=t):-1===o&&(o=i)}}return-1!==o&&(r+=encodeURIComponent(e.substring(o))),void 0!==r?r:e}function m(e){let t;for(let n=0;n1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,"\\")),r}function y(e,t){const n=t?m:p;let r="",{scheme:o,authority:i,path:s,query:a,fragment:u}=e;if(o&&(r+=o,r+=":"),(i||"file"===o)&&(r+=c,r+=c),i){let e=i.indexOf("@");if(-1!==e){const t=i.substr(0,e);i=i.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}i=i.toLowerCase(),e=i.lastIndexOf(":"),-1===e?r+=n(i,!1,!0):(r+=n(i.substr(0,e),!1,!0),r+=i.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}r+=n(s,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),u&&(r+="#",r+=t?u:p(u,!1,!1)),r}function b(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+b(e.substr(3)):e}}const v=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(e){return e.match(v)?e.replace(v,(e=>b(e))):e}var S=n(470);const T=S.posix||S,R="/";var C;!function(e){e.joinPath=function(e,...t){return e.with({path:T.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==R&&(n=R+n,r=!0);let o=T.resolve(n,...t);return r&&o[0]===R&&!e.authority&&(o=o.substring(1)),e.with({path:o})},e.dirname=function(e){if(0===e.path.length||e.path===R)return e;let t=T.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return T.basename(e.path)},e.extname=function(e){return T.extname(e.path)}}(C||(C={}))})(),r=o})();const{URI:o,Utils:i}=r}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0});const t=n(5747);!async function(){const e=[],r=process.env.VSCODE_L10N_BUNDLE_LOCATION;if(r)try{await t.config({uri:r}),e.push(`l10n: Configured to ${r.toString()}`)}catch(t){e.push(`l10n: Problems loading ${r.toString()} : ${t}`)}await Promise.resolve().then((()=>n(8049))),e.forEach(console.log)}()})();var o=exports;for(var i in r)o[i]=r[i];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})(); +//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/b58957e67ee1e712cebf466b995adf4c5307b2bd/extensions/json-language-features/server/dist/node/jsonServerMain.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/README.md" index 7bc804854c2f79a82e66fa03b2cdc6804b5ca3bf..acfc3fe495965e4905b96b7952f8c9de9252a35e 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/README.md" @@ -1,3 +1,42 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4aaa859447a3db374692b940cef70bb380160524db1203c26a969b2849e077f2 -size 1423 +# @vscode/l10n + +Library used for loading the translations into subprocesses of your extension. These usages also get picked up by [l10n-dev](https://github.com/microsoft/vscode-l10n/tree/main/l10n-dev) string extraction tooling. + +> **Note** +> +> You should _NOT_ use this library in your extension's main process. The translations are loaded into the main process by VS Code itself. + +## Usage + +```typescript +import * as l10n from '@vscode/l10n'; + +// Load the translations for the current locale +l10n.config({ + contents: JSON.parse(process.env.BUNDLE_FROM_EXTENSION) +}); +// or +l10n.config({ + fsPath: process.env.FSPATH_TO_BUNDLE_FROM_EXTENSION +}); +// or (warning, this is async) +await l10n.config({ + uri: JSON.parse(process.env.BUNDLE_URI_FROM_EXTENSION) +}); + +// returns the translated string or the original string if no translation is available +l10n.t('Hello World'); + +// supports arguments just like the vscode API +l10n.t('Hello {0}', 'John'); + +// supports comments for translators +l10n.t({ + message: 'Hello {0}', + args: ['John'], + comment: ['This is a comment'] +}); +``` + +The input for `l10n.config` pairs nicely with the `bundle` and `uri` properties on the `l10n` namespace that are provided by the [VS Code API](https://code.visualstudio.com/api/references/vscode-api#l10n). +You should send the value of one of these properties from your extension to your subprocess that is consuming `@vscode/l10n`. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/dist/browser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/dist/browser.js" index 1bb92e1ddd3d26c6b4a1274a37d67c3c62e7759f..ffe794e1c879dc1d24080661a19ef6357c0852fa 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/dist/browser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/dist/browser.js" @@ -1,3 +1,103 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7e74b4963b59a7c5e380699233d7aa7cc94fb095706fb34e8ad88bf825cc78d5 -size 2969 +// src/browser/reader.ts +async function readFileFromUri(uri) { + if (uri.protocol === "http:" || uri.protocol === "https:") { + const res = await fetch(uri); + return await res.text(); + } + throw new Error("Unsupported protocol"); +} +function readFileFromFsPath(_) { + throw new Error("Unsupported in browser"); +} + +// src/main.ts +var bundle; +function config(config2) { + if ("contents" in config2) { + if (typeof config2.contents === "string") { + bundle = JSON.parse(config2.contents); + } else { + bundle = config2.contents; + } + return; + } + if ("fsPath" in config2) { + const fileContent = readFileFromFsPath(config2.fsPath); + const content = JSON.parse(fileContent); + bundle = isBuiltinExtension(content) ? content.contents.bundle : content; + return; + } + if (config2.uri) { + let uri = config2.uri; + if (typeof config2.uri === "string") { + uri = new URL(config2.uri); + } + return new Promise((resolve, reject) => { + readFileFromUri(uri).then((uriContent) => { + try { + const content = JSON.parse(uriContent); + bundle = isBuiltinExtension(content) ? content.contents.bundle : content; + resolve(); + } catch (err) { + reject(err); + } + }).catch((err) => { + reject(err); + }); + }); + } +} +function t(...args) { + const firstArg = args[0]; + let key; + let message; + let formatArgs; + if (typeof firstArg === "string") { + key = firstArg; + message = firstArg; + args.splice(0, 1); + formatArgs = !args || typeof args[0] !== "object" ? args : args[0]; + } else if (firstArg instanceof Array) { + const replacements = args.slice(1); + if (firstArg.length !== replacements.length + 1) { + throw new Error("expected a string as the first argument to l10n.t"); + } + let str = firstArg[0]; + for (let i = 1; i < firstArg.length; i++) { + str += `{${i - 1}}` + firstArg[i]; + } + return t(str, ...replacements); + } else { + message = firstArg.message; + key = message; + if (firstArg.comment && firstArg.comment.length > 0) { + key += `/${Array.isArray(firstArg.comment) ? firstArg.comment.join("") : firstArg.comment}`; + } + formatArgs = firstArg.args ?? {}; + } + const messageFromBundle = bundle?.[key]; + if (!messageFromBundle) { + return format(message, formatArgs); + } + if (typeof messageFromBundle === "string") { + return format(messageFromBundle, formatArgs); + } + if (messageFromBundle.comment) { + return format(messageFromBundle.message, formatArgs); + } + return format(message, formatArgs); +} +var _format2Regexp = /{([^}]+)}/g; +function format(template, values) { + if (Object.keys(values).length === 0) { + return template; + } + return template.replace(_format2Regexp, (match, group) => values[group] ?? match); +} +function isBuiltinExtension(json) { + return !!(typeof json?.contents?.bundle === "object" && typeof json?.version === "string"); +} +export { + config, + t +}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/dist/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/dist/main.d.ts" index 0f858f59018a06d276f476986b00b705409d05d0..21651d5d7b729e219e3dc5939075b41bdbb3b1a4 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/dist/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/dist/main.d.ts" @@ -1,3 +1,130 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:026930c0ed50d369cfc92dac7cc62a46672d15856f5ede6f5437ac917669ff9d -size 5601 +/** + * @public + * Loads the bundle from the given contents. Must be run before the first call to any `l10n.t()` variant. + * **Note** The best way to set this is to pass the value of the VS Code API `vscode.l10n.contents` + * to the process that uses `@vscode/l10n`. + * @param config - An object that contains one property, contents, which should contain the contents of the bundle. + */ +export declare function config(config: { + contents: string | l10nJsonFormat; +}): void; + +/** + * @public + * Loads the bundle from the given fsPath. Must be run before the first call to any `l10n.t()` variant. + * **Warning** This is not implemented in the browser and will throw an Error. + * **Note** The best way to set this is to pass the value of the VS Code API `vscode.l10n.uri.fsPath` + * to the process that uses `@vscode/l10n`. + * @param config - An object that contains one property, fsPath, which should be a path to a file that contains the bundle. + */ +export declare function config(config: { + fsPath: string; +}): void; + +/** + * @public + * Loads the bundle from the given URI using an asynchronous fetch request. + * **Warning** Since this is an asynchronous API, you need to ensure that it resolves before + * the first call to any `l10n.t()` variant. + * **Note** The best way to set this is to pass the value of the VS Code API `vscode.l10n.uri.toString()` + * to the process that uses `@vscode/l10n`. + * @param config - An object that contains one property, uri, which should be a URL to the bundle. + */ +export declare function config(config: { + uri: string | URL; +}): Promise; + +/** + * @public + * The format of package.nls.json and l10n bundle files. + */ +export declare interface l10nJsonFormat { + [key: string]: l10nJsonMessageFormat; +} + +/** + * @public + * The format of a message in a bundle. + */ +export declare type l10nJsonMessageFormat = string | { + message: string; + comment: string[]; +}; + +/** + * @public + * Type that can be used as replacements in `l10n.t()` calls. + */ +export declare type L10nReplacement = string | number | boolean; + +/** + * @public + * Marks a string for localization. If the bundle has a localized value for this message, then that localized + * value will be returned (with injected `args` values for any templated values). + * @param message - The message to localize. Supports index templating where strings like `{0}` and `{1}` are + * replaced by the item at that index in the `args` array. + * @param args - The arguments to be used in the localized string. The index of the argument is used to + * match the template placeholder in the localized string. + * @returns localized string with injected arguments. + * @example `l10n.localize('hello', 'Hello {0}!', 'World');` + */ +export declare function t(message: string, ...args: Array): string; + +/** + * @public + * Marks a string for localization. If the bundle has a localized value for this message, then that localized + * value will be returned (with injected `args` values for any templated values). + * @param message - The message to localize. Supports named templating where strings like `{foo}` and `{bar}` are + * replaced by the value in the Record for that key (foo, bar, etc). + * @param args - The arguments to be used in the localized string. The name of the key in the record is used to + * match the template placeholder in the localized string. + * @returns localized string with injected arguments. + * @example `l10n.t('Hello {name}', { name: 'Erich' });` + */ +export declare function t(message: string, args: Record): string; + +/** + * @public + * Marks a string for localization. This function signature is made for usage + * with tagged template literals. + * + * The more verbose overload should still be used if comments are required. + * @example + * ``` + * l10n.t`Hello ${name}!` + * ``` + * @param message - String message components + * @param args - Replacement components in the string + * @returns localized string with injected arguments. + */ +export declare function t(strs: TemplateStringsArray, ...replacements: L10nReplacement[]): string; + +/** + * @public + * Marks a string for localization. If the bundle has a localized value for this message, then that localized + * value will be returned (with injected args values for any templated values). + * @param options - The options to use when localizing the message. + * @returns localized string with injected arguments. + * @example `l10n.t({ message: 'Hello {0}', args: ['Erich'], comment: 'This is a comment' } );` + */ +export declare function t(options: { + /** + * The message to localize. If `args` is an array, this message supports index templating where strings like + * `{0}` and `{1}` are replaced by the item at that index in the `args` array. If `args` is a `Record`, + * this supports named templating where strings like `{foo}` and `{bar}` are replaced by the value in + * the Record for that key (foo, bar, etc). + */ + message: string; + /** + * The arguments to be used in the localized string. As an array, the index of the argument is used to + * match the template placeholder in the localized string. As a Record, the key is used to match the template + * placeholder in the localized string. + */ + args?: Array | Record; + /** + * A comment to help translators understand the context of the message. + */ + comment: string | string[]; +}): string; + +export { } diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/dist/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/dist/main.js" index 0ec874db10d7202ac358b7dbfbf2f83c463bda8d..728a2d351c0677d8c1bba1c5cce4032336060736 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/dist/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/dist/main.js" @@ -1,3 +1,151 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:acb4bd2bcbfc029a6744f475151a9c188890cd0dca00c15b739d2371497909cb -size 4582 +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/main.ts +var main_exports = {}; +__export(main_exports, { + config: () => config, + t: () => t +}); +module.exports = __toCommonJS(main_exports); + +// src/node/reader.ts +var import_fs = require("fs"); +var import_promises = require("fs/promises"); +async function readFileFromUri(uri) { + if (uri.protocol === "file:") { + return await (0, import_promises.readFile)(uri, "utf8"); + } + if (uri.protocol === "http:" || uri.protocol === "https:") { + const res = await fetch(uri.toString(), { + headers: { + "Accept-Encoding": "gzip, deflate", + "Accept": "application/json" + }, + redirect: "follow" + }); + if (!res.ok) { + let error = `Unexpected ${res.status} response while trying to read ${uri}`; + try { + error += `: ${await res.text()}`; + } catch { + } + throw new Error(error); + } + const decoded = await res.text(); + return decoded; + } + throw new Error("Unsupported protocol"); +} +function readFileFromFsPath(fsPath) { + return (0, import_fs.readFileSync)(fsPath, "utf8"); +} + +// src/main.ts +var bundle; +function config(config2) { + if ("contents" in config2) { + if (typeof config2.contents === "string") { + bundle = JSON.parse(config2.contents); + } else { + bundle = config2.contents; + } + return; + } + if ("fsPath" in config2) { + const fileContent = readFileFromFsPath(config2.fsPath); + const content = JSON.parse(fileContent); + bundle = isBuiltinExtension(content) ? content.contents.bundle : content; + return; + } + if (config2.uri) { + let uri = config2.uri; + if (typeof config2.uri === "string") { + uri = new URL(config2.uri); + } + return new Promise((resolve, reject) => { + readFileFromUri(uri).then((uriContent) => { + try { + const content = JSON.parse(uriContent); + bundle = isBuiltinExtension(content) ? content.contents.bundle : content; + resolve(); + } catch (err) { + reject(err); + } + }).catch((err) => { + reject(err); + }); + }); + } +} +function t(...args) { + const firstArg = args[0]; + let key; + let message; + let formatArgs; + if (typeof firstArg === "string") { + key = firstArg; + message = firstArg; + args.splice(0, 1); + formatArgs = !args || typeof args[0] !== "object" ? args : args[0]; + } else if (firstArg instanceof Array) { + const replacements = args.slice(1); + if (firstArg.length !== replacements.length + 1) { + throw new Error("expected a string as the first argument to l10n.t"); + } + let str = firstArg[0]; + for (let i = 1; i < firstArg.length; i++) { + str += `{${i - 1}}` + firstArg[i]; + } + return t(str, ...replacements); + } else { + message = firstArg.message; + key = message; + if (firstArg.comment && firstArg.comment.length > 0) { + key += `/${Array.isArray(firstArg.comment) ? firstArg.comment.join("") : firstArg.comment}`; + } + formatArgs = firstArg.args ?? {}; + } + const messageFromBundle = bundle?.[key]; + if (!messageFromBundle) { + return format(message, formatArgs); + } + if (typeof messageFromBundle === "string") { + return format(messageFromBundle, formatArgs); + } + if (messageFromBundle.comment) { + return format(messageFromBundle.message, formatArgs); + } + return format(message, formatArgs); +} +var _format2Regexp = /{([^}]+)}/g; +function format(template, values) { + if (Object.keys(values).length === 0) { + return template; + } + return template.replace(_format2Regexp, (match, group) => values[group] ?? match); +} +function isBuiltinExtension(json) { + return !!(typeof json?.contents?.bundle === "object" && typeof json?.version === "string"); +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + config, + t +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/dist/tsdoc-metadata.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/dist/tsdoc-metadata.json" index 22f38e9653d436ddff54095c865d080ee8a2885b..2c82a4339c57f65f47ee979fd89994fd92e5aaaf 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/dist/tsdoc-metadata.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/dist/tsdoc-metadata.json" @@ -1,3 +1,11 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:edd0e881410dfe96bc8b53a2081f01f936318c850e502af3e3980fbbe2211501 -size 340 +// This file is read by tools that parse documentation comments conforming to the TSDoc standard. +// It should be published with your NPM package. It should not be tracked by Git. +{ + "tsdocVersion": "0.12", + "toolPackages": [ + { + "packageName": "@microsoft/api-extractor", + "packageVersion": "7.36.3" + } + ] +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/package.json" index 745bf23ce147de35fa130c36f16524a1a3f082ec..8ebb31b8d8635de35f382744b898c9579ee20a95 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/@vscode/l10n/package.json" @@ -1,3 +1,50 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:293375e8e1de0d54c2437079fdc47e6ee4f55a125ca346ac58e61cbd602e959a -size 1504 +{ + "name": "@vscode/l10n", + "version": "0.0.18", + "description": "A helper library to assist in localizing subprocesses spun up by VS Code extensions", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-l10n.git" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-l10n/issues" + }, + "main": "./dist/main.js", + "sideEffects": false, + "browser": { + "./dist/main.js": "./dist/browser.js", + "./src/node/reader": "./src/browser/reader" + }, + "types": "dist/main.d.ts", + "files": [ + "dist/*" + ], + "devDependencies": { + "@jest/globals": "^29.7.0", + "@microsoft/api-extractor": "^7.32.1", + "@types/mock-fs": "^4.13.1", + "@types/node": "^18", + "@typescript-eslint/eslint-plugin": "^6.13.2", + "@typescript-eslint/parser": "^6.13.2", + "esbuild": "^0.15.5", + "eslint": "^7.29.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", + "jest": "^29.7.0", + "jest-fetch-mock": "^3.0.3", + "mock-fs": "^5.1.4", + "rimraf": "^3.0.2", + "ts-jest": "^29.1.1", + "typescript": "^4.7.4" + }, + "scripts": { + "clean": "rimraf dist && rimraf lib", + "compile": "npm run clean && tsc --emitDeclarationOnly --outDir lib && node .esbuild.config.js", + "lint": "eslint src --ext ts", + "watch": "node .esbuild.config.js --watch", + "test": "jest --preset ts-jest", + "prepublishOnly": "npm run lint && npm run compile && npm run test" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/CHANGELOG.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/CHANGELOG.md" index 1dc335f337ea669c77b2527583bae59c21549986..b43a083a2f98daed446a16861955c79997ffa1d1 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/CHANGELOG.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/CHANGELOG.md" @@ -1,3 +1,72 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ce508d6b9a2e11c03f60aa3b9519e4b919ddbfe96e869dbe454dc483d26cd9fa -size 2723 + +3.2.0 2022-08-30 +================= +- update the version of the bundled Javascript files to `es2020`. +- include all `const enum` values in the bundled JavaScript files (`ScanError`, `SyntaxKind`, `ParseErrorCode`). + +3.1.0 2022-07-07 +================== + * added new API `FormattingOptions.keepLines` : It leaves the initial line positions in the formatting. + +3.0.0 2020-11-13 +================== + * fixed API spec for `parseTree`. Can return `undefine` for empty input. + * added new API `FormattingOptions.insertFinalNewline`. + + +2.3.0 2020-07-03 +================== + * new API `ModificationOptions.isArrayInsertion`: If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then `modify` will insert a new item at that location instead of overwriting its contents. + * `ModificationOptions.formattingOptions` is now optional. If not set, newly inserted content will not be formatted. + + +2.2.0 2019-10-25 +================== + * added `ParseOptions.allowEmptyContent`. Default is `false`. + * new API `getNodeType`: Returns the type of a value returned by parse. + * `parse`: Fix issue with empty property name + +2.1.0 2019-03-29 +================== + * `JSONScanner` and `JSONVisitor` return lineNumber / character. + +2.0.0 2018-04-12 +================== + * renamed `Node.columnOffset` to `Node.colonOffset` + * new API `getNodePath`: Gets the JSON path of the given JSON DOM node + * new API `findNodeAtOffset`: Finds the most inner node at the given offset. If `includeRightBound` is set, also finds nodes that end at the given offset. + +1.0.3 2018-03-07 +================== + * provide ems modules + +1.0.2 2018-03-05 +================== + * added the `visit.onComment` API, reported when comments are allowed. + * added the `ParseErrorCode.InvalidCommentToken` enum value, reported when comments are disallowed. + +1.0.1 +================== + * added the `format` API: computes edits to format a JSON document. + * added the `modify` API: computes edits to insert, remove or replace a property or value in a JSON document. + * added the `allyEdits` API: applies edits to a document + +1.0.0 +================== + * remove nls dependency (remove `getParseErrorMessage`) + +0.4.2 / 2017-05-05 +================== + * added `ParseError.offset` & `ParseError.length` + +0.4.1 / 2017-04-02 +================== + * added `ParseOptions.allowTrailingComma` + +0.4.0 / 2017-02-23 +================== + * fix for `getLocation`. Now `getLocation` inside an object will always return a property from inside that property. Can be empty string if the object has no properties or if the offset is before a actual property `{ "a": { | }} will return location ['a', ' ']` + +0.3.0 / 2017-01-17 +================== + * Updating to typescript 2.0 \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/LICENSE.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/LICENSE.md" index 28f77a90b0472b57e139eebdb907553e6a2b20ba..1c65de1db32e326f2bd84b036db911248779eaa7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/LICENSE.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/LICENSE.md" @@ -1,3 +1,21 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c3a24c02d678e5f0711623dcf3ab3f243b273c2633f638a1fa8e35fb7c7f8e4d -size 1092 +The MIT License (MIT) + +Copyright (c) Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/README.md" index 1e491c62ddf66d76f069c52419acec7239982b8a..5fd92d9e9310a6e4ed2309fea25b2be5063ad2e5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/README.md" @@ -1,3 +1,362 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7f3bbe33967c25f1974ac93a4c9c2c2bde59c79da517d27bb575dcbc10a259db -size 14129 +# jsonc-parser +Scanner and parser for JSON with comments. + +[![npm Package](https://img.shields.io/npm/v/jsonc-parser.svg?style=flat-square)](https://www.npmjs.org/package/jsonc-parser) +[![NPM Downloads](https://img.shields.io/npm/dm/jsonc-parser.svg)](https://npmjs.org/package/jsonc-parser) +[![Build Status](https://github.com/microsoft/node-jsonc-parser/workflows/Tests/badge.svg)](https://github.com/microsoft/node-jsonc-parser/workflows/Tests) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) + +Why? +---- +JSONC is JSON with JavaScript style comments. This node module provides a scanner and fault tolerant parser that can process JSONC but is also useful for standard JSON. + - the *scanner* tokenizes the input string into tokens and token offsets + - the *visit* function implements a 'SAX' style parser with callbacks for the encountered properties and values. + - the *parseTree* function computes a hierarchical DOM with offsets representing the encountered properties and values. + - the *parse* function evaluates the JavaScript object represented by JSON string in a fault tolerant fashion. + - the *getLocation* API returns a location object that describes the property or value located at a given offset in a JSON document. + - the *findNodeAtLocation* API finds the node at a given location path in a JSON DOM. + - the *format* API computes edits to format a JSON document. + - the *modify* API computes edits to insert, remove or replace a property or value in a JSON document. + - the *applyEdits* API applies edits to a document. + +Installation +------------ + +``` +npm install --save jsonc-parser +``` + +API +--- + +### Scanner: +```typescript + +/** + * Creates a JSON scanner on the given text. + * If ignoreTrivia is set, whitespaces or comments are ignored. + */ +export function createScanner(text: string, ignoreTrivia: boolean = false): JSONScanner; + +/** + * The scanner object, representing a JSON scanner at a position in the input string. + */ +export interface JSONScanner { + /** + * Sets the scan position to a new offset. A call to 'scan' is needed to get the first token. + */ + setPosition(pos: number): any; + /** + * Read the next token. Returns the token code. + */ + scan(): SyntaxKind; + /** + * Returns the zero-based current scan position, which is after the last read token. + */ + getPosition(): number; + /** + * Returns the last read token. + */ + getToken(): SyntaxKind; + /** + * Returns the last read token value. The value for strings is the decoded string content. For numbers it's of type number, for boolean it's true or false. + */ + getTokenValue(): string; + /** + * The zero-based start offset of the last read token. + */ + getTokenOffset(): number; + /** + * The length of the last read token. + */ + getTokenLength(): number; + /** + * The zero-based start line number of the last read token. + */ + getTokenStartLine(): number; + /** + * The zero-based start character (column) of the last read token. + */ + getTokenStartCharacter(): number; + /** + * An error code of the last scan. + */ + getTokenError(): ScanError; +} +``` + +### Parser: +```typescript + +export interface ParseOptions { + disallowComments?: boolean; + allowTrailingComma?: boolean; + allowEmptyContent?: boolean; +} +/** + * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + * Therefore always check the errors list to find out if the input was valid. + */ +export declare function parse(text: string, errors?: {error: ParseErrorCode;}[], options?: ParseOptions): any; + +/** + * Parses the given text and invokes the visitor functions for each object, array and literal reached. + */ +export declare function visit(text: string, visitor: JSONVisitor, options?: ParseOptions): any; + +/** + * Visitor called by {@linkcode visit} when parsing JSON. + * + * The visitor functions have the following common parameters: + * - `offset`: Global offset within the JSON document, starting at 0 + * - `startLine`: Line number, starting at 0 + * - `startCharacter`: Start character (column) within the current line, starting at 0 + * + * Additionally some functions have a `pathSupplier` parameter which can be used to obtain the + * current `JSONPath` within the document. + */ +export interface JSONVisitor { + /** + * Invoked when an open brace is encountered and an object is started. The offset and length represent the location of the open brace. + */ + onObjectBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + + /** + * Invoked when a property is encountered. The offset and length represent the location of the property name. + * The `JSONPath` created by the `pathSupplier` refers to the enclosing JSON object, it does not include the + * property name yet. + */ + onObjectProperty?: (property: string, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a closing brace is encountered and an object is completed. The offset and length represent the location of the closing brace. + */ + onObjectEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked when an open bracket is encountered. The offset and length represent the location of the open bracket. + */ + onArrayBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a closing bracket is encountered. The offset and length represent the location of the closing bracket. + */ + onArrayEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked when a literal value is encountered. The offset and length represent the location of the literal value. + */ + onLiteralValue?: (value: any, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a comma or colon separator is encountered. The offset and length represent the location of the separator. + */ + onSeparator?: (character: string, offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * When comments are allowed, invoked when a line or block comment is encountered. The offset and length represent the location of the comment. + */ + onComment?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked on an error. + */ + onError?: (error: ParseErrorCode, offset: number, length: number, startLine: number, startCharacter: number) => void; +} + +/** + * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + */ +export declare function parseTree(text: string, errors?: ParseError[], options?: ParseOptions): Node | undefined; + +export declare type NodeType = "object" | "array" | "property" | "string" | "number" | "boolean" | "null"; +export interface Node { + type: NodeType; + value?: any; + offset: number; + length: number; + colonOffset?: number; + parent?: Node; + children?: Node[]; +} + +``` + +### Utilities: +```typescript +/** + * Takes JSON with JavaScript-style comments and remove + * them. Optionally replaces every none-newline character + * of comments with a replaceCharacter + */ +export declare function stripComments(text: string, replaceCh?: string): string; + +/** + * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. + */ +export declare function getLocation(text: string, position: number): Location; + +/** + * A {@linkcode JSONPath} segment. Either a string representing an object property name + * or a number (starting at 0) for array indices. + */ +export declare type Segment = string | number; +export declare type JSONPath = Segment[]; +export interface Location { + /** + * The previous property key or literal value (string, number, boolean or null) or undefined. + */ + previousNode?: Node; + /** + * The path describing the location in the JSON document. The path consists of a sequence strings + * representing an object property or numbers for array indices. + */ + path: JSONPath; + /** + * Matches the locations path against a pattern consisting of strings (for properties) and numbers (for array indices). + * '*' will match a single segment, of any property name or index. + * '**' will match a sequence of segments or no segment, of any property name or index. + */ + matches: (patterns: JSONPath) => boolean; + /** + * If set, the location's offset is at a property key. + */ + isAtPropertyKey: boolean; +} + +/** + * Finds the node at the given path in a JSON DOM. + */ +export function findNodeAtLocation(root: Node, path: JSONPath): Node | undefined; + +/** + * Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. + */ +export function findNodeAtOffset(root: Node, offset: number, includeRightBound?: boolean) : Node | undefined; + +/** + * Gets the JSON path of the given JSON DOM node + */ +export function getNodePath(node: Node): JSONPath; + +/** + * Evaluates the JavaScript object of the given JSON DOM node + */ +export function getNodeValue(node: Node): any; + +/** + * Computes the edit operations needed to format a JSON document. + * + * @param documentText The input text + * @param range The range to format or `undefined` to format the full content + * @param options The formatting options + * @returns The edit operations describing the formatting changes to the original document following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export function format(documentText: string, range: Range, options: FormattingOptions): EditResult; + +/** + * Computes the edit operations needed to modify a value in the JSON document. + * + * @param documentText The input text + * @param path The path of the value to change. The path represents either to the document root, a property or an array item. + * If the path points to an non-existing property or item, it will be created. + * @param value The new value for the specified property or item. If the value is undefined, + * the property or item will be removed. + * @param options Options + * @returns The edit operations describing the changes to the original document, following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export function modify(text: string, path: JSONPath, value: any, options: ModificationOptions): EditResult; + +/** + * Applies edits to an input string. + * @param text The input text + * @param edits Edit operations following the format described in {@linkcode EditResult}. + * @returns The text with the applied edits. + * @throws An error if the edit operations are not well-formed as described in {@linkcode EditResult}. + */ +export function applyEdits(text: string, edits: EditResult): string; + +/** + * An edit result describes a textual edit operation. It is the result of a {@linkcode format} and {@linkcode modify} operation. + * It consist of one or more edits describing insertions, replacements or removals of text segments. + * * The offsets of the edits refer to the original state of the document. + * * No two edits change or remove the same range of text in the original document. + * * Multiple edits can have the same offset if they are multiple inserts, or an insert followed by a remove or replace. + * * The order in the array defines which edit is applied first. + * To apply an edit result use {@linkcode applyEdits}. + * In general multiple EditResults must not be concatenated because they might impact each other, producing incorrect or malformed JSON data. + */ +export type EditResult = Edit[]; + +/** + * Represents a text modification + */ +export interface Edit { + /** + * The start offset of the modification. + */ + offset: number; + /** + * The length of the modification. Must not be negative. Empty length represents an *insert*. + */ + length: number; + /** + * The new content. Empty content represents a *remove*. + */ + content: string; +} + +/** + * A text range in the document +*/ +export interface Range { + /** + * The start offset of the range. + */ + offset: number; + /** + * The length of the range. Must not be negative. + */ + length: number; +} + +/** + * Options used by {@linkcode format} when computing the formatting edit operations + */ +export interface FormattingOptions { + /** + * If indentation is based on spaces (`insertSpaces` = true), then what is the number of spaces that make an indent? + */ + tabSize: number; + /** + * Is indentation based on spaces? + */ + insertSpaces: boolean; + /** + * The default 'end of line' character + */ + eol: string; +} + +/** + * Options used by {@linkcode modify} when computing the modification edit operations + */ +export interface ModificationOptions { + /** + * Formatting options. If undefined, the newly inserted code will be inserted unformatted. + */ + formattingOptions?: FormattingOptions; + /** + * Default false. If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then + * {@linkcode modify} will insert a new item at that location instead of overwriting its contents. + */ + isArrayInsertion?: boolean; + /** + * Optional function to define the insertion index given an existing list of properties. + */ + getInsertionIndex?: (properties: string[]) => number; +} +``` + + +License +------- + +(MIT License) + +Copyright 2018, Microsoft diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/SECURITY.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/SECURITY.md" index f5f6a3f8ada07060363bde77a27e754b69f75b67..f7b89984f0fb5dd204028bc525e19eefc0859f4f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/SECURITY.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/SECURITY.md" @@ -1,3 +1,41 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:830e94b83c3b6f45ceee5609de6249b2125927f95532e68427f09c99eed5e663 -size 2780 + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). + + \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/edit.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/edit.js" index f3f4e9bcb10dd2e021843f78fe5a83c91c1e5311..4114d525b7fa2db6824ee4c3351c58aa4c6a4876 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/edit.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/edit.js" @@ -1,3 +1,185 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7e7bf98e740f560026df079056d3b0f5f34628124a8d34e2765fb101dde12911 -size 8613 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +import { format, isEOL } from './format'; +import { parseTree, findNodeAtLocation } from './parser'; +export function removeProperty(text, path, options) { + return setProperty(text, path, void 0, options); +} +export function setProperty(text, originalPath, value, options) { + const path = originalPath.slice(); + const errors = []; + const root = parseTree(text, errors); + let parent = void 0; + let lastSegment = void 0; + while (path.length > 0) { + lastSegment = path.pop(); + parent = findNodeAtLocation(root, path); + if (parent === void 0 && value !== void 0) { + if (typeof lastSegment === 'string') { + value = { [lastSegment]: value }; + } + else { + value = [value]; + } + } + else { + break; + } + } + if (!parent) { + // empty document + if (value === void 0) { // delete + throw new Error('Can not delete in empty document'); + } + return withFormatting(text, { offset: root ? root.offset : 0, length: root ? root.length : 0, content: JSON.stringify(value) }, options); + } + else if (parent.type === 'object' && typeof lastSegment === 'string' && Array.isArray(parent.children)) { + const existing = findNodeAtLocation(parent, [lastSegment]); + if (existing !== void 0) { + if (value === void 0) { // delete + if (!existing.parent) { + throw new Error('Malformed AST'); + } + const propertyIndex = parent.children.indexOf(existing.parent); + let removeBegin; + let removeEnd = existing.parent.offset + existing.parent.length; + if (propertyIndex > 0) { + // remove the comma of the previous node + let previous = parent.children[propertyIndex - 1]; + removeBegin = previous.offset + previous.length; + } + else { + removeBegin = parent.offset + 1; + if (parent.children.length > 1) { + // remove the comma of the next node + let next = parent.children[1]; + removeEnd = next.offset; + } + } + return withFormatting(text, { offset: removeBegin, length: removeEnd - removeBegin, content: '' }, options); + } + else { + // set value of existing property + return withFormatting(text, { offset: existing.offset, length: existing.length, content: JSON.stringify(value) }, options); + } + } + else { + if (value === void 0) { // delete + return []; // property does not exist, nothing to do + } + const newProperty = `${JSON.stringify(lastSegment)}: ${JSON.stringify(value)}`; + const index = options.getInsertionIndex ? options.getInsertionIndex(parent.children.map(p => p.children[0].value)) : parent.children.length; + let edit; + if (index > 0) { + let previous = parent.children[index - 1]; + edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty }; + } + else if (parent.children.length === 0) { + edit = { offset: parent.offset + 1, length: 0, content: newProperty }; + } + else { + edit = { offset: parent.offset + 1, length: 0, content: newProperty + ',' }; + } + return withFormatting(text, edit, options); + } + } + else if (parent.type === 'array' && typeof lastSegment === 'number' && Array.isArray(parent.children)) { + const insertIndex = lastSegment; + if (insertIndex === -1) { + // Insert + const newProperty = `${JSON.stringify(value)}`; + let edit; + if (parent.children.length === 0) { + edit = { offset: parent.offset + 1, length: 0, content: newProperty }; + } + else { + const previous = parent.children[parent.children.length - 1]; + edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty }; + } + return withFormatting(text, edit, options); + } + else if (value === void 0 && parent.children.length >= 0) { + // Removal + const removalIndex = lastSegment; + const toRemove = parent.children[removalIndex]; + let edit; + if (parent.children.length === 1) { + // only item + edit = { offset: parent.offset + 1, length: parent.length - 2, content: '' }; + } + else if (parent.children.length - 1 === removalIndex) { + // last item + let previous = parent.children[removalIndex - 1]; + let offset = previous.offset + previous.length; + let parentEndOffset = parent.offset + parent.length; + edit = { offset, length: parentEndOffset - 2 - offset, content: '' }; + } + else { + edit = { offset: toRemove.offset, length: parent.children[removalIndex + 1].offset - toRemove.offset, content: '' }; + } + return withFormatting(text, edit, options); + } + else if (value !== void 0) { + let edit; + const newProperty = `${JSON.stringify(value)}`; + if (!options.isArrayInsertion && parent.children.length > lastSegment) { + const toModify = parent.children[lastSegment]; + edit = { offset: toModify.offset, length: toModify.length, content: newProperty }; + } + else if (parent.children.length === 0 || lastSegment === 0) { + edit = { offset: parent.offset + 1, length: 0, content: parent.children.length === 0 ? newProperty : newProperty + ',' }; + } + else { + const index = lastSegment > parent.children.length ? parent.children.length : lastSegment; + const previous = parent.children[index - 1]; + edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty }; + } + return withFormatting(text, edit, options); + } + else { + throw new Error(`Can not ${value === void 0 ? 'remove' : (options.isArrayInsertion ? 'insert' : 'modify')} Array index ${insertIndex} as length is not sufficient`); + } + } + else { + throw new Error(`Can not add ${typeof lastSegment !== 'number' ? 'index' : 'property'} to parent of type ${parent.type}`); + } +} +function withFormatting(text, edit, options) { + if (!options.formattingOptions) { + return [edit]; + } + // apply the edit + let newText = applyEdit(text, edit); + // format the new text + let begin = edit.offset; + let end = edit.offset + edit.content.length; + if (edit.length === 0 || edit.content.length === 0) { // insert or remove + while (begin > 0 && !isEOL(newText, begin - 1)) { + begin--; + } + while (end < newText.length && !isEOL(newText, end)) { + end++; + } + } + const edits = format(newText, { offset: begin, length: end - begin }, { ...options.formattingOptions, keepLines: false }); + // apply the formatting edits and track the begin and end offsets of the changes + for (let i = edits.length - 1; i >= 0; i--) { + const edit = edits[i]; + newText = applyEdit(newText, edit); + begin = Math.min(begin, edit.offset); + end = Math.max(end, edit.offset + edit.length); + end += edit.content.length - edit.length; + } + // create a single edit with all changes + const editLength = text.length - (newText.length - end) - begin; + return [{ offset: begin, length: editLength, content: newText.substring(begin, end) }]; +} +export function applyEdit(text, edit) { + return text.substring(0, edit.offset) + edit.content + text.substring(edit.offset + edit.length); +} +export function isWS(text, offset) { + return '\r\n \t'.indexOf(text.charAt(offset)) !== -1; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/format.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/format.js" index bca40f2e9cd177c860c7fb84564dfae6d11c261a..8663a1f385b08ddb8d2cc32bd3fc793b6751737c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/format.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/format.js" @@ -1,3 +1,261 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e57dee56700a844b18dea11548f9ba42b17bc857bde5bcd39554af06ca95bb1f -size 11098 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +import { createScanner } from './scanner'; +import { cachedSpaces, cachedBreakLinesWithSpaces, supportedEols } from './string-intern'; +export function format(documentText, range, options) { + let initialIndentLevel; + let formatText; + let formatTextStart; + let rangeStart; + let rangeEnd; + if (range) { + rangeStart = range.offset; + rangeEnd = rangeStart + range.length; + formatTextStart = rangeStart; + while (formatTextStart > 0 && !isEOL(documentText, formatTextStart - 1)) { + formatTextStart--; + } + let endOffset = rangeEnd; + while (endOffset < documentText.length && !isEOL(documentText, endOffset)) { + endOffset++; + } + formatText = documentText.substring(formatTextStart, endOffset); + initialIndentLevel = computeIndentLevel(formatText, options); + } + else { + formatText = documentText; + initialIndentLevel = 0; + formatTextStart = 0; + rangeStart = 0; + rangeEnd = documentText.length; + } + const eol = getEOL(options, documentText); + const eolFastPathSupported = supportedEols.includes(eol); + let numberLineBreaks = 0; + let indentLevel = 0; + let indentValue; + if (options.insertSpaces) { + indentValue = cachedSpaces[options.tabSize || 4] ?? repeat(cachedSpaces[1], options.tabSize || 4); + } + else { + indentValue = '\t'; + } + const indentType = indentValue === '\t' ? '\t' : ' '; + let scanner = createScanner(formatText, false); + let hasError = false; + function newLinesAndIndent() { + if (numberLineBreaks > 1) { + return repeat(eol, numberLineBreaks) + repeat(indentValue, initialIndentLevel + indentLevel); + } + const amountOfSpaces = indentValue.length * (initialIndentLevel + indentLevel); + if (!eolFastPathSupported || amountOfSpaces > cachedBreakLinesWithSpaces[indentType][eol].length) { + return eol + repeat(indentValue, initialIndentLevel + indentLevel); + } + if (amountOfSpaces <= 0) { + return eol; + } + return cachedBreakLinesWithSpaces[indentType][eol][amountOfSpaces]; + } + function scanNext() { + let token = scanner.scan(); + numberLineBreaks = 0; + while (token === 15 /* SyntaxKind.Trivia */ || token === 14 /* SyntaxKind.LineBreakTrivia */) { + if (token === 14 /* SyntaxKind.LineBreakTrivia */ && options.keepLines) { + numberLineBreaks += 1; + } + else if (token === 14 /* SyntaxKind.LineBreakTrivia */) { + numberLineBreaks = 1; + } + token = scanner.scan(); + } + hasError = token === 16 /* SyntaxKind.Unknown */ || scanner.getTokenError() !== 0 /* ScanError.None */; + return token; + } + const editOperations = []; + function addEdit(text, startOffset, endOffset) { + if (!hasError && (!range || (startOffset < rangeEnd && endOffset > rangeStart)) && documentText.substring(startOffset, endOffset) !== text) { + editOperations.push({ offset: startOffset, length: endOffset - startOffset, content: text }); + } + } + let firstToken = scanNext(); + if (options.keepLines && numberLineBreaks > 0) { + addEdit(repeat(eol, numberLineBreaks), 0, 0); + } + if (firstToken !== 17 /* SyntaxKind.EOF */) { + let firstTokenStart = scanner.getTokenOffset() + formatTextStart; + let initialIndent = (indentValue.length * initialIndentLevel < 20) && options.insertSpaces + ? cachedSpaces[indentValue.length * initialIndentLevel] + : repeat(indentValue, initialIndentLevel); + addEdit(initialIndent, formatTextStart, firstTokenStart); + } + while (firstToken !== 17 /* SyntaxKind.EOF */) { + let firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart; + let secondToken = scanNext(); + let replaceContent = ''; + let needsLineBreak = false; + while (numberLineBreaks === 0 && (secondToken === 12 /* SyntaxKind.LineCommentTrivia */ || secondToken === 13 /* SyntaxKind.BlockCommentTrivia */)) { + let commentTokenStart = scanner.getTokenOffset() + formatTextStart; + addEdit(cachedSpaces[1], firstTokenEnd, commentTokenStart); + firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart; + needsLineBreak = secondToken === 12 /* SyntaxKind.LineCommentTrivia */; + replaceContent = needsLineBreak ? newLinesAndIndent() : ''; + secondToken = scanNext(); + } + if (secondToken === 2 /* SyntaxKind.CloseBraceToken */) { + if (firstToken !== 1 /* SyntaxKind.OpenBraceToken */) { + indentLevel--; + } + ; + if (options.keepLines && numberLineBreaks > 0 || !options.keepLines && firstToken !== 1 /* SyntaxKind.OpenBraceToken */) { + replaceContent = newLinesAndIndent(); + } + else if (options.keepLines) { + replaceContent = cachedSpaces[1]; + } + } + else if (secondToken === 4 /* SyntaxKind.CloseBracketToken */) { + if (firstToken !== 3 /* SyntaxKind.OpenBracketToken */) { + indentLevel--; + } + ; + if (options.keepLines && numberLineBreaks > 0 || !options.keepLines && firstToken !== 3 /* SyntaxKind.OpenBracketToken */) { + replaceContent = newLinesAndIndent(); + } + else if (options.keepLines) { + replaceContent = cachedSpaces[1]; + } + } + else { + switch (firstToken) { + case 3 /* SyntaxKind.OpenBracketToken */: + case 1 /* SyntaxKind.OpenBraceToken */: + indentLevel++; + if (options.keepLines && numberLineBreaks > 0 || !options.keepLines) { + replaceContent = newLinesAndIndent(); + } + else { + replaceContent = cachedSpaces[1]; + } + break; + case 5 /* SyntaxKind.CommaToken */: + if (options.keepLines && numberLineBreaks > 0 || !options.keepLines) { + replaceContent = newLinesAndIndent(); + } + else { + replaceContent = cachedSpaces[1]; + } + break; + case 12 /* SyntaxKind.LineCommentTrivia */: + replaceContent = newLinesAndIndent(); + break; + case 13 /* SyntaxKind.BlockCommentTrivia */: + if (numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else if (!needsLineBreak) { + replaceContent = cachedSpaces[1]; + } + break; + case 6 /* SyntaxKind.ColonToken */: + if (options.keepLines && numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else if (!needsLineBreak) { + replaceContent = cachedSpaces[1]; + } + break; + case 10 /* SyntaxKind.StringLiteral */: + if (options.keepLines && numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else if (secondToken === 6 /* SyntaxKind.ColonToken */ && !needsLineBreak) { + replaceContent = ''; + } + break; + case 7 /* SyntaxKind.NullKeyword */: + case 8 /* SyntaxKind.TrueKeyword */: + case 9 /* SyntaxKind.FalseKeyword */: + case 11 /* SyntaxKind.NumericLiteral */: + case 2 /* SyntaxKind.CloseBraceToken */: + case 4 /* SyntaxKind.CloseBracketToken */: + if (options.keepLines && numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else { + if ((secondToken === 12 /* SyntaxKind.LineCommentTrivia */ || secondToken === 13 /* SyntaxKind.BlockCommentTrivia */) && !needsLineBreak) { + replaceContent = cachedSpaces[1]; + } + else if (secondToken !== 5 /* SyntaxKind.CommaToken */ && secondToken !== 17 /* SyntaxKind.EOF */) { + hasError = true; + } + } + break; + case 16 /* SyntaxKind.Unknown */: + hasError = true; + break; + } + if (numberLineBreaks > 0 && (secondToken === 12 /* SyntaxKind.LineCommentTrivia */ || secondToken === 13 /* SyntaxKind.BlockCommentTrivia */)) { + replaceContent = newLinesAndIndent(); + } + } + if (secondToken === 17 /* SyntaxKind.EOF */) { + if (options.keepLines && numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else { + replaceContent = options.insertFinalNewline ? eol : ''; + } + } + const secondTokenStart = scanner.getTokenOffset() + formatTextStart; + addEdit(replaceContent, firstTokenEnd, secondTokenStart); + firstToken = secondToken; + } + return editOperations; +} +function repeat(s, count) { + let result = ''; + for (let i = 0; i < count; i++) { + result += s; + } + return result; +} +function computeIndentLevel(content, options) { + let i = 0; + let nChars = 0; + const tabSize = options.tabSize || 4; + while (i < content.length) { + let ch = content.charAt(i); + if (ch === cachedSpaces[1]) { + nChars++; + } + else if (ch === '\t') { + nChars += tabSize; + } + else { + break; + } + i++; + } + return Math.floor(nChars / tabSize); +} +function getEOL(options, text) { + for (let i = 0; i < text.length; i++) { + const ch = text.charAt(i); + if (ch === '\r') { + if (i + 1 < text.length && text.charAt(i + 1) === '\n') { + return '\r\n'; + } + return '\r'; + } + else if (ch === '\n') { + return '\n'; + } + } + return (options && options.eol) || '\n'; +} +export function isEOL(text, offset) { + return '\r\n'.indexOf(text.charAt(offset)) !== -1; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/parser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/parser.js" index a2e12bf8460a91fa1af7170f654333edfa340fd8..ea1ac2ed37bf0b4a90d9405066c0a9040a040dff 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/parser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/parser.js" @@ -1,3 +1,632 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cd3807c61549999adfec191a4131c71f628284e63c85e8dad2b642f283e64ba5 -size 24708 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +import { createScanner } from './scanner'; +var ParseOptions; +(function (ParseOptions) { + ParseOptions.DEFAULT = { + allowTrailingComma: false + }; +})(ParseOptions || (ParseOptions = {})); +/** + * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. + */ +export function getLocation(text, position) { + const segments = []; // strings or numbers + const earlyReturnException = new Object(); + let previousNode = undefined; + const previousNodeInst = { + value: {}, + offset: 0, + length: 0, + type: 'object', + parent: undefined + }; + let isAtPropertyKey = false; + function setPreviousNode(value, offset, length, type) { + previousNodeInst.value = value; + previousNodeInst.offset = offset; + previousNodeInst.length = length; + previousNodeInst.type = type; + previousNodeInst.colonOffset = undefined; + previousNode = previousNodeInst; + } + try { + visit(text, { + onObjectBegin: (offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + previousNode = undefined; + isAtPropertyKey = position > offset; + segments.push(''); // push a placeholder (will be replaced) + }, + onObjectProperty: (name, offset, length) => { + if (position < offset) { + throw earlyReturnException; + } + setPreviousNode(name, offset, length, 'property'); + segments[segments.length - 1] = name; + if (position <= offset + length) { + throw earlyReturnException; + } + }, + onObjectEnd: (offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + previousNode = undefined; + segments.pop(); + }, + onArrayBegin: (offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + previousNode = undefined; + segments.push(0); + }, + onArrayEnd: (offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + previousNode = undefined; + segments.pop(); + }, + onLiteralValue: (value, offset, length) => { + if (position < offset) { + throw earlyReturnException; + } + setPreviousNode(value, offset, length, getNodeType(value)); + if (position <= offset + length) { + throw earlyReturnException; + } + }, + onSeparator: (sep, offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + if (sep === ':' && previousNode && previousNode.type === 'property') { + previousNode.colonOffset = offset; + isAtPropertyKey = false; + previousNode = undefined; + } + else if (sep === ',') { + const last = segments[segments.length - 1]; + if (typeof last === 'number') { + segments[segments.length - 1] = last + 1; + } + else { + isAtPropertyKey = true; + segments[segments.length - 1] = ''; + } + previousNode = undefined; + } + } + }); + } + catch (e) { + if (e !== earlyReturnException) { + throw e; + } + } + return { + path: segments, + previousNode, + isAtPropertyKey, + matches: (pattern) => { + let k = 0; + for (let i = 0; k < pattern.length && i < segments.length; i++) { + if (pattern[k] === segments[i] || pattern[k] === '*') { + k++; + } + else if (pattern[k] !== '**') { + return false; + } + } + return k === pattern.length; + } + }; +} +/** + * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + * Therefore always check the errors list to find out if the input was valid. + */ +export function parse(text, errors = [], options = ParseOptions.DEFAULT) { + let currentProperty = null; + let currentParent = []; + const previousParents = []; + function onValue(value) { + if (Array.isArray(currentParent)) { + currentParent.push(value); + } + else if (currentProperty !== null) { + currentParent[currentProperty] = value; + } + } + const visitor = { + onObjectBegin: () => { + const object = {}; + onValue(object); + previousParents.push(currentParent); + currentParent = object; + currentProperty = null; + }, + onObjectProperty: (name) => { + currentProperty = name; + }, + onObjectEnd: () => { + currentParent = previousParents.pop(); + }, + onArrayBegin: () => { + const array = []; + onValue(array); + previousParents.push(currentParent); + currentParent = array; + currentProperty = null; + }, + onArrayEnd: () => { + currentParent = previousParents.pop(); + }, + onLiteralValue: onValue, + onError: (error, offset, length) => { + errors.push({ error, offset, length }); + } + }; + visit(text, visitor, options); + return currentParent[0]; +} +/** + * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + */ +export function parseTree(text, errors = [], options = ParseOptions.DEFAULT) { + let currentParent = { type: 'array', offset: -1, length: -1, children: [], parent: undefined }; // artificial root + function ensurePropertyComplete(endOffset) { + if (currentParent.type === 'property') { + currentParent.length = endOffset - currentParent.offset; + currentParent = currentParent.parent; + } + } + function onValue(valueNode) { + currentParent.children.push(valueNode); + return valueNode; + } + const visitor = { + onObjectBegin: (offset) => { + currentParent = onValue({ type: 'object', offset, length: -1, parent: currentParent, children: [] }); + }, + onObjectProperty: (name, offset, length) => { + currentParent = onValue({ type: 'property', offset, length: -1, parent: currentParent, children: [] }); + currentParent.children.push({ type: 'string', value: name, offset, length, parent: currentParent }); + }, + onObjectEnd: (offset, length) => { + ensurePropertyComplete(offset + length); // in case of a missing value for a property: make sure property is complete + currentParent.length = offset + length - currentParent.offset; + currentParent = currentParent.parent; + ensurePropertyComplete(offset + length); + }, + onArrayBegin: (offset, length) => { + currentParent = onValue({ type: 'array', offset, length: -1, parent: currentParent, children: [] }); + }, + onArrayEnd: (offset, length) => { + currentParent.length = offset + length - currentParent.offset; + currentParent = currentParent.parent; + ensurePropertyComplete(offset + length); + }, + onLiteralValue: (value, offset, length) => { + onValue({ type: getNodeType(value), offset, length, parent: currentParent, value }); + ensurePropertyComplete(offset + length); + }, + onSeparator: (sep, offset, length) => { + if (currentParent.type === 'property') { + if (sep === ':') { + currentParent.colonOffset = offset; + } + else if (sep === ',') { + ensurePropertyComplete(offset); + } + } + }, + onError: (error, offset, length) => { + errors.push({ error, offset, length }); + } + }; + visit(text, visitor, options); + const result = currentParent.children[0]; + if (result) { + delete result.parent; + } + return result; +} +/** + * Finds the node at the given path in a JSON DOM. + */ +export function findNodeAtLocation(root, path) { + if (!root) { + return undefined; + } + let node = root; + for (let segment of path) { + if (typeof segment === 'string') { + if (node.type !== 'object' || !Array.isArray(node.children)) { + return undefined; + } + let found = false; + for (const propertyNode of node.children) { + if (Array.isArray(propertyNode.children) && propertyNode.children[0].value === segment && propertyNode.children.length === 2) { + node = propertyNode.children[1]; + found = true; + break; + } + } + if (!found) { + return undefined; + } + } + else { + const index = segment; + if (node.type !== 'array' || index < 0 || !Array.isArray(node.children) || index >= node.children.length) { + return undefined; + } + node = node.children[index]; + } + } + return node; +} +/** + * Gets the JSON path of the given JSON DOM node + */ +export function getNodePath(node) { + if (!node.parent || !node.parent.children) { + return []; + } + const path = getNodePath(node.parent); + if (node.parent.type === 'property') { + const key = node.parent.children[0].value; + path.push(key); + } + else if (node.parent.type === 'array') { + const index = node.parent.children.indexOf(node); + if (index !== -1) { + path.push(index); + } + } + return path; +} +/** + * Evaluates the JavaScript object of the given JSON DOM node + */ +export function getNodeValue(node) { + switch (node.type) { + case 'array': + return node.children.map(getNodeValue); + case 'object': + const obj = Object.create(null); + for (let prop of node.children) { + const valueNode = prop.children[1]; + if (valueNode) { + obj[prop.children[0].value] = getNodeValue(valueNode); + } + } + return obj; + case 'null': + case 'string': + case 'number': + case 'boolean': + return node.value; + default: + return undefined; + } +} +export function contains(node, offset, includeRightBound = false) { + return (offset >= node.offset && offset < (node.offset + node.length)) || includeRightBound && (offset === (node.offset + node.length)); +} +/** + * Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. + */ +export function findNodeAtOffset(node, offset, includeRightBound = false) { + if (contains(node, offset, includeRightBound)) { + const children = node.children; + if (Array.isArray(children)) { + for (let i = 0; i < children.length && children[i].offset <= offset; i++) { + const item = findNodeAtOffset(children[i], offset, includeRightBound); + if (item) { + return item; + } + } + } + return node; + } + return undefined; +} +/** + * Parses the given text and invokes the visitor functions for each object, array and literal reached. + */ +export function visit(text, visitor, options = ParseOptions.DEFAULT) { + const _scanner = createScanner(text, false); + // Important: Only pass copies of this to visitor functions to prevent accidental modification, and + // to not affect visitor functions which stored a reference to a previous JSONPath + const _jsonPath = []; + function toNoArgVisit(visitFunction) { + return visitFunction ? () => visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true; + } + function toNoArgVisitWithPath(visitFunction) { + return visitFunction ? () => visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true; + } + function toOneArgVisit(visitFunction) { + return visitFunction ? (arg) => visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true; + } + function toOneArgVisitWithPath(visitFunction) { + return visitFunction ? (arg) => visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true; + } + const onObjectBegin = toNoArgVisitWithPath(visitor.onObjectBegin), onObjectProperty = toOneArgVisitWithPath(visitor.onObjectProperty), onObjectEnd = toNoArgVisit(visitor.onObjectEnd), onArrayBegin = toNoArgVisitWithPath(visitor.onArrayBegin), onArrayEnd = toNoArgVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisitWithPath(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError); + const disallowComments = options && options.disallowComments; + const allowTrailingComma = options && options.allowTrailingComma; + function scanNext() { + while (true) { + const token = _scanner.scan(); + switch (_scanner.getTokenError()) { + case 4 /* ScanError.InvalidUnicode */: + handleError(14 /* ParseErrorCode.InvalidUnicode */); + break; + case 5 /* ScanError.InvalidEscapeCharacter */: + handleError(15 /* ParseErrorCode.InvalidEscapeCharacter */); + break; + case 3 /* ScanError.UnexpectedEndOfNumber */: + handleError(13 /* ParseErrorCode.UnexpectedEndOfNumber */); + break; + case 1 /* ScanError.UnexpectedEndOfComment */: + if (!disallowComments) { + handleError(11 /* ParseErrorCode.UnexpectedEndOfComment */); + } + break; + case 2 /* ScanError.UnexpectedEndOfString */: + handleError(12 /* ParseErrorCode.UnexpectedEndOfString */); + break; + case 6 /* ScanError.InvalidCharacter */: + handleError(16 /* ParseErrorCode.InvalidCharacter */); + break; + } + switch (token) { + case 12 /* SyntaxKind.LineCommentTrivia */: + case 13 /* SyntaxKind.BlockCommentTrivia */: + if (disallowComments) { + handleError(10 /* ParseErrorCode.InvalidCommentToken */); + } + else { + onComment(); + } + break; + case 16 /* SyntaxKind.Unknown */: + handleError(1 /* ParseErrorCode.InvalidSymbol */); + break; + case 15 /* SyntaxKind.Trivia */: + case 14 /* SyntaxKind.LineBreakTrivia */: + break; + default: + return token; + } + } + } + function handleError(error, skipUntilAfter = [], skipUntil = []) { + onError(error); + if (skipUntilAfter.length + skipUntil.length > 0) { + let token = _scanner.getToken(); + while (token !== 17 /* SyntaxKind.EOF */) { + if (skipUntilAfter.indexOf(token) !== -1) { + scanNext(); + break; + } + else if (skipUntil.indexOf(token) !== -1) { + break; + } + token = scanNext(); + } + } + } + function parseString(isValue) { + const value = _scanner.getTokenValue(); + if (isValue) { + onLiteralValue(value); + } + else { + onObjectProperty(value); + // add property name afterwards + _jsonPath.push(value); + } + scanNext(); + return true; + } + function parseLiteral() { + switch (_scanner.getToken()) { + case 11 /* SyntaxKind.NumericLiteral */: + const tokenValue = _scanner.getTokenValue(); + let value = Number(tokenValue); + if (isNaN(value)) { + handleError(2 /* ParseErrorCode.InvalidNumberFormat */); + value = 0; + } + onLiteralValue(value); + break; + case 7 /* SyntaxKind.NullKeyword */: + onLiteralValue(null); + break; + case 8 /* SyntaxKind.TrueKeyword */: + onLiteralValue(true); + break; + case 9 /* SyntaxKind.FalseKeyword */: + onLiteralValue(false); + break; + default: + return false; + } + scanNext(); + return true; + } + function parseProperty() { + if (_scanner.getToken() !== 10 /* SyntaxKind.StringLiteral */) { + handleError(3 /* ParseErrorCode.PropertyNameExpected */, [], [2 /* SyntaxKind.CloseBraceToken */, 5 /* SyntaxKind.CommaToken */]); + return false; + } + parseString(false); + if (_scanner.getToken() === 6 /* SyntaxKind.ColonToken */) { + onSeparator(':'); + scanNext(); // consume colon + if (!parseValue()) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], [2 /* SyntaxKind.CloseBraceToken */, 5 /* SyntaxKind.CommaToken */]); + } + } + else { + handleError(5 /* ParseErrorCode.ColonExpected */, [], [2 /* SyntaxKind.CloseBraceToken */, 5 /* SyntaxKind.CommaToken */]); + } + _jsonPath.pop(); // remove processed property name + return true; + } + function parseObject() { + onObjectBegin(); + scanNext(); // consume open brace + let needsComma = false; + while (_scanner.getToken() !== 2 /* SyntaxKind.CloseBraceToken */ && _scanner.getToken() !== 17 /* SyntaxKind.EOF */) { + if (_scanner.getToken() === 5 /* SyntaxKind.CommaToken */) { + if (!needsComma) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], []); + } + onSeparator(','); + scanNext(); // consume comma + if (_scanner.getToken() === 2 /* SyntaxKind.CloseBraceToken */ && allowTrailingComma) { + break; + } + } + else if (needsComma) { + handleError(6 /* ParseErrorCode.CommaExpected */, [], []); + } + if (!parseProperty()) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], [2 /* SyntaxKind.CloseBraceToken */, 5 /* SyntaxKind.CommaToken */]); + } + needsComma = true; + } + onObjectEnd(); + if (_scanner.getToken() !== 2 /* SyntaxKind.CloseBraceToken */) { + handleError(7 /* ParseErrorCode.CloseBraceExpected */, [2 /* SyntaxKind.CloseBraceToken */], []); + } + else { + scanNext(); // consume close brace + } + return true; + } + function parseArray() { + onArrayBegin(); + scanNext(); // consume open bracket + let isFirstElement = true; + let needsComma = false; + while (_scanner.getToken() !== 4 /* SyntaxKind.CloseBracketToken */ && _scanner.getToken() !== 17 /* SyntaxKind.EOF */) { + if (_scanner.getToken() === 5 /* SyntaxKind.CommaToken */) { + if (!needsComma) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], []); + } + onSeparator(','); + scanNext(); // consume comma + if (_scanner.getToken() === 4 /* SyntaxKind.CloseBracketToken */ && allowTrailingComma) { + break; + } + } + else if (needsComma) { + handleError(6 /* ParseErrorCode.CommaExpected */, [], []); + } + if (isFirstElement) { + _jsonPath.push(0); + isFirstElement = false; + } + else { + _jsonPath[_jsonPath.length - 1]++; + } + if (!parseValue()) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], [4 /* SyntaxKind.CloseBracketToken */, 5 /* SyntaxKind.CommaToken */]); + } + needsComma = true; + } + onArrayEnd(); + if (!isFirstElement) { + _jsonPath.pop(); // remove array index + } + if (_scanner.getToken() !== 4 /* SyntaxKind.CloseBracketToken */) { + handleError(8 /* ParseErrorCode.CloseBracketExpected */, [4 /* SyntaxKind.CloseBracketToken */], []); + } + else { + scanNext(); // consume close bracket + } + return true; + } + function parseValue() { + switch (_scanner.getToken()) { + case 3 /* SyntaxKind.OpenBracketToken */: + return parseArray(); + case 1 /* SyntaxKind.OpenBraceToken */: + return parseObject(); + case 10 /* SyntaxKind.StringLiteral */: + return parseString(true); + default: + return parseLiteral(); + } + } + scanNext(); + if (_scanner.getToken() === 17 /* SyntaxKind.EOF */) { + if (options.allowEmptyContent) { + return true; + } + handleError(4 /* ParseErrorCode.ValueExpected */, [], []); + return false; + } + if (!parseValue()) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], []); + return false; + } + if (_scanner.getToken() !== 17 /* SyntaxKind.EOF */) { + handleError(9 /* ParseErrorCode.EndOfFileExpected */, [], []); + } + return true; +} +/** + * Takes JSON with JavaScript-style comments and remove + * them. Optionally replaces every none-newline character + * of comments with a replaceCharacter + */ +export function stripComments(text, replaceCh) { + let _scanner = createScanner(text), parts = [], kind, offset = 0, pos; + do { + pos = _scanner.getPosition(); + kind = _scanner.scan(); + switch (kind) { + case 12 /* SyntaxKind.LineCommentTrivia */: + case 13 /* SyntaxKind.BlockCommentTrivia */: + case 17 /* SyntaxKind.EOF */: + if (offset !== pos) { + parts.push(text.substring(offset, pos)); + } + if (replaceCh !== undefined) { + parts.push(_scanner.getTokenValue().replace(/[^\r\n]/g, replaceCh)); + } + offset = _scanner.getPosition(); + break; + } + } while (kind !== 17 /* SyntaxKind.EOF */); + return parts.join(''); +} +export function getNodeType(value) { + switch (typeof value) { + case 'boolean': return 'boolean'; + case 'number': return 'number'; + case 'string': return 'string'; + case 'object': { + if (!value) { + return 'null'; + } + else if (Array.isArray(value)) { + return 'array'; + } + return 'object'; + } + default: return 'null'; + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/scanner.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/scanner.js" index b78f2f3853661418a9ba60609997bfe30ffef9d8..e84942c122b7bca38dddd177a519d7a17ad4fcef 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/scanner.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/scanner.js" @@ -1,3 +1,443 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e737e1774f87ca88d85d73e3bafff688b78cac06b81c53b96c54da8b3ca86cd9 -size 19188 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +/** + * Creates a JSON scanner on the given text. + * If ignoreTrivia is set, whitespaces or comments are ignored. + */ +export function createScanner(text, ignoreTrivia = false) { + const len = text.length; + let pos = 0, value = '', tokenOffset = 0, token = 16 /* SyntaxKind.Unknown */, lineNumber = 0, lineStartOffset = 0, tokenLineStartOffset = 0, prevTokenLineStartOffset = 0, scanError = 0 /* ScanError.None */; + function scanHexDigits(count, exact) { + let digits = 0; + let value = 0; + while (digits < count || !exact) { + let ch = text.charCodeAt(pos); + if (ch >= 48 /* CharacterCodes._0 */ && ch <= 57 /* CharacterCodes._9 */) { + value = value * 16 + ch - 48 /* CharacterCodes._0 */; + } + else if (ch >= 65 /* CharacterCodes.A */ && ch <= 70 /* CharacterCodes.F */) { + value = value * 16 + ch - 65 /* CharacterCodes.A */ + 10; + } + else if (ch >= 97 /* CharacterCodes.a */ && ch <= 102 /* CharacterCodes.f */) { + value = value * 16 + ch - 97 /* CharacterCodes.a */ + 10; + } + else { + break; + } + pos++; + digits++; + } + if (digits < count) { + value = -1; + } + return value; + } + function setPosition(newPosition) { + pos = newPosition; + value = ''; + tokenOffset = 0; + token = 16 /* SyntaxKind.Unknown */; + scanError = 0 /* ScanError.None */; + } + function scanNumber() { + let start = pos; + if (text.charCodeAt(pos) === 48 /* CharacterCodes._0 */) { + pos++; + } + else { + pos++; + while (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + } + } + if (pos < text.length && text.charCodeAt(pos) === 46 /* CharacterCodes.dot */) { + pos++; + if (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + while (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + } + } + else { + scanError = 3 /* ScanError.UnexpectedEndOfNumber */; + return text.substring(start, pos); + } + } + let end = pos; + if (pos < text.length && (text.charCodeAt(pos) === 69 /* CharacterCodes.E */ || text.charCodeAt(pos) === 101 /* CharacterCodes.e */)) { + pos++; + if (pos < text.length && text.charCodeAt(pos) === 43 /* CharacterCodes.plus */ || text.charCodeAt(pos) === 45 /* CharacterCodes.minus */) { + pos++; + } + if (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + while (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + } + end = pos; + } + else { + scanError = 3 /* ScanError.UnexpectedEndOfNumber */; + } + } + return text.substring(start, end); + } + function scanString() { + let result = '', start = pos; + while (true) { + if (pos >= len) { + result += text.substring(start, pos); + scanError = 2 /* ScanError.UnexpectedEndOfString */; + break; + } + const ch = text.charCodeAt(pos); + if (ch === 34 /* CharacterCodes.doubleQuote */) { + result += text.substring(start, pos); + pos++; + break; + } + if (ch === 92 /* CharacterCodes.backslash */) { + result += text.substring(start, pos); + pos++; + if (pos >= len) { + scanError = 2 /* ScanError.UnexpectedEndOfString */; + break; + } + const ch2 = text.charCodeAt(pos++); + switch (ch2) { + case 34 /* CharacterCodes.doubleQuote */: + result += '\"'; + break; + case 92 /* CharacterCodes.backslash */: + result += '\\'; + break; + case 47 /* CharacterCodes.slash */: + result += '/'; + break; + case 98 /* CharacterCodes.b */: + result += '\b'; + break; + case 102 /* CharacterCodes.f */: + result += '\f'; + break; + case 110 /* CharacterCodes.n */: + result += '\n'; + break; + case 114 /* CharacterCodes.r */: + result += '\r'; + break; + case 116 /* CharacterCodes.t */: + result += '\t'; + break; + case 117 /* CharacterCodes.u */: + const ch3 = scanHexDigits(4, true); + if (ch3 >= 0) { + result += String.fromCharCode(ch3); + } + else { + scanError = 4 /* ScanError.InvalidUnicode */; + } + break; + default: + scanError = 5 /* ScanError.InvalidEscapeCharacter */; + } + start = pos; + continue; + } + if (ch >= 0 && ch <= 0x1f) { + if (isLineBreak(ch)) { + result += text.substring(start, pos); + scanError = 2 /* ScanError.UnexpectedEndOfString */; + break; + } + else { + scanError = 6 /* ScanError.InvalidCharacter */; + // mark as error but continue with string + } + } + pos++; + } + return result; + } + function scanNext() { + value = ''; + scanError = 0 /* ScanError.None */; + tokenOffset = pos; + lineStartOffset = lineNumber; + prevTokenLineStartOffset = tokenLineStartOffset; + if (pos >= len) { + // at the end + tokenOffset = len; + return token = 17 /* SyntaxKind.EOF */; + } + let code = text.charCodeAt(pos); + // trivia: whitespace + if (isWhiteSpace(code)) { + do { + pos++; + value += String.fromCharCode(code); + code = text.charCodeAt(pos); + } while (isWhiteSpace(code)); + return token = 15 /* SyntaxKind.Trivia */; + } + // trivia: newlines + if (isLineBreak(code)) { + pos++; + value += String.fromCharCode(code); + if (code === 13 /* CharacterCodes.carriageReturn */ && text.charCodeAt(pos) === 10 /* CharacterCodes.lineFeed */) { + pos++; + value += '\n'; + } + lineNumber++; + tokenLineStartOffset = pos; + return token = 14 /* SyntaxKind.LineBreakTrivia */; + } + switch (code) { + // tokens: []{}:, + case 123 /* CharacterCodes.openBrace */: + pos++; + return token = 1 /* SyntaxKind.OpenBraceToken */; + case 125 /* CharacterCodes.closeBrace */: + pos++; + return token = 2 /* SyntaxKind.CloseBraceToken */; + case 91 /* CharacterCodes.openBracket */: + pos++; + return token = 3 /* SyntaxKind.OpenBracketToken */; + case 93 /* CharacterCodes.closeBracket */: + pos++; + return token = 4 /* SyntaxKind.CloseBracketToken */; + case 58 /* CharacterCodes.colon */: + pos++; + return token = 6 /* SyntaxKind.ColonToken */; + case 44 /* CharacterCodes.comma */: + pos++; + return token = 5 /* SyntaxKind.CommaToken */; + // strings + case 34 /* CharacterCodes.doubleQuote */: + pos++; + value = scanString(); + return token = 10 /* SyntaxKind.StringLiteral */; + // comments + case 47 /* CharacterCodes.slash */: + const start = pos - 1; + // Single-line comment + if (text.charCodeAt(pos + 1) === 47 /* CharacterCodes.slash */) { + pos += 2; + while (pos < len) { + if (isLineBreak(text.charCodeAt(pos))) { + break; + } + pos++; + } + value = text.substring(start, pos); + return token = 12 /* SyntaxKind.LineCommentTrivia */; + } + // Multi-line comment + if (text.charCodeAt(pos + 1) === 42 /* CharacterCodes.asterisk */) { + pos += 2; + const safeLength = len - 1; // For lookahead. + let commentClosed = false; + while (pos < safeLength) { + const ch = text.charCodeAt(pos); + if (ch === 42 /* CharacterCodes.asterisk */ && text.charCodeAt(pos + 1) === 47 /* CharacterCodes.slash */) { + pos += 2; + commentClosed = true; + break; + } + pos++; + if (isLineBreak(ch)) { + if (ch === 13 /* CharacterCodes.carriageReturn */ && text.charCodeAt(pos) === 10 /* CharacterCodes.lineFeed */) { + pos++; + } + lineNumber++; + tokenLineStartOffset = pos; + } + } + if (!commentClosed) { + pos++; + scanError = 1 /* ScanError.UnexpectedEndOfComment */; + } + value = text.substring(start, pos); + return token = 13 /* SyntaxKind.BlockCommentTrivia */; + } + // just a single slash + value += String.fromCharCode(code); + pos++; + return token = 16 /* SyntaxKind.Unknown */; + // numbers + case 45 /* CharacterCodes.minus */: + value += String.fromCharCode(code); + pos++; + if (pos === len || !isDigit(text.charCodeAt(pos))) { + return token = 16 /* SyntaxKind.Unknown */; + } + // found a minus, followed by a number so + // we fall through to proceed with scanning + // numbers + case 48 /* CharacterCodes._0 */: + case 49 /* CharacterCodes._1 */: + case 50 /* CharacterCodes._2 */: + case 51 /* CharacterCodes._3 */: + case 52 /* CharacterCodes._4 */: + case 53 /* CharacterCodes._5 */: + case 54 /* CharacterCodes._6 */: + case 55 /* CharacterCodes._7 */: + case 56 /* CharacterCodes._8 */: + case 57 /* CharacterCodes._9 */: + value += scanNumber(); + return token = 11 /* SyntaxKind.NumericLiteral */; + // literals and unknown symbols + default: + // is a literal? Read the full word. + while (pos < len && isUnknownContentCharacter(code)) { + pos++; + code = text.charCodeAt(pos); + } + if (tokenOffset !== pos) { + value = text.substring(tokenOffset, pos); + // keywords: true, false, null + switch (value) { + case 'true': return token = 8 /* SyntaxKind.TrueKeyword */; + case 'false': return token = 9 /* SyntaxKind.FalseKeyword */; + case 'null': return token = 7 /* SyntaxKind.NullKeyword */; + } + return token = 16 /* SyntaxKind.Unknown */; + } + // some + value += String.fromCharCode(code); + pos++; + return token = 16 /* SyntaxKind.Unknown */; + } + } + function isUnknownContentCharacter(code) { + if (isWhiteSpace(code) || isLineBreak(code)) { + return false; + } + switch (code) { + case 125 /* CharacterCodes.closeBrace */: + case 93 /* CharacterCodes.closeBracket */: + case 123 /* CharacterCodes.openBrace */: + case 91 /* CharacterCodes.openBracket */: + case 34 /* CharacterCodes.doubleQuote */: + case 58 /* CharacterCodes.colon */: + case 44 /* CharacterCodes.comma */: + case 47 /* CharacterCodes.slash */: + return false; + } + return true; + } + function scanNextNonTrivia() { + let result; + do { + result = scanNext(); + } while (result >= 12 /* SyntaxKind.LineCommentTrivia */ && result <= 15 /* SyntaxKind.Trivia */); + return result; + } + return { + setPosition: setPosition, + getPosition: () => pos, + scan: ignoreTrivia ? scanNextNonTrivia : scanNext, + getToken: () => token, + getTokenValue: () => value, + getTokenOffset: () => tokenOffset, + getTokenLength: () => pos - tokenOffset, + getTokenStartLine: () => lineStartOffset, + getTokenStartCharacter: () => tokenOffset - prevTokenLineStartOffset, + getTokenError: () => scanError, + }; +} +function isWhiteSpace(ch) { + return ch === 32 /* CharacterCodes.space */ || ch === 9 /* CharacterCodes.tab */; +} +function isLineBreak(ch) { + return ch === 10 /* CharacterCodes.lineFeed */ || ch === 13 /* CharacterCodes.carriageReturn */; +} +function isDigit(ch) { + return ch >= 48 /* CharacterCodes._0 */ && ch <= 57 /* CharacterCodes._9 */; +} +var CharacterCodes; +(function (CharacterCodes) { + CharacterCodes[CharacterCodes["lineFeed"] = 10] = "lineFeed"; + CharacterCodes[CharacterCodes["carriageReturn"] = 13] = "carriageReturn"; + CharacterCodes[CharacterCodes["space"] = 32] = "space"; + CharacterCodes[CharacterCodes["_0"] = 48] = "_0"; + CharacterCodes[CharacterCodes["_1"] = 49] = "_1"; + CharacterCodes[CharacterCodes["_2"] = 50] = "_2"; + CharacterCodes[CharacterCodes["_3"] = 51] = "_3"; + CharacterCodes[CharacterCodes["_4"] = 52] = "_4"; + CharacterCodes[CharacterCodes["_5"] = 53] = "_5"; + CharacterCodes[CharacterCodes["_6"] = 54] = "_6"; + CharacterCodes[CharacterCodes["_7"] = 55] = "_7"; + CharacterCodes[CharacterCodes["_8"] = 56] = "_8"; + CharacterCodes[CharacterCodes["_9"] = 57] = "_9"; + CharacterCodes[CharacterCodes["a"] = 97] = "a"; + CharacterCodes[CharacterCodes["b"] = 98] = "b"; + CharacterCodes[CharacterCodes["c"] = 99] = "c"; + CharacterCodes[CharacterCodes["d"] = 100] = "d"; + CharacterCodes[CharacterCodes["e"] = 101] = "e"; + CharacterCodes[CharacterCodes["f"] = 102] = "f"; + CharacterCodes[CharacterCodes["g"] = 103] = "g"; + CharacterCodes[CharacterCodes["h"] = 104] = "h"; + CharacterCodes[CharacterCodes["i"] = 105] = "i"; + CharacterCodes[CharacterCodes["j"] = 106] = "j"; + CharacterCodes[CharacterCodes["k"] = 107] = "k"; + CharacterCodes[CharacterCodes["l"] = 108] = "l"; + CharacterCodes[CharacterCodes["m"] = 109] = "m"; + CharacterCodes[CharacterCodes["n"] = 110] = "n"; + CharacterCodes[CharacterCodes["o"] = 111] = "o"; + CharacterCodes[CharacterCodes["p"] = 112] = "p"; + CharacterCodes[CharacterCodes["q"] = 113] = "q"; + CharacterCodes[CharacterCodes["r"] = 114] = "r"; + CharacterCodes[CharacterCodes["s"] = 115] = "s"; + CharacterCodes[CharacterCodes["t"] = 116] = "t"; + CharacterCodes[CharacterCodes["u"] = 117] = "u"; + CharacterCodes[CharacterCodes["v"] = 118] = "v"; + CharacterCodes[CharacterCodes["w"] = 119] = "w"; + CharacterCodes[CharacterCodes["x"] = 120] = "x"; + CharacterCodes[CharacterCodes["y"] = 121] = "y"; + CharacterCodes[CharacterCodes["z"] = 122] = "z"; + CharacterCodes[CharacterCodes["A"] = 65] = "A"; + CharacterCodes[CharacterCodes["B"] = 66] = "B"; + CharacterCodes[CharacterCodes["C"] = 67] = "C"; + CharacterCodes[CharacterCodes["D"] = 68] = "D"; + CharacterCodes[CharacterCodes["E"] = 69] = "E"; + CharacterCodes[CharacterCodes["F"] = 70] = "F"; + CharacterCodes[CharacterCodes["G"] = 71] = "G"; + CharacterCodes[CharacterCodes["H"] = 72] = "H"; + CharacterCodes[CharacterCodes["I"] = 73] = "I"; + CharacterCodes[CharacterCodes["J"] = 74] = "J"; + CharacterCodes[CharacterCodes["K"] = 75] = "K"; + CharacterCodes[CharacterCodes["L"] = 76] = "L"; + CharacterCodes[CharacterCodes["M"] = 77] = "M"; + CharacterCodes[CharacterCodes["N"] = 78] = "N"; + CharacterCodes[CharacterCodes["O"] = 79] = "O"; + CharacterCodes[CharacterCodes["P"] = 80] = "P"; + CharacterCodes[CharacterCodes["Q"] = 81] = "Q"; + CharacterCodes[CharacterCodes["R"] = 82] = "R"; + CharacterCodes[CharacterCodes["S"] = 83] = "S"; + CharacterCodes[CharacterCodes["T"] = 84] = "T"; + CharacterCodes[CharacterCodes["U"] = 85] = "U"; + CharacterCodes[CharacterCodes["V"] = 86] = "V"; + CharacterCodes[CharacterCodes["W"] = 87] = "W"; + CharacterCodes[CharacterCodes["X"] = 88] = "X"; + CharacterCodes[CharacterCodes["Y"] = 89] = "Y"; + CharacterCodes[CharacterCodes["Z"] = 90] = "Z"; + CharacterCodes[CharacterCodes["asterisk"] = 42] = "asterisk"; + CharacterCodes[CharacterCodes["backslash"] = 92] = "backslash"; + CharacterCodes[CharacterCodes["closeBrace"] = 125] = "closeBrace"; + CharacterCodes[CharacterCodes["closeBracket"] = 93] = "closeBracket"; + CharacterCodes[CharacterCodes["colon"] = 58] = "colon"; + CharacterCodes[CharacterCodes["comma"] = 44] = "comma"; + CharacterCodes[CharacterCodes["dot"] = 46] = "dot"; + CharacterCodes[CharacterCodes["doubleQuote"] = 34] = "doubleQuote"; + CharacterCodes[CharacterCodes["minus"] = 45] = "minus"; + CharacterCodes[CharacterCodes["openBrace"] = 123] = "openBrace"; + CharacterCodes[CharacterCodes["openBracket"] = 91] = "openBracket"; + CharacterCodes[CharacterCodes["plus"] = 43] = "plus"; + CharacterCodes[CharacterCodes["slash"] = 47] = "slash"; + CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed"; + CharacterCodes[CharacterCodes["tab"] = 9] = "tab"; +})(CharacterCodes || (CharacterCodes = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/string-intern.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/string-intern.js" index 6e06bd79d5eb95196cba4cdd945aa6091b0212ba..2794e2b39325539833035e7a140de17df8b28e93 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/string-intern.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/impl/string-intern.js" @@ -1,3 +1,29 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3a0aad3f56c3e0728812c7584568c0ff200bce1ca58cf40e946f01fdb54c5752 -size 1034 +export const cachedSpaces = new Array(20).fill(0).map((_, index) => { + return ' '.repeat(index); +}); +const maxCachedValues = 200; +export const cachedBreakLinesWithSpaces = { + ' ': { + '\n': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\n' + ' '.repeat(index); + }), + '\r': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\r' + ' '.repeat(index); + }), + '\r\n': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\r\n' + ' '.repeat(index); + }), + }, + '\t': { + '\n': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\n' + '\t'.repeat(index); + }), + '\r': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\r' + '\t'.repeat(index); + }), + '\r\n': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\r\n' + '\t'.repeat(index); + }), + } +}; +export const supportedEols = ['\n', '\r', '\r\n']; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/main.d.ts" index 694be0bd6eeee1b89b92cc30b8110de6532fb4d9..7312a36d4f48d03e354ba9c4e45fc28947d33894 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/main.d.ts" @@ -1,3 +1,349 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4d82dad8d8a312706a9bc240c805088fef713bc71eaa622e55970e251b6c1a0f -size 14314 +/** + * Creates a JSON scanner on the given text. + * If ignoreTrivia is set, whitespaces or comments are ignored. + */ +export declare const createScanner: (text: string, ignoreTrivia?: boolean) => JSONScanner; +export declare const enum ScanError { + None = 0, + UnexpectedEndOfComment = 1, + UnexpectedEndOfString = 2, + UnexpectedEndOfNumber = 3, + InvalidUnicode = 4, + InvalidEscapeCharacter = 5, + InvalidCharacter = 6 +} +export declare const enum SyntaxKind { + OpenBraceToken = 1, + CloseBraceToken = 2, + OpenBracketToken = 3, + CloseBracketToken = 4, + CommaToken = 5, + ColonToken = 6, + NullKeyword = 7, + TrueKeyword = 8, + FalseKeyword = 9, + StringLiteral = 10, + NumericLiteral = 11, + LineCommentTrivia = 12, + BlockCommentTrivia = 13, + LineBreakTrivia = 14, + Trivia = 15, + Unknown = 16, + EOF = 17 +} +/** + * The scanner object, representing a JSON scanner at a position in the input string. + */ +export interface JSONScanner { + /** + * Sets the scan position to a new offset. A call to 'scan' is needed to get the first token. + */ + setPosition(pos: number): void; + /** + * Read the next token. Returns the token code. + */ + scan(): SyntaxKind; + /** + * Returns the zero-based current scan position, which is after the last read token. + */ + getPosition(): number; + /** + * Returns the last read token. + */ + getToken(): SyntaxKind; + /** + * Returns the last read token value. The value for strings is the decoded string content. For numbers it's of type number, for boolean it's true or false. + */ + getTokenValue(): string; + /** + * The zero-based start offset of the last read token. + */ + getTokenOffset(): number; + /** + * The length of the last read token. + */ + getTokenLength(): number; + /** + * The zero-based start line number of the last read token. + */ + getTokenStartLine(): number; + /** + * The zero-based start character (column) of the last read token. + */ + getTokenStartCharacter(): number; + /** + * An error code of the last scan. + */ + getTokenError(): ScanError; +} +/** + * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. + */ +export declare const getLocation: (text: string, position: number) => Location; +/** + * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + * Therefore, always check the errors list to find out if the input was valid. + */ +export declare const parse: (text: string, errors?: ParseError[], options?: ParseOptions) => any; +/** + * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + */ +export declare const parseTree: (text: string, errors?: ParseError[], options?: ParseOptions) => Node | undefined; +/** + * Finds the node at the given path in a JSON DOM. + */ +export declare const findNodeAtLocation: (root: Node, path: JSONPath) => Node | undefined; +/** + * Finds the innermost node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. + */ +export declare const findNodeAtOffset: (root: Node, offset: number, includeRightBound?: boolean) => Node | undefined; +/** + * Gets the JSON path of the given JSON DOM node + */ +export declare const getNodePath: (node: Node) => JSONPath; +/** + * Evaluates the JavaScript object of the given JSON DOM node + */ +export declare const getNodeValue: (node: Node) => any; +/** + * Parses the given text and invokes the visitor functions for each object, array and literal reached. + */ +export declare const visit: (text: string, visitor: JSONVisitor, options?: ParseOptions) => any; +/** + * Takes JSON with JavaScript-style comments and remove + * them. Optionally replaces every none-newline character + * of comments with a replaceCharacter + */ +export declare const stripComments: (text: string, replaceCh?: string) => string; +export interface ParseError { + error: ParseErrorCode; + offset: number; + length: number; +} +export declare const enum ParseErrorCode { + InvalidSymbol = 1, + InvalidNumberFormat = 2, + PropertyNameExpected = 3, + ValueExpected = 4, + ColonExpected = 5, + CommaExpected = 6, + CloseBraceExpected = 7, + CloseBracketExpected = 8, + EndOfFileExpected = 9, + InvalidCommentToken = 10, + UnexpectedEndOfComment = 11, + UnexpectedEndOfString = 12, + UnexpectedEndOfNumber = 13, + InvalidUnicode = 14, + InvalidEscapeCharacter = 15, + InvalidCharacter = 16 +} +export declare function printParseErrorCode(code: ParseErrorCode): "InvalidSymbol" | "InvalidNumberFormat" | "PropertyNameExpected" | "ValueExpected" | "ColonExpected" | "CommaExpected" | "CloseBraceExpected" | "CloseBracketExpected" | "EndOfFileExpected" | "InvalidCommentToken" | "UnexpectedEndOfComment" | "UnexpectedEndOfString" | "UnexpectedEndOfNumber" | "InvalidUnicode" | "InvalidEscapeCharacter" | "InvalidCharacter" | ""; +export type NodeType = 'object' | 'array' | 'property' | 'string' | 'number' | 'boolean' | 'null'; +export interface Node { + readonly type: NodeType; + readonly value?: any; + readonly offset: number; + readonly length: number; + readonly colonOffset?: number; + readonly parent?: Node; + readonly children?: Node[]; +} +/** + * A {@linkcode JSONPath} segment. Either a string representing an object property name + * or a number (starting at 0) for array indices. + */ +export type Segment = string | number; +export type JSONPath = Segment[]; +export interface Location { + /** + * The previous property key or literal value (string, number, boolean or null) or undefined. + */ + previousNode?: Node; + /** + * The path describing the location in the JSON document. The path consists of a sequence of strings + * representing an object property or numbers for array indices. + */ + path: JSONPath; + /** + * Matches the locations path against a pattern consisting of strings (for properties) and numbers (for array indices). + * '*' will match a single segment of any property name or index. + * '**' will match a sequence of segments of any property name or index, or no segment. + */ + matches: (patterns: JSONPath) => boolean; + /** + * If set, the location's offset is at a property key. + */ + isAtPropertyKey: boolean; +} +export interface ParseOptions { + disallowComments?: boolean; + allowTrailingComma?: boolean; + allowEmptyContent?: boolean; +} +/** + * Visitor called by {@linkcode visit} when parsing JSON. + * + * The visitor functions have the following common parameters: + * - `offset`: Global offset within the JSON document, starting at 0 + * - `startLine`: Line number, starting at 0 + * - `startCharacter`: Start character (column) within the current line, starting at 0 + * + * Additionally some functions have a `pathSupplier` parameter which can be used to obtain the + * current `JSONPath` within the document. + */ +export interface JSONVisitor { + /** + * Invoked when an open brace is encountered and an object is started. The offset and length represent the location of the open brace. + */ + onObjectBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a property is encountered. The offset and length represent the location of the property name. + * The `JSONPath` created by the `pathSupplier` refers to the enclosing JSON object, it does not include the + * property name yet. + */ + onObjectProperty?: (property: string, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a closing brace is encountered and an object is completed. The offset and length represent the location of the closing brace. + */ + onObjectEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked when an open bracket is encountered. The offset and length represent the location of the open bracket. + */ + onArrayBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a closing bracket is encountered. The offset and length represent the location of the closing bracket. + */ + onArrayEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked when a literal value is encountered. The offset and length represent the location of the literal value. + */ + onLiteralValue?: (value: any, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a comma or colon separator is encountered. The offset and length represent the location of the separator. + */ + onSeparator?: (character: string, offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * When comments are allowed, invoked when a line or block comment is encountered. The offset and length represent the location of the comment. + */ + onComment?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked on an error. + */ + onError?: (error: ParseErrorCode, offset: number, length: number, startLine: number, startCharacter: number) => void; +} +/** + * An edit result describes a textual edit operation. It is the result of a {@linkcode format} and {@linkcode modify} operation. + * It consist of one or more edits describing insertions, replacements or removals of text segments. + * * The offsets of the edits refer to the original state of the document. + * * No two edits change or remove the same range of text in the original document. + * * Multiple edits can have the same offset if they are multiple inserts, or an insert followed by a remove or replace. + * * The order in the array defines which edit is applied first. + * To apply an edit result use {@linkcode applyEdits}. + * In general multiple EditResults must not be concatenated because they might impact each other, producing incorrect or malformed JSON data. + */ +export type EditResult = Edit[]; +/** + * Represents a text modification + */ +export interface Edit { + /** + * The start offset of the modification. + */ + offset: number; + /** + * The length of the modification. Must not be negative. Empty length represents an *insert*. + */ + length: number; + /** + * The new content. Empty content represents a *remove*. + */ + content: string; +} +/** + * A text range in the document +*/ +export interface Range { + /** + * The start offset of the range. + */ + offset: number; + /** + * The length of the range. Must not be negative. + */ + length: number; +} +/** + * Options used by {@linkcode format} when computing the formatting edit operations + */ +export interface FormattingOptions { + /** + * If indentation is based on spaces (`insertSpaces` = true), the number of spaces that make an indent. + */ + tabSize?: number; + /** + * Is indentation based on spaces? + */ + insertSpaces?: boolean; + /** + * The default 'end of line' character. If not set, '\n' is used as default. + */ + eol?: string; + /** + * If set, will add a new line at the end of the document. + */ + insertFinalNewline?: boolean; + /** + * If true, will keep line positions as is in the formatting + */ + keepLines?: boolean; +} +/** + * Computes the edit operations needed to format a JSON document. + * + * @param documentText The input text + * @param range The range to format or `undefined` to format the full content + * @param options The formatting options + * @returns The edit operations describing the formatting changes to the original document following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export declare function format(documentText: string, range: Range | undefined, options: FormattingOptions): EditResult; +/** + * Options used by {@linkcode modify} when computing the modification edit operations + */ +export interface ModificationOptions { + /** + * Formatting options. If undefined, the newly inserted code will be inserted unformatted. + */ + formattingOptions?: FormattingOptions; + /** + * Default false. If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then + * {@linkcode modify} will insert a new item at that location instead of overwriting its contents. + */ + isArrayInsertion?: boolean; + /** + * Optional function to define the insertion index given an existing list of properties. + */ + getInsertionIndex?: (properties: string[]) => number; +} +/** + * Computes the edit operations needed to modify a value in the JSON document. + * + * @param documentText The input text + * @param path The path of the value to change. The path represents either to the document root, a property or an array item. + * If the path points to an non-existing property or item, it will be created. + * @param value The new value for the specified property or item. If the value is undefined, + * the property or item will be removed. + * @param options Options + * @returns The edit operations describing the changes to the original document, following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export declare function modify(text: string, path: JSONPath, value: any, options: ModificationOptions): EditResult; +/** + * Applies edits to an input string. + * @param text The input text + * @param edits Edit operations following the format described in {@linkcode EditResult}. + * @returns The text with the applied edits. + * @throws An error if the edit operations are not well-formed as described in {@linkcode EditResult}. + */ +export declare function applyEdits(text: string, edits: EditResult): string; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/main.js" index ce40a7adf761593eaad62916aba502af75574067..18e3cb7168b5cc4401a25bcace1f8af379c408d5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/esm/main.js" @@ -1,3 +1,178 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:72ff182105e158a1505ca3ecbf3f30359abb138a3980edaef1db7f4010ffb7dc -size 9363 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +import * as formatter from './impl/format'; +import * as edit from './impl/edit'; +import * as scanner from './impl/scanner'; +import * as parser from './impl/parser'; +/** + * Creates a JSON scanner on the given text. + * If ignoreTrivia is set, whitespaces or comments are ignored. + */ +export const createScanner = scanner.createScanner; +export var ScanError; +(function (ScanError) { + ScanError[ScanError["None"] = 0] = "None"; + ScanError[ScanError["UnexpectedEndOfComment"] = 1] = "UnexpectedEndOfComment"; + ScanError[ScanError["UnexpectedEndOfString"] = 2] = "UnexpectedEndOfString"; + ScanError[ScanError["UnexpectedEndOfNumber"] = 3] = "UnexpectedEndOfNumber"; + ScanError[ScanError["InvalidUnicode"] = 4] = "InvalidUnicode"; + ScanError[ScanError["InvalidEscapeCharacter"] = 5] = "InvalidEscapeCharacter"; + ScanError[ScanError["InvalidCharacter"] = 6] = "InvalidCharacter"; +})(ScanError || (ScanError = {})); +export var SyntaxKind; +(function (SyntaxKind) { + SyntaxKind[SyntaxKind["OpenBraceToken"] = 1] = "OpenBraceToken"; + SyntaxKind[SyntaxKind["CloseBraceToken"] = 2] = "CloseBraceToken"; + SyntaxKind[SyntaxKind["OpenBracketToken"] = 3] = "OpenBracketToken"; + SyntaxKind[SyntaxKind["CloseBracketToken"] = 4] = "CloseBracketToken"; + SyntaxKind[SyntaxKind["CommaToken"] = 5] = "CommaToken"; + SyntaxKind[SyntaxKind["ColonToken"] = 6] = "ColonToken"; + SyntaxKind[SyntaxKind["NullKeyword"] = 7] = "NullKeyword"; + SyntaxKind[SyntaxKind["TrueKeyword"] = 8] = "TrueKeyword"; + SyntaxKind[SyntaxKind["FalseKeyword"] = 9] = "FalseKeyword"; + SyntaxKind[SyntaxKind["StringLiteral"] = 10] = "StringLiteral"; + SyntaxKind[SyntaxKind["NumericLiteral"] = 11] = "NumericLiteral"; + SyntaxKind[SyntaxKind["LineCommentTrivia"] = 12] = "LineCommentTrivia"; + SyntaxKind[SyntaxKind["BlockCommentTrivia"] = 13] = "BlockCommentTrivia"; + SyntaxKind[SyntaxKind["LineBreakTrivia"] = 14] = "LineBreakTrivia"; + SyntaxKind[SyntaxKind["Trivia"] = 15] = "Trivia"; + SyntaxKind[SyntaxKind["Unknown"] = 16] = "Unknown"; + SyntaxKind[SyntaxKind["EOF"] = 17] = "EOF"; +})(SyntaxKind || (SyntaxKind = {})); +/** + * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. + */ +export const getLocation = parser.getLocation; +/** + * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + * Therefore, always check the errors list to find out if the input was valid. + */ +export const parse = parser.parse; +/** + * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + */ +export const parseTree = parser.parseTree; +/** + * Finds the node at the given path in a JSON DOM. + */ +export const findNodeAtLocation = parser.findNodeAtLocation; +/** + * Finds the innermost node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. + */ +export const findNodeAtOffset = parser.findNodeAtOffset; +/** + * Gets the JSON path of the given JSON DOM node + */ +export const getNodePath = parser.getNodePath; +/** + * Evaluates the JavaScript object of the given JSON DOM node + */ +export const getNodeValue = parser.getNodeValue; +/** + * Parses the given text and invokes the visitor functions for each object, array and literal reached. + */ +export const visit = parser.visit; +/** + * Takes JSON with JavaScript-style comments and remove + * them. Optionally replaces every none-newline character + * of comments with a replaceCharacter + */ +export const stripComments = parser.stripComments; +export var ParseErrorCode; +(function (ParseErrorCode) { + ParseErrorCode[ParseErrorCode["InvalidSymbol"] = 1] = "InvalidSymbol"; + ParseErrorCode[ParseErrorCode["InvalidNumberFormat"] = 2] = "InvalidNumberFormat"; + ParseErrorCode[ParseErrorCode["PropertyNameExpected"] = 3] = "PropertyNameExpected"; + ParseErrorCode[ParseErrorCode["ValueExpected"] = 4] = "ValueExpected"; + ParseErrorCode[ParseErrorCode["ColonExpected"] = 5] = "ColonExpected"; + ParseErrorCode[ParseErrorCode["CommaExpected"] = 6] = "CommaExpected"; + ParseErrorCode[ParseErrorCode["CloseBraceExpected"] = 7] = "CloseBraceExpected"; + ParseErrorCode[ParseErrorCode["CloseBracketExpected"] = 8] = "CloseBracketExpected"; + ParseErrorCode[ParseErrorCode["EndOfFileExpected"] = 9] = "EndOfFileExpected"; + ParseErrorCode[ParseErrorCode["InvalidCommentToken"] = 10] = "InvalidCommentToken"; + ParseErrorCode[ParseErrorCode["UnexpectedEndOfComment"] = 11] = "UnexpectedEndOfComment"; + ParseErrorCode[ParseErrorCode["UnexpectedEndOfString"] = 12] = "UnexpectedEndOfString"; + ParseErrorCode[ParseErrorCode["UnexpectedEndOfNumber"] = 13] = "UnexpectedEndOfNumber"; + ParseErrorCode[ParseErrorCode["InvalidUnicode"] = 14] = "InvalidUnicode"; + ParseErrorCode[ParseErrorCode["InvalidEscapeCharacter"] = 15] = "InvalidEscapeCharacter"; + ParseErrorCode[ParseErrorCode["InvalidCharacter"] = 16] = "InvalidCharacter"; +})(ParseErrorCode || (ParseErrorCode = {})); +export function printParseErrorCode(code) { + switch (code) { + case 1 /* ParseErrorCode.InvalidSymbol */: return 'InvalidSymbol'; + case 2 /* ParseErrorCode.InvalidNumberFormat */: return 'InvalidNumberFormat'; + case 3 /* ParseErrorCode.PropertyNameExpected */: return 'PropertyNameExpected'; + case 4 /* ParseErrorCode.ValueExpected */: return 'ValueExpected'; + case 5 /* ParseErrorCode.ColonExpected */: return 'ColonExpected'; + case 6 /* ParseErrorCode.CommaExpected */: return 'CommaExpected'; + case 7 /* ParseErrorCode.CloseBraceExpected */: return 'CloseBraceExpected'; + case 8 /* ParseErrorCode.CloseBracketExpected */: return 'CloseBracketExpected'; + case 9 /* ParseErrorCode.EndOfFileExpected */: return 'EndOfFileExpected'; + case 10 /* ParseErrorCode.InvalidCommentToken */: return 'InvalidCommentToken'; + case 11 /* ParseErrorCode.UnexpectedEndOfComment */: return 'UnexpectedEndOfComment'; + case 12 /* ParseErrorCode.UnexpectedEndOfString */: return 'UnexpectedEndOfString'; + case 13 /* ParseErrorCode.UnexpectedEndOfNumber */: return 'UnexpectedEndOfNumber'; + case 14 /* ParseErrorCode.InvalidUnicode */: return 'InvalidUnicode'; + case 15 /* ParseErrorCode.InvalidEscapeCharacter */: return 'InvalidEscapeCharacter'; + case 16 /* ParseErrorCode.InvalidCharacter */: return 'InvalidCharacter'; + } + return ''; +} +/** + * Computes the edit operations needed to format a JSON document. + * + * @param documentText The input text + * @param range The range to format or `undefined` to format the full content + * @param options The formatting options + * @returns The edit operations describing the formatting changes to the original document following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export function format(documentText, range, options) { + return formatter.format(documentText, range, options); +} +/** + * Computes the edit operations needed to modify a value in the JSON document. + * + * @param documentText The input text + * @param path The path of the value to change. The path represents either to the document root, a property or an array item. + * If the path points to an non-existing property or item, it will be created. + * @param value The new value for the specified property or item. If the value is undefined, + * the property or item will be removed. + * @param options Options + * @returns The edit operations describing the changes to the original document, following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export function modify(text, path, value, options) { + return edit.setProperty(text, path, value, options); +} +/** + * Applies edits to an input string. + * @param text The input text + * @param edits Edit operations following the format described in {@linkcode EditResult}. + * @returns The text with the applied edits. + * @throws An error if the edit operations are not well-formed as described in {@linkcode EditResult}. + */ +export function applyEdits(text, edits) { + let sortedEdits = edits.slice(0).sort((a, b) => { + const diff = a.offset - b.offset; + if (diff === 0) { + return a.length - b.length; + } + return diff; + }); + let lastModifiedOffset = text.length; + for (let i = sortedEdits.length - 1; i >= 0; i--) { + let e = sortedEdits[i]; + if (e.offset + e.length <= lastModifiedOffset) { + text = edit.applyEdit(text, e); + } + else { + throw new Error('Overlapping edit'); + } + lastModifiedOffset = e.offset; + } + return text; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/edit.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/edit.js" index 90bb5ec12296eddad590023d9d177066bdd7afa6..f9aeefef667d8a725dba6954d5831bdc5ff145f8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/edit.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/edit.js" @@ -1,3 +1,201 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9ecd115039cf7a478f223e4a9649170c7f5e8fd8016df1b267723b57553f9483 -size 10061 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./format", "./parser"], factory); + } +})(function (require, exports) { + /*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + 'use strict'; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isWS = exports.applyEdit = exports.setProperty = exports.removeProperty = void 0; + const format_1 = require("./format"); + const parser_1 = require("./parser"); + function removeProperty(text, path, options) { + return setProperty(text, path, void 0, options); + } + exports.removeProperty = removeProperty; + function setProperty(text, originalPath, value, options) { + const path = originalPath.slice(); + const errors = []; + const root = (0, parser_1.parseTree)(text, errors); + let parent = void 0; + let lastSegment = void 0; + while (path.length > 0) { + lastSegment = path.pop(); + parent = (0, parser_1.findNodeAtLocation)(root, path); + if (parent === void 0 && value !== void 0) { + if (typeof lastSegment === 'string') { + value = { [lastSegment]: value }; + } + else { + value = [value]; + } + } + else { + break; + } + } + if (!parent) { + // empty document + if (value === void 0) { // delete + throw new Error('Can not delete in empty document'); + } + return withFormatting(text, { offset: root ? root.offset : 0, length: root ? root.length : 0, content: JSON.stringify(value) }, options); + } + else if (parent.type === 'object' && typeof lastSegment === 'string' && Array.isArray(parent.children)) { + const existing = (0, parser_1.findNodeAtLocation)(parent, [lastSegment]); + if (existing !== void 0) { + if (value === void 0) { // delete + if (!existing.parent) { + throw new Error('Malformed AST'); + } + const propertyIndex = parent.children.indexOf(existing.parent); + let removeBegin; + let removeEnd = existing.parent.offset + existing.parent.length; + if (propertyIndex > 0) { + // remove the comma of the previous node + let previous = parent.children[propertyIndex - 1]; + removeBegin = previous.offset + previous.length; + } + else { + removeBegin = parent.offset + 1; + if (parent.children.length > 1) { + // remove the comma of the next node + let next = parent.children[1]; + removeEnd = next.offset; + } + } + return withFormatting(text, { offset: removeBegin, length: removeEnd - removeBegin, content: '' }, options); + } + else { + // set value of existing property + return withFormatting(text, { offset: existing.offset, length: existing.length, content: JSON.stringify(value) }, options); + } + } + else { + if (value === void 0) { // delete + return []; // property does not exist, nothing to do + } + const newProperty = `${JSON.stringify(lastSegment)}: ${JSON.stringify(value)}`; + const index = options.getInsertionIndex ? options.getInsertionIndex(parent.children.map(p => p.children[0].value)) : parent.children.length; + let edit; + if (index > 0) { + let previous = parent.children[index - 1]; + edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty }; + } + else if (parent.children.length === 0) { + edit = { offset: parent.offset + 1, length: 0, content: newProperty }; + } + else { + edit = { offset: parent.offset + 1, length: 0, content: newProperty + ',' }; + } + return withFormatting(text, edit, options); + } + } + else if (parent.type === 'array' && typeof lastSegment === 'number' && Array.isArray(parent.children)) { + const insertIndex = lastSegment; + if (insertIndex === -1) { + // Insert + const newProperty = `${JSON.stringify(value)}`; + let edit; + if (parent.children.length === 0) { + edit = { offset: parent.offset + 1, length: 0, content: newProperty }; + } + else { + const previous = parent.children[parent.children.length - 1]; + edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty }; + } + return withFormatting(text, edit, options); + } + else if (value === void 0 && parent.children.length >= 0) { + // Removal + const removalIndex = lastSegment; + const toRemove = parent.children[removalIndex]; + let edit; + if (parent.children.length === 1) { + // only item + edit = { offset: parent.offset + 1, length: parent.length - 2, content: '' }; + } + else if (parent.children.length - 1 === removalIndex) { + // last item + let previous = parent.children[removalIndex - 1]; + let offset = previous.offset + previous.length; + let parentEndOffset = parent.offset + parent.length; + edit = { offset, length: parentEndOffset - 2 - offset, content: '' }; + } + else { + edit = { offset: toRemove.offset, length: parent.children[removalIndex + 1].offset - toRemove.offset, content: '' }; + } + return withFormatting(text, edit, options); + } + else if (value !== void 0) { + let edit; + const newProperty = `${JSON.stringify(value)}`; + if (!options.isArrayInsertion && parent.children.length > lastSegment) { + const toModify = parent.children[lastSegment]; + edit = { offset: toModify.offset, length: toModify.length, content: newProperty }; + } + else if (parent.children.length === 0 || lastSegment === 0) { + edit = { offset: parent.offset + 1, length: 0, content: parent.children.length === 0 ? newProperty : newProperty + ',' }; + } + else { + const index = lastSegment > parent.children.length ? parent.children.length : lastSegment; + const previous = parent.children[index - 1]; + edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty }; + } + return withFormatting(text, edit, options); + } + else { + throw new Error(`Can not ${value === void 0 ? 'remove' : (options.isArrayInsertion ? 'insert' : 'modify')} Array index ${insertIndex} as length is not sufficient`); + } + } + else { + throw new Error(`Can not add ${typeof lastSegment !== 'number' ? 'index' : 'property'} to parent of type ${parent.type}`); + } + } + exports.setProperty = setProperty; + function withFormatting(text, edit, options) { + if (!options.formattingOptions) { + return [edit]; + } + // apply the edit + let newText = applyEdit(text, edit); + // format the new text + let begin = edit.offset; + let end = edit.offset + edit.content.length; + if (edit.length === 0 || edit.content.length === 0) { // insert or remove + while (begin > 0 && !(0, format_1.isEOL)(newText, begin - 1)) { + begin--; + } + while (end < newText.length && !(0, format_1.isEOL)(newText, end)) { + end++; + } + } + const edits = (0, format_1.format)(newText, { offset: begin, length: end - begin }, { ...options.formattingOptions, keepLines: false }); + // apply the formatting edits and track the begin and end offsets of the changes + for (let i = edits.length - 1; i >= 0; i--) { + const edit = edits[i]; + newText = applyEdit(newText, edit); + begin = Math.min(begin, edit.offset); + end = Math.max(end, edit.offset + edit.length); + end += edit.content.length - edit.length; + } + // create a single edit with all changes + const editLength = text.length - (newText.length - end) - begin; + return [{ offset: begin, length: editLength, content: newText.substring(begin, end) }]; + } + function applyEdit(text, edit) { + return text.substring(0, edit.offset) + edit.content + text.substring(edit.offset + edit.length); + } + exports.applyEdit = applyEdit; + function isWS(text, offset) { + return '\r\n \t'.indexOf(text.charAt(offset)) !== -1; + } + exports.isWS = isWS; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/format.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/format.js" index 7671aa9b5e75e3efe70b4d3a7c78b5c50db8fbdb..2b9f2bc54a9ad4ad38a99bbaab4da57f89d40f3d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/format.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/format.js" @@ -1,3 +1,275 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f9e468e436bf1014a4395b1ac70374edb918739ba90b19e6e6a22ca0214564a9 -size 12888 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./scanner", "./string-intern"], factory); + } +})(function (require, exports) { + /*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + 'use strict'; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isEOL = exports.format = void 0; + const scanner_1 = require("./scanner"); + const string_intern_1 = require("./string-intern"); + function format(documentText, range, options) { + let initialIndentLevel; + let formatText; + let formatTextStart; + let rangeStart; + let rangeEnd; + if (range) { + rangeStart = range.offset; + rangeEnd = rangeStart + range.length; + formatTextStart = rangeStart; + while (formatTextStart > 0 && !isEOL(documentText, formatTextStart - 1)) { + formatTextStart--; + } + let endOffset = rangeEnd; + while (endOffset < documentText.length && !isEOL(documentText, endOffset)) { + endOffset++; + } + formatText = documentText.substring(formatTextStart, endOffset); + initialIndentLevel = computeIndentLevel(formatText, options); + } + else { + formatText = documentText; + initialIndentLevel = 0; + formatTextStart = 0; + rangeStart = 0; + rangeEnd = documentText.length; + } + const eol = getEOL(options, documentText); + const eolFastPathSupported = string_intern_1.supportedEols.includes(eol); + let numberLineBreaks = 0; + let indentLevel = 0; + let indentValue; + if (options.insertSpaces) { + indentValue = string_intern_1.cachedSpaces[options.tabSize || 4] ?? repeat(string_intern_1.cachedSpaces[1], options.tabSize || 4); + } + else { + indentValue = '\t'; + } + const indentType = indentValue === '\t' ? '\t' : ' '; + let scanner = (0, scanner_1.createScanner)(formatText, false); + let hasError = false; + function newLinesAndIndent() { + if (numberLineBreaks > 1) { + return repeat(eol, numberLineBreaks) + repeat(indentValue, initialIndentLevel + indentLevel); + } + const amountOfSpaces = indentValue.length * (initialIndentLevel + indentLevel); + if (!eolFastPathSupported || amountOfSpaces > string_intern_1.cachedBreakLinesWithSpaces[indentType][eol].length) { + return eol + repeat(indentValue, initialIndentLevel + indentLevel); + } + if (amountOfSpaces <= 0) { + return eol; + } + return string_intern_1.cachedBreakLinesWithSpaces[indentType][eol][amountOfSpaces]; + } + function scanNext() { + let token = scanner.scan(); + numberLineBreaks = 0; + while (token === 15 /* SyntaxKind.Trivia */ || token === 14 /* SyntaxKind.LineBreakTrivia */) { + if (token === 14 /* SyntaxKind.LineBreakTrivia */ && options.keepLines) { + numberLineBreaks += 1; + } + else if (token === 14 /* SyntaxKind.LineBreakTrivia */) { + numberLineBreaks = 1; + } + token = scanner.scan(); + } + hasError = token === 16 /* SyntaxKind.Unknown */ || scanner.getTokenError() !== 0 /* ScanError.None */; + return token; + } + const editOperations = []; + function addEdit(text, startOffset, endOffset) { + if (!hasError && (!range || (startOffset < rangeEnd && endOffset > rangeStart)) && documentText.substring(startOffset, endOffset) !== text) { + editOperations.push({ offset: startOffset, length: endOffset - startOffset, content: text }); + } + } + let firstToken = scanNext(); + if (options.keepLines && numberLineBreaks > 0) { + addEdit(repeat(eol, numberLineBreaks), 0, 0); + } + if (firstToken !== 17 /* SyntaxKind.EOF */) { + let firstTokenStart = scanner.getTokenOffset() + formatTextStart; + let initialIndent = (indentValue.length * initialIndentLevel < 20) && options.insertSpaces + ? string_intern_1.cachedSpaces[indentValue.length * initialIndentLevel] + : repeat(indentValue, initialIndentLevel); + addEdit(initialIndent, formatTextStart, firstTokenStart); + } + while (firstToken !== 17 /* SyntaxKind.EOF */) { + let firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart; + let secondToken = scanNext(); + let replaceContent = ''; + let needsLineBreak = false; + while (numberLineBreaks === 0 && (secondToken === 12 /* SyntaxKind.LineCommentTrivia */ || secondToken === 13 /* SyntaxKind.BlockCommentTrivia */)) { + let commentTokenStart = scanner.getTokenOffset() + formatTextStart; + addEdit(string_intern_1.cachedSpaces[1], firstTokenEnd, commentTokenStart); + firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart; + needsLineBreak = secondToken === 12 /* SyntaxKind.LineCommentTrivia */; + replaceContent = needsLineBreak ? newLinesAndIndent() : ''; + secondToken = scanNext(); + } + if (secondToken === 2 /* SyntaxKind.CloseBraceToken */) { + if (firstToken !== 1 /* SyntaxKind.OpenBraceToken */) { + indentLevel--; + } + ; + if (options.keepLines && numberLineBreaks > 0 || !options.keepLines && firstToken !== 1 /* SyntaxKind.OpenBraceToken */) { + replaceContent = newLinesAndIndent(); + } + else if (options.keepLines) { + replaceContent = string_intern_1.cachedSpaces[1]; + } + } + else if (secondToken === 4 /* SyntaxKind.CloseBracketToken */) { + if (firstToken !== 3 /* SyntaxKind.OpenBracketToken */) { + indentLevel--; + } + ; + if (options.keepLines && numberLineBreaks > 0 || !options.keepLines && firstToken !== 3 /* SyntaxKind.OpenBracketToken */) { + replaceContent = newLinesAndIndent(); + } + else if (options.keepLines) { + replaceContent = string_intern_1.cachedSpaces[1]; + } + } + else { + switch (firstToken) { + case 3 /* SyntaxKind.OpenBracketToken */: + case 1 /* SyntaxKind.OpenBraceToken */: + indentLevel++; + if (options.keepLines && numberLineBreaks > 0 || !options.keepLines) { + replaceContent = newLinesAndIndent(); + } + else { + replaceContent = string_intern_1.cachedSpaces[1]; + } + break; + case 5 /* SyntaxKind.CommaToken */: + if (options.keepLines && numberLineBreaks > 0 || !options.keepLines) { + replaceContent = newLinesAndIndent(); + } + else { + replaceContent = string_intern_1.cachedSpaces[1]; + } + break; + case 12 /* SyntaxKind.LineCommentTrivia */: + replaceContent = newLinesAndIndent(); + break; + case 13 /* SyntaxKind.BlockCommentTrivia */: + if (numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else if (!needsLineBreak) { + replaceContent = string_intern_1.cachedSpaces[1]; + } + break; + case 6 /* SyntaxKind.ColonToken */: + if (options.keepLines && numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else if (!needsLineBreak) { + replaceContent = string_intern_1.cachedSpaces[1]; + } + break; + case 10 /* SyntaxKind.StringLiteral */: + if (options.keepLines && numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else if (secondToken === 6 /* SyntaxKind.ColonToken */ && !needsLineBreak) { + replaceContent = ''; + } + break; + case 7 /* SyntaxKind.NullKeyword */: + case 8 /* SyntaxKind.TrueKeyword */: + case 9 /* SyntaxKind.FalseKeyword */: + case 11 /* SyntaxKind.NumericLiteral */: + case 2 /* SyntaxKind.CloseBraceToken */: + case 4 /* SyntaxKind.CloseBracketToken */: + if (options.keepLines && numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else { + if ((secondToken === 12 /* SyntaxKind.LineCommentTrivia */ || secondToken === 13 /* SyntaxKind.BlockCommentTrivia */) && !needsLineBreak) { + replaceContent = string_intern_1.cachedSpaces[1]; + } + else if (secondToken !== 5 /* SyntaxKind.CommaToken */ && secondToken !== 17 /* SyntaxKind.EOF */) { + hasError = true; + } + } + break; + case 16 /* SyntaxKind.Unknown */: + hasError = true; + break; + } + if (numberLineBreaks > 0 && (secondToken === 12 /* SyntaxKind.LineCommentTrivia */ || secondToken === 13 /* SyntaxKind.BlockCommentTrivia */)) { + replaceContent = newLinesAndIndent(); + } + } + if (secondToken === 17 /* SyntaxKind.EOF */) { + if (options.keepLines && numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else { + replaceContent = options.insertFinalNewline ? eol : ''; + } + } + const secondTokenStart = scanner.getTokenOffset() + formatTextStart; + addEdit(replaceContent, firstTokenEnd, secondTokenStart); + firstToken = secondToken; + } + return editOperations; + } + exports.format = format; + function repeat(s, count) { + let result = ''; + for (let i = 0; i < count; i++) { + result += s; + } + return result; + } + function computeIndentLevel(content, options) { + let i = 0; + let nChars = 0; + const tabSize = options.tabSize || 4; + while (i < content.length) { + let ch = content.charAt(i); + if (ch === string_intern_1.cachedSpaces[1]) { + nChars++; + } + else if (ch === '\t') { + nChars += tabSize; + } + else { + break; + } + i++; + } + return Math.floor(nChars / tabSize); + } + function getEOL(options, text) { + for (let i = 0; i < text.length; i++) { + const ch = text.charAt(i); + if (ch === '\r') { + if (i + 1 < text.length && text.charAt(i + 1) === '\n') { + return '\r\n'; + } + return '\r'; + } + else if (ch === '\n') { + return '\n'; + } + } + return (options && options.eol) || '\n'; + } + function isEOL(text, offset) { + return '\r\n'.indexOf(text.charAt(offset)) !== -1; + } + exports.isEOL = isEOL; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/parser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/parser.js" index 5019fb7434dcd5565d7d41968c29e20229863462..211e1d1c14885aedc6fd3b966d5a24790beaf908 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/parser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/parser.js" @@ -1,3 +1,655 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c75be447c5ebcd16b212ae7089b1d2438f037c709c6b1784d22c25b8a35fde48 -size 28290 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./scanner"], factory); + } +})(function (require, exports) { + /*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + 'use strict'; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getNodeType = exports.stripComments = exports.visit = exports.findNodeAtOffset = exports.contains = exports.getNodeValue = exports.getNodePath = exports.findNodeAtLocation = exports.parseTree = exports.parse = exports.getLocation = void 0; + const scanner_1 = require("./scanner"); + var ParseOptions; + (function (ParseOptions) { + ParseOptions.DEFAULT = { + allowTrailingComma: false + }; + })(ParseOptions || (ParseOptions = {})); + /** + * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. + */ + function getLocation(text, position) { + const segments = []; // strings or numbers + const earlyReturnException = new Object(); + let previousNode = undefined; + const previousNodeInst = { + value: {}, + offset: 0, + length: 0, + type: 'object', + parent: undefined + }; + let isAtPropertyKey = false; + function setPreviousNode(value, offset, length, type) { + previousNodeInst.value = value; + previousNodeInst.offset = offset; + previousNodeInst.length = length; + previousNodeInst.type = type; + previousNodeInst.colonOffset = undefined; + previousNode = previousNodeInst; + } + try { + visit(text, { + onObjectBegin: (offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + previousNode = undefined; + isAtPropertyKey = position > offset; + segments.push(''); // push a placeholder (will be replaced) + }, + onObjectProperty: (name, offset, length) => { + if (position < offset) { + throw earlyReturnException; + } + setPreviousNode(name, offset, length, 'property'); + segments[segments.length - 1] = name; + if (position <= offset + length) { + throw earlyReturnException; + } + }, + onObjectEnd: (offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + previousNode = undefined; + segments.pop(); + }, + onArrayBegin: (offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + previousNode = undefined; + segments.push(0); + }, + onArrayEnd: (offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + previousNode = undefined; + segments.pop(); + }, + onLiteralValue: (value, offset, length) => { + if (position < offset) { + throw earlyReturnException; + } + setPreviousNode(value, offset, length, getNodeType(value)); + if (position <= offset + length) { + throw earlyReturnException; + } + }, + onSeparator: (sep, offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + if (sep === ':' && previousNode && previousNode.type === 'property') { + previousNode.colonOffset = offset; + isAtPropertyKey = false; + previousNode = undefined; + } + else if (sep === ',') { + const last = segments[segments.length - 1]; + if (typeof last === 'number') { + segments[segments.length - 1] = last + 1; + } + else { + isAtPropertyKey = true; + segments[segments.length - 1] = ''; + } + previousNode = undefined; + } + } + }); + } + catch (e) { + if (e !== earlyReturnException) { + throw e; + } + } + return { + path: segments, + previousNode, + isAtPropertyKey, + matches: (pattern) => { + let k = 0; + for (let i = 0; k < pattern.length && i < segments.length; i++) { + if (pattern[k] === segments[i] || pattern[k] === '*') { + k++; + } + else if (pattern[k] !== '**') { + return false; + } + } + return k === pattern.length; + } + }; + } + exports.getLocation = getLocation; + /** + * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + * Therefore always check the errors list to find out if the input was valid. + */ + function parse(text, errors = [], options = ParseOptions.DEFAULT) { + let currentProperty = null; + let currentParent = []; + const previousParents = []; + function onValue(value) { + if (Array.isArray(currentParent)) { + currentParent.push(value); + } + else if (currentProperty !== null) { + currentParent[currentProperty] = value; + } + } + const visitor = { + onObjectBegin: () => { + const object = {}; + onValue(object); + previousParents.push(currentParent); + currentParent = object; + currentProperty = null; + }, + onObjectProperty: (name) => { + currentProperty = name; + }, + onObjectEnd: () => { + currentParent = previousParents.pop(); + }, + onArrayBegin: () => { + const array = []; + onValue(array); + previousParents.push(currentParent); + currentParent = array; + currentProperty = null; + }, + onArrayEnd: () => { + currentParent = previousParents.pop(); + }, + onLiteralValue: onValue, + onError: (error, offset, length) => { + errors.push({ error, offset, length }); + } + }; + visit(text, visitor, options); + return currentParent[0]; + } + exports.parse = parse; + /** + * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + */ + function parseTree(text, errors = [], options = ParseOptions.DEFAULT) { + let currentParent = { type: 'array', offset: -1, length: -1, children: [], parent: undefined }; // artificial root + function ensurePropertyComplete(endOffset) { + if (currentParent.type === 'property') { + currentParent.length = endOffset - currentParent.offset; + currentParent = currentParent.parent; + } + } + function onValue(valueNode) { + currentParent.children.push(valueNode); + return valueNode; + } + const visitor = { + onObjectBegin: (offset) => { + currentParent = onValue({ type: 'object', offset, length: -1, parent: currentParent, children: [] }); + }, + onObjectProperty: (name, offset, length) => { + currentParent = onValue({ type: 'property', offset, length: -1, parent: currentParent, children: [] }); + currentParent.children.push({ type: 'string', value: name, offset, length, parent: currentParent }); + }, + onObjectEnd: (offset, length) => { + ensurePropertyComplete(offset + length); // in case of a missing value for a property: make sure property is complete + currentParent.length = offset + length - currentParent.offset; + currentParent = currentParent.parent; + ensurePropertyComplete(offset + length); + }, + onArrayBegin: (offset, length) => { + currentParent = onValue({ type: 'array', offset, length: -1, parent: currentParent, children: [] }); + }, + onArrayEnd: (offset, length) => { + currentParent.length = offset + length - currentParent.offset; + currentParent = currentParent.parent; + ensurePropertyComplete(offset + length); + }, + onLiteralValue: (value, offset, length) => { + onValue({ type: getNodeType(value), offset, length, parent: currentParent, value }); + ensurePropertyComplete(offset + length); + }, + onSeparator: (sep, offset, length) => { + if (currentParent.type === 'property') { + if (sep === ':') { + currentParent.colonOffset = offset; + } + else if (sep === ',') { + ensurePropertyComplete(offset); + } + } + }, + onError: (error, offset, length) => { + errors.push({ error, offset, length }); + } + }; + visit(text, visitor, options); + const result = currentParent.children[0]; + if (result) { + delete result.parent; + } + return result; + } + exports.parseTree = parseTree; + /** + * Finds the node at the given path in a JSON DOM. + */ + function findNodeAtLocation(root, path) { + if (!root) { + return undefined; + } + let node = root; + for (let segment of path) { + if (typeof segment === 'string') { + if (node.type !== 'object' || !Array.isArray(node.children)) { + return undefined; + } + let found = false; + for (const propertyNode of node.children) { + if (Array.isArray(propertyNode.children) && propertyNode.children[0].value === segment && propertyNode.children.length === 2) { + node = propertyNode.children[1]; + found = true; + break; + } + } + if (!found) { + return undefined; + } + } + else { + const index = segment; + if (node.type !== 'array' || index < 0 || !Array.isArray(node.children) || index >= node.children.length) { + return undefined; + } + node = node.children[index]; + } + } + return node; + } + exports.findNodeAtLocation = findNodeAtLocation; + /** + * Gets the JSON path of the given JSON DOM node + */ + function getNodePath(node) { + if (!node.parent || !node.parent.children) { + return []; + } + const path = getNodePath(node.parent); + if (node.parent.type === 'property') { + const key = node.parent.children[0].value; + path.push(key); + } + else if (node.parent.type === 'array') { + const index = node.parent.children.indexOf(node); + if (index !== -1) { + path.push(index); + } + } + return path; + } + exports.getNodePath = getNodePath; + /** + * Evaluates the JavaScript object of the given JSON DOM node + */ + function getNodeValue(node) { + switch (node.type) { + case 'array': + return node.children.map(getNodeValue); + case 'object': + const obj = Object.create(null); + for (let prop of node.children) { + const valueNode = prop.children[1]; + if (valueNode) { + obj[prop.children[0].value] = getNodeValue(valueNode); + } + } + return obj; + case 'null': + case 'string': + case 'number': + case 'boolean': + return node.value; + default: + return undefined; + } + } + exports.getNodeValue = getNodeValue; + function contains(node, offset, includeRightBound = false) { + return (offset >= node.offset && offset < (node.offset + node.length)) || includeRightBound && (offset === (node.offset + node.length)); + } + exports.contains = contains; + /** + * Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. + */ + function findNodeAtOffset(node, offset, includeRightBound = false) { + if (contains(node, offset, includeRightBound)) { + const children = node.children; + if (Array.isArray(children)) { + for (let i = 0; i < children.length && children[i].offset <= offset; i++) { + const item = findNodeAtOffset(children[i], offset, includeRightBound); + if (item) { + return item; + } + } + } + return node; + } + return undefined; + } + exports.findNodeAtOffset = findNodeAtOffset; + /** + * Parses the given text and invokes the visitor functions for each object, array and literal reached. + */ + function visit(text, visitor, options = ParseOptions.DEFAULT) { + const _scanner = (0, scanner_1.createScanner)(text, false); + // Important: Only pass copies of this to visitor functions to prevent accidental modification, and + // to not affect visitor functions which stored a reference to a previous JSONPath + const _jsonPath = []; + function toNoArgVisit(visitFunction) { + return visitFunction ? () => visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true; + } + function toNoArgVisitWithPath(visitFunction) { + return visitFunction ? () => visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true; + } + function toOneArgVisit(visitFunction) { + return visitFunction ? (arg) => visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true; + } + function toOneArgVisitWithPath(visitFunction) { + return visitFunction ? (arg) => visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true; + } + const onObjectBegin = toNoArgVisitWithPath(visitor.onObjectBegin), onObjectProperty = toOneArgVisitWithPath(visitor.onObjectProperty), onObjectEnd = toNoArgVisit(visitor.onObjectEnd), onArrayBegin = toNoArgVisitWithPath(visitor.onArrayBegin), onArrayEnd = toNoArgVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisitWithPath(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError); + const disallowComments = options && options.disallowComments; + const allowTrailingComma = options && options.allowTrailingComma; + function scanNext() { + while (true) { + const token = _scanner.scan(); + switch (_scanner.getTokenError()) { + case 4 /* ScanError.InvalidUnicode */: + handleError(14 /* ParseErrorCode.InvalidUnicode */); + break; + case 5 /* ScanError.InvalidEscapeCharacter */: + handleError(15 /* ParseErrorCode.InvalidEscapeCharacter */); + break; + case 3 /* ScanError.UnexpectedEndOfNumber */: + handleError(13 /* ParseErrorCode.UnexpectedEndOfNumber */); + break; + case 1 /* ScanError.UnexpectedEndOfComment */: + if (!disallowComments) { + handleError(11 /* ParseErrorCode.UnexpectedEndOfComment */); + } + break; + case 2 /* ScanError.UnexpectedEndOfString */: + handleError(12 /* ParseErrorCode.UnexpectedEndOfString */); + break; + case 6 /* ScanError.InvalidCharacter */: + handleError(16 /* ParseErrorCode.InvalidCharacter */); + break; + } + switch (token) { + case 12 /* SyntaxKind.LineCommentTrivia */: + case 13 /* SyntaxKind.BlockCommentTrivia */: + if (disallowComments) { + handleError(10 /* ParseErrorCode.InvalidCommentToken */); + } + else { + onComment(); + } + break; + case 16 /* SyntaxKind.Unknown */: + handleError(1 /* ParseErrorCode.InvalidSymbol */); + break; + case 15 /* SyntaxKind.Trivia */: + case 14 /* SyntaxKind.LineBreakTrivia */: + break; + default: + return token; + } + } + } + function handleError(error, skipUntilAfter = [], skipUntil = []) { + onError(error); + if (skipUntilAfter.length + skipUntil.length > 0) { + let token = _scanner.getToken(); + while (token !== 17 /* SyntaxKind.EOF */) { + if (skipUntilAfter.indexOf(token) !== -1) { + scanNext(); + break; + } + else if (skipUntil.indexOf(token) !== -1) { + break; + } + token = scanNext(); + } + } + } + function parseString(isValue) { + const value = _scanner.getTokenValue(); + if (isValue) { + onLiteralValue(value); + } + else { + onObjectProperty(value); + // add property name afterwards + _jsonPath.push(value); + } + scanNext(); + return true; + } + function parseLiteral() { + switch (_scanner.getToken()) { + case 11 /* SyntaxKind.NumericLiteral */: + const tokenValue = _scanner.getTokenValue(); + let value = Number(tokenValue); + if (isNaN(value)) { + handleError(2 /* ParseErrorCode.InvalidNumberFormat */); + value = 0; + } + onLiteralValue(value); + break; + case 7 /* SyntaxKind.NullKeyword */: + onLiteralValue(null); + break; + case 8 /* SyntaxKind.TrueKeyword */: + onLiteralValue(true); + break; + case 9 /* SyntaxKind.FalseKeyword */: + onLiteralValue(false); + break; + default: + return false; + } + scanNext(); + return true; + } + function parseProperty() { + if (_scanner.getToken() !== 10 /* SyntaxKind.StringLiteral */) { + handleError(3 /* ParseErrorCode.PropertyNameExpected */, [], [2 /* SyntaxKind.CloseBraceToken */, 5 /* SyntaxKind.CommaToken */]); + return false; + } + parseString(false); + if (_scanner.getToken() === 6 /* SyntaxKind.ColonToken */) { + onSeparator(':'); + scanNext(); // consume colon + if (!parseValue()) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], [2 /* SyntaxKind.CloseBraceToken */, 5 /* SyntaxKind.CommaToken */]); + } + } + else { + handleError(5 /* ParseErrorCode.ColonExpected */, [], [2 /* SyntaxKind.CloseBraceToken */, 5 /* SyntaxKind.CommaToken */]); + } + _jsonPath.pop(); // remove processed property name + return true; + } + function parseObject() { + onObjectBegin(); + scanNext(); // consume open brace + let needsComma = false; + while (_scanner.getToken() !== 2 /* SyntaxKind.CloseBraceToken */ && _scanner.getToken() !== 17 /* SyntaxKind.EOF */) { + if (_scanner.getToken() === 5 /* SyntaxKind.CommaToken */) { + if (!needsComma) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], []); + } + onSeparator(','); + scanNext(); // consume comma + if (_scanner.getToken() === 2 /* SyntaxKind.CloseBraceToken */ && allowTrailingComma) { + break; + } + } + else if (needsComma) { + handleError(6 /* ParseErrorCode.CommaExpected */, [], []); + } + if (!parseProperty()) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], [2 /* SyntaxKind.CloseBraceToken */, 5 /* SyntaxKind.CommaToken */]); + } + needsComma = true; + } + onObjectEnd(); + if (_scanner.getToken() !== 2 /* SyntaxKind.CloseBraceToken */) { + handleError(7 /* ParseErrorCode.CloseBraceExpected */, [2 /* SyntaxKind.CloseBraceToken */], []); + } + else { + scanNext(); // consume close brace + } + return true; + } + function parseArray() { + onArrayBegin(); + scanNext(); // consume open bracket + let isFirstElement = true; + let needsComma = false; + while (_scanner.getToken() !== 4 /* SyntaxKind.CloseBracketToken */ && _scanner.getToken() !== 17 /* SyntaxKind.EOF */) { + if (_scanner.getToken() === 5 /* SyntaxKind.CommaToken */) { + if (!needsComma) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], []); + } + onSeparator(','); + scanNext(); // consume comma + if (_scanner.getToken() === 4 /* SyntaxKind.CloseBracketToken */ && allowTrailingComma) { + break; + } + } + else if (needsComma) { + handleError(6 /* ParseErrorCode.CommaExpected */, [], []); + } + if (isFirstElement) { + _jsonPath.push(0); + isFirstElement = false; + } + else { + _jsonPath[_jsonPath.length - 1]++; + } + if (!parseValue()) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], [4 /* SyntaxKind.CloseBracketToken */, 5 /* SyntaxKind.CommaToken */]); + } + needsComma = true; + } + onArrayEnd(); + if (!isFirstElement) { + _jsonPath.pop(); // remove array index + } + if (_scanner.getToken() !== 4 /* SyntaxKind.CloseBracketToken */) { + handleError(8 /* ParseErrorCode.CloseBracketExpected */, [4 /* SyntaxKind.CloseBracketToken */], []); + } + else { + scanNext(); // consume close bracket + } + return true; + } + function parseValue() { + switch (_scanner.getToken()) { + case 3 /* SyntaxKind.OpenBracketToken */: + return parseArray(); + case 1 /* SyntaxKind.OpenBraceToken */: + return parseObject(); + case 10 /* SyntaxKind.StringLiteral */: + return parseString(true); + default: + return parseLiteral(); + } + } + scanNext(); + if (_scanner.getToken() === 17 /* SyntaxKind.EOF */) { + if (options.allowEmptyContent) { + return true; + } + handleError(4 /* ParseErrorCode.ValueExpected */, [], []); + return false; + } + if (!parseValue()) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], []); + return false; + } + if (_scanner.getToken() !== 17 /* SyntaxKind.EOF */) { + handleError(9 /* ParseErrorCode.EndOfFileExpected */, [], []); + } + return true; + } + exports.visit = visit; + /** + * Takes JSON with JavaScript-style comments and remove + * them. Optionally replaces every none-newline character + * of comments with a replaceCharacter + */ + function stripComments(text, replaceCh) { + let _scanner = (0, scanner_1.createScanner)(text), parts = [], kind, offset = 0, pos; + do { + pos = _scanner.getPosition(); + kind = _scanner.scan(); + switch (kind) { + case 12 /* SyntaxKind.LineCommentTrivia */: + case 13 /* SyntaxKind.BlockCommentTrivia */: + case 17 /* SyntaxKind.EOF */: + if (offset !== pos) { + parts.push(text.substring(offset, pos)); + } + if (replaceCh !== undefined) { + parts.push(_scanner.getTokenValue().replace(/[^\r\n]/g, replaceCh)); + } + offset = _scanner.getPosition(); + break; + } + } while (kind !== 17 /* SyntaxKind.EOF */); + return parts.join(''); + } + exports.stripComments = stripComments; + function getNodeType(value) { + switch (typeof value) { + case 'boolean': return 'boolean'; + case 'number': return 'number'; + case 'string': return 'string'; + case 'object': { + if (!value) { + return 'null'; + } + else if (Array.isArray(value)) { + return 'array'; + } + return 'object'; + } + default: return 'null'; + } + } + exports.getNodeType = getNodeType; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/scanner.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/scanner.js" index ee8812ab387f52ccee79be540acdad491be9f9ce..ebca65f49cc2507b2ca0f8cd784dfdf414896dd7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/scanner.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/scanner.js" @@ -1,3 +1,456 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:581d82c4f1aa84b0605369c01f414fb0164ee462e03daa298cb960076a2a9e82 -size 21446 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + /*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + 'use strict'; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createScanner = void 0; + /** + * Creates a JSON scanner on the given text. + * If ignoreTrivia is set, whitespaces or comments are ignored. + */ + function createScanner(text, ignoreTrivia = false) { + const len = text.length; + let pos = 0, value = '', tokenOffset = 0, token = 16 /* SyntaxKind.Unknown */, lineNumber = 0, lineStartOffset = 0, tokenLineStartOffset = 0, prevTokenLineStartOffset = 0, scanError = 0 /* ScanError.None */; + function scanHexDigits(count, exact) { + let digits = 0; + let value = 0; + while (digits < count || !exact) { + let ch = text.charCodeAt(pos); + if (ch >= 48 /* CharacterCodes._0 */ && ch <= 57 /* CharacterCodes._9 */) { + value = value * 16 + ch - 48 /* CharacterCodes._0 */; + } + else if (ch >= 65 /* CharacterCodes.A */ && ch <= 70 /* CharacterCodes.F */) { + value = value * 16 + ch - 65 /* CharacterCodes.A */ + 10; + } + else if (ch >= 97 /* CharacterCodes.a */ && ch <= 102 /* CharacterCodes.f */) { + value = value * 16 + ch - 97 /* CharacterCodes.a */ + 10; + } + else { + break; + } + pos++; + digits++; + } + if (digits < count) { + value = -1; + } + return value; + } + function setPosition(newPosition) { + pos = newPosition; + value = ''; + tokenOffset = 0; + token = 16 /* SyntaxKind.Unknown */; + scanError = 0 /* ScanError.None */; + } + function scanNumber() { + let start = pos; + if (text.charCodeAt(pos) === 48 /* CharacterCodes._0 */) { + pos++; + } + else { + pos++; + while (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + } + } + if (pos < text.length && text.charCodeAt(pos) === 46 /* CharacterCodes.dot */) { + pos++; + if (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + while (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + } + } + else { + scanError = 3 /* ScanError.UnexpectedEndOfNumber */; + return text.substring(start, pos); + } + } + let end = pos; + if (pos < text.length && (text.charCodeAt(pos) === 69 /* CharacterCodes.E */ || text.charCodeAt(pos) === 101 /* CharacterCodes.e */)) { + pos++; + if (pos < text.length && text.charCodeAt(pos) === 43 /* CharacterCodes.plus */ || text.charCodeAt(pos) === 45 /* CharacterCodes.minus */) { + pos++; + } + if (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + while (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + } + end = pos; + } + else { + scanError = 3 /* ScanError.UnexpectedEndOfNumber */; + } + } + return text.substring(start, end); + } + function scanString() { + let result = '', start = pos; + while (true) { + if (pos >= len) { + result += text.substring(start, pos); + scanError = 2 /* ScanError.UnexpectedEndOfString */; + break; + } + const ch = text.charCodeAt(pos); + if (ch === 34 /* CharacterCodes.doubleQuote */) { + result += text.substring(start, pos); + pos++; + break; + } + if (ch === 92 /* CharacterCodes.backslash */) { + result += text.substring(start, pos); + pos++; + if (pos >= len) { + scanError = 2 /* ScanError.UnexpectedEndOfString */; + break; + } + const ch2 = text.charCodeAt(pos++); + switch (ch2) { + case 34 /* CharacterCodes.doubleQuote */: + result += '\"'; + break; + case 92 /* CharacterCodes.backslash */: + result += '\\'; + break; + case 47 /* CharacterCodes.slash */: + result += '/'; + break; + case 98 /* CharacterCodes.b */: + result += '\b'; + break; + case 102 /* CharacterCodes.f */: + result += '\f'; + break; + case 110 /* CharacterCodes.n */: + result += '\n'; + break; + case 114 /* CharacterCodes.r */: + result += '\r'; + break; + case 116 /* CharacterCodes.t */: + result += '\t'; + break; + case 117 /* CharacterCodes.u */: + const ch3 = scanHexDigits(4, true); + if (ch3 >= 0) { + result += String.fromCharCode(ch3); + } + else { + scanError = 4 /* ScanError.InvalidUnicode */; + } + break; + default: + scanError = 5 /* ScanError.InvalidEscapeCharacter */; + } + start = pos; + continue; + } + if (ch >= 0 && ch <= 0x1f) { + if (isLineBreak(ch)) { + result += text.substring(start, pos); + scanError = 2 /* ScanError.UnexpectedEndOfString */; + break; + } + else { + scanError = 6 /* ScanError.InvalidCharacter */; + // mark as error but continue with string + } + } + pos++; + } + return result; + } + function scanNext() { + value = ''; + scanError = 0 /* ScanError.None */; + tokenOffset = pos; + lineStartOffset = lineNumber; + prevTokenLineStartOffset = tokenLineStartOffset; + if (pos >= len) { + // at the end + tokenOffset = len; + return token = 17 /* SyntaxKind.EOF */; + } + let code = text.charCodeAt(pos); + // trivia: whitespace + if (isWhiteSpace(code)) { + do { + pos++; + value += String.fromCharCode(code); + code = text.charCodeAt(pos); + } while (isWhiteSpace(code)); + return token = 15 /* SyntaxKind.Trivia */; + } + // trivia: newlines + if (isLineBreak(code)) { + pos++; + value += String.fromCharCode(code); + if (code === 13 /* CharacterCodes.carriageReturn */ && text.charCodeAt(pos) === 10 /* CharacterCodes.lineFeed */) { + pos++; + value += '\n'; + } + lineNumber++; + tokenLineStartOffset = pos; + return token = 14 /* SyntaxKind.LineBreakTrivia */; + } + switch (code) { + // tokens: []{}:, + case 123 /* CharacterCodes.openBrace */: + pos++; + return token = 1 /* SyntaxKind.OpenBraceToken */; + case 125 /* CharacterCodes.closeBrace */: + pos++; + return token = 2 /* SyntaxKind.CloseBraceToken */; + case 91 /* CharacterCodes.openBracket */: + pos++; + return token = 3 /* SyntaxKind.OpenBracketToken */; + case 93 /* CharacterCodes.closeBracket */: + pos++; + return token = 4 /* SyntaxKind.CloseBracketToken */; + case 58 /* CharacterCodes.colon */: + pos++; + return token = 6 /* SyntaxKind.ColonToken */; + case 44 /* CharacterCodes.comma */: + pos++; + return token = 5 /* SyntaxKind.CommaToken */; + // strings + case 34 /* CharacterCodes.doubleQuote */: + pos++; + value = scanString(); + return token = 10 /* SyntaxKind.StringLiteral */; + // comments + case 47 /* CharacterCodes.slash */: + const start = pos - 1; + // Single-line comment + if (text.charCodeAt(pos + 1) === 47 /* CharacterCodes.slash */) { + pos += 2; + while (pos < len) { + if (isLineBreak(text.charCodeAt(pos))) { + break; + } + pos++; + } + value = text.substring(start, pos); + return token = 12 /* SyntaxKind.LineCommentTrivia */; + } + // Multi-line comment + if (text.charCodeAt(pos + 1) === 42 /* CharacterCodes.asterisk */) { + pos += 2; + const safeLength = len - 1; // For lookahead. + let commentClosed = false; + while (pos < safeLength) { + const ch = text.charCodeAt(pos); + if (ch === 42 /* CharacterCodes.asterisk */ && text.charCodeAt(pos + 1) === 47 /* CharacterCodes.slash */) { + pos += 2; + commentClosed = true; + break; + } + pos++; + if (isLineBreak(ch)) { + if (ch === 13 /* CharacterCodes.carriageReturn */ && text.charCodeAt(pos) === 10 /* CharacterCodes.lineFeed */) { + pos++; + } + lineNumber++; + tokenLineStartOffset = pos; + } + } + if (!commentClosed) { + pos++; + scanError = 1 /* ScanError.UnexpectedEndOfComment */; + } + value = text.substring(start, pos); + return token = 13 /* SyntaxKind.BlockCommentTrivia */; + } + // just a single slash + value += String.fromCharCode(code); + pos++; + return token = 16 /* SyntaxKind.Unknown */; + // numbers + case 45 /* CharacterCodes.minus */: + value += String.fromCharCode(code); + pos++; + if (pos === len || !isDigit(text.charCodeAt(pos))) { + return token = 16 /* SyntaxKind.Unknown */; + } + // found a minus, followed by a number so + // we fall through to proceed with scanning + // numbers + case 48 /* CharacterCodes._0 */: + case 49 /* CharacterCodes._1 */: + case 50 /* CharacterCodes._2 */: + case 51 /* CharacterCodes._3 */: + case 52 /* CharacterCodes._4 */: + case 53 /* CharacterCodes._5 */: + case 54 /* CharacterCodes._6 */: + case 55 /* CharacterCodes._7 */: + case 56 /* CharacterCodes._8 */: + case 57 /* CharacterCodes._9 */: + value += scanNumber(); + return token = 11 /* SyntaxKind.NumericLiteral */; + // literals and unknown symbols + default: + // is a literal? Read the full word. + while (pos < len && isUnknownContentCharacter(code)) { + pos++; + code = text.charCodeAt(pos); + } + if (tokenOffset !== pos) { + value = text.substring(tokenOffset, pos); + // keywords: true, false, null + switch (value) { + case 'true': return token = 8 /* SyntaxKind.TrueKeyword */; + case 'false': return token = 9 /* SyntaxKind.FalseKeyword */; + case 'null': return token = 7 /* SyntaxKind.NullKeyword */; + } + return token = 16 /* SyntaxKind.Unknown */; + } + // some + value += String.fromCharCode(code); + pos++; + return token = 16 /* SyntaxKind.Unknown */; + } + } + function isUnknownContentCharacter(code) { + if (isWhiteSpace(code) || isLineBreak(code)) { + return false; + } + switch (code) { + case 125 /* CharacterCodes.closeBrace */: + case 93 /* CharacterCodes.closeBracket */: + case 123 /* CharacterCodes.openBrace */: + case 91 /* CharacterCodes.openBracket */: + case 34 /* CharacterCodes.doubleQuote */: + case 58 /* CharacterCodes.colon */: + case 44 /* CharacterCodes.comma */: + case 47 /* CharacterCodes.slash */: + return false; + } + return true; + } + function scanNextNonTrivia() { + let result; + do { + result = scanNext(); + } while (result >= 12 /* SyntaxKind.LineCommentTrivia */ && result <= 15 /* SyntaxKind.Trivia */); + return result; + } + return { + setPosition: setPosition, + getPosition: () => pos, + scan: ignoreTrivia ? scanNextNonTrivia : scanNext, + getToken: () => token, + getTokenValue: () => value, + getTokenOffset: () => tokenOffset, + getTokenLength: () => pos - tokenOffset, + getTokenStartLine: () => lineStartOffset, + getTokenStartCharacter: () => tokenOffset - prevTokenLineStartOffset, + getTokenError: () => scanError, + }; + } + exports.createScanner = createScanner; + function isWhiteSpace(ch) { + return ch === 32 /* CharacterCodes.space */ || ch === 9 /* CharacterCodes.tab */; + } + function isLineBreak(ch) { + return ch === 10 /* CharacterCodes.lineFeed */ || ch === 13 /* CharacterCodes.carriageReturn */; + } + function isDigit(ch) { + return ch >= 48 /* CharacterCodes._0 */ && ch <= 57 /* CharacterCodes._9 */; + } + var CharacterCodes; + (function (CharacterCodes) { + CharacterCodes[CharacterCodes["lineFeed"] = 10] = "lineFeed"; + CharacterCodes[CharacterCodes["carriageReturn"] = 13] = "carriageReturn"; + CharacterCodes[CharacterCodes["space"] = 32] = "space"; + CharacterCodes[CharacterCodes["_0"] = 48] = "_0"; + CharacterCodes[CharacterCodes["_1"] = 49] = "_1"; + CharacterCodes[CharacterCodes["_2"] = 50] = "_2"; + CharacterCodes[CharacterCodes["_3"] = 51] = "_3"; + CharacterCodes[CharacterCodes["_4"] = 52] = "_4"; + CharacterCodes[CharacterCodes["_5"] = 53] = "_5"; + CharacterCodes[CharacterCodes["_6"] = 54] = "_6"; + CharacterCodes[CharacterCodes["_7"] = 55] = "_7"; + CharacterCodes[CharacterCodes["_8"] = 56] = "_8"; + CharacterCodes[CharacterCodes["_9"] = 57] = "_9"; + CharacterCodes[CharacterCodes["a"] = 97] = "a"; + CharacterCodes[CharacterCodes["b"] = 98] = "b"; + CharacterCodes[CharacterCodes["c"] = 99] = "c"; + CharacterCodes[CharacterCodes["d"] = 100] = "d"; + CharacterCodes[CharacterCodes["e"] = 101] = "e"; + CharacterCodes[CharacterCodes["f"] = 102] = "f"; + CharacterCodes[CharacterCodes["g"] = 103] = "g"; + CharacterCodes[CharacterCodes["h"] = 104] = "h"; + CharacterCodes[CharacterCodes["i"] = 105] = "i"; + CharacterCodes[CharacterCodes["j"] = 106] = "j"; + CharacterCodes[CharacterCodes["k"] = 107] = "k"; + CharacterCodes[CharacterCodes["l"] = 108] = "l"; + CharacterCodes[CharacterCodes["m"] = 109] = "m"; + CharacterCodes[CharacterCodes["n"] = 110] = "n"; + CharacterCodes[CharacterCodes["o"] = 111] = "o"; + CharacterCodes[CharacterCodes["p"] = 112] = "p"; + CharacterCodes[CharacterCodes["q"] = 113] = "q"; + CharacterCodes[CharacterCodes["r"] = 114] = "r"; + CharacterCodes[CharacterCodes["s"] = 115] = "s"; + CharacterCodes[CharacterCodes["t"] = 116] = "t"; + CharacterCodes[CharacterCodes["u"] = 117] = "u"; + CharacterCodes[CharacterCodes["v"] = 118] = "v"; + CharacterCodes[CharacterCodes["w"] = 119] = "w"; + CharacterCodes[CharacterCodes["x"] = 120] = "x"; + CharacterCodes[CharacterCodes["y"] = 121] = "y"; + CharacterCodes[CharacterCodes["z"] = 122] = "z"; + CharacterCodes[CharacterCodes["A"] = 65] = "A"; + CharacterCodes[CharacterCodes["B"] = 66] = "B"; + CharacterCodes[CharacterCodes["C"] = 67] = "C"; + CharacterCodes[CharacterCodes["D"] = 68] = "D"; + CharacterCodes[CharacterCodes["E"] = 69] = "E"; + CharacterCodes[CharacterCodes["F"] = 70] = "F"; + CharacterCodes[CharacterCodes["G"] = 71] = "G"; + CharacterCodes[CharacterCodes["H"] = 72] = "H"; + CharacterCodes[CharacterCodes["I"] = 73] = "I"; + CharacterCodes[CharacterCodes["J"] = 74] = "J"; + CharacterCodes[CharacterCodes["K"] = 75] = "K"; + CharacterCodes[CharacterCodes["L"] = 76] = "L"; + CharacterCodes[CharacterCodes["M"] = 77] = "M"; + CharacterCodes[CharacterCodes["N"] = 78] = "N"; + CharacterCodes[CharacterCodes["O"] = 79] = "O"; + CharacterCodes[CharacterCodes["P"] = 80] = "P"; + CharacterCodes[CharacterCodes["Q"] = 81] = "Q"; + CharacterCodes[CharacterCodes["R"] = 82] = "R"; + CharacterCodes[CharacterCodes["S"] = 83] = "S"; + CharacterCodes[CharacterCodes["T"] = 84] = "T"; + CharacterCodes[CharacterCodes["U"] = 85] = "U"; + CharacterCodes[CharacterCodes["V"] = 86] = "V"; + CharacterCodes[CharacterCodes["W"] = 87] = "W"; + CharacterCodes[CharacterCodes["X"] = 88] = "X"; + CharacterCodes[CharacterCodes["Y"] = 89] = "Y"; + CharacterCodes[CharacterCodes["Z"] = 90] = "Z"; + CharacterCodes[CharacterCodes["asterisk"] = 42] = "asterisk"; + CharacterCodes[CharacterCodes["backslash"] = 92] = "backslash"; + CharacterCodes[CharacterCodes["closeBrace"] = 125] = "closeBrace"; + CharacterCodes[CharacterCodes["closeBracket"] = 93] = "closeBracket"; + CharacterCodes[CharacterCodes["colon"] = 58] = "colon"; + CharacterCodes[CharacterCodes["comma"] = 44] = "comma"; + CharacterCodes[CharacterCodes["dot"] = 46] = "dot"; + CharacterCodes[CharacterCodes["doubleQuote"] = 34] = "doubleQuote"; + CharacterCodes[CharacterCodes["minus"] = 45] = "minus"; + CharacterCodes[CharacterCodes["openBrace"] = 123] = "openBrace"; + CharacterCodes[CharacterCodes["openBracket"] = 91] = "openBracket"; + CharacterCodes[CharacterCodes["plus"] = 43] = "plus"; + CharacterCodes[CharacterCodes["slash"] = 47] = "slash"; + CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed"; + CharacterCodes[CharacterCodes["tab"] = 9] = "tab"; + })(CharacterCodes || (CharacterCodes = {})); +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/string-intern.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/string-intern.js" index 791e444caf9ffd0f9692f552ace6f33faba10e92..177f2d72734a7fdad28df179e9d00e32bf17657c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/string-intern.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/impl/string-intern.js" @@ -1,3 +1,42 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e590d27909a7c132382fbf9b8c4668054ab425734c1e0789753063356826c30f -size 1663 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.supportedEols = exports.cachedBreakLinesWithSpaces = exports.cachedSpaces = void 0; + exports.cachedSpaces = new Array(20).fill(0).map((_, index) => { + return ' '.repeat(index); + }); + const maxCachedValues = 200; + exports.cachedBreakLinesWithSpaces = { + ' ': { + '\n': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\n' + ' '.repeat(index); + }), + '\r': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\r' + ' '.repeat(index); + }), + '\r\n': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\r\n' + ' '.repeat(index); + }), + }, + '\t': { + '\n': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\n' + '\t'.repeat(index); + }), + '\r': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\r' + '\t'.repeat(index); + }), + '\r\n': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\r\n' + '\t'.repeat(index); + }), + } + }; + exports.supportedEols = ['\n', '\r', '\r\n']; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/main.d.ts" index 694be0bd6eeee1b89b92cc30b8110de6532fb4d9..7312a36d4f48d03e354ba9c4e45fc28947d33894 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/main.d.ts" @@ -1,3 +1,349 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4d82dad8d8a312706a9bc240c805088fef713bc71eaa622e55970e251b6c1a0f -size 14314 +/** + * Creates a JSON scanner on the given text. + * If ignoreTrivia is set, whitespaces or comments are ignored. + */ +export declare const createScanner: (text: string, ignoreTrivia?: boolean) => JSONScanner; +export declare const enum ScanError { + None = 0, + UnexpectedEndOfComment = 1, + UnexpectedEndOfString = 2, + UnexpectedEndOfNumber = 3, + InvalidUnicode = 4, + InvalidEscapeCharacter = 5, + InvalidCharacter = 6 +} +export declare const enum SyntaxKind { + OpenBraceToken = 1, + CloseBraceToken = 2, + OpenBracketToken = 3, + CloseBracketToken = 4, + CommaToken = 5, + ColonToken = 6, + NullKeyword = 7, + TrueKeyword = 8, + FalseKeyword = 9, + StringLiteral = 10, + NumericLiteral = 11, + LineCommentTrivia = 12, + BlockCommentTrivia = 13, + LineBreakTrivia = 14, + Trivia = 15, + Unknown = 16, + EOF = 17 +} +/** + * The scanner object, representing a JSON scanner at a position in the input string. + */ +export interface JSONScanner { + /** + * Sets the scan position to a new offset. A call to 'scan' is needed to get the first token. + */ + setPosition(pos: number): void; + /** + * Read the next token. Returns the token code. + */ + scan(): SyntaxKind; + /** + * Returns the zero-based current scan position, which is after the last read token. + */ + getPosition(): number; + /** + * Returns the last read token. + */ + getToken(): SyntaxKind; + /** + * Returns the last read token value. The value for strings is the decoded string content. For numbers it's of type number, for boolean it's true or false. + */ + getTokenValue(): string; + /** + * The zero-based start offset of the last read token. + */ + getTokenOffset(): number; + /** + * The length of the last read token. + */ + getTokenLength(): number; + /** + * The zero-based start line number of the last read token. + */ + getTokenStartLine(): number; + /** + * The zero-based start character (column) of the last read token. + */ + getTokenStartCharacter(): number; + /** + * An error code of the last scan. + */ + getTokenError(): ScanError; +} +/** + * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. + */ +export declare const getLocation: (text: string, position: number) => Location; +/** + * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + * Therefore, always check the errors list to find out if the input was valid. + */ +export declare const parse: (text: string, errors?: ParseError[], options?: ParseOptions) => any; +/** + * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + */ +export declare const parseTree: (text: string, errors?: ParseError[], options?: ParseOptions) => Node | undefined; +/** + * Finds the node at the given path in a JSON DOM. + */ +export declare const findNodeAtLocation: (root: Node, path: JSONPath) => Node | undefined; +/** + * Finds the innermost node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. + */ +export declare const findNodeAtOffset: (root: Node, offset: number, includeRightBound?: boolean) => Node | undefined; +/** + * Gets the JSON path of the given JSON DOM node + */ +export declare const getNodePath: (node: Node) => JSONPath; +/** + * Evaluates the JavaScript object of the given JSON DOM node + */ +export declare const getNodeValue: (node: Node) => any; +/** + * Parses the given text and invokes the visitor functions for each object, array and literal reached. + */ +export declare const visit: (text: string, visitor: JSONVisitor, options?: ParseOptions) => any; +/** + * Takes JSON with JavaScript-style comments and remove + * them. Optionally replaces every none-newline character + * of comments with a replaceCharacter + */ +export declare const stripComments: (text: string, replaceCh?: string) => string; +export interface ParseError { + error: ParseErrorCode; + offset: number; + length: number; +} +export declare const enum ParseErrorCode { + InvalidSymbol = 1, + InvalidNumberFormat = 2, + PropertyNameExpected = 3, + ValueExpected = 4, + ColonExpected = 5, + CommaExpected = 6, + CloseBraceExpected = 7, + CloseBracketExpected = 8, + EndOfFileExpected = 9, + InvalidCommentToken = 10, + UnexpectedEndOfComment = 11, + UnexpectedEndOfString = 12, + UnexpectedEndOfNumber = 13, + InvalidUnicode = 14, + InvalidEscapeCharacter = 15, + InvalidCharacter = 16 +} +export declare function printParseErrorCode(code: ParseErrorCode): "InvalidSymbol" | "InvalidNumberFormat" | "PropertyNameExpected" | "ValueExpected" | "ColonExpected" | "CommaExpected" | "CloseBraceExpected" | "CloseBracketExpected" | "EndOfFileExpected" | "InvalidCommentToken" | "UnexpectedEndOfComment" | "UnexpectedEndOfString" | "UnexpectedEndOfNumber" | "InvalidUnicode" | "InvalidEscapeCharacter" | "InvalidCharacter" | ""; +export type NodeType = 'object' | 'array' | 'property' | 'string' | 'number' | 'boolean' | 'null'; +export interface Node { + readonly type: NodeType; + readonly value?: any; + readonly offset: number; + readonly length: number; + readonly colonOffset?: number; + readonly parent?: Node; + readonly children?: Node[]; +} +/** + * A {@linkcode JSONPath} segment. Either a string representing an object property name + * or a number (starting at 0) for array indices. + */ +export type Segment = string | number; +export type JSONPath = Segment[]; +export interface Location { + /** + * The previous property key or literal value (string, number, boolean or null) or undefined. + */ + previousNode?: Node; + /** + * The path describing the location in the JSON document. The path consists of a sequence of strings + * representing an object property or numbers for array indices. + */ + path: JSONPath; + /** + * Matches the locations path against a pattern consisting of strings (for properties) and numbers (for array indices). + * '*' will match a single segment of any property name or index. + * '**' will match a sequence of segments of any property name or index, or no segment. + */ + matches: (patterns: JSONPath) => boolean; + /** + * If set, the location's offset is at a property key. + */ + isAtPropertyKey: boolean; +} +export interface ParseOptions { + disallowComments?: boolean; + allowTrailingComma?: boolean; + allowEmptyContent?: boolean; +} +/** + * Visitor called by {@linkcode visit} when parsing JSON. + * + * The visitor functions have the following common parameters: + * - `offset`: Global offset within the JSON document, starting at 0 + * - `startLine`: Line number, starting at 0 + * - `startCharacter`: Start character (column) within the current line, starting at 0 + * + * Additionally some functions have a `pathSupplier` parameter which can be used to obtain the + * current `JSONPath` within the document. + */ +export interface JSONVisitor { + /** + * Invoked when an open brace is encountered and an object is started. The offset and length represent the location of the open brace. + */ + onObjectBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a property is encountered. The offset and length represent the location of the property name. + * The `JSONPath` created by the `pathSupplier` refers to the enclosing JSON object, it does not include the + * property name yet. + */ + onObjectProperty?: (property: string, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a closing brace is encountered and an object is completed. The offset and length represent the location of the closing brace. + */ + onObjectEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked when an open bracket is encountered. The offset and length represent the location of the open bracket. + */ + onArrayBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a closing bracket is encountered. The offset and length represent the location of the closing bracket. + */ + onArrayEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked when a literal value is encountered. The offset and length represent the location of the literal value. + */ + onLiteralValue?: (value: any, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a comma or colon separator is encountered. The offset and length represent the location of the separator. + */ + onSeparator?: (character: string, offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * When comments are allowed, invoked when a line or block comment is encountered. The offset and length represent the location of the comment. + */ + onComment?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked on an error. + */ + onError?: (error: ParseErrorCode, offset: number, length: number, startLine: number, startCharacter: number) => void; +} +/** + * An edit result describes a textual edit operation. It is the result of a {@linkcode format} and {@linkcode modify} operation. + * It consist of one or more edits describing insertions, replacements or removals of text segments. + * * The offsets of the edits refer to the original state of the document. + * * No two edits change or remove the same range of text in the original document. + * * Multiple edits can have the same offset if they are multiple inserts, or an insert followed by a remove or replace. + * * The order in the array defines which edit is applied first. + * To apply an edit result use {@linkcode applyEdits}. + * In general multiple EditResults must not be concatenated because they might impact each other, producing incorrect or malformed JSON data. + */ +export type EditResult = Edit[]; +/** + * Represents a text modification + */ +export interface Edit { + /** + * The start offset of the modification. + */ + offset: number; + /** + * The length of the modification. Must not be negative. Empty length represents an *insert*. + */ + length: number; + /** + * The new content. Empty content represents a *remove*. + */ + content: string; +} +/** + * A text range in the document +*/ +export interface Range { + /** + * The start offset of the range. + */ + offset: number; + /** + * The length of the range. Must not be negative. + */ + length: number; +} +/** + * Options used by {@linkcode format} when computing the formatting edit operations + */ +export interface FormattingOptions { + /** + * If indentation is based on spaces (`insertSpaces` = true), the number of spaces that make an indent. + */ + tabSize?: number; + /** + * Is indentation based on spaces? + */ + insertSpaces?: boolean; + /** + * The default 'end of line' character. If not set, '\n' is used as default. + */ + eol?: string; + /** + * If set, will add a new line at the end of the document. + */ + insertFinalNewline?: boolean; + /** + * If true, will keep line positions as is in the formatting + */ + keepLines?: boolean; +} +/** + * Computes the edit operations needed to format a JSON document. + * + * @param documentText The input text + * @param range The range to format or `undefined` to format the full content + * @param options The formatting options + * @returns The edit operations describing the formatting changes to the original document following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export declare function format(documentText: string, range: Range | undefined, options: FormattingOptions): EditResult; +/** + * Options used by {@linkcode modify} when computing the modification edit operations + */ +export interface ModificationOptions { + /** + * Formatting options. If undefined, the newly inserted code will be inserted unformatted. + */ + formattingOptions?: FormattingOptions; + /** + * Default false. If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then + * {@linkcode modify} will insert a new item at that location instead of overwriting its contents. + */ + isArrayInsertion?: boolean; + /** + * Optional function to define the insertion index given an existing list of properties. + */ + getInsertionIndex?: (properties: string[]) => number; +} +/** + * Computes the edit operations needed to modify a value in the JSON document. + * + * @param documentText The input text + * @param path The path of the value to change. The path represents either to the document root, a property or an array item. + * If the path points to an non-existing property or item, it will be created. + * @param value The new value for the specified property or item. If the value is undefined, + * the property or item will be removed. + * @param options Options + * @returns The edit operations describing the changes to the original document, following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export declare function modify(text: string, path: JSONPath, value: any, options: ModificationOptions): EditResult; +/** + * Applies edits to an input string. + * @param text The input text + * @param edits Edit operations following the format described in {@linkcode EditResult}. + * @returns The text with the applied edits. + * @throws An error if the edit operations are not well-formed as described in {@linkcode EditResult}. + */ +export declare function applyEdits(text: string, edits: EditResult): string; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/main.js" index 94fc7a3ebbf516e6325b93cbfdf9599da4e8757d..2ed744665430578caebcb12053150fbf4d7e76da 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/lib/umd/main.js" @@ -1,3 +1,194 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6dc132e2e792a9616688ff93d10dd671c1fbcfa3301d76bff3e81193d049337d -size 11059 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./impl/format", "./impl/edit", "./impl/scanner", "./impl/parser"], factory); + } +})(function (require, exports) { + /*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + 'use strict'; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.applyEdits = exports.modify = exports.format = exports.printParseErrorCode = exports.ParseErrorCode = exports.stripComments = exports.visit = exports.getNodeValue = exports.getNodePath = exports.findNodeAtOffset = exports.findNodeAtLocation = exports.parseTree = exports.parse = exports.getLocation = exports.SyntaxKind = exports.ScanError = exports.createScanner = void 0; + const formatter = require("./impl/format"); + const edit = require("./impl/edit"); + const scanner = require("./impl/scanner"); + const parser = require("./impl/parser"); + /** + * Creates a JSON scanner on the given text. + * If ignoreTrivia is set, whitespaces or comments are ignored. + */ + exports.createScanner = scanner.createScanner; + var ScanError; + (function (ScanError) { + ScanError[ScanError["None"] = 0] = "None"; + ScanError[ScanError["UnexpectedEndOfComment"] = 1] = "UnexpectedEndOfComment"; + ScanError[ScanError["UnexpectedEndOfString"] = 2] = "UnexpectedEndOfString"; + ScanError[ScanError["UnexpectedEndOfNumber"] = 3] = "UnexpectedEndOfNumber"; + ScanError[ScanError["InvalidUnicode"] = 4] = "InvalidUnicode"; + ScanError[ScanError["InvalidEscapeCharacter"] = 5] = "InvalidEscapeCharacter"; + ScanError[ScanError["InvalidCharacter"] = 6] = "InvalidCharacter"; + })(ScanError || (exports.ScanError = ScanError = {})); + var SyntaxKind; + (function (SyntaxKind) { + SyntaxKind[SyntaxKind["OpenBraceToken"] = 1] = "OpenBraceToken"; + SyntaxKind[SyntaxKind["CloseBraceToken"] = 2] = "CloseBraceToken"; + SyntaxKind[SyntaxKind["OpenBracketToken"] = 3] = "OpenBracketToken"; + SyntaxKind[SyntaxKind["CloseBracketToken"] = 4] = "CloseBracketToken"; + SyntaxKind[SyntaxKind["CommaToken"] = 5] = "CommaToken"; + SyntaxKind[SyntaxKind["ColonToken"] = 6] = "ColonToken"; + SyntaxKind[SyntaxKind["NullKeyword"] = 7] = "NullKeyword"; + SyntaxKind[SyntaxKind["TrueKeyword"] = 8] = "TrueKeyword"; + SyntaxKind[SyntaxKind["FalseKeyword"] = 9] = "FalseKeyword"; + SyntaxKind[SyntaxKind["StringLiteral"] = 10] = "StringLiteral"; + SyntaxKind[SyntaxKind["NumericLiteral"] = 11] = "NumericLiteral"; + SyntaxKind[SyntaxKind["LineCommentTrivia"] = 12] = "LineCommentTrivia"; + SyntaxKind[SyntaxKind["BlockCommentTrivia"] = 13] = "BlockCommentTrivia"; + SyntaxKind[SyntaxKind["LineBreakTrivia"] = 14] = "LineBreakTrivia"; + SyntaxKind[SyntaxKind["Trivia"] = 15] = "Trivia"; + SyntaxKind[SyntaxKind["Unknown"] = 16] = "Unknown"; + SyntaxKind[SyntaxKind["EOF"] = 17] = "EOF"; + })(SyntaxKind || (exports.SyntaxKind = SyntaxKind = {})); + /** + * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. + */ + exports.getLocation = parser.getLocation; + /** + * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + * Therefore, always check the errors list to find out if the input was valid. + */ + exports.parse = parser.parse; + /** + * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + */ + exports.parseTree = parser.parseTree; + /** + * Finds the node at the given path in a JSON DOM. + */ + exports.findNodeAtLocation = parser.findNodeAtLocation; + /** + * Finds the innermost node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. + */ + exports.findNodeAtOffset = parser.findNodeAtOffset; + /** + * Gets the JSON path of the given JSON DOM node + */ + exports.getNodePath = parser.getNodePath; + /** + * Evaluates the JavaScript object of the given JSON DOM node + */ + exports.getNodeValue = parser.getNodeValue; + /** + * Parses the given text and invokes the visitor functions for each object, array and literal reached. + */ + exports.visit = parser.visit; + /** + * Takes JSON with JavaScript-style comments and remove + * them. Optionally replaces every none-newline character + * of comments with a replaceCharacter + */ + exports.stripComments = parser.stripComments; + var ParseErrorCode; + (function (ParseErrorCode) { + ParseErrorCode[ParseErrorCode["InvalidSymbol"] = 1] = "InvalidSymbol"; + ParseErrorCode[ParseErrorCode["InvalidNumberFormat"] = 2] = "InvalidNumberFormat"; + ParseErrorCode[ParseErrorCode["PropertyNameExpected"] = 3] = "PropertyNameExpected"; + ParseErrorCode[ParseErrorCode["ValueExpected"] = 4] = "ValueExpected"; + ParseErrorCode[ParseErrorCode["ColonExpected"] = 5] = "ColonExpected"; + ParseErrorCode[ParseErrorCode["CommaExpected"] = 6] = "CommaExpected"; + ParseErrorCode[ParseErrorCode["CloseBraceExpected"] = 7] = "CloseBraceExpected"; + ParseErrorCode[ParseErrorCode["CloseBracketExpected"] = 8] = "CloseBracketExpected"; + ParseErrorCode[ParseErrorCode["EndOfFileExpected"] = 9] = "EndOfFileExpected"; + ParseErrorCode[ParseErrorCode["InvalidCommentToken"] = 10] = "InvalidCommentToken"; + ParseErrorCode[ParseErrorCode["UnexpectedEndOfComment"] = 11] = "UnexpectedEndOfComment"; + ParseErrorCode[ParseErrorCode["UnexpectedEndOfString"] = 12] = "UnexpectedEndOfString"; + ParseErrorCode[ParseErrorCode["UnexpectedEndOfNumber"] = 13] = "UnexpectedEndOfNumber"; + ParseErrorCode[ParseErrorCode["InvalidUnicode"] = 14] = "InvalidUnicode"; + ParseErrorCode[ParseErrorCode["InvalidEscapeCharacter"] = 15] = "InvalidEscapeCharacter"; + ParseErrorCode[ParseErrorCode["InvalidCharacter"] = 16] = "InvalidCharacter"; + })(ParseErrorCode || (exports.ParseErrorCode = ParseErrorCode = {})); + function printParseErrorCode(code) { + switch (code) { + case 1 /* ParseErrorCode.InvalidSymbol */: return 'InvalidSymbol'; + case 2 /* ParseErrorCode.InvalidNumberFormat */: return 'InvalidNumberFormat'; + case 3 /* ParseErrorCode.PropertyNameExpected */: return 'PropertyNameExpected'; + case 4 /* ParseErrorCode.ValueExpected */: return 'ValueExpected'; + case 5 /* ParseErrorCode.ColonExpected */: return 'ColonExpected'; + case 6 /* ParseErrorCode.CommaExpected */: return 'CommaExpected'; + case 7 /* ParseErrorCode.CloseBraceExpected */: return 'CloseBraceExpected'; + case 8 /* ParseErrorCode.CloseBracketExpected */: return 'CloseBracketExpected'; + case 9 /* ParseErrorCode.EndOfFileExpected */: return 'EndOfFileExpected'; + case 10 /* ParseErrorCode.InvalidCommentToken */: return 'InvalidCommentToken'; + case 11 /* ParseErrorCode.UnexpectedEndOfComment */: return 'UnexpectedEndOfComment'; + case 12 /* ParseErrorCode.UnexpectedEndOfString */: return 'UnexpectedEndOfString'; + case 13 /* ParseErrorCode.UnexpectedEndOfNumber */: return 'UnexpectedEndOfNumber'; + case 14 /* ParseErrorCode.InvalidUnicode */: return 'InvalidUnicode'; + case 15 /* ParseErrorCode.InvalidEscapeCharacter */: return 'InvalidEscapeCharacter'; + case 16 /* ParseErrorCode.InvalidCharacter */: return 'InvalidCharacter'; + } + return ''; + } + exports.printParseErrorCode = printParseErrorCode; + /** + * Computes the edit operations needed to format a JSON document. + * + * @param documentText The input text + * @param range The range to format or `undefined` to format the full content + * @param options The formatting options + * @returns The edit operations describing the formatting changes to the original document following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ + function format(documentText, range, options) { + return formatter.format(documentText, range, options); + } + exports.format = format; + /** + * Computes the edit operations needed to modify a value in the JSON document. + * + * @param documentText The input text + * @param path The path of the value to change. The path represents either to the document root, a property or an array item. + * If the path points to an non-existing property or item, it will be created. + * @param value The new value for the specified property or item. If the value is undefined, + * the property or item will be removed. + * @param options Options + * @returns The edit operations describing the changes to the original document, following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ + function modify(text, path, value, options) { + return edit.setProperty(text, path, value, options); + } + exports.modify = modify; + /** + * Applies edits to an input string. + * @param text The input text + * @param edits Edit operations following the format described in {@linkcode EditResult}. + * @returns The text with the applied edits. + * @throws An error if the edit operations are not well-formed as described in {@linkcode EditResult}. + */ + function applyEdits(text, edits) { + let sortedEdits = edits.slice(0).sort((a, b) => { + const diff = a.offset - b.offset; + if (diff === 0) { + return a.length - b.length; + } + return diff; + }); + let lastModifiedOffset = text.length; + for (let i = sortedEdits.length - 1; i >= 0; i--) { + let e = sortedEdits[i]; + if (e.offset + e.length <= lastModifiedOffset) { + text = edit.applyEdit(text, e); + } + else { + throw new Error('Overlapping edit'); + } + lastModifiedOffset = e.offset; + } + return text; + } + exports.applyEdits = applyEdits; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/package.json" index 895928e60f0e511895647af5e4468007463932b6..da7a76b27709ed983d4c62c132e278b0da791872 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/jsonc-parser/package.json" @@ -1,3 +1,37 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6442d10a23718191adbedd34448552cea97a8ff9c67ee71292a9e1ab5d9a140d -size 1180 +{ + "name": "jsonc-parser", + "version": "3.2.1", + "description": "Scanner and parser for JSON with comments.", + "main": "./lib/umd/main.js", + "typings": "./lib/umd/main.d.ts", + "module": "./lib/esm/main.js", + "author": "Microsoft Corporation", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/node-jsonc-parser" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/microsoft/node-jsonc-parser/issues" + }, + "devDependencies": { + "mocha": "^10.2.0", + "typescript": "^5.3.3", + "@types/node": "^16.x", + "@types/mocha": "^10.0.6", + "@typescript-eslint/eslint-plugin": "^6.19.1", + "@typescript-eslint/parser": "^6.19.1", + "eslint": "^8.56.0", + "rimraf": "^5.0.5" + }, + "scripts": { + "prepack": "npm run clean && npm run compile-esm && npm run test && npm run remove-sourcemap-refs", + "compile": "tsc -p ./src && npm run lint", + "compile-esm": "tsc -p ./src/tsconfig.esm.json", + "remove-sourcemap-refs": "node ./build/remove-sourcemap-refs.js", + "clean": "rimraf lib", + "watch": "tsc -w -p ./src", + "test": "npm run compile && mocha ./lib/umd/test", + "lint": "eslint src/**/*.ts" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/License.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/License.txt" index 71c73d0cbbb244fd8977b1334dae3ac9800e0c19..a07e3ae825f86b6d1f966659954bffc0768bef66 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/License.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/License.txt" @@ -1,3 +1,11 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec9ee83580841e8eb687aca9867f221503809ba6426c7f876ede17d91b9fcfd0 -size 1095 +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/README.md" index b98c011bbb79f9de7d08167548c677ad64d2bb13..b179b5d0849b9a85c154ffe5226dc738b86f02b4 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/README.md" @@ -1,3 +1,69 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5d797b2750ce6671ac696a964ca10062d81af394803fa782b4c1368bb461c589 -size 2292 +# VSCode JSON RPC + +[![NPM Version](https://img.shields.io/npm/v/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc) +[![Build Status](https://dev.azure.com/ms/vscode-languageserver-node/_apis/build/status/microsoft.vscode-languageserver-node?branchName=main)](https://dev.azure.com/ms/vscode-languageserver-node/_build/latest?definitionId=439&branchName=main) + +This npm module implements the base messaging protocol spoken between a VSCode language server and a VSCode language client. + +The npm module can also be used standalone to establish a [JSON-RPC](http://www.jsonrpc.org/) channel between +a client and a server. Below an example how to setup a JSON-RPC connection. First the client side. + +```ts +import * as cp from 'child_process'; +import * as rpc from 'vscode-jsonrpc/node'; + +let childProcess = cp.spawn(...); + +// Use stdin and stdout for communication: +let connection = rpc.createMessageConnection( + new rpc.StreamMessageReader(childProcess.stdout), + new rpc.StreamMessageWriter(childProcess.stdin)); + +let notification = new rpc.NotificationType('testNotification'); + +connection.listen(); + +connection.sendNotification(notification, 'Hello World'); +``` + +The server side looks very symmetrical: + +```ts +import * as rpc from 'vscode-jsonrpc/node'; + + +let connection = rpc.createMessageConnection( + new rpc.StreamMessageReader(process.stdin), + new rpc.StreamMessageWriter(process.stdout)); + +let notification = new rpc.NotificationType('testNotification'); +connection.onNotification(notification, (param: string) => { + console.log(param); // This prints Hello World +}); + +connection.listen(); +``` + +# History + +### 5.0.0 + +- add progress support +- move JS target to ES2017 + +### 4.0.0 + +- move JS target to ES6. + +### 3.0.0: + +- converted the NPM module to use TypeScript 2.0.3. +- added strict null support. +- support for passing more than one parameter to a request or notification. +- Breaking changes: + - due to the use of TypeScript 2.0.3 and differences in d.ts generation users of the new version need to move to + TypeScript 2.0.3 as well. + +## License +[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt) diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/browser.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/browser.d.ts" index 0898e728f1aa9ab8ecda68d04096c898e91dbe6a..e628f1b5caf549c4b58cead28e5ca6a1d682acf8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/browser.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/browser.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99170b7257d895bb2594d7db9c255a4b0029a1363fe5e89849fda830b5c997ce -size 385 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/browser/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/browser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/browser.js" index da29a4f6ec2636f4c79c022c589b7adc67c91530..f5caebf0011feb56821400f3e85f752c80778192 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/browser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/browser.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9406802db032558d3cd8bde9f68d20c067f3a7eca251ad7d0e4473da8d457ada -size 411 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/browser/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/browser/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/browser/main.d.ts" index ca1cbfd35ff41135a2b709846ea28452a3fb53b5..05d994f7bc7586b82e024d5cdce1194910308801 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/browser/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/browser/main.d.ts" @@ -1,3 +1,17 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fbbdb0baaade3505088d8eeaee2e57468ccd5fb08189cb5dfc58ec9c571f3191 -size 994 +import { AbstractMessageReader, DataCallback, AbstractMessageWriter, Message, Disposable, ConnectionStrategy, ConnectionOptions, MessageReader, MessageWriter, Logger, MessageConnection } from '../common/api'; +export * from '../common/api'; +export declare class BrowserMessageReader extends AbstractMessageReader implements MessageReader { + private _onData; + private _messageListener; + constructor(port: MessagePort | Worker | DedicatedWorkerGlobalScope); + listen(callback: DataCallback): Disposable; +} +export declare class BrowserMessageWriter extends AbstractMessageWriter implements MessageWriter { + private port; + private errorCount; + constructor(port: MessagePort | Worker | DedicatedWorkerGlobalScope); + write(msg: Message): Promise; + private handleError; + end(): void; +} +export declare function createMessageConnection(reader: MessageReader, writer: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/browser/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/browser/main.js" index 1538a888b1666e2e20bf0f5e03ebb346fb1a34f5..7367be5115795fdc0b75ce3bbb54398d5915136a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/browser/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/browser/main.js" @@ -1,3 +1,76 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b8a81be90adb2c0ee8309509685068c74b96870ffba6e8dc664a8ce94fadc168 -size 2964 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createMessageConnection = exports.BrowserMessageWriter = exports.BrowserMessageReader = void 0; +const ril_1 = require("./ril"); +// Install the browser runtime abstract. +ril_1.default.install(); +const api_1 = require("../common/api"); +__exportStar(require("../common/api"), exports); +class BrowserMessageReader extends api_1.AbstractMessageReader { + constructor(port) { + super(); + this._onData = new api_1.Emitter(); + this._messageListener = (event) => { + this._onData.fire(event.data); + }; + port.addEventListener('error', (event) => this.fireError(event)); + port.onmessage = this._messageListener; + } + listen(callback) { + return this._onData.event(callback); + } +} +exports.BrowserMessageReader = BrowserMessageReader; +class BrowserMessageWriter extends api_1.AbstractMessageWriter { + constructor(port) { + super(); + this.port = port; + this.errorCount = 0; + port.addEventListener('error', (event) => this.fireError(event)); + } + write(msg) { + try { + this.port.postMessage(msg); + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.BrowserMessageWriter = BrowserMessageWriter; +function createMessageConnection(reader, writer, logger, options) { + if (logger === undefined) { + logger = api_1.NullLogger; + } + if (api_1.ConnectionStrategy.is(options)) { + options = { connectionStrategy: options }; + } + return (0, api_1.createMessageConnection)(reader, writer, logger, options); +} +exports.createMessageConnection = createMessageConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts" index d2f8d6ba693933c232f3d7f7fcb042682b32faf4..5a5a82c5f9d6d9b0d71c97320f56ef81b94681b6 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts" @@ -1,3 +1,12 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a9994d282573b31ac3b09bb94c88868edd6530c06d77e99379d4fd9e91d90dc6 -size 358 +import { RAL } from '../common/api'; +interface RIL extends RAL { + readonly stream: { + readonly asReadableStream: (stream: WebSocket) => RAL.ReadableStream; + readonly asWritableStream: (stream: WebSocket) => RAL.WritableStream; + }; +} +declare function RIL(): RIL; +declare namespace RIL { + function install(): void; +} +export default RIL; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/browser/ril.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/browser/ril.js" index c085fca48e924a527b1121bfc96b8e88c2cfd788..8991868a2474a41f2c01d366721ed499fb7ec699 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/browser/ril.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/browser/ril.js" @@ -1,3 +1,156 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e636b0a5c6513a6adb5b1a7814128904a39c6fe285019dbfa75d9c44cdb4d262 -size 5643 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +const api_1 = require("../common/api"); +class MessageBuffer extends api_1.AbstractMessageBuffer { + constructor(encoding = 'utf-8') { + super(encoding); + this.asciiDecoder = new TextDecoder('ascii'); + } + emptyBuffer() { + return MessageBuffer.emptyBuffer; + } + fromString(value, _encoding) { + return (new TextEncoder()).encode(value); + } + toString(value, encoding) { + if (encoding === 'ascii') { + return this.asciiDecoder.decode(value); + } + else { + return (new TextDecoder(encoding)).decode(value); + } + } + asNative(buffer, length) { + if (length === undefined) { + return buffer; + } + else { + return buffer.slice(0, length); + } + } + allocNative(length) { + return new Uint8Array(length); + } +} +MessageBuffer.emptyBuffer = new Uint8Array(0); +class ReadableStreamWrapper { + constructor(socket) { + this.socket = socket; + this._onData = new api_1.Emitter(); + this._messageListener = (event) => { + const blob = event.data; + blob.arrayBuffer().then((buffer) => { + this._onData.fire(new Uint8Array(buffer)); + }, () => { + (0, api_1.RAL)().console.error(`Converting blob to array buffer failed.`); + }); + }; + this.socket.addEventListener('message', this._messageListener); + } + onClose(listener) { + this.socket.addEventListener('close', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('close', listener)); + } + onError(listener) { + this.socket.addEventListener('error', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('error', listener)); + } + onEnd(listener) { + this.socket.addEventListener('end', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('end', listener)); + } + onData(listener) { + return this._onData.event(listener); + } +} +class WritableStreamWrapper { + constructor(socket) { + this.socket = socket; + } + onClose(listener) { + this.socket.addEventListener('close', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('close', listener)); + } + onError(listener) { + this.socket.addEventListener('error', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('error', listener)); + } + onEnd(listener) { + this.socket.addEventListener('end', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('end', listener)); + } + write(data, encoding) { + if (typeof data === 'string') { + if (encoding !== undefined && encoding !== 'utf-8') { + throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${encoding}`); + } + this.socket.send(data); + } + else { + this.socket.send(data); + } + return Promise.resolve(); + } + end() { + this.socket.close(); + } +} +const _textEncoder = new TextEncoder(); +const _ril = Object.freeze({ + messageBuffer: Object.freeze({ + create: (encoding) => new MessageBuffer(encoding) + }), + applicationJson: Object.freeze({ + encoder: Object.freeze({ + name: 'application/json', + encode: (msg, options) => { + if (options.charset !== 'utf-8') { + throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${options.charset}`); + } + return Promise.resolve(_textEncoder.encode(JSON.stringify(msg, undefined, 0))); + } + }), + decoder: Object.freeze({ + name: 'application/json', + decode: (buffer, options) => { + if (!(buffer instanceof Uint8Array)) { + throw new Error(`In a Browser environments only Uint8Arrays are supported.`); + } + return Promise.resolve(JSON.parse(new TextDecoder(options.charset).decode(buffer))); + } + }) + }), + stream: Object.freeze({ + asReadableStream: (socket) => new ReadableStreamWrapper(socket), + asWritableStream: (socket) => new WritableStreamWrapper(socket) + }), + console: console, + timer: Object.freeze({ + setTimeout(callback, ms, ...args) { + const handle = setTimeout(callback, ms, ...args); + return { dispose: () => clearTimeout(handle) }; + }, + setImmediate(callback, ...args) { + const handle = setTimeout(callback, 0, ...args); + return { dispose: () => clearTimeout(handle) }; + }, + setInterval(callback, ms, ...args) { + const handle = setInterval(callback, ms, ...args); + return { dispose: () => clearInterval(handle) }; + }, + }) +}); +function RIL() { + return _ril; +} +(function (RIL) { + function install() { + api_1.RAL.install(_ril); + } + RIL.install = install; +})(RIL || (RIL = {})); +exports.default = RIL; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/api.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/api.d.ts" index ace2d1a2a6d8cc5a9b12c574bf9d30413d8150fa..ecb02b36bc406c5f93b2599a778546ab74d540e4 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/api.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/api.d.ts" @@ -1,3 +1,14 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c0241916cf44e700edc1cdac8d48b2a9cf4658cf624788da59b3d29c7769a966 -size 4464 +/// +import { Message, MessageSignature, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseError, ErrorCodes, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, ResponseMessage, ParameterStructures, _EM } from './messages'; +import { LinkedMap, LRUCache, Touch } from './linkedMap'; +import { Disposable } from './disposable'; +import { Event, Emitter } from './events'; +import { AbstractCancellationTokenSource, CancellationTokenSource, CancellationToken } from './cancellation'; +import { SharedArraySenderStrategy, SharedArrayReceiverStrategy } from './sharedArrayCancellation'; +import { MessageReader, AbstractMessageReader, ReadableStreamMessageReader, DataCallback, MessageReaderOptions, PartialMessageInfo } from './messageReader'; +import { MessageWriter, AbstractMessageWriter, WriteableStreamMessageWriter, MessageWriterOptions } from './messageWriter'; +import { AbstractMessageBuffer } from './messageBuffer'; +import { ContentTypeEncoderOptions, ContentEncoder, ContentTypeEncoder, ContentTypeDecoderOptions, ContentDecoder, ContentTypeDecoder } from './encoding'; +import { Logger, ConnectionStrategy, ConnectionOptions, MessageConnection, NullLogger, createMessageConnection, ProgressToken, ProgressType, HandlerResult, StarRequestHandler, GenericRequestHandler, RequestHandler0, RequestHandler, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, StarNotificationHandler, GenericNotificationHandler, NotificationHandler0, NotificationHandler, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, Trace, TraceValue, TraceFormat, TraceOptions, SetTraceParams, SetTraceNotification, LogTraceParams, LogTraceNotification, Tracer, ConnectionErrors, ConnectionError, CancellationId, CancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy, MessageStrategy, TraceValues } from './connection'; +import RAL from './ral'; +export { RAL, Message, MessageSignature, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseError, ErrorCodes, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, ResponseMessage, ParameterStructures, _EM, LinkedMap, Touch, LRUCache, Disposable, Event, Emitter, AbstractCancellationTokenSource, CancellationTokenSource, CancellationToken, SharedArraySenderStrategy, SharedArrayReceiverStrategy, MessageReader, AbstractMessageReader, ReadableStreamMessageReader, DataCallback, MessageReaderOptions, PartialMessageInfo, MessageWriter, AbstractMessageWriter, WriteableStreamMessageWriter, MessageWriterOptions, AbstractMessageBuffer, ContentTypeEncoderOptions, ContentEncoder, ContentTypeEncoder, ContentTypeDecoderOptions, ContentDecoder, ContentTypeDecoder, Logger, ConnectionStrategy, ConnectionOptions, MessageConnection, NullLogger, createMessageConnection, ProgressToken, ProgressType, HandlerResult, StarRequestHandler, GenericRequestHandler, RequestHandler0, RequestHandler, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, StarNotificationHandler, GenericNotificationHandler, NotificationHandler0, NotificationHandler, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, Trace, TraceValue, TraceValues, TraceFormat, TraceOptions, SetTraceParams, SetTraceNotification, LogTraceParams, LogTraceNotification, Tracer, ConnectionErrors, ConnectionError, CancellationId, CancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy, MessageStrategy }; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/api.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/api.js" index db20f5a9098e2c32001954e51a19923be359ccdc..976573f6ccf29a58f6f5e2ecc1b821723b707078 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/api.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/api.js" @@ -1,3 +1,82 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c142c5e45d2a62092c2db2aab7c1ac1f805dca8036e2f1d1b05e9284494bf894 -size 10754 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +/// +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProgressType = exports.ProgressToken = exports.createMessageConnection = exports.NullLogger = exports.ConnectionOptions = exports.ConnectionStrategy = exports.AbstractMessageBuffer = exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = exports.SharedArrayReceiverStrategy = exports.SharedArraySenderStrategy = exports.CancellationToken = exports.CancellationTokenSource = exports.Emitter = exports.Event = exports.Disposable = exports.LRUCache = exports.Touch = exports.LinkedMap = exports.ParameterStructures = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.ErrorCodes = exports.ResponseError = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType0 = exports.RequestType = exports.Message = exports.RAL = void 0; +exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.TraceValue = exports.Trace = void 0; +const messages_1 = require("./messages"); +Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return messages_1.Message; } }); +Object.defineProperty(exports, "RequestType", { enumerable: true, get: function () { return messages_1.RequestType; } }); +Object.defineProperty(exports, "RequestType0", { enumerable: true, get: function () { return messages_1.RequestType0; } }); +Object.defineProperty(exports, "RequestType1", { enumerable: true, get: function () { return messages_1.RequestType1; } }); +Object.defineProperty(exports, "RequestType2", { enumerable: true, get: function () { return messages_1.RequestType2; } }); +Object.defineProperty(exports, "RequestType3", { enumerable: true, get: function () { return messages_1.RequestType3; } }); +Object.defineProperty(exports, "RequestType4", { enumerable: true, get: function () { return messages_1.RequestType4; } }); +Object.defineProperty(exports, "RequestType5", { enumerable: true, get: function () { return messages_1.RequestType5; } }); +Object.defineProperty(exports, "RequestType6", { enumerable: true, get: function () { return messages_1.RequestType6; } }); +Object.defineProperty(exports, "RequestType7", { enumerable: true, get: function () { return messages_1.RequestType7; } }); +Object.defineProperty(exports, "RequestType8", { enumerable: true, get: function () { return messages_1.RequestType8; } }); +Object.defineProperty(exports, "RequestType9", { enumerable: true, get: function () { return messages_1.RequestType9; } }); +Object.defineProperty(exports, "ResponseError", { enumerable: true, get: function () { return messages_1.ResponseError; } }); +Object.defineProperty(exports, "ErrorCodes", { enumerable: true, get: function () { return messages_1.ErrorCodes; } }); +Object.defineProperty(exports, "NotificationType", { enumerable: true, get: function () { return messages_1.NotificationType; } }); +Object.defineProperty(exports, "NotificationType0", { enumerable: true, get: function () { return messages_1.NotificationType0; } }); +Object.defineProperty(exports, "NotificationType1", { enumerable: true, get: function () { return messages_1.NotificationType1; } }); +Object.defineProperty(exports, "NotificationType2", { enumerable: true, get: function () { return messages_1.NotificationType2; } }); +Object.defineProperty(exports, "NotificationType3", { enumerable: true, get: function () { return messages_1.NotificationType3; } }); +Object.defineProperty(exports, "NotificationType4", { enumerable: true, get: function () { return messages_1.NotificationType4; } }); +Object.defineProperty(exports, "NotificationType5", { enumerable: true, get: function () { return messages_1.NotificationType5; } }); +Object.defineProperty(exports, "NotificationType6", { enumerable: true, get: function () { return messages_1.NotificationType6; } }); +Object.defineProperty(exports, "NotificationType7", { enumerable: true, get: function () { return messages_1.NotificationType7; } }); +Object.defineProperty(exports, "NotificationType8", { enumerable: true, get: function () { return messages_1.NotificationType8; } }); +Object.defineProperty(exports, "NotificationType9", { enumerable: true, get: function () { return messages_1.NotificationType9; } }); +Object.defineProperty(exports, "ParameterStructures", { enumerable: true, get: function () { return messages_1.ParameterStructures; } }); +const linkedMap_1 = require("./linkedMap"); +Object.defineProperty(exports, "LinkedMap", { enumerable: true, get: function () { return linkedMap_1.LinkedMap; } }); +Object.defineProperty(exports, "LRUCache", { enumerable: true, get: function () { return linkedMap_1.LRUCache; } }); +Object.defineProperty(exports, "Touch", { enumerable: true, get: function () { return linkedMap_1.Touch; } }); +const disposable_1 = require("./disposable"); +Object.defineProperty(exports, "Disposable", { enumerable: true, get: function () { return disposable_1.Disposable; } }); +const events_1 = require("./events"); +Object.defineProperty(exports, "Event", { enumerable: true, get: function () { return events_1.Event; } }); +Object.defineProperty(exports, "Emitter", { enumerable: true, get: function () { return events_1.Emitter; } }); +const cancellation_1 = require("./cancellation"); +Object.defineProperty(exports, "CancellationTokenSource", { enumerable: true, get: function () { return cancellation_1.CancellationTokenSource; } }); +Object.defineProperty(exports, "CancellationToken", { enumerable: true, get: function () { return cancellation_1.CancellationToken; } }); +const sharedArrayCancellation_1 = require("./sharedArrayCancellation"); +Object.defineProperty(exports, "SharedArraySenderStrategy", { enumerable: true, get: function () { return sharedArrayCancellation_1.SharedArraySenderStrategy; } }); +Object.defineProperty(exports, "SharedArrayReceiverStrategy", { enumerable: true, get: function () { return sharedArrayCancellation_1.SharedArrayReceiverStrategy; } }); +const messageReader_1 = require("./messageReader"); +Object.defineProperty(exports, "MessageReader", { enumerable: true, get: function () { return messageReader_1.MessageReader; } }); +Object.defineProperty(exports, "AbstractMessageReader", { enumerable: true, get: function () { return messageReader_1.AbstractMessageReader; } }); +Object.defineProperty(exports, "ReadableStreamMessageReader", { enumerable: true, get: function () { return messageReader_1.ReadableStreamMessageReader; } }); +const messageWriter_1 = require("./messageWriter"); +Object.defineProperty(exports, "MessageWriter", { enumerable: true, get: function () { return messageWriter_1.MessageWriter; } }); +Object.defineProperty(exports, "AbstractMessageWriter", { enumerable: true, get: function () { return messageWriter_1.AbstractMessageWriter; } }); +Object.defineProperty(exports, "WriteableStreamMessageWriter", { enumerable: true, get: function () { return messageWriter_1.WriteableStreamMessageWriter; } }); +const messageBuffer_1 = require("./messageBuffer"); +Object.defineProperty(exports, "AbstractMessageBuffer", { enumerable: true, get: function () { return messageBuffer_1.AbstractMessageBuffer; } }); +const connection_1 = require("./connection"); +Object.defineProperty(exports, "ConnectionStrategy", { enumerable: true, get: function () { return connection_1.ConnectionStrategy; } }); +Object.defineProperty(exports, "ConnectionOptions", { enumerable: true, get: function () { return connection_1.ConnectionOptions; } }); +Object.defineProperty(exports, "NullLogger", { enumerable: true, get: function () { return connection_1.NullLogger; } }); +Object.defineProperty(exports, "createMessageConnection", { enumerable: true, get: function () { return connection_1.createMessageConnection; } }); +Object.defineProperty(exports, "ProgressToken", { enumerable: true, get: function () { return connection_1.ProgressToken; } }); +Object.defineProperty(exports, "ProgressType", { enumerable: true, get: function () { return connection_1.ProgressType; } }); +Object.defineProperty(exports, "Trace", { enumerable: true, get: function () { return connection_1.Trace; } }); +Object.defineProperty(exports, "TraceValue", { enumerable: true, get: function () { return connection_1.TraceValue; } }); +Object.defineProperty(exports, "TraceFormat", { enumerable: true, get: function () { return connection_1.TraceFormat; } }); +Object.defineProperty(exports, "SetTraceNotification", { enumerable: true, get: function () { return connection_1.SetTraceNotification; } }); +Object.defineProperty(exports, "LogTraceNotification", { enumerable: true, get: function () { return connection_1.LogTraceNotification; } }); +Object.defineProperty(exports, "ConnectionErrors", { enumerable: true, get: function () { return connection_1.ConnectionErrors; } }); +Object.defineProperty(exports, "ConnectionError", { enumerable: true, get: function () { return connection_1.ConnectionError; } }); +Object.defineProperty(exports, "CancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.CancellationReceiverStrategy; } }); +Object.defineProperty(exports, "CancellationSenderStrategy", { enumerable: true, get: function () { return connection_1.CancellationSenderStrategy; } }); +Object.defineProperty(exports, "CancellationStrategy", { enumerable: true, get: function () { return connection_1.CancellationStrategy; } }); +Object.defineProperty(exports, "MessageStrategy", { enumerable: true, get: function () { return connection_1.MessageStrategy; } }); +Object.defineProperty(exports, "TraceValues", { enumerable: true, get: function () { return connection_1.TraceValues; } }); +const ral_1 = require("./ral"); +exports.RAL = ral_1.default; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts" index d3ad20ff1e6a0619dff0e4588f595f59c3564bb6..4028512ef3535af306f10dc79f6187faf4ced360 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts" @@ -1,3 +1,32 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:392dd7b1117b588cba36c04909efd24b0458980506e8e8c1966114f8989058e2 -size 1030 +import { Event } from './events'; +import { Disposable } from './disposable'; +/** + * Defines a CancellationToken. This interface is not + * intended to be implemented. A CancellationToken must + * be created via a CancellationTokenSource. + */ +export interface CancellationToken { + /** + * Is `true` when the token has been cancelled, `false` otherwise. + */ + readonly isCancellationRequested: boolean; + /** + * An {@link Event event} which fires upon cancellation. + */ + readonly onCancellationRequested: Event; +} +export declare namespace CancellationToken { + const None: CancellationToken; + const Cancelled: CancellationToken; + function is(value: any): value is CancellationToken; +} +export interface AbstractCancellationTokenSource extends Disposable { + token: CancellationToken; + cancel(): void; +} +export declare class CancellationTokenSource implements AbstractCancellationTokenSource { + private _token; + get token(): CancellationToken; + cancel(): void; + dispose(): void; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/cancellation.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/cancellation.js" index db58dc7bbaad2bbee72743e74cdda6d3d1927ec7..43a95808cbee4cd9d452cf5c018a7c62bbf7ac2a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/cancellation.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/cancellation.js" @@ -1,3 +1,96 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bddf9e8f3bf2db7907d3c2551a690328cc6f978b1342432105dcbd072080e935 -size 3288 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CancellationTokenSource = exports.CancellationToken = void 0; +const ral_1 = require("./ral"); +const Is = require("./is"); +const events_1 = require("./events"); +var CancellationToken; +(function (CancellationToken) { + CancellationToken.None = Object.freeze({ + isCancellationRequested: false, + onCancellationRequested: events_1.Event.None + }); + CancellationToken.Cancelled = Object.freeze({ + isCancellationRequested: true, + onCancellationRequested: events_1.Event.None + }); + function is(value) { + const candidate = value; + return candidate && (candidate === CancellationToken.None + || candidate === CancellationToken.Cancelled + || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested)); + } + CancellationToken.is = is; +})(CancellationToken || (exports.CancellationToken = CancellationToken = {})); +const shortcutEvent = Object.freeze(function (callback, context) { + const handle = (0, ral_1.default)().timer.setTimeout(callback.bind(context), 0); + return { dispose() { handle.dispose(); } }; +}); +class MutableToken { + constructor() { + this._isCancelled = false; + } + cancel() { + if (!this._isCancelled) { + this._isCancelled = true; + if (this._emitter) { + this._emitter.fire(undefined); + this.dispose(); + } + } + } + get isCancellationRequested() { + return this._isCancelled; + } + get onCancellationRequested() { + if (this._isCancelled) { + return shortcutEvent; + } + if (!this._emitter) { + this._emitter = new events_1.Emitter(); + } + return this._emitter.event; + } + dispose() { + if (this._emitter) { + this._emitter.dispose(); + this._emitter = undefined; + } + } +} +class CancellationTokenSource { + get token() { + if (!this._token) { + // be lazy and create the token only when + // actually needed + this._token = new MutableToken(); + } + return this._token; + } + cancel() { + if (!this._token) { + // save an object by returning the default + // cancelled token when cancellation happens + // before someone asks for the token + this._token = CancellationToken.Cancelled; + } + else { + this._token.cancel(); + } + } + dispose() { + if (!this._token) { + // ensure to initialize with an empty token if we had none + this._token = CancellationToken.None; + } + else if (this._token instanceof MutableToken) { + // actually dispose + this._token.dispose(); + } + } +} +exports.CancellationTokenSource = CancellationTokenSource; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/connection.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/connection.d.ts" index 47d1f9da8d5bc6ccfe531cd4faee022c6cfd2db2..f7cbeda7fe204fa44aa42ac35731b9ae275f1a3a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/connection.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/connection.d.ts" @@ -1,3 +1,365 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d9c2b7ccd24031cb91d67e7f046c66f2cdfa7caf512ccbb365654fb7eb7ae05e -size 18312 +import { Message, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseMessage, ResponseError, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, _EM, ParameterStructures } from './messages'; +import type { Disposable } from './disposable'; +import { Event } from './events'; +import { CancellationToken, AbstractCancellationTokenSource } from './cancellation'; +import { MessageReader } from './messageReader'; +import { MessageWriter } from './messageWriter'; +export type ProgressToken = number | string; +export declare namespace ProgressToken { + function is(value: any): value is number | string; +} +interface ProgressParams { + /** + * The progress token provided by the client or server. + */ + token: ProgressToken; + /** + * The progress data. + */ + value: T; +} +export declare class ProgressType { + /** + * Clients must not use these properties. They are here to ensure correct typing. + * in TypeScript + */ + readonly __: [PR, _EM] | undefined; + readonly _pr: PR | undefined; + constructor(); +} +export type HandlerResult = R | ResponseError | Thenable | Thenable> | Thenable>; +export interface StarRequestHandler { + (method: string, params: any[] | object | undefined, token: CancellationToken): HandlerResult; +} +export interface GenericRequestHandler { + (...params: any[]): HandlerResult; +} +export interface RequestHandler0 { + (token: CancellationToken): HandlerResult; +} +export interface RequestHandler { + (params: P, token: CancellationToken): HandlerResult; +} +export interface RequestHandler1 { + (p1: P1, token: CancellationToken): HandlerResult; +} +export interface RequestHandler2 { + (p1: P1, p2: P2, token: CancellationToken): HandlerResult; +} +export interface RequestHandler3 { + (p1: P1, p2: P2, p3: P3, token: CancellationToken): HandlerResult; +} +export interface RequestHandler4 { + (p1: P1, p2: P2, p3: P3, p4: P4, token: CancellationToken): HandlerResult; +} +export interface RequestHandler5 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, token: CancellationToken): HandlerResult; +} +export interface RequestHandler6 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, token: CancellationToken): HandlerResult; +} +export interface RequestHandler7 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, token: CancellationToken): HandlerResult; +} +export interface RequestHandler8 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, token: CancellationToken): HandlerResult; +} +export interface RequestHandler9 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, token: CancellationToken): HandlerResult; +} +export type NotificationResult = void | Promise; +export interface StarNotificationHandler { + (method: string, params: any[] | object | undefined): NotificationResult; +} +export interface GenericNotificationHandler { + (...params: any[]): NotificationResult; +} +export interface NotificationHandler0 { + (): NotificationResult; +} +export interface NotificationHandler

{ + (params: P): NotificationResult; +} +export interface NotificationHandler1 { + (p1: P1): NotificationResult; +} +export interface NotificationHandler2 { + (p1: P1, p2: P2): NotificationResult; +} +export interface NotificationHandler3 { + (p1: P1, p2: P2, p3: P3): NotificationResult; +} +export interface NotificationHandler4 { + (p1: P1, p2: P2, p3: P3, p4: P4): NotificationResult; +} +export interface NotificationHandler5 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5): NotificationResult; +} +export interface NotificationHandler6 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6): NotificationResult; +} +export interface NotificationHandler7 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7): NotificationResult; +} +export interface NotificationHandler8 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8): NotificationResult; +} +export interface NotificationHandler9 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9): NotificationResult; +} +export interface Logger { + error(message: string): void; + warn(message: string): void; + info(message: string): void; + log(message: string): void; +} +export declare const NullLogger: Logger; +export declare enum Trace { + Off = 0, + Messages = 1, + Compact = 2, + Verbose = 3 +} +export declare namespace TraceValue { + /** + * Turn tracing off. + */ + const Off: 'off'; + /** + * Trace messages only. + */ + const Messages: 'messages'; + /** + * Compact message tracing. + */ + const Compact: 'compact'; + /** + * Verbose message tracing. + */ + const Verbose: 'verbose'; +} +export type TraceValue = 'off' | 'messages' | 'compact' | 'verbose'; +/** + * @deprecated Use TraceValue instead + */ +export declare const TraceValues: typeof TraceValue; +export type TraceValues = TraceValue; +export declare namespace Trace { + function fromString(value: string): Trace; + function toString(value: Trace): TraceValue; +} +export declare enum TraceFormat { + Text = "text", + JSON = "json" +} +export declare namespace TraceFormat { + function fromString(value: string): TraceFormat; +} +export interface TraceOptions { + sendNotification?: boolean; + traceFormat?: TraceFormat; +} +export interface SetTraceParams { + value: TraceValue; +} +export declare namespace SetTraceNotification { + const type: NotificationType; +} +export interface LogTraceParams { + message: string; + verbose?: string; +} +export declare namespace LogTraceNotification { + const type: NotificationType; +} +export interface Tracer { + log(dataObject: any): void; + log(message: string, data?: string): void; +} +export declare enum ConnectionErrors { + /** + * The connection is closed. + */ + Closed = 1, + /** + * The connection got disposed. + */ + Disposed = 2, + /** + * The connection is already in listening mode. + */ + AlreadyListening = 3 +} +export declare class ConnectionError extends Error { + readonly code: ConnectionErrors; + constructor(code: ConnectionErrors, message: string); +} +export type ConnectionStrategy = { + cancelUndispatched?: (message: Message, next: (message: Message) => ResponseMessage | undefined) => ResponseMessage | undefined; +}; +export declare namespace ConnectionStrategy { + function is(value: any): value is ConnectionStrategy; +} +export type CancellationId = number | string; +export interface IdCancellationReceiverStrategy { + kind?: 'id'; + /** + * Creates a CancellationTokenSource from a cancellation id. + * + * @param id The cancellation id. + */ + createCancellationTokenSource(id: CancellationId): AbstractCancellationTokenSource; + /** + * An optional method to dispose the strategy. + */ + dispose?(): void; +} +export declare namespace IdCancellationReceiverStrategy { + function is(value: any): value is IdCancellationReceiverStrategy; +} +export interface RequestCancellationReceiverStrategy { + kind: 'request'; + /** + * Create a cancellation token source from a given request message. + * + * @param requestMessage The request message. + */ + createCancellationTokenSource(requestMessage: RequestMessage): AbstractCancellationTokenSource; + /** + * An optional method to dispose the strategy. + */ + dispose?(): void; +} +export declare namespace RequestCancellationReceiverStrategy { + function is(value: any): value is RequestCancellationReceiverStrategy; +} +export type CancellationReceiverStrategy = IdCancellationReceiverStrategy | RequestCancellationReceiverStrategy; +export declare namespace CancellationReceiverStrategy { + const Message: CancellationReceiverStrategy; + function is(value: any): value is CancellationReceiverStrategy; +} +export interface CancellationSenderStrategy { + /** + * Hook to enable cancellation for the given request. + * + * @param request The request to enable cancellation for. + */ + enableCancellation?(request: RequestMessage): void; + /** + * Send cancellation for the given cancellation id + * + * @param conn The connection used. + * @param id The cancellation id. + */ + sendCancellation(conn: MessageConnection, id: CancellationId): Promise; + /** + * Cleanup any cancellation state for the given cancellation id. After this + * method has been call no cancellation will be sent anymore for the given id. + * + * @param id The cancellation id. + */ + cleanup(id: CancellationId): void; + /** + * An optional method to dispose the strategy. + */ + dispose?(): void; +} +export declare namespace CancellationSenderStrategy { + const Message: CancellationSenderStrategy; + function is(value: any): value is CancellationSenderStrategy; +} +export interface CancellationStrategy { + receiver: CancellationReceiverStrategy | RequestCancellationReceiverStrategy; + sender: CancellationSenderStrategy; +} +export declare namespace CancellationStrategy { + const Message: CancellationStrategy; + function is(value: any): value is CancellationStrategy; +} +export interface MessageStrategy { + handleMessage(message: Message, next: (message: Message) => NotificationResult): NotificationResult; +} +export declare namespace MessageStrategy { + function is(value: any): value is MessageStrategy; +} +/** + * Connection options. A valid connection option must have at least a + * `CancellationStrategy` or a `MessageStrategy` or a `ConnectionStrategy`. + */ +export interface ConnectionOptions { + cancellationStrategy?: CancellationStrategy; + connectionStrategy?: ConnectionStrategy; + messageStrategy?: MessageStrategy; + maxParallelism?: number; +} +export declare namespace ConnectionOptions { + function is(value: any): value is ConnectionOptions; +} +export interface MessageConnection { + sendRequest(type: RequestType0, token?: CancellationToken): Promise; + sendRequest(type: RequestType, params: P, token?: CancellationToken): Promise; + sendRequest(type: RequestType1, p1: P1, token?: CancellationToken): Promise; + sendRequest(type: RequestType2, p1: P1, p2: P2, token?: CancellationToken): Promise; + sendRequest(type: RequestType3, p1: P1, p2: P2, p3: P3, token?: CancellationToken): Promise; + sendRequest(type: RequestType4, p1: P1, p2: P2, p3: P3, p4: P4, token?: CancellationToken): Promise; + sendRequest(type: RequestType5, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, token?: CancellationToken): Promise; + sendRequest(type: RequestType6, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, token?: CancellationToken): Promise; + sendRequest(type: RequestType7, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, token?: CancellationToken): Promise; + sendRequest(type: RequestType8, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, token?: CancellationToken): Promise; + sendRequest(type: RequestType9, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, token?: CancellationToken): Promise; + sendRequest(method: string, r0?: ParameterStructures | any, ...rest: any[]): Promise; + onRequest(type: RequestType0, handler: RequestHandler0): Disposable; + onRequest(type: RequestType, handler: RequestHandler): Disposable; + onRequest(type: RequestType1, handler: RequestHandler1): Disposable; + onRequest(type: RequestType2, handler: RequestHandler2): Disposable; + onRequest(type: RequestType3, handler: RequestHandler3): Disposable; + onRequest(type: RequestType4, handler: RequestHandler4): Disposable; + onRequest(type: RequestType5, handler: RequestHandler5): Disposable; + onRequest(type: RequestType6, handler: RequestHandler6): Disposable; + onRequest(type: RequestType7, handler: RequestHandler7): Disposable; + onRequest(type: RequestType8, handler: RequestHandler8): Disposable; + onRequest(type: RequestType9, handler: RequestHandler9): Disposable; + onRequest(method: string, handler: GenericRequestHandler): Disposable; + onRequest(handler: StarRequestHandler): Disposable; + hasPendingResponse(): boolean; + sendNotification(type: NotificationType0): Promise; + sendNotification

(type: NotificationType

, params?: P): Promise; + sendNotification(type: NotificationType1, p1: P1): Promise; + sendNotification(type: NotificationType2, p1: P1, p2: P2): Promise; + sendNotification(type: NotificationType3, p1: P1, p2: P2, p3: P3): Promise; + sendNotification(type: NotificationType4, p1: P1, p2: P2, p3: P3, p4: P4): Promise; + sendNotification(type: NotificationType5, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5): Promise; + sendNotification(type: NotificationType6, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6): Promise; + sendNotification(type: NotificationType7, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7): Promise; + sendNotification(type: NotificationType8, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8): Promise; + sendNotification(type: NotificationType9, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9): Promise; + sendNotification(method: string, r0?: ParameterStructures | any, ...rest: any[]): Promise; + onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable; + onNotification

(type: NotificationType

, handler: NotificationHandler

): Disposable; + onNotification(type: NotificationType1, handler: NotificationHandler1): Disposable; + onNotification(type: NotificationType2, handler: NotificationHandler2): Disposable; + onNotification(type: NotificationType3, handler: NotificationHandler3): Disposable; + onNotification(type: NotificationType4, handler: NotificationHandler4): Disposable; + onNotification(type: NotificationType5, handler: NotificationHandler5): Disposable; + onNotification(type: NotificationType6, handler: NotificationHandler6): Disposable; + onNotification(type: NotificationType7, handler: NotificationHandler7): Disposable; + onNotification(type: NotificationType8, handler: NotificationHandler8): Disposable; + onNotification(type: NotificationType9, handler: NotificationHandler9): Disposable; + onNotification(method: string, handler: GenericNotificationHandler): Disposable; + onNotification(handler: StarNotificationHandler): Disposable; + onUnhandledNotification: Event; + onProgress

(type: ProgressType

, token: string | number, handler: NotificationHandler

): Disposable; + sendProgress

(type: ProgressType

, token: string | number, value: P): Promise; + onUnhandledProgress: Event>; + trace(value: Trace, tracer: Tracer, sendNotification?: boolean): Promise; + trace(value: Trace, tracer: Tracer, traceOptions?: TraceOptions): Promise; + onError: Event<[Error, Message | undefined, number | undefined]>; + onClose: Event; + listen(): void; + end(): void; + onDispose: Event; + dispose(): void; + inspect(): void; +} +export declare function createMessageConnection(messageReader: MessageReader, messageWriter: MessageWriter, _logger?: Logger, options?: ConnectionOptions): MessageConnection; +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/connection.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/connection.js" index 63ab2c31c25ac5a9747d3c96dfeecd19e34edf12..205033630d0b735bc16ccdb87f4f31f90d81c2e1 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/connection.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/connection.js" @@ -1,3 +1,1220 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1725210c7c2aba1d9ac0d094be8e93a3635ba4c26bfc4ea10624f38717177394 -size 50857 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createMessageConnection = exports.ConnectionOptions = exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.RequestCancellationReceiverStrategy = exports.IdCancellationReceiverStrategy = exports.ConnectionStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.TraceValue = exports.Trace = exports.NullLogger = exports.ProgressType = exports.ProgressToken = void 0; +const ral_1 = require("./ral"); +const Is = require("./is"); +const messages_1 = require("./messages"); +const linkedMap_1 = require("./linkedMap"); +const events_1 = require("./events"); +const cancellation_1 = require("./cancellation"); +var CancelNotification; +(function (CancelNotification) { + CancelNotification.type = new messages_1.NotificationType('$/cancelRequest'); +})(CancelNotification || (CancelNotification = {})); +var ProgressToken; +(function (ProgressToken) { + function is(value) { + return typeof value === 'string' || typeof value === 'number'; + } + ProgressToken.is = is; +})(ProgressToken || (exports.ProgressToken = ProgressToken = {})); +var ProgressNotification; +(function (ProgressNotification) { + ProgressNotification.type = new messages_1.NotificationType('$/progress'); +})(ProgressNotification || (ProgressNotification = {})); +class ProgressType { + constructor() { + } +} +exports.ProgressType = ProgressType; +var StarRequestHandler; +(function (StarRequestHandler) { + function is(value) { + return Is.func(value); + } + StarRequestHandler.is = is; +})(StarRequestHandler || (StarRequestHandler = {})); +exports.NullLogger = Object.freeze({ + error: () => { }, + warn: () => { }, + info: () => { }, + log: () => { } +}); +var Trace; +(function (Trace) { + Trace[Trace["Off"] = 0] = "Off"; + Trace[Trace["Messages"] = 1] = "Messages"; + Trace[Trace["Compact"] = 2] = "Compact"; + Trace[Trace["Verbose"] = 3] = "Verbose"; +})(Trace || (exports.Trace = Trace = {})); +var TraceValue; +(function (TraceValue) { + /** + * Turn tracing off. + */ + TraceValue.Off = 'off'; + /** + * Trace messages only. + */ + TraceValue.Messages = 'messages'; + /** + * Compact message tracing. + */ + TraceValue.Compact = 'compact'; + /** + * Verbose message tracing. + */ + TraceValue.Verbose = 'verbose'; +})(TraceValue || (exports.TraceValue = TraceValue = {})); +/** + * @deprecated Use TraceValue instead + */ +exports.TraceValues = TraceValue; +(function (Trace) { + function fromString(value) { + if (!Is.string(value)) { + return Trace.Off; + } + value = value.toLowerCase(); + switch (value) { + case 'off': + return Trace.Off; + case 'messages': + return Trace.Messages; + case 'compact': + return Trace.Compact; + case 'verbose': + return Trace.Verbose; + default: + return Trace.Off; + } + } + Trace.fromString = fromString; + function toString(value) { + switch (value) { + case Trace.Off: + return 'off'; + case Trace.Messages: + return 'messages'; + case Trace.Compact: + return 'compact'; + case Trace.Verbose: + return 'verbose'; + default: + return 'off'; + } + } + Trace.toString = toString; +})(Trace || (exports.Trace = Trace = {})); +var TraceFormat; +(function (TraceFormat) { + TraceFormat["Text"] = "text"; + TraceFormat["JSON"] = "json"; +})(TraceFormat || (exports.TraceFormat = TraceFormat = {})); +(function (TraceFormat) { + function fromString(value) { + if (!Is.string(value)) { + return TraceFormat.Text; + } + value = value.toLowerCase(); + if (value === 'json') { + return TraceFormat.JSON; + } + else { + return TraceFormat.Text; + } + } + TraceFormat.fromString = fromString; +})(TraceFormat || (exports.TraceFormat = TraceFormat = {})); +var SetTraceNotification; +(function (SetTraceNotification) { + SetTraceNotification.type = new messages_1.NotificationType('$/setTrace'); +})(SetTraceNotification || (exports.SetTraceNotification = SetTraceNotification = {})); +var LogTraceNotification; +(function (LogTraceNotification) { + LogTraceNotification.type = new messages_1.NotificationType('$/logTrace'); +})(LogTraceNotification || (exports.LogTraceNotification = LogTraceNotification = {})); +var ConnectionErrors; +(function (ConnectionErrors) { + /** + * The connection is closed. + */ + ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed"; + /** + * The connection got disposed. + */ + ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed"; + /** + * The connection is already in listening mode. + */ + ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening"; +})(ConnectionErrors || (exports.ConnectionErrors = ConnectionErrors = {})); +class ConnectionError extends Error { + constructor(code, message) { + super(message); + this.code = code; + Object.setPrototypeOf(this, ConnectionError.prototype); + } +} +exports.ConnectionError = ConnectionError; +var ConnectionStrategy; +(function (ConnectionStrategy) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.cancelUndispatched); + } + ConnectionStrategy.is = is; +})(ConnectionStrategy || (exports.ConnectionStrategy = ConnectionStrategy = {})); +var IdCancellationReceiverStrategy; +(function (IdCancellationReceiverStrategy) { + function is(value) { + const candidate = value; + return candidate && (candidate.kind === undefined || candidate.kind === 'id') && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === undefined || Is.func(candidate.dispose)); + } + IdCancellationReceiverStrategy.is = is; +})(IdCancellationReceiverStrategy || (exports.IdCancellationReceiverStrategy = IdCancellationReceiverStrategy = {})); +var RequestCancellationReceiverStrategy; +(function (RequestCancellationReceiverStrategy) { + function is(value) { + const candidate = value; + return candidate && candidate.kind === 'request' && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === undefined || Is.func(candidate.dispose)); + } + RequestCancellationReceiverStrategy.is = is; +})(RequestCancellationReceiverStrategy || (exports.RequestCancellationReceiverStrategy = RequestCancellationReceiverStrategy = {})); +var CancellationReceiverStrategy; +(function (CancellationReceiverStrategy) { + CancellationReceiverStrategy.Message = Object.freeze({ + createCancellationTokenSource(_) { + return new cancellation_1.CancellationTokenSource(); + } + }); + function is(value) { + return IdCancellationReceiverStrategy.is(value) || RequestCancellationReceiverStrategy.is(value); + } + CancellationReceiverStrategy.is = is; +})(CancellationReceiverStrategy || (exports.CancellationReceiverStrategy = CancellationReceiverStrategy = {})); +var CancellationSenderStrategy; +(function (CancellationSenderStrategy) { + CancellationSenderStrategy.Message = Object.freeze({ + sendCancellation(conn, id) { + return conn.sendNotification(CancelNotification.type, { id }); + }, + cleanup(_) { } + }); + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup); + } + CancellationSenderStrategy.is = is; +})(CancellationSenderStrategy || (exports.CancellationSenderStrategy = CancellationSenderStrategy = {})); +var CancellationStrategy; +(function (CancellationStrategy) { + CancellationStrategy.Message = Object.freeze({ + receiver: CancellationReceiverStrategy.Message, + sender: CancellationSenderStrategy.Message + }); + function is(value) { + const candidate = value; + return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender); + } + CancellationStrategy.is = is; +})(CancellationStrategy || (exports.CancellationStrategy = CancellationStrategy = {})); +var MessageStrategy; +(function (MessageStrategy) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.handleMessage); + } + MessageStrategy.is = is; +})(MessageStrategy || (exports.MessageStrategy = MessageStrategy = {})); +var ConnectionOptions; +(function (ConnectionOptions) { + function is(value) { + const candidate = value; + return candidate + && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy) || MessageStrategy.is(candidate.messageStrategy) || Is.number(candidate.maxParallelism)); + } + ConnectionOptions.is = is; +})(ConnectionOptions || (exports.ConnectionOptions = ConnectionOptions = {})); +var ConnectionState; +(function (ConnectionState) { + ConnectionState[ConnectionState["New"] = 1] = "New"; + ConnectionState[ConnectionState["Listening"] = 2] = "Listening"; + ConnectionState[ConnectionState["Closed"] = 3] = "Closed"; + ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed"; +})(ConnectionState || (ConnectionState = {})); +function createMessageConnection(messageReader, messageWriter, _logger, options) { + const logger = _logger !== undefined ? _logger : exports.NullLogger; + let sequenceNumber = 0; + let notificationSequenceNumber = 0; + let unknownResponseSequenceNumber = 0; + const version = '2.0'; + const maxParallelism = options?.maxParallelism ?? -1; + let inFlight = 0; + let starRequestHandler = undefined; + const requestHandlers = new Map(); + let starNotificationHandler = undefined; + const notificationHandlers = new Map(); + const progressHandlers = new Map(); + let timer; + let messageQueue = new linkedMap_1.LinkedMap(); + let responsePromises = new Map(); + let knownCanceledRequests = new Set(); + let requestTokens = new Map(); + let trace = Trace.Off; + let traceFormat = TraceFormat.Text; + let tracer; + let state = ConnectionState.New; + const errorEmitter = new events_1.Emitter(); + const closeEmitter = new events_1.Emitter(); + const unhandledNotificationEmitter = new events_1.Emitter(); + const unhandledProgressEmitter = new events_1.Emitter(); + const disposeEmitter = new events_1.Emitter(); + const cancellationStrategy = (options && options.cancellationStrategy) ? options.cancellationStrategy : CancellationStrategy.Message; + function cancelUndispatched(_message) { + return undefined; + } + function isListening() { + return state === ConnectionState.Listening; + } + function isClosed() { + return state === ConnectionState.Closed; + } + function isDisposed() { + return state === ConnectionState.Disposed; + } + function closeHandler() { + if (state === ConnectionState.New || state === ConnectionState.Listening) { + state = ConnectionState.Closed; + closeEmitter.fire(undefined); + } + // If the connection is disposed don't sent close events. + } + function readErrorHandler(error) { + errorEmitter.fire([error, undefined, undefined]); + } + function writeErrorHandler(data) { + errorEmitter.fire(data); + } + messageReader.onClose(closeHandler); + messageReader.onError(readErrorHandler); + messageWriter.onClose(closeHandler); + messageWriter.onError(writeErrorHandler); + function createRequestQueueKey(id) { + if (id === null) { + throw new Error(`Can't send requests with id null since the response can't be correlated.`); + } + return 'req-' + id.toString(); + } + function createResponseQueueKey(id) { + if (id === null) { + return 'res-unknown-' + (++unknownResponseSequenceNumber).toString(); + } + else { + return 'res-' + id.toString(); + } + } + function createNotificationQueueKey() { + return 'not-' + (++notificationSequenceNumber).toString(); + } + function addMessageToQueue(queue, message) { + if (messages_1.Message.isRequest(message)) { + queue.set(createRequestQueueKey(message.id), message); + } + else if (messages_1.Message.isResponse(message)) { + // If we have unlimited parallelism we queue the response to keep + // the previous semantics. + if (maxParallelism === -1) { + queue.set(createResponseQueueKey(message.id), message); + } + else { + // If we have limited parallelism we resolve responses to avoid + // dead locks. + handleResponse(message); + } + } + else { + queue.set(createNotificationQueueKey(), message); + } + } + function triggerMessageQueue() { + if (timer || messageQueue.size === 0) { + return; + } + if (maxParallelism !== -1 && inFlight >= maxParallelism) { + return; + } + timer = (0, ral_1.default)().timer.setImmediate(async () => { + timer = undefined; + if (messageQueue.size === 0) { + return; + } + if (maxParallelism !== -1 && inFlight >= maxParallelism) { + return; + } + const message = messageQueue.shift(); + let result; + try { + inFlight++; + const messageStrategy = options?.messageStrategy; + if (MessageStrategy.is(messageStrategy)) { + result = messageStrategy.handleMessage(message, handleMessage); + } + else { + result = handleMessage(message); + } + } + catch (error) { + logger.error(`Processing message queue failed: ${error.toString()}`); + } + finally { + if (result instanceof Promise) { + result.then(() => { + inFlight--; + triggerMessageQueue(); + }).catch((error) => { + logger.error(`Processing message queue failed: ${error.toString()}`); + }); + } + else { + inFlight--; + } + triggerMessageQueue(); + } + }); + } + async function handleMessage(message) { + if (messages_1.Message.isRequest(message)) { + return handleRequest(message); + } + else if (messages_1.Message.isNotification(message)) { + return handleNotification(message); + } + else if (messages_1.Message.isResponse(message)) { + return handleResponse(message); + } + else { + return handleInvalidMessage(message); + } + } + const callback = (message) => { + try { + // We have received a cancellation message. Check if the message is still in the queue + // and cancel it if allowed to do so. + if (messages_1.Message.isNotification(message) && message.method === CancelNotification.type.method) { + const cancelId = message.params.id; + const key = createRequestQueueKey(cancelId); + const toCancel = messageQueue.get(key); + if (messages_1.Message.isRequest(toCancel)) { + const strategy = options?.connectionStrategy; + const response = (strategy && strategy.cancelUndispatched) ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel); + if (response && (response.error !== undefined || response.result !== undefined)) { + messageQueue.delete(key); + requestTokens.delete(cancelId); + response.id = toCancel.id; + traceSendingResponse(response, message.method, Date.now()); + messageWriter.write(response).catch(() => logger.error(`Sending response for canceled message failed.`)); + return; + } + } + const cancellationToken = requestTokens.get(cancelId); + // The request is already running. Cancel the token + if (cancellationToken !== undefined) { + cancellationToken.cancel(); + traceReceivedNotification(message); + return; + } + else { + // Remember the cancel but still queue the message to + // clean up state in process message. + knownCanceledRequests.add(cancelId); + } + } + addMessageToQueue(messageQueue, message); + } + finally { + triggerMessageQueue(); + } + }; + async function handleRequest(requestMessage) { + if (isDisposed()) { + // we return here silently since we fired an event when the + // connection got disposed. + return Promise.resolve(); + } + function reply(resultOrError, method, startTime) { + const message = { + jsonrpc: version, + id: requestMessage.id + }; + if (resultOrError instanceof messages_1.ResponseError) { + message.error = resultOrError.toJson(); + } + else { + message.result = resultOrError === undefined ? null : resultOrError; + } + traceSendingResponse(message, method, startTime); + return messageWriter.write(message); + } + function replyError(error, method, startTime) { + const message = { + jsonrpc: version, + id: requestMessage.id, + error: error.toJson() + }; + traceSendingResponse(message, method, startTime); + return messageWriter.write(message); + } + traceReceivedRequest(requestMessage); + const element = requestHandlers.get(requestMessage.method); + let type; + let requestHandler; + if (element) { + type = element.type; + requestHandler = element.handler; + } + const startTime = Date.now(); + if (requestHandler || starRequestHandler) { + const tokenKey = requestMessage.id ?? String(Date.now()); // + const cancellationSource = IdCancellationReceiverStrategy.is(cancellationStrategy.receiver) + ? cancellationStrategy.receiver.createCancellationTokenSource(tokenKey) + : cancellationStrategy.receiver.createCancellationTokenSource(requestMessage); + if (requestMessage.id !== null && knownCanceledRequests.has(requestMessage.id)) { + cancellationSource.cancel(); + } + if (requestMessage.id !== null) { + requestTokens.set(tokenKey, cancellationSource); + } + try { + let handlerResult; + if (requestHandler) { + if (requestMessage.params === undefined) { + if (type !== undefined && type.numberOfParams !== 0) { + return replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines ${type.numberOfParams} params but received none.`), requestMessage.method, startTime); + } + handlerResult = requestHandler(cancellationSource.token); + } + else if (Array.isArray(requestMessage.params)) { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byName) { + return replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by name but received parameters by position`), requestMessage.method, startTime); + } + handlerResult = requestHandler(...requestMessage.params, cancellationSource.token); + } + else { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) { + return replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by position but received parameters by name`), requestMessage.method, startTime); + } + handlerResult = requestHandler(requestMessage.params, cancellationSource.token); + } + } + else if (starRequestHandler) { + handlerResult = starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token); + } + const resultOrError = await handlerResult; + await reply(resultOrError, requestMessage.method, startTime); + } + catch (error) { + if (error instanceof messages_1.ResponseError) { + await reply(error, requestMessage.method, startTime); + } + else if (error && Is.string(error.message)) { + await replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime); + } + else { + await replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime); + } + } + finally { + requestTokens.delete(tokenKey); + } + } + else { + await replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime); + } + } + function handleResponse(responseMessage) { + if (isDisposed()) { + // See handle request. + return; + } + if (responseMessage.id === null) { + if (responseMessage.error) { + logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`); + } + else { + logger.error(`Received response message without id. No further error information provided.`); + } + } + else { + const key = responseMessage.id; + const responsePromise = responsePromises.get(key); + traceReceivedResponse(responseMessage, responsePromise); + if (responsePromise !== undefined) { + responsePromises.delete(key); + try { + if (responseMessage.error) { + const error = responseMessage.error; + responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data)); + } + else if (responseMessage.result !== undefined) { + responsePromise.resolve(responseMessage.result); + } + else { + throw new Error('Should never happen.'); + } + } + catch (error) { + if (error.message) { + logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`); + } + else { + logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`); + } + } + } + } + } + async function handleNotification(message) { + if (isDisposed()) { + // See handle request. + return; + } + let type = undefined; + let notificationHandler; + if (message.method === CancelNotification.type.method) { + const cancelId = message.params.id; + knownCanceledRequests.delete(cancelId); + traceReceivedNotification(message); + return; + } + else { + const element = notificationHandlers.get(message.method); + if (element) { + notificationHandler = element.handler; + type = element.type; + } + } + if (notificationHandler || starNotificationHandler) { + try { + traceReceivedNotification(message); + if (notificationHandler) { + if (message.params === undefined) { + if (type !== undefined) { + if (type.numberOfParams !== 0 && type.parameterStructures !== messages_1.ParameterStructures.byName) { + logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received none.`); + } + } + await notificationHandler(); + } + else if (Array.isArray(message.params)) { + // There are JSON-RPC libraries that send progress message as positional params although + // specified as named. So convert them if this is the case. + const params = message.params; + if (message.method === ProgressNotification.type.method && params.length === 2 && ProgressToken.is(params[0])) { + await notificationHandler({ token: params[0], value: params[1] }); + } + else { + if (type !== undefined) { + if (type.parameterStructures === messages_1.ParameterStructures.byName) { + logger.error(`Notification ${message.method} defines parameters by name but received parameters by position`); + } + if (type.numberOfParams !== message.params.length) { + logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received ${params.length} arguments`); + } + } + await notificationHandler(...params); + } + } + else { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) { + logger.error(`Notification ${message.method} defines parameters by position but received parameters by name`); + } + await notificationHandler(message.params); + } + } + else if (starNotificationHandler) { + await starNotificationHandler(message.method, message.params); + } + } + catch (error) { + if (error.message) { + logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`); + } + else { + logger.error(`Notification handler '${message.method}' failed unexpectedly.`); + } + } + } + else { + unhandledNotificationEmitter.fire(message); + } + } + function handleInvalidMessage(message) { + if (!message) { + logger.error('Received empty message.'); + return; + } + logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`); + // Test whether we find an id to reject the promise + const responseMessage = message; + if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) { + const key = responseMessage.id; + const responseHandler = responsePromises.get(key); + if (responseHandler) { + responseHandler.reject(new Error('The received response has neither a result nor an error property.')); + } + } + } + function stringifyTrace(params) { + if (params === undefined || params === null) { + return undefined; + } + switch (trace) { + case Trace.Verbose: + return JSON.stringify(params, null, 4); + case Trace.Compact: + return JSON.stringify(params); + default: + return undefined; + } + } + function traceSendingRequest(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) { + data = `Params: ${stringifyTrace(message.params)}\n\n`; + } + tracer.log(`Sending request '${message.method} - (${message.id})'.`, data); + } + else { + logLSPMessage('send-request', message); + } + } + function traceSendingNotification(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.params) { + data = `Params: ${stringifyTrace(message.params)}\n\n`; + } + else { + data = 'No parameters provided.\n\n'; + } + } + tracer.log(`Sending notification '${message.method}'.`, data); + } + else { + logLSPMessage('send-notification', message); + } + } + function traceSendingResponse(message, method, startTime) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.error && message.error.data) { + data = `Error data: ${stringifyTrace(message.error.data)}\n\n`; + } + else { + if (message.result) { + data = `Result: ${stringifyTrace(message.result)}\n\n`; + } + else if (message.error === undefined) { + data = 'No result returned.\n\n'; + } + } + } + tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data); + } + else { + logLSPMessage('send-response', message); + } + } + function traceReceivedRequest(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) { + data = `Params: ${stringifyTrace(message.params)}\n\n`; + } + tracer.log(`Received request '${message.method} - (${message.id})'.`, data); + } + else { + logLSPMessage('receive-request', message); + } + } + function traceReceivedNotification(message) { + if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.params) { + data = `Params: ${stringifyTrace(message.params)}\n\n`; + } + else { + data = 'No parameters provided.\n\n'; + } + } + tracer.log(`Received notification '${message.method}'.`, data); + } + else { + logLSPMessage('receive-notification', message); + } + } + function traceReceivedResponse(message, responsePromise) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.error && message.error.data) { + data = `Error data: ${stringifyTrace(message.error.data)}\n\n`; + } + else { + if (message.result) { + data = `Result: ${stringifyTrace(message.result)}\n\n`; + } + else if (message.error === undefined) { + data = 'No result returned.\n\n'; + } + } + } + if (responsePromise) { + const error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : ''; + tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data); + } + else { + tracer.log(`Received response ${message.id} without active response promise.`, data); + } + } + else { + logLSPMessage('receive-response', message); + } + } + function logLSPMessage(type, message) { + if (!tracer || trace === Trace.Off) { + return; + } + const lspMessage = { + isLSPMessage: true, + type, + message, + timestamp: Date.now() + }; + tracer.log(lspMessage); + } + function throwIfClosedOrDisposed() { + if (isClosed()) { + throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.'); + } + if (isDisposed()) { + throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.'); + } + } + function throwIfListening() { + if (isListening()) { + throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening'); + } + } + function throwIfNotListening() { + if (!isListening()) { + throw new Error('Call listen() first.'); + } + } + function undefinedToNull(param) { + if (param === undefined) { + return null; + } + else { + return param; + } + } + function nullToUndefined(param) { + if (param === null) { + return undefined; + } + else { + return param; + } + } + function isNamedParam(param) { + return param !== undefined && param !== null && !Array.isArray(param) && typeof param === 'object'; + } + function computeSingleParam(parameterStructures, param) { + switch (parameterStructures) { + case messages_1.ParameterStructures.auto: + if (isNamedParam(param)) { + return nullToUndefined(param); + } + else { + return [undefinedToNull(param)]; + } + case messages_1.ParameterStructures.byName: + if (!isNamedParam(param)) { + throw new Error(`Received parameters by name but param is not an object literal.`); + } + return nullToUndefined(param); + case messages_1.ParameterStructures.byPosition: + return [undefinedToNull(param)]; + default: + throw new Error(`Unknown parameter structure ${parameterStructures.toString()}`); + } + } + function computeMessageParams(type, params) { + let result; + const numberOfParams = type.numberOfParams; + switch (numberOfParams) { + case 0: + result = undefined; + break; + case 1: + result = computeSingleParam(type.parameterStructures, params[0]); + break; + default: + result = []; + for (let i = 0; i < params.length && i < numberOfParams; i++) { + result.push(undefinedToNull(params[i])); + } + if (params.length < numberOfParams) { + for (let i = params.length; i < numberOfParams; i++) { + result.push(null); + } + } + break; + } + return result; + } + const connection = { + sendNotification: (type, ...args) => { + throwIfClosedOrDisposed(); + let method; + let messageParams; + if (Is.string(type)) { + method = type; + const first = args[0]; + let paramStart = 0; + let parameterStructures = messages_1.ParameterStructures.auto; + if (messages_1.ParameterStructures.is(first)) { + paramStart = 1; + parameterStructures = first; + } + const paramEnd = args.length; + const numberOfParams = paramEnd - paramStart; + switch (numberOfParams) { + case 0: + messageParams = undefined; + break; + case 1: + messageParams = computeSingleParam(parameterStructures, args[paramStart]); + break; + default: + if (parameterStructures === messages_1.ParameterStructures.byName) { + throw new Error(`Received ${numberOfParams} parameters for 'by Name' notification parameter structure.`); + } + messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value)); + break; + } + } + else { + const params = args; + method = type.method; + messageParams = computeMessageParams(type, params); + } + const notificationMessage = { + jsonrpc: version, + method: method, + params: messageParams + }; + traceSendingNotification(notificationMessage); + return messageWriter.write(notificationMessage).catch((error) => { + logger.error(`Sending notification failed.`); + throw error; + }); + }, + onNotification: (type, handler) => { + throwIfClosedOrDisposed(); + let method; + if (Is.func(type)) { + starNotificationHandler = type; + } + else if (handler) { + if (Is.string(type)) { + method = type; + notificationHandlers.set(type, { type: undefined, handler }); + } + else { + method = type.method; + notificationHandlers.set(type.method, { type, handler }); + } + } + return { + dispose: () => { + if (method !== undefined) { + notificationHandlers.delete(method); + } + else { + starNotificationHandler = undefined; + } + } + }; + }, + onProgress: (_type, token, handler) => { + if (progressHandlers.has(token)) { + throw new Error(`Progress handler for token ${token} already registered`); + } + progressHandlers.set(token, handler); + return { + dispose: () => { + progressHandlers.delete(token); + } + }; + }, + sendProgress: (_type, token, value) => { + // This should not await but simple return to ensure that we don't have another + // async scheduling. Otherwise one send could overtake another send. + return connection.sendNotification(ProgressNotification.type, { token, value }); + }, + onUnhandledProgress: unhandledProgressEmitter.event, + sendRequest: (type, ...args) => { + throwIfClosedOrDisposed(); + throwIfNotListening(); + function sendCancellation(connection, id) { + const p = cancellationStrategy.sender.sendCancellation(connection, id); + if (p === undefined) { + logger.log(`Received no promise from cancellation strategy when cancelling id ${id}`); + } + else { + p.catch(() => { + logger.log(`Sending cancellation messages for id ${id} failed.`); + }); + } + } + let method; + let messageParams; + let token = undefined; + if (Is.string(type)) { + method = type; + const first = args[0]; + const last = args[args.length - 1]; + let paramStart = 0; + let parameterStructures = messages_1.ParameterStructures.auto; + if (messages_1.ParameterStructures.is(first)) { + paramStart = 1; + parameterStructures = first; + } + let paramEnd = args.length; + if (cancellation_1.CancellationToken.is(last)) { + paramEnd = paramEnd - 1; + token = last; + } + const numberOfParams = paramEnd - paramStart; + switch (numberOfParams) { + case 0: + messageParams = undefined; + break; + case 1: + messageParams = computeSingleParam(parameterStructures, args[paramStart]); + break; + default: + if (parameterStructures === messages_1.ParameterStructures.byName) { + throw new Error(`Received ${numberOfParams} parameters for 'by Name' request parameter structure.`); + } + messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value)); + break; + } + } + else { + const params = args; + method = type.method; + messageParams = computeMessageParams(type, params); + const numberOfParams = type.numberOfParams; + token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined; + } + const id = sequenceNumber++; + let disposable; + let tokenWasCancelled = false; + if (token !== undefined) { + if (token.isCancellationRequested) { + tokenWasCancelled = true; + } + else { + disposable = token.onCancellationRequested(() => { + sendCancellation(connection, id); + }); + } + } + const requestMessage = { + jsonrpc: version, + id: id, + method: method, + params: messageParams + }; + traceSendingRequest(requestMessage); + if (typeof cancellationStrategy.sender.enableCancellation === 'function') { + cancellationStrategy.sender.enableCancellation(requestMessage); + } + // eslint-disable-next-line no-async-promise-executor + return new Promise(async (resolve, reject) => { + const resolveWithCleanup = (r) => { + resolve(r); + cancellationStrategy.sender.cleanup(id); + disposable?.dispose(); + }; + const rejectWithCleanup = (r) => { + reject(r); + cancellationStrategy.sender.cleanup(id); + disposable?.dispose(); + }; + const responsePromise = { method: method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup }; + try { + await messageWriter.write(requestMessage); + responsePromises.set(id, responsePromise); + if (tokenWasCancelled) { + sendCancellation(connection, id); + } + } + catch (error) { + logger.error(`Sending request failed.`); + // Writing the message failed. So we need to reject the promise. + responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, error.message ? error.message : 'Unknown reason')); + throw error; + } + }); + }, + onRequest: (type, handler) => { + throwIfClosedOrDisposed(); + let method = null; + if (StarRequestHandler.is(type)) { + method = undefined; + starRequestHandler = type; + } + else if (Is.string(type)) { + method = null; + if (handler !== undefined) { + method = type; + requestHandlers.set(type, { handler: handler, type: undefined }); + } + } + else { + if (handler !== undefined) { + method = type.method; + requestHandlers.set(type.method, { type, handler }); + } + } + return { + dispose: () => { + if (method === null) { + return; + } + if (method !== undefined) { + requestHandlers.delete(method); + } + else { + starRequestHandler = undefined; + } + } + }; + }, + hasPendingResponse: () => { + return responsePromises.size > 0; + }, + trace: async (_value, _tracer, sendNotificationOrTraceOptions) => { + let _sendNotification = false; + let _traceFormat = TraceFormat.Text; + if (sendNotificationOrTraceOptions !== undefined) { + if (Is.boolean(sendNotificationOrTraceOptions)) { + _sendNotification = sendNotificationOrTraceOptions; + } + else { + _sendNotification = sendNotificationOrTraceOptions.sendNotification || false; + _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text; + } + } + trace = _value; + traceFormat = _traceFormat; + if (trace === Trace.Off) { + tracer = undefined; + } + else { + tracer = _tracer; + } + if (_sendNotification && !isClosed() && !isDisposed()) { + await connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) }); + } + }, + onError: errorEmitter.event, + onClose: closeEmitter.event, + onUnhandledNotification: unhandledNotificationEmitter.event, + onDispose: disposeEmitter.event, + end: () => { + messageWriter.end(); + }, + dispose: () => { + if (isDisposed()) { + return; + } + state = ConnectionState.Disposed; + disposeEmitter.fire(undefined); + const error = new messages_1.ResponseError(messages_1.ErrorCodes.PendingResponseRejected, 'Pending response rejected since connection got disposed'); + for (const promise of responsePromises.values()) { + promise.reject(error); + } + responsePromises = new Map(); + requestTokens = new Map(); + knownCanceledRequests = new Set(); + messageQueue = new linkedMap_1.LinkedMap(); + // Test for backwards compatibility + if (Is.func(messageWriter.dispose)) { + messageWriter.dispose(); + } + if (Is.func(messageReader.dispose)) { + messageReader.dispose(); + } + }, + listen: () => { + throwIfClosedOrDisposed(); + throwIfListening(); + state = ConnectionState.Listening; + messageReader.listen(callback); + }, + inspect: () => { + // eslint-disable-next-line no-console + (0, ral_1.default)().console.log('inspect'); + } + }; + connection.onNotification(LogTraceNotification.type, (params) => { + if (trace === Trace.Off || !tracer) { + return; + } + const verbose = trace === Trace.Verbose || trace === Trace.Compact; + tracer.log(params.message, verbose ? params.verbose : undefined); + }); + connection.onNotification(ProgressNotification.type, async (params) => { + const handler = progressHandlers.get(params.token); + if (handler) { + await handler(params.value); + } + else { + unhandledProgressEmitter.fire(params); + } + }); + return connection; +} +exports.createMessageConnection = createMessageConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts" index 41dac66c8a8621db7da17f29483c4c9e42c3acb3..99878bba42532ae95d0d978fcaa8d97420470d8a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts" @@ -1,3 +1,9 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f0745ab78e18a2befaf1d9951481973318722c4e2f33e859239f55fa999ff2b1 -size 188 +export interface Disposable { + /** + * Dispose this object. + */ + dispose(): void; +} +export declare namespace Disposable { + function create(func: () => void): Disposable; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/disposable.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/disposable.js" index 649df1edb2f4a65e40fab21b226f06663a1628ab..b2800ad5015c5f940d3abab72aba112207226589 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/disposable.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/disposable.js" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ad43f37a324cf41af376ea66004063ac5867a2e3dfce81b47ab617b9105a0a7d -size 677 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Disposable = void 0; +var Disposable; +(function (Disposable) { + function create(func) { + return { + dispose: func + }; + } + Disposable.create = create; +})(Disposable || (exports.Disposable = Disposable = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts" index 7f29e34423fa55e01a06826bbb7e58e7985a0f38..9bc71364f29ea1c00f20c7ba5038ac4a4c9bb627 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts" @@ -1,3 +1,52 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e445daedeac3005da51d0a3e3258be16096e1c0116701e8979272aaf7aba5fb4 -size 1897 +import type RAL from './ral'; +import { Message } from './messages'; +export interface FunctionContentEncoder { + name: string; + encode(input: Uint8Array): Promise; +} +export interface StreamContentEncoder { + name: string; + create(): RAL.WritableStream; +} +export type ContentEncoder = FunctionContentEncoder | (FunctionContentEncoder & StreamContentEncoder); +export interface FunctionContentDecoder { + name: string; + decode(buffer: Uint8Array): Promise; +} +export interface StreamContentDecoder { + name: string; + create(): RAL.WritableStream; +} +export type ContentDecoder = FunctionContentDecoder | (FunctionContentDecoder & StreamContentDecoder); +export interface ContentTypeEncoderOptions { + charset: RAL.MessageBufferEncoding; +} +export interface FunctionContentTypeEncoder { + name: string; + encode(msg: Message, options: ContentTypeEncoderOptions): Promise; +} +export interface StreamContentTypeEncoder { + name: string; + create(options: ContentTypeEncoderOptions): RAL.WritableStream; +} +export type ContentTypeEncoder = FunctionContentTypeEncoder | (FunctionContentTypeEncoder & StreamContentTypeEncoder); +export interface ContentTypeDecoderOptions { + charset: RAL.MessageBufferEncoding; +} +export interface FunctionContentTypeDecoder { + name: string; + decode(buffer: Uint8Array, options: ContentTypeDecoderOptions): Promise; +} +export interface StreamContentTypeDecoder { + name: string; + create(options: ContentTypeDecoderOptions): RAL.WritableStream; +} +export type ContentTypeDecoder = FunctionContentTypeDecoder | (FunctionContentTypeDecoder & StreamContentTypeDecoder); +interface Named { + name: string; +} +export declare namespace Encodings { + function getEncodingHeaderValue(encodings: Named[]): string | undefined; + function parseEncodingHeaderValue(value: string): string[]; +} +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/encoding.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/encoding.js" index 3ed3f1968036b7cfdf9f6e43278a5c536562571f..914ce0a5c235029a7b5f004c2cecc3ce0445631c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/encoding.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/encoding.js" @@ -1,3 +1,70 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:812de3b9b71e07f4c042de286e44a3acc070d4639257e39a9de20548b1f3262b -size 2649 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Encodings = void 0; +var Encodings; +(function (Encodings) { + function getEncodingHeaderValue(encodings) { + if (encodings.length === 1) { + return encodings[0].name; + } + const distribute = encodings.length - 1; + if (distribute > 1000) { + throw new Error(`Quality value can only have three decimal digits but trying to distribute ${encodings.length} elements.`); + } + const digits = Math.ceil(Math.log10(distribute)); + const factor = Math.pow(10, digits); + const diff = Math.floor((1 / distribute) * factor) / factor; + const result = []; + let q = 1; + for (const encoding of encodings) { + result.push(`${encoding.name};q=${q === 1 || q === 0 ? q.toFixed(0) : q.toFixed(digits)}`); + q = q - diff; + } + return result.join(', '); + } + Encodings.getEncodingHeaderValue = getEncodingHeaderValue; + function parseEncodingHeaderValue(value) { + const map = new Map(); + const encodings = value.split(/\s*,\s*/); + for (const value of encodings) { + const [encoding, q] = parseEncoding(value); + if (encoding === '*') { + continue; + } + let values = map.get(q); + if (values === undefined) { + values = []; + map.set(q, values); + } + values.push(encoding); + } + const keys = Array.from(map.keys()); + keys.sort((a, b) => b - a); + const result = []; + for (const key of keys) { + result.push(...map.get(key)); + } + return result; + } + Encodings.parseEncodingHeaderValue = parseEncodingHeaderValue; + function parseEncoding(value) { + let q = 1; + let encoding; + const index = value.indexOf(';q='); + if (index !== -1) { + const parsed = parseFloat(value.substr(index)); + if (!Number.isNaN(parsed)) { + q = parsed; + } + encoding = value.substr(0, index); + } + else { + encoding = value; + } + return [encoding, q]; + } +})(Encodings || (exports.Encodings = Encodings = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/events.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/events.d.ts" index 43c85ceed6e6fb202ac9a30c75699d4d0f956ebc..fe8f407aea94691fc2666913809d6ad5a6e4456f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/events.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/events.d.ts" @@ -1,3 +1,39 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:886e183dd0199e7de45d6308ac3e2185dac6f83283d1b8200ea62cf5c43966a1 -size 1086 +import { Disposable } from './disposable'; +/** + * Represents a typed event. + */ +export interface Event { + /** + * + * @param listener The listener function will be called when the event happens. + * @param thisArgs The 'this' which will be used when calling the event listener. + * @param disposables An array to which a {{IDisposable}} will be added. + * @return + */ + (listener: (e: T) => any, thisArgs?: any, disposables?: Disposable[]): Disposable; +} +export declare namespace Event { + const None: Event; +} +export interface EmitterOptions { + onFirstListenerAdd?: Function; + onLastListenerRemove?: Function; +} +export declare class Emitter { + private _options?; + private static _noop; + private _event; + private _callbacks; + constructor(_options?: EmitterOptions | undefined); + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + get event(): Event; + /** + * To be kept private to fire an event to + * subscribers + */ + fire(event: T): any; + dispose(): void; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/events.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/events.js" index 0e9e2e2f2a5fc842f90226c8981865fa8c77ac2b..e9b3b68081315ddb7ad989ccb83902c75a0970fb 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/events.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/events.js" @@ -1,3 +1,128 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:896ca079b51b0f5daf4668941849d57cc035db5faa12e8fe888e7582e167fd55 -size 4506 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Emitter = exports.Event = void 0; +const ral_1 = require("./ral"); +var Event; +(function (Event) { + const _disposable = { dispose() { } }; + Event.None = function () { return _disposable; }; +})(Event || (exports.Event = Event = {})); +class CallbackList { + add(callback, context = null, bucket) { + if (!this._callbacks) { + this._callbacks = []; + this._contexts = []; + } + this._callbacks.push(callback); + this._contexts.push(context); + if (Array.isArray(bucket)) { + bucket.push({ dispose: () => this.remove(callback, context) }); + } + } + remove(callback, context = null) { + if (!this._callbacks) { + return; + } + let foundCallbackWithDifferentContext = false; + for (let i = 0, len = this._callbacks.length; i < len; i++) { + if (this._callbacks[i] === callback) { + if (this._contexts[i] === context) { + // callback & context match => remove it + this._callbacks.splice(i, 1); + this._contexts.splice(i, 1); + return; + } + else { + foundCallbackWithDifferentContext = true; + } + } + } + if (foundCallbackWithDifferentContext) { + throw new Error('When adding a listener with a context, you should remove it with the same context'); + } + } + invoke(...args) { + if (!this._callbacks) { + return []; + } + const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0); + for (let i = 0, len = callbacks.length; i < len; i++) { + try { + ret.push(callbacks[i].apply(contexts[i], args)); + } + catch (e) { + // eslint-disable-next-line no-console + (0, ral_1.default)().console.error(e); + } + } + return ret; + } + isEmpty() { + return !this._callbacks || this._callbacks.length === 0; + } + dispose() { + this._callbacks = undefined; + this._contexts = undefined; + } +} +class Emitter { + constructor(_options) { + this._options = _options; + } + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + get event() { + if (!this._event) { + this._event = (listener, thisArgs, disposables) => { + if (!this._callbacks) { + this._callbacks = new CallbackList(); + } + if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) { + this._options.onFirstListenerAdd(this); + } + this._callbacks.add(listener, thisArgs); + const result = { + dispose: () => { + if (!this._callbacks) { + // disposable is disposed after emitter is disposed. + return; + } + this._callbacks.remove(listener, thisArgs); + result.dispose = Emitter._noop; + if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) { + this._options.onLastListenerRemove(this); + } + } + }; + if (Array.isArray(disposables)) { + disposables.push(result); + } + return result; + }; + } + return this._event; + } + /** + * To be kept private to fire an event to + * subscribers + */ + fire(event) { + if (this._callbacks) { + this._callbacks.invoke.call(this._callbacks, event); + } + } + dispose() { + if (this._callbacks) { + this._callbacks.dispose(); + this._callbacks = undefined; + } + } +} +exports.Emitter = Emitter; +Emitter._noop = function () { }; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/is.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/is.d.ts" index bc53f5df6c6caf87f0c9425ae9a603687ae044a0..9261a2697bedff7fb49ad6a075afdd68f98b20ff 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/is.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/is.d.ts" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cf445a02b226e862589a7a4d4296dc0eb7e2b3398d24e2a9109fae165a179db1 -size 433 +export declare function boolean(value: any): value is boolean; +export declare function string(value: any): value is string; +export declare function number(value: any): value is number; +export declare function error(value: any): value is Error; +export declare function func(value: any): value is Function; +export declare function array(value: any): value is T[]; +export declare function stringArray(value: any): value is string[]; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/is.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/is.js" index be8091a5694dc82c1790e2798ae8de90ca76997c..b0990e92e144eb21a6113f1de476c50d2230b0de 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/is.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/is.js" @@ -1,3 +1,35 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9b3f16400056b77fc0b940d93ca9db322c297a7e666062ef038fd66604b4c34c -size 1272 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0; +function boolean(value) { + return value === true || value === false; +} +exports.boolean = boolean; +function string(value) { + return typeof value === 'string' || value instanceof String; +} +exports.string = string; +function number(value) { + return typeof value === 'number' || value instanceof Number; +} +exports.number = number; +function error(value) { + return value instanceof Error; +} +exports.error = error; +function func(value) { + return typeof value === 'function'; +} +exports.func = func; +function array(value) { + return Array.isArray(value); +} +exports.array = array; +function stringArray(value) { + return array(value) && value.every(elem => string(elem)); +} +exports.stringArray = stringArray; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts" index 34dac534e135a133a650d44228d2e762ceb66390..ae9e69913ce0568f2d391453302fdd0eefd37611 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts" @@ -1,3 +1,55 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:227f12275e82a3fef38e184c0c384bb1b132abeff7d05f6e476ee3660bc16f8d -size 1655 +export declare namespace Touch { + const None: 0; + const First: 1; + const AsOld: 1; + const Last: 2; + const AsNew: 2; +} +export type Touch = 0 | 1 | 2; +export declare class LinkedMap implements Map { + readonly [Symbol.toStringTag] = "LinkedMap"; + private _map; + private _head; + private _tail; + private _size; + private _state; + constructor(); + clear(): void; + isEmpty(): boolean; + get size(): number; + get first(): V | undefined; + get last(): V | undefined; + before(key: K): V | undefined; + after(key: K): V | undefined; + has(key: K): boolean; + get(key: K, touch?: Touch): V | undefined; + set(key: K, value: V, touch?: Touch): this; + delete(key: K): boolean; + remove(key: K): V | undefined; + shift(): V | undefined; + forEach(callbackfn: (value: V, key: K, map: LinkedMap) => void, thisArg?: any): void; + keys(): IterableIterator; + values(): IterableIterator; + entries(): IterableIterator<[K, V]>; + [Symbol.iterator](): IterableIterator<[K, V]>; + protected trimOld(newSize: number): void; + private addItemFirst; + private addItemLast; + private removeItem; + private touch; + toJSON(): [K, V][]; + fromJSON(data: [K, V][]): void; +} +export declare class LRUCache extends LinkedMap { + private _limit; + private _ratio; + constructor(limit: number, ratio?: number); + get limit(): number; + set limit(limit: number); + get ratio(): number; + set ratio(ratio: number); + get(key: K, touch?: Touch): V | undefined; + peek(key: K): V | undefined; + set(key: K, value: V): this; + private checkTrim; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/linkedMap.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/linkedMap.js" index 035f40721c1a2fd2dc65278621d421383c8905bb..ef03483cc8990c2d34ab8d147b9e9f6cde93e97f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/linkedMap.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/linkedMap.js" @@ -1,3 +1,406 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d353298f8834640cb5f1a7e3575eb5bd904570747f6f73f0bf3bce7e038bde33 -size 11996 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var _a; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LRUCache = exports.LinkedMap = exports.Touch = void 0; +var Touch; +(function (Touch) { + Touch.None = 0; + Touch.First = 1; + Touch.AsOld = Touch.First; + Touch.Last = 2; + Touch.AsNew = Touch.Last; +})(Touch || (exports.Touch = Touch = {})); +class LinkedMap { + constructor() { + this[_a] = 'LinkedMap'; + this._map = new Map(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + this._state = 0; + } + clear() { + this._map.clear(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + this._state++; + } + isEmpty() { + return !this._head && !this._tail; + } + get size() { + return this._size; + } + get first() { + return this._head?.value; + } + get last() { + return this._tail?.value; + } + before(key) { + const item = this._map.get(key); + return item ? item.previous?.value : undefined; + } + after(key) { + const item = this._map.get(key); + return item ? item.next?.value : undefined; + } + has(key) { + return this._map.has(key); + } + get(key, touch = Touch.None) { + const item = this._map.get(key); + if (!item) { + return undefined; + } + if (touch !== Touch.None) { + this.touch(item, touch); + } + return item.value; + } + set(key, value, touch = Touch.None) { + let item = this._map.get(key); + if (item) { + item.value = value; + if (touch !== Touch.None) { + this.touch(item, touch); + } + } + else { + item = { key, value, next: undefined, previous: undefined }; + switch (touch) { + case Touch.None: + this.addItemLast(item); + break; + case Touch.First: + this.addItemFirst(item); + break; + case Touch.Last: + this.addItemLast(item); + break; + default: + this.addItemLast(item); + break; + } + this._map.set(key, item); + this._size++; + } + return this; + } + delete(key) { + return !!this.remove(key); + } + remove(key) { + const item = this._map.get(key); + if (!item) { + return undefined; + } + this._map.delete(key); + this.removeItem(item); + this._size--; + return item.value; + } + shift() { + if (!this._head && !this._tail) { + return undefined; + } + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + const item = this._head; + this._map.delete(item.key); + this.removeItem(item); + this._size--; + return item.value; + } + forEach(callbackfn, thisArg) { + const state = this._state; + let current = this._head; + while (current) { + if (thisArg) { + callbackfn.bind(thisArg)(current.value, current.key, this); + } + else { + callbackfn(current.value, current.key, this); + } + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + current = current.next; + } + } + keys() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: current.key, done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + values() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: current.value, done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + entries() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: [current.key, current.value], done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + [(_a = Symbol.toStringTag, Symbol.iterator)]() { + return this.entries(); + } + trimOld(newSize) { + if (newSize >= this.size) { + return; + } + if (newSize === 0) { + this.clear(); + return; + } + let current = this._head; + let currentSize = this.size; + while (current && currentSize > newSize) { + this._map.delete(current.key); + current = current.next; + currentSize--; + } + this._head = current; + this._size = currentSize; + if (current) { + current.previous = undefined; + } + this._state++; + } + addItemFirst(item) { + // First time Insert + if (!this._head && !this._tail) { + this._tail = item; + } + else if (!this._head) { + throw new Error('Invalid list'); + } + else { + item.next = this._head; + this._head.previous = item; + } + this._head = item; + this._state++; + } + addItemLast(item) { + // First time Insert + if (!this._head && !this._tail) { + this._head = item; + } + else if (!this._tail) { + throw new Error('Invalid list'); + } + else { + item.previous = this._tail; + this._tail.next = item; + } + this._tail = item; + this._state++; + } + removeItem(item) { + if (item === this._head && item === this._tail) { + this._head = undefined; + this._tail = undefined; + } + else if (item === this._head) { + // This can only happened if size === 1 which is handle + // by the case above. + if (!item.next) { + throw new Error('Invalid list'); + } + item.next.previous = undefined; + this._head = item.next; + } + else if (item === this._tail) { + // This can only happened if size === 1 which is handle + // by the case above. + if (!item.previous) { + throw new Error('Invalid list'); + } + item.previous.next = undefined; + this._tail = item.previous; + } + else { + const next = item.next; + const previous = item.previous; + if (!next || !previous) { + throw new Error('Invalid list'); + } + next.previous = previous; + previous.next = next; + } + item.next = undefined; + item.previous = undefined; + this._state++; + } + touch(item, touch) { + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + if ((touch !== Touch.First && touch !== Touch.Last)) { + return; + } + if (touch === Touch.First) { + if (item === this._head) { + return; + } + const next = item.next; + const previous = item.previous; + // Unlink the item + if (item === this._tail) { + // previous must be defined since item was not head but is tail + // So there are more than on item in the map + previous.next = undefined; + this._tail = previous; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next.previous = previous; + previous.next = next; + } + // Insert the node at head + item.previous = undefined; + item.next = this._head; + this._head.previous = item; + this._head = item; + this._state++; + } + else if (touch === Touch.Last) { + if (item === this._tail) { + return; + } + const next = item.next; + const previous = item.previous; + // Unlink the item. + if (item === this._head) { + // next must be defined since item was not tail but is head + // So there are more than on item in the map + next.previous = undefined; + this._head = next; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next.previous = previous; + previous.next = next; + } + item.next = undefined; + item.previous = this._tail; + this._tail.next = item; + this._tail = item; + this._state++; + } + } + toJSON() { + const data = []; + this.forEach((value, key) => { + data.push([key, value]); + }); + return data; + } + fromJSON(data) { + this.clear(); + for (const [key, value] of data) { + this.set(key, value); + } + } +} +exports.LinkedMap = LinkedMap; +class LRUCache extends LinkedMap { + constructor(limit, ratio = 1) { + super(); + this._limit = limit; + this._ratio = Math.min(Math.max(0, ratio), 1); + } + get limit() { + return this._limit; + } + set limit(limit) { + this._limit = limit; + this.checkTrim(); + } + get ratio() { + return this._ratio; + } + set ratio(ratio) { + this._ratio = Math.min(Math.max(0, ratio), 1); + this.checkTrim(); + } + get(key, touch = Touch.AsNew) { + return super.get(key, touch); + } + peek(key) { + return super.get(key, Touch.None); + } + set(key, value) { + super.set(key, value, Touch.Last); + this.checkTrim(); + return this; + } + checkTrim() { + if (this.size > this._limit) { + this.trimOld(Math.round(this._limit * this._ratio)); + } + } +} +exports.LRUCache = LRUCache; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts" index 8e0d66cc85ecbce42c92dc8dcaefabea5ae705fc..354df8d2e6edecb9fabb98ca8492f430733e4f49 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts" @@ -1,3 +1,18 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4962729121c2cb97a4481cdb06dfc720a79a3bc2fc9330ff2bcf604cfc541177 -size 907 +import RAL from './ral'; +export declare abstract class AbstractMessageBuffer implements RAL.MessageBuffer { + private _encoding; + private _chunks; + private _totalLength; + constructor(encoding?: RAL.MessageBufferEncoding); + protected abstract emptyBuffer(): Uint8Array; + protected abstract fromString(value: string, encoding: RAL.MessageBufferEncoding): Uint8Array; + protected abstract toString(value: Uint8Array, encoding: RAL.MessageBufferEncoding): string; + protected abstract asNative(buffer: Uint8Array, length?: number): Uint8Array; + protected abstract allocNative(length: number): Uint8Array; + get encoding(): RAL.MessageBufferEncoding; + append(chunk: Uint8Array | string): void; + tryReadHeaders(lowerCaseKeys?: boolean): Map | undefined; + tryReadBody(length: number): Uint8Array | undefined; + get numberOfBytes(): number; + private _read; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js" index c14cc1f0c0ae2addbe50e68f795b4da4fdbdfe70..71d065d36ed31afb4512773f8addcf0d596d6b80 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js" @@ -1,3 +1,152 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2c7cf3a0e07213a5f93e141f1cb91252575e898c72eb18cf7cab3d3cbfdf271a -size 5653 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AbstractMessageBuffer = void 0; +const CR = 13; +const LF = 10; +const CRLF = '\r\n'; +class AbstractMessageBuffer { + constructor(encoding = 'utf-8') { + this._encoding = encoding; + this._chunks = []; + this._totalLength = 0; + } + get encoding() { + return this._encoding; + } + append(chunk) { + const toAppend = typeof chunk === 'string' ? this.fromString(chunk, this._encoding) : chunk; + this._chunks.push(toAppend); + this._totalLength += toAppend.byteLength; + } + tryReadHeaders(lowerCaseKeys = false) { + if (this._chunks.length === 0) { + return undefined; + } + let state = 0; + let chunkIndex = 0; + let offset = 0; + let chunkBytesRead = 0; + row: while (chunkIndex < this._chunks.length) { + const chunk = this._chunks[chunkIndex]; + offset = 0; + while (offset < chunk.length) { + const value = chunk[offset]; + switch (value) { + case CR: + switch (state) { + case 0: + state = 1; + break; + case 2: + state = 3; + break; + default: + state = 0; + } + break; + case LF: + switch (state) { + case 1: + state = 2; + break; + case 3: + state = 4; + offset++; + break row; + default: + state = 0; + } + break; + default: + state = 0; + } + offset++; + } + chunkBytesRead += chunk.byteLength; + chunkIndex++; + } + if (state !== 4) { + return undefined; + } + // The buffer contains the two CRLF at the end. So we will + // have two empty lines after the split at the end as well. + const buffer = this._read(chunkBytesRead + offset); + const result = new Map(); + const headers = this.toString(buffer, 'ascii').split(CRLF); + if (headers.length < 2) { + return result; + } + for (let i = 0; i < headers.length - 2; i++) { + const header = headers[i]; + const index = header.indexOf(':'); + if (index === -1) { + throw new Error(`Message header must separate key and value using ':'\n${header}`); + } + const key = header.substr(0, index); + const value = header.substr(index + 1).trim(); + result.set(lowerCaseKeys ? key.toLowerCase() : key, value); + } + return result; + } + tryReadBody(length) { + if (this._totalLength < length) { + return undefined; + } + return this._read(length); + } + get numberOfBytes() { + return this._totalLength; + } + _read(byteCount) { + if (byteCount === 0) { + return this.emptyBuffer(); + } + if (byteCount > this._totalLength) { + throw new Error(`Cannot read so many bytes!`); + } + if (this._chunks[0].byteLength === byteCount) { + // super fast path, precisely first chunk must be returned + const chunk = this._chunks[0]; + this._chunks.shift(); + this._totalLength -= byteCount; + return this.asNative(chunk); + } + if (this._chunks[0].byteLength > byteCount) { + // fast path, the reading is entirely within the first chunk + const chunk = this._chunks[0]; + const result = this.asNative(chunk, byteCount); + this._chunks[0] = chunk.slice(byteCount); + this._totalLength -= byteCount; + return result; + } + const result = this.allocNative(byteCount); + let resultOffset = 0; + const chunkIndex = 0; + while (byteCount > 0) { + const chunk = this._chunks[chunkIndex]; + if (chunk.byteLength > byteCount) { + // this chunk will survive + const chunkPart = chunk.slice(0, byteCount); + result.set(chunkPart, resultOffset); + resultOffset += byteCount; + this._chunks[chunkIndex] = chunk.slice(byteCount); + this._totalLength -= byteCount; + byteCount -= byteCount; + } + else { + // this chunk will be entirely read + result.set(chunk, resultOffset); + resultOffset += chunk.byteLength; + this._chunks.shift(); + this._totalLength -= chunk.byteLength; + byteCount -= chunk.byteLength; + } + } + return result; + } +} +exports.AbstractMessageBuffer = AbstractMessageBuffer; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts" index 25d784f33ae7dbf175c7b0b17c09ff8d405fe6be..d447d07a24ae5803fa2f1a9c1a9137288170c4f1 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts" @@ -1,3 +1,77 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3ca7b2e8012b9a6be09fafd62f8f3937388b9e1600a59c98887d2b11f6d01b43 -size 3002 +import RAL from './ral'; +import { Event } from './events'; +import { Message } from './messages'; +import { ContentDecoder, ContentTypeDecoder } from './encoding'; +import { Disposable } from './api'; +/** + * A callback that receives each incoming JSON-RPC message. + */ +export interface DataCallback { + (data: Message): void; +} +export interface PartialMessageInfo { + readonly messageToken: number; + readonly waitingTime: number; +} +/** Reads JSON-RPC messages from some underlying transport. */ +export interface MessageReader { + /** Raised whenever an error occurs while reading a message. */ + readonly onError: Event; + /** An event raised when the end of the underlying transport has been reached. */ + readonly onClose: Event; + /** + * An event that *may* be raised to inform the owner that only part of a message has been received. + * A MessageReader implementation may choose to raise this event after a timeout elapses while waiting for more of a partially received message to be received. + */ + readonly onPartialMessage: Event; + /** + * Begins listening for incoming messages. To be called at most once. + * @param callback A callback for receiving decoded messages. + */ + listen(callback: DataCallback): Disposable; + /** Releases resources incurred from reading or raising events. Does NOT close the underlying transport, if any. */ + dispose(): void; +} +export declare namespace MessageReader { + function is(value: any): value is MessageReader; +} +export declare abstract class AbstractMessageReader implements MessageReader { + private errorEmitter; + private closeEmitter; + private partialMessageEmitter; + constructor(); + dispose(): void; + get onError(): Event; + protected fireError(error: any): void; + get onClose(): Event; + protected fireClose(): void; + get onPartialMessage(): Event; + protected firePartialMessage(info: PartialMessageInfo): void; + private asError; + abstract listen(callback: DataCallback): Disposable; +} +export interface MessageReaderOptions { + charset?: RAL.MessageBufferEncoding; + contentDecoder?: ContentDecoder; + contentDecoders?: ContentDecoder[]; + contentTypeDecoder?: ContentTypeDecoder; + contentTypeDecoders?: ContentTypeDecoder[]; +} +export declare class ReadableStreamMessageReader extends AbstractMessageReader { + private readable; + private options; + private callback; + private nextMessageLength; + private messageToken; + private buffer; + private partialMessageTimer; + private _partialMessageTimeout; + private readSemaphore; + constructor(readable: RAL.ReadableStream, options?: RAL.MessageBufferEncoding | MessageReaderOptions); + set partialMessageTimeout(timeout: number); + get partialMessageTimeout(): number; + listen(callback: DataCallback): Disposable; + private onData; + private clearPartialMessageTimer; + private setPartialMessageTimer; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageReader.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageReader.js" index 370403d285309c6409ab178397ee24fb60f698fc..b908d35856d6f0e5edacdf35728370c1036c053b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageReader.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageReader.js" @@ -1,3 +1,197 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:52cc8ed058cbd2c740499bf517957ef4935636fc16196eb5892a4285dd96254e -size 8154 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = void 0; +const ral_1 = require("./ral"); +const Is = require("./is"); +const events_1 = require("./events"); +const semaphore_1 = require("./semaphore"); +var MessageReader; +(function (MessageReader) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) && + Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage); + } + MessageReader.is = is; +})(MessageReader || (exports.MessageReader = MessageReader = {})); +class AbstractMessageReader { + constructor() { + this.errorEmitter = new events_1.Emitter(); + this.closeEmitter = new events_1.Emitter(); + this.partialMessageEmitter = new events_1.Emitter(); + } + dispose() { + this.errorEmitter.dispose(); + this.closeEmitter.dispose(); + } + get onError() { + return this.errorEmitter.event; + } + fireError(error) { + this.errorEmitter.fire(this.asError(error)); + } + get onClose() { + return this.closeEmitter.event; + } + fireClose() { + this.closeEmitter.fire(undefined); + } + get onPartialMessage() { + return this.partialMessageEmitter.event; + } + firePartialMessage(info) { + this.partialMessageEmitter.fire(info); + } + asError(error) { + if (error instanceof Error) { + return error; + } + else { + return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`); + } + } +} +exports.AbstractMessageReader = AbstractMessageReader; +var ResolvedMessageReaderOptions; +(function (ResolvedMessageReaderOptions) { + function fromOptions(options) { + let charset; + let result; + let contentDecoder; + const contentDecoders = new Map(); + let contentTypeDecoder; + const contentTypeDecoders = new Map(); + if (options === undefined || typeof options === 'string') { + charset = options ?? 'utf-8'; + } + else { + charset = options.charset ?? 'utf-8'; + if (options.contentDecoder !== undefined) { + contentDecoder = options.contentDecoder; + contentDecoders.set(contentDecoder.name, contentDecoder); + } + if (options.contentDecoders !== undefined) { + for (const decoder of options.contentDecoders) { + contentDecoders.set(decoder.name, decoder); + } + } + if (options.contentTypeDecoder !== undefined) { + contentTypeDecoder = options.contentTypeDecoder; + contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder); + } + if (options.contentTypeDecoders !== undefined) { + for (const decoder of options.contentTypeDecoders) { + contentTypeDecoders.set(decoder.name, decoder); + } + } + } + if (contentTypeDecoder === undefined) { + contentTypeDecoder = (0, ral_1.default)().applicationJson.decoder; + contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder); + } + return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders }; + } + ResolvedMessageReaderOptions.fromOptions = fromOptions; +})(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {})); +class ReadableStreamMessageReader extends AbstractMessageReader { + constructor(readable, options) { + super(); + this.readable = readable; + this.options = ResolvedMessageReaderOptions.fromOptions(options); + this.buffer = (0, ral_1.default)().messageBuffer.create(this.options.charset); + this._partialMessageTimeout = 10000; + this.nextMessageLength = -1; + this.messageToken = 0; + this.readSemaphore = new semaphore_1.Semaphore(1); + } + set partialMessageTimeout(timeout) { + this._partialMessageTimeout = timeout; + } + get partialMessageTimeout() { + return this._partialMessageTimeout; + } + listen(callback) { + this.nextMessageLength = -1; + this.messageToken = 0; + this.partialMessageTimer = undefined; + this.callback = callback; + const result = this.readable.onData((data) => { + this.onData(data); + }); + this.readable.onError((error) => this.fireError(error)); + this.readable.onClose(() => this.fireClose()); + return result; + } + onData(data) { + try { + this.buffer.append(data); + while (true) { + if (this.nextMessageLength === -1) { + const headers = this.buffer.tryReadHeaders(true); + if (!headers) { + return; + } + const contentLength = headers.get('content-length'); + if (!contentLength) { + this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(headers))}`)); + return; + } + const length = parseInt(contentLength); + if (isNaN(length)) { + this.fireError(new Error(`Content-Length value must be a number. Got ${contentLength}`)); + return; + } + this.nextMessageLength = length; + } + const body = this.buffer.tryReadBody(this.nextMessageLength); + if (body === undefined) { + /** We haven't received the full message yet. */ + this.setPartialMessageTimer(); + return; + } + this.clearPartialMessageTimer(); + this.nextMessageLength = -1; + // Make sure that we convert one received message after the + // other. Otherwise it could happen that a decoding of a second + // smaller message finished before the decoding of a first larger + // message and then we would deliver the second message first. + this.readSemaphore.lock(async () => { + const bytes = this.options.contentDecoder !== undefined + ? await this.options.contentDecoder.decode(body) + : body; + const message = await this.options.contentTypeDecoder.decode(bytes, this.options); + this.callback(message); + }).catch((error) => { + this.fireError(error); + }); + } + } + catch (error) { + this.fireError(error); + } + } + clearPartialMessageTimer() { + if (this.partialMessageTimer) { + this.partialMessageTimer.dispose(); + this.partialMessageTimer = undefined; + } + } + setPartialMessageTimer() { + this.clearPartialMessageTimer(); + if (this._partialMessageTimeout <= 0) { + return; + } + this.partialMessageTimer = (0, ral_1.default)().timer.setTimeout((token, timeout) => { + this.partialMessageTimer = undefined; + if (token === this.messageToken) { + this.firePartialMessage({ messageToken: token, waitingTime: timeout }); + this.setPartialMessageTimer(); + } + }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout); + } +} +exports.ReadableStreamMessageReader = ReadableStreamMessageReader; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts" index c44d89eb01470ac3f6e5f9083d9ab0d07ac6c899..fd86488804a266bcb737049012dbb1460706fb36 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts" @@ -1,3 +1,60 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b138b3f30708386023a7dc9981bb867808e5ff3383429ac7f69b7bfd0dcc5bd5 -size 2193 +import RAL from './ral'; +import { Message } from './messages'; +import { Event } from './events'; +import { ContentEncoder, ContentTypeEncoder } from './encoding'; +/** + * Writes JSON-RPC messages to an underlying transport. + */ +export interface MessageWriter { + /** + * Raised whenever an error occurs while writing a message. + */ + readonly onError: Event<[Error, Message | undefined, number | undefined]>; + /** + * An event raised when the underlying transport has closed and writing is no longer possible. + */ + readonly onClose: Event; + /** + * Sends a JSON-RPC message. + * @param msg The JSON-RPC message to be sent. + * @description Implementations should guarantee messages are transmitted in the same order that they are received by this method. + */ + write(msg: Message): Promise; + /** + * Call when the connection using this message writer ends + * (e.g. MessageConnection.end() is called) + */ + end(): void; + /** Releases resources incurred from writing or raising events. Does NOT close the underlying transport, if any. */ + dispose(): void; +} +export declare namespace MessageWriter { + function is(value: any): value is MessageWriter; +} +export declare abstract class AbstractMessageWriter { + private errorEmitter; + private closeEmitter; + constructor(); + dispose(): void; + get onError(): Event<[Error, Message | undefined, number | undefined]>; + protected fireError(error: any, message?: Message, count?: number): void; + get onClose(): Event; + protected fireClose(): void; + private asError; +} +export interface MessageWriterOptions { + charset?: RAL.MessageBufferEncoding; + contentEncoder?: ContentEncoder; + contentTypeEncoder?: ContentTypeEncoder; +} +export declare class WriteableStreamMessageWriter extends AbstractMessageWriter implements MessageWriter { + private writable; + private options; + private errorCount; + private writeSemaphore; + constructor(writable: RAL.WritableStream, options?: RAL.MessageBufferEncoding | MessageWriterOptions); + write(msg: Message): Promise; + private doWrite; + private handleError; + end(): void; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageWriter.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageWriter.js" index 5648c7bf3f202dd6d1b330b6af8265b44ce904d8..b83f26bb33bdac8b060567be345c8957a7231efd 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageWriter.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messageWriter.js" @@ -1,3 +1,115 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4dd0a2b0bc54d3a456ae1caac6c9526ff0337245aedd6c15d0c80f52b2dc1c08 -size 4433 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = void 0; +const ral_1 = require("./ral"); +const Is = require("./is"); +const semaphore_1 = require("./semaphore"); +const events_1 = require("./events"); +const ContentLength = 'Content-Length: '; +const CRLF = '\r\n'; +var MessageWriter; +(function (MessageWriter) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) && + Is.func(candidate.onError) && Is.func(candidate.write); + } + MessageWriter.is = is; +})(MessageWriter || (exports.MessageWriter = MessageWriter = {})); +class AbstractMessageWriter { + constructor() { + this.errorEmitter = new events_1.Emitter(); + this.closeEmitter = new events_1.Emitter(); + } + dispose() { + this.errorEmitter.dispose(); + this.closeEmitter.dispose(); + } + get onError() { + return this.errorEmitter.event; + } + fireError(error, message, count) { + this.errorEmitter.fire([this.asError(error), message, count]); + } + get onClose() { + return this.closeEmitter.event; + } + fireClose() { + this.closeEmitter.fire(undefined); + } + asError(error) { + if (error instanceof Error) { + return error; + } + else { + return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`); + } + } +} +exports.AbstractMessageWriter = AbstractMessageWriter; +var ResolvedMessageWriterOptions; +(function (ResolvedMessageWriterOptions) { + function fromOptions(options) { + if (options === undefined || typeof options === 'string') { + return { charset: options ?? 'utf-8', contentTypeEncoder: (0, ral_1.default)().applicationJson.encoder }; + } + else { + return { charset: options.charset ?? 'utf-8', contentEncoder: options.contentEncoder, contentTypeEncoder: options.contentTypeEncoder ?? (0, ral_1.default)().applicationJson.encoder }; + } + } + ResolvedMessageWriterOptions.fromOptions = fromOptions; +})(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {})); +class WriteableStreamMessageWriter extends AbstractMessageWriter { + constructor(writable, options) { + super(); + this.writable = writable; + this.options = ResolvedMessageWriterOptions.fromOptions(options); + this.errorCount = 0; + this.writeSemaphore = new semaphore_1.Semaphore(1); + this.writable.onError((error) => this.fireError(error)); + this.writable.onClose(() => this.fireClose()); + } + async write(msg) { + return this.writeSemaphore.lock(async () => { + const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => { + if (this.options.contentEncoder !== undefined) { + return this.options.contentEncoder.encode(buffer); + } + else { + return buffer; + } + }); + return payload.then((buffer) => { + const headers = []; + headers.push(ContentLength, buffer.byteLength.toString(), CRLF); + headers.push(CRLF); + return this.doWrite(msg, headers, buffer); + }, (error) => { + this.fireError(error); + throw error; + }); + }); + } + async doWrite(msg, headers, data) { + try { + await this.writable.write(headers.join(''), 'ascii'); + return this.writable.write(data); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + this.writable.end(); + } +} +exports.WriteableStreamMessageWriter = WriteableStreamMessageWriter; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messages.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messages.d.ts" index 3a22e80ad4e40c05cc1e0ae450acb9e8e1c5c4ee..4d9ab2bbd71ac450115dbf93a1d8fe7da16165bf 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messages.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messages.d.ts" @@ -1,3 +1,369 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b716daa9737308e83fc9d3826cac21b3a6c12ff420b5e89415d1ca396616f1b6 -size 12602 +/** + * A language server message + */ +export interface Message { + jsonrpc: string; +} +/** + * Request message + */ +export interface RequestMessage extends Message { + /** + * The request id. + */ + id: number | string | null; + /** + * The method to be invoked. + */ + method: string; + /** + * The method's params. + */ + params?: any[] | object; +} +/** + * Predefined error codes. + */ +export declare namespace ErrorCodes { + const ParseError: -32700; + const InvalidRequest: -32600; + const MethodNotFound: -32601; + const InvalidParams: -32602; + const InternalError: -32603; + /** + * This is the start range of JSON RPC reserved error codes. + * It doesn't denote a real error code. No application error codes should + * be defined between the start and end range. For backwards + * compatibility the `ServerNotInitialized` and the `UnknownErrorCode` + * are left in the range. + * + * @since 3.16.0 + */ + const jsonrpcReservedErrorRangeStart: -32099; + /** @deprecated use jsonrpcReservedErrorRangeStart */ + const serverErrorStart: -32099; + /** + * An error occurred when write a message to the transport layer. + */ + const MessageWriteError: -32099; + /** + * An error occurred when reading a message from the transport layer. + */ + const MessageReadError: -32098; + /** + * The connection got disposed or lost and all pending responses got + * rejected. + */ + const PendingResponseRejected: -32097; + /** + * The connection is inactive and a use of it failed. + */ + const ConnectionInactive: -32096; + /** + * Error code indicating that a server received a notification or + * request before the server has received the `initialize` request. + */ + const ServerNotInitialized: -32002; + const UnknownErrorCode: -32001; + /** + * This is the end range of JSON RPC reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + const jsonrpcReservedErrorRangeEnd: -32000; + /** @deprecated use jsonrpcReservedErrorRangeEnd */ + const serverErrorEnd: -32000; +} +type integer = number; +export type ErrorCodes = integer; +export interface ResponseErrorLiteral { + /** + * A number indicating the error type that occurred. + */ + code: number; + /** + * A string providing a short description of the error. + */ + message: string; + /** + * A Primitive or Structured value that contains additional + * information about the error. Can be omitted. + */ + data?: D; +} +/** + * An error object return in a response in case a request + * has failed. + */ +export declare class ResponseError extends Error { + readonly code: number; + readonly data: D | undefined; + constructor(code: number, message: string, data?: D); + toJson(): ResponseErrorLiteral; +} +/** + * A response message. + */ +export interface ResponseMessage extends Message { + /** + * The request id. + */ + id: number | string | null; + /** + * The result of a request. This member is REQUIRED on success. + * This member MUST NOT exist if there was an error invoking the method. + */ + result?: string | number | boolean | object | any[] | null; + /** + * The error object in case a request fails. + */ + error?: ResponseErrorLiteral; +} +/** + * A LSP Log Entry. + */ +export type LSPMessageType = 'send-request' | 'receive-request' | 'send-response' | 'receive-response' | 'send-notification' | 'receive-notification'; +export interface LSPLogMessage { + type: LSPMessageType; + message: RequestMessage | ResponseMessage | NotificationMessage; + timestamp: number; +} +export declare class ParameterStructures { + private readonly kind; + /** + * The parameter structure is automatically inferred on the number of parameters + * and the parameter type in case of a single param. + */ + static readonly auto: ParameterStructures; + /** + * Forces `byPosition` parameter structure. This is useful if you have a single + * parameter which has a literal type. + */ + static readonly byPosition: ParameterStructures; + /** + * Forces `byName` parameter structure. This is only useful when having a single + * parameter. The library will report errors if used with a different number of + * parameters. + */ + static readonly byName: ParameterStructures; + private constructor(); + static is(value: any): value is ParameterStructures; + toString(): string; +} +/** + * An interface to type messages. + */ +export interface MessageSignature { + readonly method: string; + readonly numberOfParams: number; + readonly parameterStructures: ParameterStructures; +} +/** + * An abstract implementation of a MessageType. + */ +export declare abstract class AbstractMessageSignature implements MessageSignature { + readonly method: string; + readonly numberOfParams: number; + constructor(method: string, numberOfParams: number); + get parameterStructures(): ParameterStructures; +} +/** + * End marker interface for request and notification types. + */ +export interface _EM { + _$endMarker$_: number; +} +/** + * Classes to type request response pairs + */ +export declare class RequestType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P, R, E, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class RequestType1 extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, R, E, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class RequestType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, P9, R, E, _EM] | undefined; + constructor(method: string); +} +/** + * Notification Message + */ +export interface NotificationMessage extends Message { + /** + * The method to be invoked. + */ + method: string; + /** + * The notification's params. + */ + params?: any[] | object; +} +export declare class NotificationType

extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class NotificationType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [_EM] | undefined; + constructor(method: string); +} +export declare class NotificationType1 extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class NotificationType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, P9, _EM] | undefined; + constructor(method: string); +} +export declare namespace Message { + /** + * Tests if the given message is a request message + */ + function isRequest(message: Message | undefined): message is RequestMessage; + /** + * Tests if the given message is a notification message + */ + function isNotification(message: Message | undefined): message is NotificationMessage; + /** + * Tests if the given message is a response message + */ + function isResponse(message: Message | undefined): message is ResponseMessage; +} +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messages.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messages.js" index f32a8a79ed27e830479f2ae3ce4aeedeafc4ed0b..459194c62bd33aad140d29382ccee0efd812b6be 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messages.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/messages.js" @@ -1,3 +1,306 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7646445ce78ee32dfc25bf75362d09aa91aae9695a80b6f7ce57027ad5dd09a0 -size 10357 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Message = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType = exports.RequestType0 = exports.AbstractMessageSignature = exports.ParameterStructures = exports.ResponseError = exports.ErrorCodes = void 0; +const is = require("./is"); +/** + * Predefined error codes. + */ +var ErrorCodes; +(function (ErrorCodes) { + // Defined by JSON RPC + ErrorCodes.ParseError = -32700; + ErrorCodes.InvalidRequest = -32600; + ErrorCodes.MethodNotFound = -32601; + ErrorCodes.InvalidParams = -32602; + ErrorCodes.InternalError = -32603; + /** + * This is the start range of JSON RPC reserved error codes. + * It doesn't denote a real error code. No application error codes should + * be defined between the start and end range. For backwards + * compatibility the `ServerNotInitialized` and the `UnknownErrorCode` + * are left in the range. + * + * @since 3.16.0 + */ + ErrorCodes.jsonrpcReservedErrorRangeStart = -32099; + /** @deprecated use jsonrpcReservedErrorRangeStart */ + ErrorCodes.serverErrorStart = -32099; + /** + * An error occurred when write a message to the transport layer. + */ + ErrorCodes.MessageWriteError = -32099; + /** + * An error occurred when reading a message from the transport layer. + */ + ErrorCodes.MessageReadError = -32098; + /** + * The connection got disposed or lost and all pending responses got + * rejected. + */ + ErrorCodes.PendingResponseRejected = -32097; + /** + * The connection is inactive and a use of it failed. + */ + ErrorCodes.ConnectionInactive = -32096; + /** + * Error code indicating that a server received a notification or + * request before the server has received the `initialize` request. + */ + ErrorCodes.ServerNotInitialized = -32002; + ErrorCodes.UnknownErrorCode = -32001; + /** + * This is the end range of JSON RPC reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + ErrorCodes.jsonrpcReservedErrorRangeEnd = -32000; + /** @deprecated use jsonrpcReservedErrorRangeEnd */ + ErrorCodes.serverErrorEnd = -32000; +})(ErrorCodes || (exports.ErrorCodes = ErrorCodes = {})); +/** + * An error object return in a response in case a request + * has failed. + */ +class ResponseError extends Error { + constructor(code, message, data) { + super(message); + this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode; + this.data = data; + Object.setPrototypeOf(this, ResponseError.prototype); + } + toJson() { + const result = { + code: this.code, + message: this.message + }; + if (this.data !== undefined) { + result.data = this.data; + } + return result; + } +} +exports.ResponseError = ResponseError; +class ParameterStructures { + constructor(kind) { + this.kind = kind; + } + static is(value) { + return value === ParameterStructures.auto || value === ParameterStructures.byName || value === ParameterStructures.byPosition; + } + toString() { + return this.kind; + } +} +exports.ParameterStructures = ParameterStructures; +/** + * The parameter structure is automatically inferred on the number of parameters + * and the parameter type in case of a single param. + */ +ParameterStructures.auto = new ParameterStructures('auto'); +/** + * Forces `byPosition` parameter structure. This is useful if you have a single + * parameter which has a literal type. + */ +ParameterStructures.byPosition = new ParameterStructures('byPosition'); +/** + * Forces `byName` parameter structure. This is only useful when having a single + * parameter. The library will report errors if used with a different number of + * parameters. + */ +ParameterStructures.byName = new ParameterStructures('byName'); +/** + * An abstract implementation of a MessageType. + */ +class AbstractMessageSignature { + constructor(method, numberOfParams) { + this.method = method; + this.numberOfParams = numberOfParams; + } + get parameterStructures() { + return ParameterStructures.auto; + } +} +exports.AbstractMessageSignature = AbstractMessageSignature; +/** + * Classes to type request response pairs + */ +class RequestType0 extends AbstractMessageSignature { + constructor(method) { + super(method, 0); + } +} +exports.RequestType0 = RequestType0; +class RequestType extends AbstractMessageSignature { + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.RequestType = RequestType; +class RequestType1 extends AbstractMessageSignature { + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.RequestType1 = RequestType1; +class RequestType2 extends AbstractMessageSignature { + constructor(method) { + super(method, 2); + } +} +exports.RequestType2 = RequestType2; +class RequestType3 extends AbstractMessageSignature { + constructor(method) { + super(method, 3); + } +} +exports.RequestType3 = RequestType3; +class RequestType4 extends AbstractMessageSignature { + constructor(method) { + super(method, 4); + } +} +exports.RequestType4 = RequestType4; +class RequestType5 extends AbstractMessageSignature { + constructor(method) { + super(method, 5); + } +} +exports.RequestType5 = RequestType5; +class RequestType6 extends AbstractMessageSignature { + constructor(method) { + super(method, 6); + } +} +exports.RequestType6 = RequestType6; +class RequestType7 extends AbstractMessageSignature { + constructor(method) { + super(method, 7); + } +} +exports.RequestType7 = RequestType7; +class RequestType8 extends AbstractMessageSignature { + constructor(method) { + super(method, 8); + } +} +exports.RequestType8 = RequestType8; +class RequestType9 extends AbstractMessageSignature { + constructor(method) { + super(method, 9); + } +} +exports.RequestType9 = RequestType9; +class NotificationType extends AbstractMessageSignature { + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.NotificationType = NotificationType; +class NotificationType0 extends AbstractMessageSignature { + constructor(method) { + super(method, 0); + } +} +exports.NotificationType0 = NotificationType0; +class NotificationType1 extends AbstractMessageSignature { + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.NotificationType1 = NotificationType1; +class NotificationType2 extends AbstractMessageSignature { + constructor(method) { + super(method, 2); + } +} +exports.NotificationType2 = NotificationType2; +class NotificationType3 extends AbstractMessageSignature { + constructor(method) { + super(method, 3); + } +} +exports.NotificationType3 = NotificationType3; +class NotificationType4 extends AbstractMessageSignature { + constructor(method) { + super(method, 4); + } +} +exports.NotificationType4 = NotificationType4; +class NotificationType5 extends AbstractMessageSignature { + constructor(method) { + super(method, 5); + } +} +exports.NotificationType5 = NotificationType5; +class NotificationType6 extends AbstractMessageSignature { + constructor(method) { + super(method, 6); + } +} +exports.NotificationType6 = NotificationType6; +class NotificationType7 extends AbstractMessageSignature { + constructor(method) { + super(method, 7); + } +} +exports.NotificationType7 = NotificationType7; +class NotificationType8 extends AbstractMessageSignature { + constructor(method) { + super(method, 8); + } +} +exports.NotificationType8 = NotificationType8; +class NotificationType9 extends AbstractMessageSignature { + constructor(method) { + super(method, 9); + } +} +exports.NotificationType9 = NotificationType9; +var Message; +(function (Message) { + /** + * Tests if the given message is a request message + */ + function isRequest(message) { + const candidate = message; + return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id)); + } + Message.isRequest = isRequest; + /** + * Tests if the given message is a notification message + */ + function isNotification(message) { + const candidate = message; + return candidate && is.string(candidate.method) && message.id === void 0; + } + Message.isNotification = isNotification; + /** + * Tests if the given message is a response message + */ + function isResponse(message) { + const candidate = message; + return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null); + } + Message.isResponse = isResponse; +})(Message || (exports.Message = Message = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/ral.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/ral.d.ts" index 27598c577e0a718001e611b25ee423153f7f3965..e14ec4ae1d36d7b423c0389986a66d1d275781b0 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/ral.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/ral.d.ts" @@ -1,3 +1,74 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d79ae695899e28c4dba32ba39268a1eafc556f3f183175a355424fae553585a -size 2835 +import type { Disposable } from './disposable'; +import type { ContentTypeEncoder, ContentTypeDecoder } from './encoding'; +interface _MessageBuffer { + readonly encoding: RAL.MessageBufferEncoding; + /** + * Append data to the message buffer. + * + * @param chunk the data to append. + */ + append(chunk: Uint8Array | string): void; + /** + * Tries to read the headers from the buffer + * + * @param lowerCaseKeys Whether the keys should be stored lower case. Doing + * so is recommended since HTTP headers are case insensitive. + * + * @returns the header properties or undefined in not enough data can be read. + */ + tryReadHeaders(lowerCaseKeys?: boolean): Map | undefined; + /** + * Tries to read the body of the given length. + * + * @param length the amount of bytes to read. + * @returns the data or undefined int less data is available. + */ + tryReadBody(length: number): Uint8Array | undefined; +} +type _MessageBufferEncoding = 'ascii' | 'utf-8'; +interface _ReadableStream { + onData(listener: (data: Uint8Array) => void): Disposable; + onClose(listener: () => void): Disposable; + onError(listener: (error: any) => void): Disposable; + onEnd(listener: () => void): Disposable; +} +interface _WritableStream { + onClose(listener: () => void): Disposable; + onError(listener: (error: any) => void): Disposable; + onEnd(listener: () => void): Disposable; + write(data: Uint8Array): Promise; + write(data: string, encoding: _MessageBufferEncoding): Promise; + end(): void; +} +interface _DuplexStream extends _ReadableStream, _WritableStream { +} +interface RAL { + readonly applicationJson: { + readonly encoder: ContentTypeEncoder; + readonly decoder: ContentTypeDecoder; + }; + readonly messageBuffer: { + create(encoding: RAL.MessageBufferEncoding): RAL.MessageBuffer; + }; + readonly console: { + info(message?: any, ...optionalParams: any[]): void; + log(message?: any, ...optionalParams: any[]): void; + warn(message?: any, ...optionalParams: any[]): void; + error(message?: any, ...optionalParams: any[]): void; + }; + readonly timer: { + setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable; + setImmediate(callback: (...args: any[]) => void, ...args: any[]): Disposable; + setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable; + }; +} +declare function RAL(): RAL; +declare namespace RAL { + type MessageBuffer = _MessageBuffer; + type MessageBufferEncoding = _MessageBufferEncoding; + type ReadableStream = _ReadableStream; + type WritableStream = _WritableStream; + type DuplexStream = _DuplexStream; + function install(ral: RAL): void; +} +export default RAL; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/ral.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/ral.js" index d8f4748e471a911aaa9a7a7f771c4f7da69337dc..ae335df56eca4599be4c63d27f4de3cb4d9c7d27 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/ral.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/ral.js" @@ -1,3 +1,23 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9b4736fe0168adf1dff8a1f41cf76dc8e9f380684cbb39056403e81a05a51cb3 -size 834 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +let _ral; +function RAL() { + if (_ral === undefined) { + throw new Error(`No runtime abstraction layer installed`); + } + return _ral; +} +(function (RAL) { + function install(ral) { + if (ral === undefined) { + throw new Error(`No runtime abstraction layer provided`); + } + _ral = ral; + } + RAL.install = install; +})(RAL || (RAL = {})); +exports.default = RAL; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts" index 4c391f1034ab8c430240f5b1008c37ce2d048bbd..1261daab59d0723e9adb787406f701cb2f9ac50b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts" @@ -1,3 +1,10 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e861653b284114109a695dd061a427b7bb09ce01dbe1c2d3e753fc342919faaf -size 272 +export declare class Semaphore { + private _capacity; + private _active; + private _waiting; + constructor(capacity?: number); + lock(thunk: () => T | PromiseLike): Promise; + get active(): number; + private runNext; + private doRunNext; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/semaphore.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/semaphore.js" index 112ca39c2ae1bae9b722a0bebc18229206379449..730f4e123dad437817f2676e0be883117a319633 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/semaphore.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/semaphore.js" @@ -1,3 +1,68 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:23f97fc853d012174609337eb92cbebf41b970175ee82fd2bf3ee6cd5a7e0980 -size 2197 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Semaphore = void 0; +const ral_1 = require("./ral"); +class Semaphore { + constructor(capacity = 1) { + if (capacity <= 0) { + throw new Error('Capacity must be greater than 0'); + } + this._capacity = capacity; + this._active = 0; + this._waiting = []; + } + lock(thunk) { + return new Promise((resolve, reject) => { + this._waiting.push({ thunk, resolve, reject }); + this.runNext(); + }); + } + get active() { + return this._active; + } + runNext() { + if (this._waiting.length === 0 || this._active === this._capacity) { + return; + } + (0, ral_1.default)().timer.setImmediate(() => this.doRunNext()); + } + doRunNext() { + if (this._waiting.length === 0 || this._active === this._capacity) { + return; + } + const next = this._waiting.shift(); + this._active++; + if (this._active > this._capacity) { + throw new Error(`To many thunks active`); + } + try { + const result = next.thunk(); + if (result instanceof Promise) { + result.then((value) => { + this._active--; + next.resolve(value); + this.runNext(); + }, (err) => { + this._active--; + next.reject(err); + this.runNext(); + }); + } + else { + this._active--; + next.resolve(result); + this.runNext(); + } + } + catch (err) { + this._active--; + next.reject(err); + this.runNext(); + } + } +} +exports.Semaphore = Semaphore; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts" index 4d5eccfa2fa3489045bdd3ecf1abd39941f005b7..c6e8d08ea418553fd08db047b67ea2c512c4adb2 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts" @@ -1,3 +1,15 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:13ec544ab0a3a7ff96afac1016f55b264c812428e37d595dc33b688296435469 -size 801 +import { RequestMessage } from './messages'; +import { AbstractCancellationTokenSource } from './cancellation'; +import { CancellationId, RequestCancellationReceiverStrategy, CancellationSenderStrategy, MessageConnection } from './connection'; +export declare class SharedArraySenderStrategy implements CancellationSenderStrategy { + private readonly buffers; + constructor(); + enableCancellation(request: RequestMessage): void; + sendCancellation(_conn: MessageConnection, id: CancellationId): Promise; + cleanup(id: CancellationId): void; + dispose(): void; +} +export declare class SharedArrayReceiverStrategy implements RequestCancellationReceiverStrategy { + readonly kind: "request"; + createCancellationTokenSource(request: RequestMessage): AbstractCancellationTokenSource; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js" index 46a78175f24ee7b77361fa3f80212cbe991fcd85..d3971fc9c32c04ce68f2bac7f84518e20a3244af 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js" @@ -1,3 +1,76 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5d72941efcfae5ec26b955f18afc4042833825019e3a84e45fdd4952da51fc29 -size 2640 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SharedArrayReceiverStrategy = exports.SharedArraySenderStrategy = void 0; +const cancellation_1 = require("./cancellation"); +var CancellationState; +(function (CancellationState) { + CancellationState.Continue = 0; + CancellationState.Cancelled = 1; +})(CancellationState || (CancellationState = {})); +class SharedArraySenderStrategy { + constructor() { + this.buffers = new Map(); + } + enableCancellation(request) { + if (request.id === null) { + return; + } + const buffer = new SharedArrayBuffer(4); + const data = new Int32Array(buffer, 0, 1); + data[0] = CancellationState.Continue; + this.buffers.set(request.id, buffer); + request.$cancellationData = buffer; + } + async sendCancellation(_conn, id) { + const buffer = this.buffers.get(id); + if (buffer === undefined) { + return; + } + const data = new Int32Array(buffer, 0, 1); + Atomics.store(data, 0, CancellationState.Cancelled); + } + cleanup(id) { + this.buffers.delete(id); + } + dispose() { + this.buffers.clear(); + } +} +exports.SharedArraySenderStrategy = SharedArraySenderStrategy; +class SharedArrayBufferCancellationToken { + constructor(buffer) { + this.data = new Int32Array(buffer, 0, 1); + } + get isCancellationRequested() { + return Atomics.load(this.data, 0) === CancellationState.Cancelled; + } + get onCancellationRequested() { + throw new Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`); + } +} +class SharedArrayBufferCancellationTokenSource { + constructor(buffer) { + this.token = new SharedArrayBufferCancellationToken(buffer); + } + cancel() { + } + dispose() { + } +} +class SharedArrayReceiverStrategy { + constructor() { + this.kind = 'request'; + } + createCancellationTokenSource(request) { + const buffer = request.$cancellationData; + if (buffer === undefined) { + return new cancellation_1.CancellationTokenSource(); + } + return new SharedArrayBufferCancellationTokenSource(buffer); + } +} +exports.SharedArrayReceiverStrategy = SharedArrayReceiverStrategy; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/node/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/node/main.d.ts" index f8dcc14a8df099b431e3e4bfc121d4797526360b..99eb9ab83c3e604b287ba86399c28dcc077ed62f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/node/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/node/main.d.ts" @@ -1,3 +1,63 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67d37ef881a81aefe3a0f70f78e3835be950f2359487d3eb61b0a3bb9af172bc -size 3537 +/// +/// +/// +/// +/// +import { ChildProcess } from 'child_process'; +import { Socket } from 'net'; +import { MessagePort, Worker } from 'worker_threads'; +import { RAL, AbstractMessageReader, DataCallback, AbstractMessageWriter, Message, ReadableStreamMessageReader, WriteableStreamMessageWriter, MessageWriterOptions, MessageReaderOptions, MessageReader, MessageWriter, ConnectionStrategy, ConnectionOptions, MessageConnection, Logger, Disposable } from '../common/api'; +export * from '../common/api'; +export declare class IPCMessageReader extends AbstractMessageReader { + private process; + constructor(process: NodeJS.Process | ChildProcess); + listen(callback: DataCallback): Disposable; +} +export declare class IPCMessageWriter extends AbstractMessageWriter implements MessageWriter { + private readonly process; + private errorCount; + constructor(process: NodeJS.Process | ChildProcess); + write(msg: Message): Promise; + private handleError; + end(): void; +} +export declare class PortMessageReader extends AbstractMessageReader implements MessageReader { + private onData; + constructor(port: MessagePort | Worker); + listen(callback: DataCallback): Disposable; +} +export declare class PortMessageWriter extends AbstractMessageWriter implements MessageWriter { + private readonly port; + private errorCount; + constructor(port: MessagePort | Worker); + write(msg: Message): Promise; + private handleError; + end(): void; +} +export declare class SocketMessageReader extends ReadableStreamMessageReader { + constructor(socket: Socket, encoding?: RAL.MessageBufferEncoding); +} +export declare class SocketMessageWriter extends WriteableStreamMessageWriter { + private socket; + constructor(socket: Socket, options?: RAL.MessageBufferEncoding | MessageWriterOptions); + dispose(): void; +} +export declare class StreamMessageReader extends ReadableStreamMessageReader { + constructor(readable: NodeJS.ReadableStream, encoding?: RAL.MessageBufferEncoding | MessageReaderOptions); +} +export declare class StreamMessageWriter extends WriteableStreamMessageWriter { + constructor(writable: NodeJS.WritableStream, options?: RAL.MessageBufferEncoding | MessageWriterOptions); +} +export declare function generateRandomPipeName(): string; +export interface PipeTransport { + onConnected(): Promise<[MessageReader, MessageWriter]>; +} +export declare function createClientPipeTransport(pipeName: string, encoding?: RAL.MessageBufferEncoding): Promise; +export declare function createServerPipeTransport(pipeName: string, encoding?: RAL.MessageBufferEncoding): [MessageReader, MessageWriter]; +export interface SocketTransport { + onConnected(): Promise<[MessageReader, MessageWriter]>; +} +export declare function createClientSocketTransport(port: number, encoding?: RAL.MessageBufferEncoding): Promise; +export declare function createServerSocketTransport(port: number, encoding?: RAL.MessageBufferEncoding): [MessageReader, MessageWriter]; +export declare function createMessageConnection(reader: MessageReader, writer: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; +export declare function createMessageConnection(inputStream: NodeJS.ReadableStream, outputStream: NodeJS.WritableStream, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/node/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/node/main.js" index 785b5f3791894bc164db7e10e18e7c762c16f6db..60593c56690f80d51610c51f22049414720006f9 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/node/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/node/main.js" @@ -1,3 +1,257 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e312601eb2975bc9dd33ab34ff719ef15775011fc127af7c87f978ed85b9383 -size 9895 +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createMessageConnection = exports.createServerSocketTransport = exports.createClientSocketTransport = exports.createServerPipeTransport = exports.createClientPipeTransport = exports.generateRandomPipeName = exports.StreamMessageWriter = exports.StreamMessageReader = exports.SocketMessageWriter = exports.SocketMessageReader = exports.PortMessageWriter = exports.PortMessageReader = exports.IPCMessageWriter = exports.IPCMessageReader = void 0; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +const ril_1 = require("./ril"); +// Install the node runtime abstract. +ril_1.default.install(); +const path = require("path"); +const os = require("os"); +const fs = require("fs"); +const crypto_1 = require("crypto"); +const net_1 = require("net"); +const api_1 = require("../common/api"); +__exportStar(require("../common/api"), exports); +class IPCMessageReader extends api_1.AbstractMessageReader { + constructor(process) { + super(); + this.process = process; + const eventEmitter = this.process; + eventEmitter.on('error', (error) => this.fireError(error)); + eventEmitter.on('close', () => this.fireClose()); + } + listen(callback) { + this.process.on('message', callback); + return api_1.Disposable.create(() => this.process.off('message', callback)); + } +} +exports.IPCMessageReader = IPCMessageReader; +class IPCMessageWriter extends api_1.AbstractMessageWriter { + constructor(process) { + super(); + this.process = process; + this.errorCount = 0; + const eventEmitter = this.process; + eventEmitter.on('error', (error) => this.fireError(error)); + eventEmitter.on('close', () => this.fireClose); + } + write(msg) { + try { + if (typeof this.process.send === 'function') { + this.process.send(msg, undefined, undefined, (error) => { + if (error) { + this.errorCount++; + this.handleError(error, msg); + } + else { + this.errorCount = 0; + } + }); + } + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.IPCMessageWriter = IPCMessageWriter; +class PortMessageReader extends api_1.AbstractMessageReader { + constructor(port) { + super(); + this.onData = new api_1.Emitter; + port.on('close', () => this.fireClose); + port.on('error', (error) => this.fireError(error)); + port.on('message', (message) => { + this.onData.fire(message); + }); + } + listen(callback) { + return this.onData.event(callback); + } +} +exports.PortMessageReader = PortMessageReader; +class PortMessageWriter extends api_1.AbstractMessageWriter { + constructor(port) { + super(); + this.port = port; + this.errorCount = 0; + port.on('close', () => this.fireClose()); + port.on('error', (error) => this.fireError(error)); + } + write(msg) { + try { + this.port.postMessage(msg); + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.PortMessageWriter = PortMessageWriter; +class SocketMessageReader extends api_1.ReadableStreamMessageReader { + constructor(socket, encoding = 'utf-8') { + super((0, ril_1.default)().stream.asReadableStream(socket), encoding); + } +} +exports.SocketMessageReader = SocketMessageReader; +class SocketMessageWriter extends api_1.WriteableStreamMessageWriter { + constructor(socket, options) { + super((0, ril_1.default)().stream.asWritableStream(socket), options); + this.socket = socket; + } + dispose() { + super.dispose(); + this.socket.destroy(); + } +} +exports.SocketMessageWriter = SocketMessageWriter; +class StreamMessageReader extends api_1.ReadableStreamMessageReader { + constructor(readable, encoding) { + super((0, ril_1.default)().stream.asReadableStream(readable), encoding); + } +} +exports.StreamMessageReader = StreamMessageReader; +class StreamMessageWriter extends api_1.WriteableStreamMessageWriter { + constructor(writable, options) { + super((0, ril_1.default)().stream.asWritableStream(writable), options); + } +} +exports.StreamMessageWriter = StreamMessageWriter; +const XDG_RUNTIME_DIR = process.env['XDG_RUNTIME_DIR']; +const safeIpcPathLengths = new Map([ + ['linux', 107], + ['darwin', 103] +]); +function generateRandomPipeName() { + if (process.platform === 'win32') { + return `\\\\.\\pipe\\lsp-${(0, crypto_1.randomBytes)(16).toString('hex')}-sock`; + } + let randomLength = 32; + const fixedLength = 'lsp-.sock'.length; + const tmpDir = fs.realpathSync(XDG_RUNTIME_DIR ?? os.tmpdir()); + const limit = safeIpcPathLengths.get(process.platform); + if (limit !== undefined) { + randomLength = Math.min(limit - tmpDir.length - fixedLength, randomLength); + } + if (randomLength < 16) { + throw new Error(`Unable to generate a random pipe name with ${randomLength} characters.`); + } + const randomSuffix = (0, crypto_1.randomBytes)(Math.floor(randomLength / 2)).toString('hex'); + return path.join(tmpDir, `lsp-${randomSuffix}.sock`); +} +exports.generateRandomPipeName = generateRandomPipeName; +function createClientPipeTransport(pipeName, encoding = 'utf-8') { + let connectResolve; + const connected = new Promise((resolve, _reject) => { + connectResolve = resolve; + }); + return new Promise((resolve, reject) => { + const server = (0, net_1.createServer)((socket) => { + server.close(); + connectResolve([ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]); + }); + server.on('error', reject); + server.listen(pipeName, () => { + server.removeListener('error', reject); + resolve({ + onConnected: () => { return connected; } + }); + }); + }); +} +exports.createClientPipeTransport = createClientPipeTransport; +function createServerPipeTransport(pipeName, encoding = 'utf-8') { + const socket = (0, net_1.createConnection)(pipeName); + return [ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]; +} +exports.createServerPipeTransport = createServerPipeTransport; +function createClientSocketTransport(port, encoding = 'utf-8') { + let connectResolve; + const connected = new Promise((resolve, _reject) => { + connectResolve = resolve; + }); + return new Promise((resolve, reject) => { + const server = (0, net_1.createServer)((socket) => { + server.close(); + connectResolve([ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]); + }); + server.on('error', reject); + server.listen(port, '127.0.0.1', () => { + server.removeListener('error', reject); + resolve({ + onConnected: () => { return connected; } + }); + }); + }); +} +exports.createClientSocketTransport = createClientSocketTransport; +function createServerSocketTransport(port, encoding = 'utf-8') { + const socket = (0, net_1.createConnection)(port, '127.0.0.1'); + return [ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]; +} +exports.createServerSocketTransport = createServerSocketTransport; +function isReadableStream(value) { + const candidate = value; + return candidate.read !== undefined && candidate.addListener !== undefined; +} +function isWritableStream(value) { + const candidate = value; + return candidate.write !== undefined && candidate.addListener !== undefined; +} +function createMessageConnection(input, output, logger, options) { + if (!logger) { + logger = api_1.NullLogger; + } + const reader = isReadableStream(input) ? new StreamMessageReader(input) : input; + const writer = isWritableStream(output) ? new StreamMessageWriter(output) : output; + if (api_1.ConnectionStrategy.is(options)) { + options = { connectionStrategy: options }; + } + return (0, api_1.createMessageConnection)(reader, writer, logger, options); +} +exports.createMessageConnection = createMessageConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/node/ril.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/node/ril.d.ts" index 56718267e6504b75bd3fdf2864cbefd916779fdf..31bc9227d4836c10ae180a936e030b3e5f1bddc4 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/node/ril.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/node/ril.d.ts" @@ -1,3 +1,13 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b397fd8e5a65bc04e3de262da0e5ceeae5d53ca7fdfd0f9d8327618b3fe32f3c -size 413 +/// +import { RAL } from '../common/api'; +interface RIL extends RAL { + readonly stream: { + readonly asReadableStream: (stream: NodeJS.ReadableStream) => RAL.ReadableStream; + readonly asWritableStream: (stream: NodeJS.WritableStream) => RAL.WritableStream; + }; +} +declare function RIL(): RIL; +declare namespace RIL { + function install(): void; +} +export default RIL; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/node/ril.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/node/ril.js" index 9955ea7fa86e8a830555ceab4f7bdcdf7d36194e..570081810bf8efeb72089ab3f5d40387d18b9135 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/node/ril.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/lib/node/ril.js" @@ -1,3 +1,161 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:daff19bb252f60c97c629f7b9f299ae957a9ef2c87152498262484e6b990debc -size 5392 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +const util_1 = require("util"); +const api_1 = require("../common/api"); +class MessageBuffer extends api_1.AbstractMessageBuffer { + constructor(encoding = 'utf-8') { + super(encoding); + } + emptyBuffer() { + return MessageBuffer.emptyBuffer; + } + fromString(value, encoding) { + return Buffer.from(value, encoding); + } + toString(value, encoding) { + if (value instanceof Buffer) { + return value.toString(encoding); + } + else { + return new util_1.TextDecoder(encoding).decode(value); + } + } + asNative(buffer, length) { + if (length === undefined) { + return buffer instanceof Buffer ? buffer : Buffer.from(buffer); + } + else { + return buffer instanceof Buffer ? buffer.slice(0, length) : Buffer.from(buffer, 0, length); + } + } + allocNative(length) { + return Buffer.allocUnsafe(length); + } +} +MessageBuffer.emptyBuffer = Buffer.allocUnsafe(0); +class ReadableStreamWrapper { + constructor(stream) { + this.stream = stream; + } + onClose(listener) { + this.stream.on('close', listener); + return api_1.Disposable.create(() => this.stream.off('close', listener)); + } + onError(listener) { + this.stream.on('error', listener); + return api_1.Disposable.create(() => this.stream.off('error', listener)); + } + onEnd(listener) { + this.stream.on('end', listener); + return api_1.Disposable.create(() => this.stream.off('end', listener)); + } + onData(listener) { + this.stream.on('data', listener); + return api_1.Disposable.create(() => this.stream.off('data', listener)); + } +} +class WritableStreamWrapper { + constructor(stream) { + this.stream = stream; + } + onClose(listener) { + this.stream.on('close', listener); + return api_1.Disposable.create(() => this.stream.off('close', listener)); + } + onError(listener) { + this.stream.on('error', listener); + return api_1.Disposable.create(() => this.stream.off('error', listener)); + } + onEnd(listener) { + this.stream.on('end', listener); + return api_1.Disposable.create(() => this.stream.off('end', listener)); + } + write(data, encoding) { + return new Promise((resolve, reject) => { + const callback = (error) => { + if (error === undefined || error === null) { + resolve(); + } + else { + reject(error); + } + }; + if (typeof data === 'string') { + this.stream.write(data, encoding, callback); + } + else { + this.stream.write(data, callback); + } + }); + } + end() { + this.stream.end(); + } +} +const _ril = Object.freeze({ + messageBuffer: Object.freeze({ + create: (encoding) => new MessageBuffer(encoding) + }), + applicationJson: Object.freeze({ + encoder: Object.freeze({ + name: 'application/json', + encode: (msg, options) => { + try { + return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset)); + } + catch (err) { + return Promise.reject(err); + } + } + }), + decoder: Object.freeze({ + name: 'application/json', + decode: (buffer, options) => { + try { + if (buffer instanceof Buffer) { + return Promise.resolve(JSON.parse(buffer.toString(options.charset))); + } + else { + return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer))); + } + } + catch (err) { + return Promise.reject(err); + } + } + }) + }), + stream: Object.freeze({ + asReadableStream: (stream) => new ReadableStreamWrapper(stream), + asWritableStream: (stream) => new WritableStreamWrapper(stream) + }), + console: console, + timer: Object.freeze({ + setTimeout(callback, ms, ...args) { + const handle = setTimeout(callback, ms, ...args); + return { dispose: () => clearTimeout(handle) }; + }, + setImmediate(callback, ...args) { + const handle = setImmediate(callback, ...args); + return { dispose: () => clearImmediate(handle) }; + }, + setInterval(callback, ms, ...args) { + const handle = setInterval(callback, ms, ...args); + return { dispose: () => clearInterval(handle) }; + } + }) +}); +function RIL() { + return _ril; +} +(function (RIL) { + function install() { + api_1.RAL.install(_ril); + } + RIL.install = install; +})(RIL || (RIL = {})); +exports.default = RIL; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/node.cmd" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/node.cmd" index d6820389cf905e2639588cfaf3d1dd49787060d0..791e6e36ca158adb27a1ca664413568656ce2781 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/node.cmd" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/node.cmd" @@ -1,3 +1,5 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fad7474018db5e3ef38b97374d82fb3b5c56a16aee423f482b6732800007f533 -size 213 +@echo off +REM This file is necessary to ensure that under Windows we don't +REM run the node.js file in the Windows Script Host when using +REM node in packakge.json scripts. See also PATHEXT setting +node.exe %* \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/node.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/node.d.ts" index d4501421d4bd489c9190700a07b50dd52678f01e..b4c4fcd723edbd7b4ea066a4059cf8393e46aa88 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/node.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/node.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c98df0145d99011af92c397fa787fc39d42cc04019614ab5581febe71fb32e1 -size 382 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/node/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/node.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/node.js" index 6ca9fea0ab31ba44f19549c8fa3b28a055f235c0..388e3197ebb862634cda424e9d707896b40627da 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/node.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/node.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20ed9d05087fa65ed99369c32ebaad6d2714c56d38b6b58e660ec428d1280054 -size 408 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/node/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/package.json" index 2dec60cd1ba4691c3277e004118836eabb363a75..b444835f4d70cf67cce85950fd485cf17a6a3fa1 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/package.json" @@ -1,3 +1,45 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ef66d2864301665c0f0194a465d207c85125b8d9baa650d571a7d9d4dbd0a66f -size 1972 +{ + "name": "vscode-jsonrpc", + "description": "A json rpc implementation over streams", + "version": "9.0.0-next.3", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-languageserver-node.git", + "directory": "jsonrpc" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "engines": { + "node": ">=14.0.0" + }, + "main": "./lib/node/main.js", + "browser": { + "./lib/node/main.js": "./lib/browser/main.js" + }, + "typings": "./lib/common/api.d.ts", + "devDependencies": { + "@types/msgpack-lite": "^0.1.10", + "msgpack-lite": "^0.1.26" + }, + "scripts": { + "prepublishOnly": "echo \"⛔ Can only publish from a secure pipeline ⛔\" && node ../build/npm/fail", + "prepack": "npm run all:publish", + "preversion": "npm test", + "compile": "node ../build/bin/tsc -b ./tsconfig.json", + "watch": "node ../build/bin/tsc -b ./tsconfig.watch.json -w", + "clean": "node ../node_modules/rimraf/dist/esm/bin.mjs lib && node ../node_modules/rimraf/dist/esm/bin.mjs dist", + "lint": "node ../node_modules/eslint/bin/eslint.js --ext ts src", + "test": "npm run test:node && npm run test:browser", + "test:node": "node ../node_modules/mocha/bin/_mocha", + "test:browser": "npm run webpack:test:silent && node ../build/bin/runBrowserTests.js http://127.0.0.1:8080/jsonrpc/src/browser/test/", + "webpack": "node ../build/bin/webpack --mode none --config ./webpack.config.js", + "webpack:test": "node ../build/bin/webpack --mode none --config ./src/browser/test/webpack.config.js", + "webpack:test:silent": "node ../build/bin/webpack --no-stats --mode none --config ./src/browser/test/webpack.config.js", + "all": "npm run clean && npm run compile && npm run lint && npm run test", + "compile:publish": "node ../build/bin/tsc -b ./tsconfig.publish.json", + "all:publish": "git clean -xfd . && npm install && npm run compile:publish && npm run lint && npm run test" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/thirdpartynotices.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/thirdpartynotices.txt" index 2d95e953bff42d0943832bbb3cbac2bfdfd91a1e..0592beef14f651f468c39777ce98ebc523ec4a43 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/thirdpartynotices.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/thirdpartynotices.txt" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a89123562fe364dc8e969e85614eb6c1f8452afe131d6e42bd1314bb2d092b04 -size 623 +NOTICES AND INFORMATION +Do Not Translate or Localize + +This software incorporates material from third parties. +Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com, +or you may send a check or money order for US $5.00, including the product name, +the open source component name, platform, and version number, to: + +Source Code Compliance Team +Microsoft Corporation +One Microsoft Way +Redmond, WA 98052 +USA + +Notwithstanding any other terms, you may reverse engineer this software to the extent +required to debug changes to any libraries licensed under the GNU Lesser General Public License. \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/typings/thenable.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/typings/thenable.d.ts" index 71628bfa09bffea0029445a98311b0929f940987..8c4d2eeacd7b7de01db59e651d7eb4990b2ac605 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/typings/thenable.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-jsonrpc/typings/thenable.d.ts" @@ -1,3 +1,5 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:65b9243c80068ec9696b1fbdd23c9acf80d51df02f97b2d7a0514312b0a9fe7d -size 398 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +interface Thenable extends PromiseLike { } \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/License.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/License.txt" index 71c73d0cbbb244fd8977b1334dae3ac9800e0c19..a07e3ae825f86b6d1f966659954bffc0768bef66 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/License.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/License.txt" @@ -1,3 +1,11 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec9ee83580841e8eb687aca9867f221503809ba6426c7f876ede17d91b9fcfd0 -size 1095 +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/README.md" index 8de7b9a45df02871e8cb7d5a9b9fac93c4f9442b..cc65d3e4e5d7e9d591adf10b9ed20e3c331c060f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/README.md" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a66640bcbdb2d60dace652316de43aeaab8b4e7a3afbaa52809cda685b53e7ec -size 1467 +# VSCode Language Server - Protocol Module + +[![NPM Version](https://img.shields.io/npm/v/vscode-languageserver-protocol.svg)](https://npmjs.org/package/vscode-languageclient) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-languageserver-protocol.svg)](https://npmjs.org/package/vscode-languageclient) +[![Build Status](https://dev.azure.com/ms/vscode-languageserver-node/_apis/build/status/microsoft.vscode-languageserver-node?branchName=main)](https://dev.azure.com/ms/vscode-languageserver-node/_build/latest?definitionId=439&branchName=main) + +This npm module is a tool independent implementation of the language server protocol and can be used in any type of node application. Please note that the protocol is versioned using the LSP specification version number. Since the protocol depends on the `vscode-jsonrpc` version a a breaking change on that dependencies might not be reflected in a major version change of this module. Changing the major version number in these cases was more confusing this it would result in a version mismatch between the protocol and the LSP specification. + +See [here](https://github.com/Microsoft/language-server-protocol) for a detailed documentation on the language server protocol. + +## History + +For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md) + +## License +[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt) diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/browser.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/browser.d.ts" index 0898e728f1aa9ab8ecda68d04096c898e91dbe6a..e628f1b5caf549c4b58cead28e5ca6a1d682acf8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/browser.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/browser.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99170b7257d895bb2594d7db9c255a4b0029a1363fe5e89849fda830b5c997ce -size 385 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/browser/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/browser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/browser.js" index da29a4f6ec2636f4c79c022c589b7adc67c91530..f5caebf0011feb56821400f3e85f752c80778192 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/browser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/browser.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9406802db032558d3cd8bde9f68d20c067f3a7eca251ad7d0e4473da8d457ada -size 411 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/browser/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/browser/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/browser/main.d.ts" index e4a45e968b64e31c5705e782f97a78d36f3f1fc3..9452eeaefbb9801b1ba901b571acf017b1910659 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/browser/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/browser/main.d.ts" @@ -1,3 +1,4 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:59ba6326cca505253577e9c34a601031793081c6e2b21b08ee73921fc1ecbeb3 -size 383 +import { MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, ProtocolConnection } from '../common/api'; +export * from 'vscode-jsonrpc/browser'; +export * from '../common/api'; +export declare function createProtocolConnection(reader: MessageReader, writer: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/browser/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/browser/main.js" index 48878e746938c13c553b9ae450a659233bcda2bb..b3d8e5b78f5f638da176068bf0082c0f25a0c7c7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/browser/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/browser/main.js" @@ -1,3 +1,28 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:16c182c4c1d71bdae3d0b6a5197a4edb98abdb04e7186ab73d014b9d3c1c4a10 -size 1526 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createProtocolConnection = void 0; +const browser_1 = require("vscode-jsonrpc/browser"); +__exportStar(require("vscode-jsonrpc/browser"), exports); +__exportStar(require("../common/api"), exports); +function createProtocolConnection(reader, writer, logger, options) { + return (0, browser_1.createMessageConnection)(reader, writer, logger, options); +} +exports.createProtocolConnection = createProtocolConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts" index 676b1d0d3a5bf6a5195a586d84806733d3370ec5..6ac13a0f031a0f056f41bfda9134eac6c484567b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts" @@ -1,3 +1,58 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:63737e468dd56f09a5ad291cae1a69a49ce01cfe989e23698142f2741637af87 -size 1923 +import type { integer } from 'vscode-languageserver-types'; +export * from 'vscode-jsonrpc'; +export * from 'vscode-languageserver-types'; +export * from './messages'; +export * from './protocol'; +export { ProtocolConnection, createProtocolConnection } from './connection'; +export declare namespace LSPErrorCodes { + /** + * This is the start range of LSP reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + const lspReservedErrorRangeStart: integer; + /** + * A request failed but it was syntactically correct, e.g the + * method name was known and the parameters were valid. The error + * message should contain human readable information about why + * the request failed. + * + * @since 3.17.0 + */ + const RequestFailed: integer; + /** + * The server cancelled the request. This error code should + * only be used for requests that explicitly support being + * server cancellable. + * + * @since 3.17.0 + */ + const ServerCancelled: integer; + /** + * The server detected that the content of a document got + * modified outside normal conditions. A server should + * NOT send this error code if it detects a content change + * in it unprocessed messages. The result even computed + * on an older state might still be useful for the client. + * + * If a client decides that a result is not of any use anymore + * the client should cancel the request. + */ + const ContentModified: integer; + /** + * The client has canceled a request and a server has detected + * the cancel. + */ + const RequestCancelled: integer; + /** + * This is the end range of LSP reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + const lspReservedErrorRangeEnd: integer; +} +export type LSPErrorCodes = integer; +export declare namespace Proposed { +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/api.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/api.js" index 34581650fcb3b747cabf0c923df31a4ca09c8481..ffc8398fea58325dd5bd81047fc50fbca0cef76b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/api.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/api.js" @@ -1,3 +1,77 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9e6a38c7fa9e9c895a9def3b2782aa6d237478fcb9ca50fe2bf7a8e01a30ae52 -size 3270 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LSPErrorCodes = exports.createProtocolConnection = void 0; +__exportStar(require("vscode-jsonrpc"), exports); +__exportStar(require("vscode-languageserver-types"), exports); +__exportStar(require("./messages"), exports); +__exportStar(require("./protocol"), exports); +var connection_1 = require("./connection"); +Object.defineProperty(exports, "createProtocolConnection", { enumerable: true, get: function () { return connection_1.createProtocolConnection; } }); +var LSPErrorCodes; +(function (LSPErrorCodes) { + /** + * This is the start range of LSP reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + LSPErrorCodes.lspReservedErrorRangeStart = -32899; + /** + * A request failed but it was syntactically correct, e.g the + * method name was known and the parameters were valid. The error + * message should contain human readable information about why + * the request failed. + * + * @since 3.17.0 + */ + LSPErrorCodes.RequestFailed = -32803; + /** + * The server cancelled the request. This error code should + * only be used for requests that explicitly support being + * server cancellable. + * + * @since 3.17.0 + */ + LSPErrorCodes.ServerCancelled = -32802; + /** + * The server detected that the content of a document got + * modified outside normal conditions. A server should + * NOT send this error code if it detects a content change + * in it unprocessed messages. The result even computed + * on an older state might still be useful for the client. + * + * If a client decides that a result is not of any use anymore + * the client should cancel the request. + */ + LSPErrorCodes.ContentModified = -32801; + /** + * The client has canceled a request and a server has detected + * the cancel. + */ + LSPErrorCodes.RequestCancelled = -32800; + /** + * This is the end range of LSP reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + LSPErrorCodes.lspReservedErrorRangeEnd = -32800; +})(LSPErrorCodes || (exports.LSPErrorCodes = LSPErrorCodes = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts" index 1635e0ecfb46d398d4d074588322acdfd27eefd6..5d89ede052275d887324f52149656626ad1c86c9 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts" @@ -1,3 +1,187 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c0c205fec8b10f3ad0e65af65dd20ea7cf633df0964c84305e375ccdc4f5557e -size 8129 +import { Message, NotificationMessage, CancellationToken, RequestHandler0, RequestHandler, GenericRequestHandler, NotificationHandler0, NotificationHandler, GenericNotificationHandler, ProgressType, Trace, Tracer, TraceOptions, Disposable, Event, MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, RequestType0, RequestType, NotificationType0, NotificationType } from 'vscode-jsonrpc'; +import { ProtocolRequestType, ProtocolRequestType0, ProtocolNotificationType, ProtocolNotificationType0 } from './messages'; +export interface ProtocolConnection { + /** + * Sends a request and returns a promise resolving to the result of the request. + * + * @param type The type of request to sent. + * @param token An optional cancellation token. + * @returns A promise resolving to the request's result. + */ + sendRequest(type: ProtocolRequestType0, token?: CancellationToken): Promise; + sendRequest(type: RequestType0, token?: CancellationToken): Promise; + /** + * Sends a request and returns a promise resolving to the result of the request. + * + * @param type The type of request to sent. + * @param params The request's parameter. + * @param token An optional cancellation token. + * @returns A promise resolving to the request's result. + */ + sendRequest(type: ProtocolRequestType, params: P, token?: CancellationToken): Promise; + sendRequest(type: RequestType, params: P, token?: CancellationToken): Promise; + /** + * Sends a request and returns a promise resolving to the result of the request. + * + * @param method the method name. + * @param token An optional cancellation token. + * @returns A promise resolving to the request's result. + */ + sendRequest(method: string, token?: CancellationToken): Promise; + /** + * Sends a request and returns a promise resolving to the result of the request. + * + * @param method the method name. + * @param params The request's parameter. + * @param token An optional cancellation token. + * @returns A promise resolving to the request's result. + */ + sendRequest(method: string, param: any, token?: CancellationToken): Promise; + /** + * Installs a request handler. + * + * @param type The request type to install the handler for. + * @param handler The actual handler. + * @returns A disposable to remove the handler. + */ + onRequest(type: ProtocolRequestType0, handler: RequestHandler0): Disposable; + onRequest(type: RequestType0, handler: RequestHandler0): Disposable; + /** + * Installs a request handler. + * + * @param type The request type to install the handler for. + * @param handler The actual handler. + * @returns A disposable to remove the handler. + */ + onRequest(type: ProtocolRequestType, handler: RequestHandler): Disposable; + onRequest(type: RequestType, handler: RequestHandler): Disposable; + /** + * Installs a request handler. + * + * @param methods the message method name to install a handler for. + * @param handler The actual handler. + * @returns A disposable to remove the handler. + */ + onRequest(method: string, handler: GenericRequestHandler): Disposable; + /** + * Returns true if the connection has a pending response. + * Otherwise false is returned. + */ + hasPendingResponse(): boolean; + /** + * Sends a notification. + * + * @param type the notification's type to send. + * @returns A promise that resolves when the notification is written to the + * network layer. + */ + sendNotification(type: NotificationType0): Promise; + sendNotification(type: ProtocolNotificationType0): Promise; + /** + * Sends a notification. + * + * @param type the notification's type to send. + * @param params the notification's parameters. + * @returns A promise that resolves when the notification is written to the + * network layer. + */ + sendNotification(type: ProtocolNotificationType, params?: P): Promise; + sendNotification

(type: NotificationType

, params?: P): Promise; + /** + * Sends a notification. + * + * @param method the notification's method name. + * @returns A promise that resolves when the notification is written to the + * network layer. + */ + sendNotification(method: string): Promise; + /** + * Sends a notification. + * + * @param method the notification's method name. + * @param params the notification's parameters. + * @returns A promise that resolves when the notification is written to the + * network layer. + */ + sendNotification(method: string, params: any): Promise; + /** + * Installs a notification handler. + * + * @param type The notification type to install the handler for. + * @param handler The actual handler. + * @returns A disposable to remove the handler. + */ + onNotification(type: ProtocolNotificationType0, handler: NotificationHandler0): Disposable; + onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable; + /** + * Installs a notification handler. + * + * @param type The notification type to install the handler for. + * @param handler The actual handler. + * @returns A disposable to remove the handler. + */ + onNotification(type: ProtocolNotificationType, handler: NotificationHandler

): Disposable; + onNotification

(type: NotificationType

, handler: NotificationHandler

): Disposable; + /** + * Installs a notification handler. + * + * @param methods The message method name to install the handler for. + * @param handler The actual handler. + * @returns A disposable to remove the handler. + */ + onNotification(method: string, handler: GenericNotificationHandler): Disposable; + /** + * Installs a progress handler for a given token. + * @param type the progress type + * @param token the token + * @param handler the handler + * @returns A disposable to remove the handler. + */ + onProgress

(type: ProgressType

, token: string | number, handler: NotificationHandler

): Disposable; + /** + * Sends progress. + * @param type the progress type + * @param token the token to use + * @param value the progress value + * @returns A promise that resolves when the progress is written to the + * network layer. + */ + sendProgress

(type: ProgressType

, token: string | number, value: P): Promise; + /** + * Enables tracing mode for the connection. + * @returns A promise that resolves when the trace value is written to the + * network layer. + */ + trace(value: Trace, tracer: Tracer, sendNotification?: boolean): Promise; + trace(value: Trace, tracer: Tracer, traceOptions?: TraceOptions): Promise; + /** + * An event emitter firing when an error occurs on the connection. + */ + onError: Event<[Error, Message | undefined, number | undefined]>; + /** + * An event emitter firing when the connection got closed. + */ + onClose: Event; + /** + * An event emitter firing when the connection receives a notification that is not + * handled. + */ + onUnhandledNotification: Event; + /** + * An event emitter firing when the connection got disposed. + */ + onDispose: Event; + /** + * Ends the connection. + */ + end(): void; + /** + * Actively disposes the connection. + */ + dispose(): void; + /** + * Turns the connection into listening mode + */ + listen(): void; +} +export declare function createProtocolConnection(input: MessageReader, output: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/connection.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/connection.js" index 392453fcf3aaba7d4bb3fdaca321147538c4d5d9..eb3e86fa636da129056397ae7b9ba01a71457d52 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/connection.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/connection.js" @@ -1,3 +1,15 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b230398b4b9685fb946607ecebaab2c9c739d1002ebf4cee524dffb80f9c306d -size 859 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createProtocolConnection = void 0; +const vscode_jsonrpc_1 = require("vscode-jsonrpc"); +function createProtocolConnection(input, output, logger, options) { + if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) { + options = { connectionStrategy: options }; + } + return (0, vscode_jsonrpc_1.createMessageConnection)(input, output, logger, options); +} +exports.createProtocolConnection = createProtocolConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts" index fa2b9b9da9b1b7556e49cb674a93bf04b7dbd338..cc66a5de494f628d8fa1e3e0496fe340fcb95730 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts" @@ -1,3 +1,51 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5bf947093bfad8e98456c28106a9db37d9276261a7b82fa04f4dc8119bab7f8e -size 2038 +import { RequestType, RequestType0, NotificationType, NotificationType0, ProgressType, _EM } from 'vscode-jsonrpc'; +export declare enum MessageDirection { + clientToServer = "clientToServer", + serverToClient = "serverToClient", + both = "both" +} +export declare class RegistrationType { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly ____: [RO, _EM] | undefined; + readonly method: string; + constructor(method: string); +} +export declare class ProtocolRequestType0 extends RequestType0 implements ProgressType, RegistrationType { + /** + * Clients must not use these properties. They are here to ensure correct typing. + * in TypeScript + */ + readonly __: [PR, _EM] | undefined; + readonly ___: [PR, RO, _EM] | undefined; + readonly ____: [RO, _EM] | undefined; + readonly _pr: PR | undefined; + constructor(method: string); +} +export declare class ProtocolRequestType extends RequestType implements ProgressType, RegistrationType { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly __: [PR, _EM] | undefined; + readonly ___: [PR, RO, _EM] | undefined; + readonly ____: [RO, _EM] | undefined; + readonly _pr: PR | undefined; + constructor(method: string); +} +export declare class ProtocolNotificationType0 extends NotificationType0 implements RegistrationType { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly ___: [RO, _EM] | undefined; + readonly ____: [RO, _EM] | undefined; + constructor(method: string); +} +export declare class ProtocolNotificationType extends NotificationType

implements RegistrationType { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly ___: [RO, _EM] | undefined; + readonly ____: [RO, _EM] | undefined; + constructor(method: string); +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/messages.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/messages.js" index 01019fa7b29a8484aad306be25ea5c782dbf8b22..de7f2755fa369b9b543b0b0ba447d81f62f12fe3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/messages.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/messages.js" @@ -1,3 +1,44 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:749bf2ac16a8af924e924a95fc51a7b888756cf1e66497137b521e6aba540011 -size 1923 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProtocolNotificationType = exports.ProtocolNotificationType0 = exports.ProtocolRequestType = exports.ProtocolRequestType0 = exports.RegistrationType = exports.MessageDirection = void 0; +const vscode_jsonrpc_1 = require("vscode-jsonrpc"); +var MessageDirection; +(function (MessageDirection) { + MessageDirection["clientToServer"] = "clientToServer"; + MessageDirection["serverToClient"] = "serverToClient"; + MessageDirection["both"] = "both"; +})(MessageDirection || (exports.MessageDirection = MessageDirection = {})); +class RegistrationType { + constructor(method) { + this.method = method; + } +} +exports.RegistrationType = RegistrationType; +class ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 { + constructor(method) { + super(method); + } +} +exports.ProtocolRequestType0 = ProtocolRequestType0; +class ProtocolRequestType extends vscode_jsonrpc_1.RequestType { + constructor(method) { + super(method, vscode_jsonrpc_1.ParameterStructures.byName); + } +} +exports.ProtocolRequestType = ProtocolRequestType; +class ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 { + constructor(method) { + super(method); + } +} +exports.ProtocolNotificationType0 = ProtocolNotificationType0; +class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType { + constructor(method) { + super(method, vscode_jsonrpc_1.ParameterStructures.byName); + } +} +exports.ProtocolNotificationType = ProtocolNotificationType; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.d.ts" index a9755173b4bb6da2a9126864f68f2b7288ece072..cb0ff5c3b541f646105198ee23ac0fc3d805023e 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.d.ts" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881 -size 11 +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.js" index 160c45283073a62f48db4c482da2ff70d4b0b80e..afae3b51d76c65de4387571d0b920018a5b3d753 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.js" @@ -1,3 +1,43 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0270b54cea45b7fdf27d450e19d7c258c78c40924bf209ecb62ad682237f201d -size 2303 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) TypeFox, Microsoft and others. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +const vscode_jsonrpc_1 = require("vscode-jsonrpc"); +const messages_1 = require("./messages"); +const api_1 = require("./api"); +// This file is used to define the $ notification partly specified in JSON-RPC +// so that we generate proper data for them in the meta model. +// @ts-ignore 6196 +var SetTraceNotification; +(function (SetTraceNotification) { + SetTraceNotification.method = '$/setTrace'; + SetTraceNotification.messageDirection = messages_1.MessageDirection.clientToServer; + SetTraceNotification.type = new messages_1.ProtocolNotificationType(SetTraceNotification.method); +})(SetTraceNotification || (SetTraceNotification = {})); +// @ts-ignore 6196 +var LogTraceNotification; +(function (LogTraceNotification) { + LogTraceNotification.method = '$/logTrace'; + LogTraceNotification.messageDirection = messages_1.MessageDirection.serverToClient; + LogTraceNotification.type = new messages_1.ProtocolNotificationType(LogTraceNotification.method); +})(LogTraceNotification || (LogTraceNotification = {})); +// @ts-ignore 6196 +const $ErrorCodes = vscode_jsonrpc_1.ErrorCodes; +// @ts-ignore 6196 +const $LSPErrorCodes = api_1.LSPErrorCodes; +// @ts-ignore 6196 +var CancelNotification; +(function (CancelNotification) { + CancelNotification.method = '$/cancelRequest'; + CancelNotification.messageDirection = messages_1.MessageDirection.both; + CancelNotification.type = new messages_1.ProtocolNotificationType(CancelNotification.method); +})(CancelNotification || (CancelNotification = {})); +// @ts-ignore 6196 +var ProgressNotification; +(function (ProgressNotification) { + ProgressNotification.method = '$/progress'; + ProgressNotification.messageDirection = messages_1.MessageDirection.both; + ProgressNotification.type = new messages_1.ProtocolNotificationType(ProgressNotification.method); +})(ProgressNotification || (ProgressNotification = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts" index 5483a83238126669f0a6f1d6772c14307c112fac..3882714af41416a29a3c9406431a2943daa1c4b6 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts" @@ -1,3 +1,86 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:29a456c61c3d93e36f5eba4c0ed567d7896a9c08a38b537c3fc192a99d03b348 -size 3505 +import { RequestHandler } from 'vscode-jsonrpc'; +import { CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +/** + * @since 3.16.0 + */ +export interface CallHierarchyClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + * return value for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; +} +/** + * Call hierarchy options used during static registration. + * + * @since 3.16.0 + */ +export interface CallHierarchyOptions extends WorkDoneProgressOptions { +} +/** + * Call hierarchy options used during static or dynamic registration. + * + * @since 3.16.0 + */ +export interface CallHierarchyRegistrationOptions extends TextDocumentRegistrationOptions, CallHierarchyOptions, StaticRegistrationOptions { +} +/** + * The parameter of a `textDocument/prepareCallHierarchy` request. + * + * @since 3.16.0 + */ +export interface CallHierarchyPrepareParams extends TextDocumentPositionParams, WorkDoneProgressParams { +} +/** + * A request to result a `CallHierarchyItem` in a document at a given position. + * Can be used as an input to an incoming or outgoing call hierarchy. + * + * @since 3.16.0 + */ +export declare namespace CallHierarchyPrepareRequest { + const method: 'textDocument/prepareCallHierarchy'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * The parameter of a `callHierarchy/incomingCalls` request. + * + * @since 3.16.0 + */ +export interface CallHierarchyIncomingCallsParams extends WorkDoneProgressParams, PartialResultParams { + item: CallHierarchyItem; +} +/** + * A request to resolve the incoming calls for a given `CallHierarchyItem`. + * + * @since 3.16.0 + */ +export declare namespace CallHierarchyIncomingCallsRequest { + const method: 'callHierarchy/incomingCalls'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * The parameter of a `callHierarchy/outgoingCalls` request. + * + * @since 3.16.0 + */ +export interface CallHierarchyOutgoingCallsParams extends WorkDoneProgressParams, PartialResultParams { + item: CallHierarchyItem; +} +/** + * A request to resolve the outgoing calls for a given `CallHierarchyItem`. + * + * @since 3.16.0 + */ +export declare namespace CallHierarchyOutgoingCallsRequest { + const method: 'callHierarchy/outgoingCalls'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js" index f8bb373d9436f1d77e7c841e5a4cc0d02ed2c32d..b654fa63a5be388d15c8180f5256869b64084c5a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js" @@ -1,3 +1,42 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:97a0be06fe7f0b92e65a1a9279173ffe096bf3b4d3d28307ca7cdf48d62c7541 -size 2497 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) TypeFox, Microsoft and others. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.CallHierarchyPrepareRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to result a `CallHierarchyItem` in a document at a given position. + * Can be used as an input to an incoming or outgoing call hierarchy. + * + * @since 3.16.0 + */ +var CallHierarchyPrepareRequest; +(function (CallHierarchyPrepareRequest) { + CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy'; + CallHierarchyPrepareRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method); +})(CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = CallHierarchyPrepareRequest = {})); +/** + * A request to resolve the incoming calls for a given `CallHierarchyItem`. + * + * @since 3.16.0 + */ +var CallHierarchyIncomingCallsRequest; +(function (CallHierarchyIncomingCallsRequest) { + CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls'; + CallHierarchyIncomingCallsRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method); +})(CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = CallHierarchyIncomingCallsRequest = {})); +/** + * A request to resolve the outgoing calls for a given `CallHierarchyItem`. + * + * @since 3.16.0 + */ +var CallHierarchyOutgoingCallsRequest; +(function (CallHierarchyOutgoingCallsRequest) { + CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls'; + CallHierarchyOutgoingCallsRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method); +})(CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = CallHierarchyOutgoingCallsRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts" index 18a867d8f2840d81664950694f667932b004e577..adbf45a969c7d612a9311be32b24d5c97da5d936 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts" @@ -1,3 +1,66 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:33e11cee43184a95afe9a450f7dde6bd2b6a03fc9643f898268e8594c266554a -size 2900 +import { RequestHandler } from 'vscode-jsonrpc'; +import { TextDocumentIdentifier, Range, Color, ColorInformation, ColorPresentation } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +export interface DocumentColorClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `DocumentColorRegistrationOptions` return value + * for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; +} +export interface DocumentColorOptions extends WorkDoneProgressOptions { +} +export interface DocumentColorRegistrationOptions extends TextDocumentRegistrationOptions, StaticRegistrationOptions, DocumentColorOptions { +} +/** + * Parameters for a {@link DocumentColorRequest}. + */ +export interface DocumentColorParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; +} +/** + * A request to list all color symbols found in a given text document. The request's + * parameter is of type {@link DocumentColorParams} the + * response is of type {@link ColorInformation ColorInformation[]} or a Thenable + * that resolves to such. + */ +export declare namespace DocumentColorRequest { + const method: 'textDocument/documentColor'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * Parameters for a {@link ColorPresentationRequest}. + */ +export interface ColorPresentationParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The color to request presentations for. + */ + color: Color; + /** + * The range where the color would be inserted. Serves as a context. + */ + range: Range; +} +/** + * A request to list all presentation for a color. The request's + * parameter is of type {@link ColorPresentationParams} the + * response is of type {@link ColorInformation ColorInformation[]} or a Thenable + * that resolves to such. + */ +export declare namespace ColorPresentationRequest { + const method: 'textDocument/colorPresentation'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js" index 93183ad2fdcc9977555de0822ef80510c8c31920..ed43a32ad802c7514ba87191e38744c8d70e5ba0 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js" @@ -1,3 +1,32 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b9b50911781d46cc22a9f6143675411c84e45250a533959ea5097380865d782a -size 1875 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ColorPresentationRequest = exports.DocumentColorRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to list all color symbols found in a given text document. The request's + * parameter is of type {@link DocumentColorParams} the + * response is of type {@link ColorInformation ColorInformation[]} or a Thenable + * that resolves to such. + */ +var DocumentColorRequest; +(function (DocumentColorRequest) { + DocumentColorRequest.method = 'textDocument/documentColor'; + DocumentColorRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method); +})(DocumentColorRequest || (exports.DocumentColorRequest = DocumentColorRequest = {})); +/** + * A request to list all presentation for a color. The request's + * parameter is of type {@link ColorPresentationParams} the + * response is of type {@link ColorInformation ColorInformation[]} or a Thenable + * that resolves to such. + */ +var ColorPresentationRequest; +(function (ColorPresentationRequest) { + ColorPresentationRequest.method = 'textDocument/colorPresentation'; + ColorPresentationRequest.messageDirection = messages_1.MessageDirection.clientToServer; + ColorPresentationRequest.type = new messages_1.ProtocolRequestType(ColorPresentationRequest.method); +})(ColorPresentationRequest || (exports.ColorPresentationRequest = ColorPresentationRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts" index e71bd0a515616858a78713452294095cb0ca8843..20249481b0761d2ade350d347dcd06f4ad210a01 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts" @@ -1,3 +1,35 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:00f191fd642e8130d5b77fb11f76f4762eb86ac1cbe9b89b4ff63ab95be58baa -size 1503 +import { RequestHandler, HandlerResult, CancellationToken } from 'vscode-jsonrpc'; +import { LSPAny, URI } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +/** + * The 'workspace/configuration' request is sent from the server to the client to fetch a certain + * configuration setting. + * + * This pull model replaces the old push model were the client signaled configuration change via an + * event. If the server still needs to react to configuration changes (since the server caches the + * result of `workspace/configuration` requests) the server should register for an empty configuration + * change event and empty the cache if such an event is received. + */ +export declare namespace ConfigurationRequest { + const method: 'workspace/configuration'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; + type MiddlewareSignature = (params: ConfigurationParams, token: CancellationToken, next: HandlerSignature) => HandlerResult; +} +export interface ConfigurationItem { + /** + * The scope to get the configuration section for. + */ + scopeUri?: URI; + /** + * The configuration section asked for. + */ + section?: string; +} +/** + * The parameters of a configuration request. + */ +export interface ConfigurationParams { + items: ConfigurationItem[]; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js" index f0384598e8682154f9452372e76649e7807b0fef..3489a6c52456189da308808fc79437a4bafc1d63 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js" @@ -1,3 +1,24 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:22552e95594bf2fb8b8feba72733473c7ef5e2a7a0c0f1357a6b7dfbd6dec5fb -size 1444 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ConfigurationRequest = void 0; +const messages_1 = require("./messages"); +//---- Get Configuration request ---- +/** + * The 'workspace/configuration' request is sent from the server to the client to fetch a certain + * configuration setting. + * + * This pull model replaces the old push model were the client signaled configuration change via an + * event. If the server still needs to react to configuration changes (since the server caches the + * result of `workspace/configuration` requests) the server should register for an empty configuration + * change event and empty the cache if such an event is received. + */ +var ConfigurationRequest; +(function (ConfigurationRequest) { + ConfigurationRequest.method = 'workspace/configuration'; + ConfigurationRequest.messageDirection = messages_1.MessageDirection.serverToClient; + ConfigurationRequest.type = new messages_1.ProtocolRequestType(ConfigurationRequest.method); +})(ConfigurationRequest || (exports.ConfigurationRequest = ConfigurationRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts" index da51f96093b43074e7e05e2d3d07a3ec44a5bfc1..ca405fd5fa08bc39ba0d0ffb367cd6837f898d75 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts" @@ -1,3 +1,3481 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:544ced4db619b9923bbaad6bf939cfc95ff3864aa795ad3c88e90458506afb23 -size 119863 +import { ProgressToken, RequestHandler, TraceValue } from 'vscode-jsonrpc'; +import { MessageDirection, ProtocolRequestType, ProtocolRequestType0, ProtocolNotificationType, ProtocolNotificationType0 } from './messages'; +import { Position, Range, Location, LocationLink, Diagnostic, Command, TextEdit, WorkspaceEdit, WorkspaceEditMetadata, DocumentUri, TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, CompletionItem, CompletionList, Hover, SignatureHelp, Definition, ReferenceContext, DocumentHighlight, SymbolInformation, CodeLens, CodeActionContext, FormattingOptions, DocumentLink, MarkupKind, SymbolKind, CompletionItemKind, CodeAction, CodeActionKind, DocumentSymbol, CompletionItemTag, DiagnosticTag, SymbolTag, uinteger, integer, InsertTextMode, LSPAny, WorkspaceSymbol, URI, WorkspaceFolder } from 'vscode-languageserver-types'; +import { ImplementationRequest, ImplementationClientCapabilities, ImplementationOptions, ImplementationRegistrationOptions, ImplementationParams } from './protocol.implementation'; +import { TypeDefinitionRequest, TypeDefinitionClientCapabilities, TypeDefinitionOptions, TypeDefinitionRegistrationOptions, TypeDefinitionParams } from './protocol.typeDefinition'; +import { WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFoldersChangeEvent, WorkspaceFoldersInitializeParams, WorkspaceFoldersServerCapabilities } from './protocol.workspaceFolder'; +import { ConfigurationRequest, ConfigurationParams, ConfigurationItem } from './protocol.configuration'; +import { DocumentColorRequest, ColorPresentationRequest, DocumentColorOptions, DocumentColorParams, ColorPresentationParams, DocumentColorClientCapabilities, DocumentColorRegistrationOptions } from './protocol.colorProvider'; +import { FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeRegistrationOptions, FoldingRangeRefreshRequest, FoldingRangeWorkspaceClientCapabilities } from './protocol.foldingRange'; +import { DeclarationClientCapabilities, DeclarationRequest, DeclarationOptions, DeclarationRegistrationOptions, DeclarationParams } from './protocol.declaration'; +import { SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeRequest, SelectionRangeParams, SelectionRangeRegistrationOptions } from './protocol.selectionRange'; +import { WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, WorkDoneProgress, WorkDoneProgressCreateParams, WorkDoneProgressCreateRequest, WorkDoneProgressCancelParams, WorkDoneProgressCancelNotification } from './protocol.progress'; +import { CallHierarchyClientCapabilities, CallHierarchyOptions, CallHierarchyRegistrationOptions, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCallsRequest, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCallsRequest, CallHierarchyPrepareParams, CallHierarchyPrepareRequest } from './protocol.callHierarchy'; +import { SemanticTokensPartialResult, SemanticTokensDeltaPartialResult, TokenFormat, SemanticTokensClientCapabilities, SemanticTokensOptions, SemanticTokensRegistrationOptions, SemanticTokensParams, SemanticTokensRequest, SemanticTokensDeltaParams, SemanticTokensDeltaRequest, SemanticTokensRangeParams, SemanticTokensRangeRequest, SemanticTokensRefreshRequest, SemanticTokensWorkspaceClientCapabilities, SemanticTokensRegistrationType } from './protocol.semanticTokens'; +import { ShowDocumentParams, ShowDocumentResult, ShowDocumentRequest, ShowDocumentClientCapabilities } from './protocol.showDocument'; +import { LinkedEditingRangeClientCapabilities, LinkedEditingRanges, LinkedEditingRangeOptions, LinkedEditingRangeParams, LinkedEditingRangeRegistrationOptions, LinkedEditingRangeRequest } from './protocol.linkedEditingRange'; +import { FileOperationOptions, FileOperationClientCapabilities, FileOperationRegistrationOptions, FileOperationPatternOptions, FileOperationPatternKind, DidCreateFilesNotification, CreateFilesParams, FileCreate, WillCreateFilesRequest, DidRenameFilesNotification, RenameFilesParams, FileRename, WillRenameFilesRequest, DidDeleteFilesNotification, DeleteFilesParams, FileDelete, WillDeleteFilesRequest } from './protocol.fileOperations'; +import { UniquenessLevel, MonikerKind, Moniker, MonikerClientCapabilities, MonikerOptions, MonikerRegistrationOptions, MonikerParams, MonikerRequest } from './protocol.moniker'; +import { TypeHierarchyClientCapabilities, TypeHierarchyOptions, TypeHierarchyRegistrationOptions, TypeHierarchyPrepareParams, TypeHierarchyPrepareRequest, TypeHierarchySubtypesParams, TypeHierarchySubtypesRequest, TypeHierarchySupertypesParams, TypeHierarchySupertypesRequest } from './protocol.typeHierarchy'; +import { InlineValueClientCapabilities, InlineValueOptions, InlineValueRegistrationOptions, InlineValueWorkspaceClientCapabilities, InlineValueParams, InlineValueRequest, InlineValueRefreshRequest } from './protocol.inlineValue'; +import { InlayHintClientCapabilities, InlayHintOptions, InlayHintRegistrationOptions, InlayHintWorkspaceClientCapabilities, InlayHintParams, InlayHintRequest, InlayHintResolveRequest, InlayHintRefreshRequest } from './protocol.inlayHint'; +import { DiagnosticClientCapabilities, DiagnosticOptions, DiagnosticRegistrationOptions, DiagnosticServerCancellationData, DocumentDiagnosticParams, DocumentDiagnosticReportKind, FullDocumentDiagnosticReport, RelatedFullDocumentDiagnosticReport, UnchangedDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DocumentDiagnosticRequest, PreviousResultId, WorkspaceDiagnosticParams, WorkspaceFullDocumentDiagnosticReport, WorkspaceUnchangedDocumentDiagnosticReport, WorkspaceDocumentDiagnosticReport, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult, WorkspaceDiagnosticRequest, DiagnosticRefreshRequest, DiagnosticWorkspaceClientCapabilities } from './protocol.diagnostic'; +import { NotebookDocumentSyncClientCapabilities, NotebookCellKind, ExecutionSummary, NotebookCell, NotebookDocument, NotebookDocumentIdentifier, VersionedNotebookDocumentIdentifier, NotebookDocumentSyncOptions, NotebookDocumentSyncRegistrationOptions, NotebookDocumentSyncRegistrationType, DidOpenNotebookDocumentParams, DidOpenNotebookDocumentNotification, NotebookCellArrayChange, NotebookDocumentChangeEvent, DidChangeNotebookDocumentParams, DidChangeNotebookDocumentNotification, DidSaveNotebookDocumentParams, DidSaveNotebookDocumentNotification, DidCloseNotebookDocumentParams, DidCloseNotebookDocumentNotification } from './protocol.notebook'; +import { InlineCompletionClientCapabilities, InlineCompletionOptions, InlineCompletionParams, InlineCompletionRegistrationOptions, InlineCompletionRequest } from './protocol.inlineCompletion'; +/** + * A document filter where `language` is required field. + * + * @since 3.18.0 + */ +export interface TextDocumentFilterLanguage { + /** A language id, like `typescript`. */ + language: string; + /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */ + scheme?: string; + /** A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. */ + pattern?: string; +} +/** + * A document filter where `scheme` is required field. + * + * @since 3.18.0 + */ +export interface TextDocumentFilterScheme { + /** A language id, like `typescript`. */ + language?: string; + /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */ + scheme: string; + /** A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. */ + pattern?: string; +} +/** + * A document filter where `pattern` is required field. + * + * @since 3.18.0 + */ +export interface TextDocumentFilterPattern { + /** A language id, like `typescript`. */ + language?: string; + /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */ + scheme?: string; + /** A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. */ + pattern: string; +} +/** + * A document filter denotes a document by different properties like + * the {@link TextDocument.languageId language}, the {@link Uri.scheme scheme} of + * its resource, or a glob-pattern that is applied to the {@link TextDocument.fileName path}. + * + * Glob patterns can have the following syntax: + * - `*` to match one or more characters in a path segment + * - `?` to match on one character in a path segment + * - `**` to match any number of path segments, including none + * - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files) + * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`) + * + * @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }` + * @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }` + * + * @since 3.17.0 + */ +export type TextDocumentFilter = TextDocumentFilterLanguage | TextDocumentFilterScheme | TextDocumentFilterPattern; +/** + * The TextDocumentFilter namespace provides helper functions to work with + * {@link TextDocumentFilter} literals. + * + * @since 3.17.0 + */ +export declare namespace TextDocumentFilter { + function is(value: any): value is TextDocumentFilter; +} +/** + * A notebook document filter where `notebookType` is required field. + * + * @since 3.18.0 + */ +export interface NotebookDocumentFilterNotebookType { + /** The type of the enclosing notebook. */ + notebookType: string; + /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */ + scheme?: string; + /** A glob pattern. */ + pattern?: string; +} +/** + * A notebook document filter where `scheme` is required field. + * + * @since 3.18.0 + */ +export interface NotebookDocumentFilterScheme { + /** The type of the enclosing notebook. */ + notebookType?: string; + /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */ + scheme: string; + /** A glob pattern. */ + pattern?: string; +} +/** + * A notebook document filter where `pattern` is required field. + * + * @since 3.18.0 + */ +export interface NotebookDocumentFilterPattern { + /** The type of the enclosing notebook. */ + notebookType?: string; + /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */ + scheme?: string; + /** A glob pattern. */ + pattern: string; +} +/** + * A notebook document filter denotes a notebook document by + * different properties. The properties will be match + * against the notebook's URI (same as with documents) + * + * @since 3.17.0 + */ +export type NotebookDocumentFilter = NotebookDocumentFilterNotebookType | NotebookDocumentFilterScheme | NotebookDocumentFilterPattern; +/** + * The NotebookDocumentFilter namespace provides helper functions to work with + * {@link NotebookDocumentFilter} literals. + * + * @since 3.17.0 + */ +export declare namespace NotebookDocumentFilter { + function is(value: any): value is NotebookDocumentFilter; +} +/** + * A notebook cell text document filter denotes a cell text + * document by different properties. + * + * @since 3.17.0 + */ +export type NotebookCellTextDocumentFilter = { + /** + * A filter that matches against the notebook + * containing the notebook cell. If a string + * value is provided it matches against the + * notebook type. '*' matches every notebook. + */ + notebook: string | NotebookDocumentFilter; + /** + * A language id like `python`. + * + * Will be matched against the language id of the + * notebook cell document. '*' matches every language. + */ + language?: string; +}; +/** + * The NotebookCellTextDocumentFilter namespace provides helper functions to work with + * {@link NotebookCellTextDocumentFilter} literals. + * + * @since 3.17.0 + */ +export declare namespace NotebookCellTextDocumentFilter { + function is(value: any): value is NotebookCellTextDocumentFilter; +} +/** + * A document filter describes a top level text document or + * a notebook cell document. + * + * @since 3.17.0 - proposed support for NotebookCellTextDocumentFilter. + */ +export type DocumentFilter = TextDocumentFilter | NotebookCellTextDocumentFilter; +/** + * A document selector is the combination of one or many document filters. + * + * @sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`; + * + * The use of a string as a document filter is deprecated @since 3.16.0. + */ +export type DocumentSelector = (string | DocumentFilter)[]; +/** + * The DocumentSelector namespace provides helper functions to work with + * {@link DocumentSelector}s. + */ +export declare namespace DocumentSelector { + function is(value: any[] | undefined | null): value is DocumentSelector; +} +/** + * General parameters to register for a notification or to register a provider. + */ +export interface Registration { + /** + * The id used to register the request. The id can be used to deregister + * the request again. + */ + id: string; + /** + * The method / capability to register for. + */ + method: string; + /** + * Options necessary for the registration. + */ + registerOptions?: LSPAny; +} +export interface RegistrationParams { + registrations: Registration[]; +} +/** + * The `client/registerCapability` request is sent from the server to the client to register a new capability + * handler on the client side. + */ +export declare namespace RegistrationRequest { + const method: 'client/registerCapability'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * General parameters to unregister a request or notification. + */ +export interface Unregistration { + /** + * The id used to unregister the request or notification. Usually an id + * provided during the register request. + */ + id: string; + /** + * The method to unregister for. + */ + method: string; +} +export interface UnregistrationParams { + unregisterations: Unregistration[]; +} +/** + * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability + * handler on the client side. + */ +export declare namespace UnregistrationRequest { + const method: 'client/unregisterCapability'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +export interface WorkDoneProgressParams { + /** + * An optional token that a server can use to report work done progress. + */ + workDoneToken?: ProgressToken; +} +export interface PartialResultParams { + /** + * An optional token that a server can use to report partial results (e.g. streaming) to + * the client. + */ + partialResultToken?: ProgressToken; +} +/** + * A parameter literal used in requests to pass a text document and a position inside that + * document. + */ +export interface TextDocumentPositionParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The position inside the text document. + */ + position: Position; +} +/** + * The kind of resource operations supported by the client. + */ +export type ResourceOperationKind = 'create' | 'rename' | 'delete'; +export declare namespace ResourceOperationKind { + /** + * Supports creating new files and folders. + */ + const Create: ResourceOperationKind; + /** + * Supports renaming existing files and folders. + */ + const Rename: ResourceOperationKind; + /** + * Supports deleting existing files and folders. + */ + const Delete: ResourceOperationKind; +} +export type FailureHandlingKind = 'abort' | 'transactional' | 'undo' | 'textOnlyTransactional'; +export declare namespace FailureHandlingKind { + /** + * Applying the workspace change is simply aborted if one of the changes provided + * fails. All operations executed before the failing operation stay executed. + */ + const Abort: FailureHandlingKind; + /** + * All operations are executed transactional. That means they either all + * succeed or no changes at all are applied to the workspace. + */ + const Transactional: FailureHandlingKind; + /** + * If the workspace edit contains only textual file changes they are executed transactional. + * If resource changes (create, rename or delete file) are part of the change the failure + * handling strategy is abort. + */ + const TextOnlyTransactional: FailureHandlingKind; + /** + * The client tries to undo the operations already executed. But there is no + * guarantee that this is succeeding. + */ + const Undo: FailureHandlingKind; +} +/** + * Workspace specific client capabilities. + */ +export interface WorkspaceClientCapabilities { + /** + * The client supports applying batch edits + * to the workspace by supporting the request + * 'workspace/applyEdit' + */ + applyEdit?: boolean; + /** + * Capabilities specific to `WorkspaceEdit`s. + */ + workspaceEdit?: WorkspaceEditClientCapabilities; + /** + * Capabilities specific to the `workspace/didChangeConfiguration` notification. + */ + didChangeConfiguration?: DidChangeConfigurationClientCapabilities; + /** + * Capabilities specific to the `workspace/didChangeWatchedFiles` notification. + */ + didChangeWatchedFiles?: DidChangeWatchedFilesClientCapabilities; + /** + * Capabilities specific to the `workspace/symbol` request. + */ + symbol?: WorkspaceSymbolClientCapabilities; + /** + * Capabilities specific to the `workspace/executeCommand` request. + */ + executeCommand?: ExecuteCommandClientCapabilities; + /** + * The client has support for workspace folders. + * + * @since 3.6.0 + */ + workspaceFolders?: boolean; + /** + * The client supports `workspace/configuration` requests. + * + * @since 3.6.0 + */ + configuration?: boolean; + /** + * Capabilities specific to the semantic token requests scoped to the + * workspace. + * + * @since 3.16.0. + */ + semanticTokens?: SemanticTokensWorkspaceClientCapabilities; + /** + * Capabilities specific to the code lens requests scoped to the + * workspace. + * + * @since 3.16.0. + */ + codeLens?: CodeLensWorkspaceClientCapabilities; + /** + * The client has support for file notifications/requests for user operations on files. + * + * Since 3.16.0 + */ + fileOperations?: FileOperationClientCapabilities; + /** + * Capabilities specific to the inline values requests scoped to the + * workspace. + * + * @since 3.17.0. + */ + inlineValue?: InlineValueWorkspaceClientCapabilities; + /** + * Capabilities specific to the inlay hint requests scoped to the + * workspace. + * + * @since 3.17.0. + */ + inlayHint?: InlayHintWorkspaceClientCapabilities; + /** + * Capabilities specific to the diagnostic requests scoped to the + * workspace. + * + * @since 3.17.0. + */ + diagnostics?: DiagnosticWorkspaceClientCapabilities; + /** + * Capabilities specific to the folding range requests scoped to the workspace. + * + * @since 3.18.0 + * @proposed + */ + foldingRange?: FoldingRangeWorkspaceClientCapabilities; +} +/** + * Text document specific client capabilities. + */ +export interface TextDocumentClientCapabilities { + /** + * Defines which synchronization capabilities the client supports. + */ + synchronization?: TextDocumentSyncClientCapabilities; + /** + * Capabilities specific to the `textDocument/completion` request. + */ + completion?: CompletionClientCapabilities; + /** + * Capabilities specific to the `textDocument/hover` request. + */ + hover?: HoverClientCapabilities; + /** + * Capabilities specific to the `textDocument/signatureHelp` request. + */ + signatureHelp?: SignatureHelpClientCapabilities; + /** + * Capabilities specific to the `textDocument/declaration` request. + * + * @since 3.14.0 + */ + declaration?: DeclarationClientCapabilities; + /** + * Capabilities specific to the `textDocument/definition` request. + */ + definition?: DefinitionClientCapabilities; + /** + * Capabilities specific to the `textDocument/typeDefinition` request. + * + * @since 3.6.0 + */ + typeDefinition?: TypeDefinitionClientCapabilities; + /** + * Capabilities specific to the `textDocument/implementation` request. + * + * @since 3.6.0 + */ + implementation?: ImplementationClientCapabilities; + /** + * Capabilities specific to the `textDocument/references` request. + */ + references?: ReferenceClientCapabilities; + /** + * Capabilities specific to the `textDocument/documentHighlight` request. + */ + documentHighlight?: DocumentHighlightClientCapabilities; + /** + * Capabilities specific to the `textDocument/documentSymbol` request. + */ + documentSymbol?: DocumentSymbolClientCapabilities; + /** + * Capabilities specific to the `textDocument/codeAction` request. + */ + codeAction?: CodeActionClientCapabilities; + /** + * Capabilities specific to the `textDocument/codeLens` request. + */ + codeLens?: CodeLensClientCapabilities; + /** + * Capabilities specific to the `textDocument/documentLink` request. + */ + documentLink?: DocumentLinkClientCapabilities; + /** + * Capabilities specific to the `textDocument/documentColor` and the + * `textDocument/colorPresentation` request. + * + * @since 3.6.0 + */ + colorProvider?: DocumentColorClientCapabilities; + /** + * Capabilities specific to the `textDocument/formatting` request. + */ + formatting?: DocumentFormattingClientCapabilities; + /** + * Capabilities specific to the `textDocument/rangeFormatting` request. + */ + rangeFormatting?: DocumentRangeFormattingClientCapabilities; + /** + * Capabilities specific to the `textDocument/onTypeFormatting` request. + */ + onTypeFormatting?: DocumentOnTypeFormattingClientCapabilities; + /** + * Capabilities specific to the `textDocument/rename` request. + */ + rename?: RenameClientCapabilities; + /** + * Capabilities specific to the `textDocument/foldingRange` request. + * + * @since 3.10.0 + */ + foldingRange?: FoldingRangeClientCapabilities; + /** + * Capabilities specific to the `textDocument/selectionRange` request. + * + * @since 3.15.0 + */ + selectionRange?: SelectionRangeClientCapabilities; + /** + * Capabilities specific to the `textDocument/publishDiagnostics` notification. + */ + publishDiagnostics?: PublishDiagnosticsClientCapabilities; + /** + * Capabilities specific to the various call hierarchy requests. + * + * @since 3.16.0 + */ + callHierarchy?: CallHierarchyClientCapabilities; + /** + * Capabilities specific to the various semantic token request. + * + * @since 3.16.0 + */ + semanticTokens?: SemanticTokensClientCapabilities; + /** + * Capabilities specific to the `textDocument/linkedEditingRange` request. + * + * @since 3.16.0 + */ + linkedEditingRange?: LinkedEditingRangeClientCapabilities; + /** + * Client capabilities specific to the `textDocument/moniker` request. + * + * @since 3.16.0 + */ + moniker?: MonikerClientCapabilities; + /** + * Capabilities specific to the various type hierarchy requests. + * + * @since 3.17.0 + */ + typeHierarchy?: TypeHierarchyClientCapabilities; + /** + * Capabilities specific to the `textDocument/inlineValue` request. + * + * @since 3.17.0 + */ + inlineValue?: InlineValueClientCapabilities; + /** + * Capabilities specific to the `textDocument/inlayHint` request. + * + * @since 3.17.0 + */ + inlayHint?: InlayHintClientCapabilities; + /** + * Capabilities specific to the diagnostic pull model. + * + * @since 3.17.0 + */ + diagnostic?: DiagnosticClientCapabilities; + /** + * Client capabilities specific to inline completions. + * + * @since 3.18.0 + * @proposed + */ + inlineCompletion?: InlineCompletionClientCapabilities; +} +export interface WindowClientCapabilities { + /** + * It indicates whether the client supports server initiated + * progress using the `window/workDoneProgress/create` request. + * + * The capability also controls Whether client supports handling + * of progress notifications. If set servers are allowed to report a + * `workDoneProgress` property in the request specific server + * capabilities. + * + * @since 3.15.0 + */ + workDoneProgress?: boolean; + /** + * Capabilities specific to the showMessage request. + * + * @since 3.16.0 + */ + showMessage?: ShowMessageRequestClientCapabilities; + /** + * Capabilities specific to the showDocument request. + * + * @since 3.16.0 + */ + showDocument?: ShowDocumentClientCapabilities; +} +/** + * Regular Expression Engines + * + * @since 3.18.0 + * @proposed + */ +export declare namespace RegularExpressionEngineKind { + const ES2020: "ES2020"; +} +export type RegularExpressionEngineKind = string; +/** + * Client capabilities specific to regular expressions. + * + * @since 3.16.0 + */ +export interface RegularExpressionsClientCapabilities { + /** + * The engine's name. + */ + engine: RegularExpressionEngineKind; + /** + * The engine's version. + */ + version?: string; +} +/** + * Client capabilities specific to the used markdown parser. + * + * @since 3.16.0 + */ +export interface MarkdownClientCapabilities { + /** + * The name of the parser. + */ + parser: string; + /** + * The version of the parser. + */ + version?: string; + /** + * A list of HTML tags that the client allows / supports in + * Markdown. + * + * @since 3.17.0 + */ + allowedTags?: string[]; +} +/** + * A set of predefined position encoding kinds. + * + * @since 3.17.0 + */ +export declare namespace PositionEncodingKind { + /** + * Character offsets count UTF-8 code units (e.g. bytes). + */ + const UTF8: PositionEncodingKind; + /** + * Character offsets count UTF-16 code units. + * + * This is the default and must always be supported + * by servers + */ + const UTF16: PositionEncodingKind; + /** + * Character offsets count UTF-32 code units. + * + * Implementation note: these are the same as Unicode codepoints, + * so this `PositionEncodingKind` may also be used for an + * encoding-agnostic representation of character offsets. + */ + const UTF32: PositionEncodingKind; +} +/** + * A type indicating how positions are encoded, + * specifically what column offsets mean. + * + * @since 3.17.0 + */ +export type PositionEncodingKind = string; +/** + * @since 3.18.0 + */ +export interface StaleRequestSupportOptions { + /** + * The client will actively cancel the request. + */ + cancel: boolean; + /** + * The list of requests for which the client + * will retry the request if it receives a + * response with error code `ContentModified` + */ + retryOnContentModified: string[]; +} +/** + * General client capabilities. + * + * @since 3.16.0 + */ +export interface GeneralClientCapabilities { + /** + * Client capability that signals how the client + * handles stale requests (e.g. a request + * for which the client will not process the response + * anymore since the information is outdated). + * + * @since 3.17.0 + */ + staleRequestSupport?: StaleRequestSupportOptions; + /** + * Client capabilities specific to regular expressions. + * + * @since 3.16.0 + */ + regularExpressions?: RegularExpressionsClientCapabilities; + /** + * Client capabilities specific to the client's markdown parser. + * + * @since 3.16.0 + */ + markdown?: MarkdownClientCapabilities; + /** + * The position encodings supported by the client. Client and server + * have to agree on the same position encoding to ensure that offsets + * (e.g. character position in a line) are interpreted the same on both + * sides. + * + * To keep the protocol backwards compatible the following applies: if + * the value 'utf-16' is missing from the array of position encodings + * servers can assume that the client supports UTF-16. UTF-16 is + * therefore a mandatory encoding. + * + * If omitted it defaults to ['utf-16']. + * + * Implementation considerations: since the conversion from one encoding + * into another requires the content of the file / line the conversion + * is best done where the file is read which is usually on the server + * side. + * + * @since 3.17.0 + */ + positionEncodings?: PositionEncodingKind[]; +} +/** + * Capabilities specific to the notebook document support. + * + * @since 3.17.0 + */ +export interface NotebookDocumentClientCapabilities { + /** + * Capabilities specific to notebook document synchronization + * + * @since 3.17.0 + */ + synchronization: NotebookDocumentSyncClientCapabilities; +} +/** + * Defines the capabilities provided by the client. + */ +export interface ClientCapabilities { + /** + * Workspace specific client capabilities. + */ + workspace?: WorkspaceClientCapabilities; + /** + * Text document specific client capabilities. + */ + textDocument?: TextDocumentClientCapabilities; + /** + * Capabilities specific to the notebook document support. + * + * @since 3.17.0 + */ + notebookDocument?: NotebookDocumentClientCapabilities; + /** + * Window specific client capabilities. + */ + window?: WindowClientCapabilities; + /** + * General client capabilities. + * + * @since 3.16.0 + */ + general?: GeneralClientCapabilities; + /** + * Experimental client capabilities. + */ + experimental?: LSPAny; +} +/** + * Static registration options to be returned in the initialize + * request. + */ +export interface StaticRegistrationOptions { + /** + * The id used to register the request. The id can be used to deregister + * the request again. See also Registration#id. + */ + id?: string; +} +/** + * The StaticRegistrationOptions namespace provides helper functions to work with + * {@link StaticRegistrationOptions} literals. + */ +export declare namespace StaticRegistrationOptions { + function hasId(value: object): value is { + id: string; + }; +} +/** + * General text document registration options. + */ +export interface TextDocumentRegistrationOptions { + /** + * A document selector to identify the scope of the registration. If set to null + * the document selector provided on the client side will be used. + */ + documentSelector: DocumentSelector | null; +} +/** + * The TextDocumentRegistrationOptions namespace provides helper functions to work with + * {@link TextDocumentRegistrationOptions} literals. + */ +export declare namespace TextDocumentRegistrationOptions { + function is(value: any): value is TextDocumentRegistrationOptions; +} +/** + * Save options. + */ +export interface SaveOptions { + /** + * The client is supposed to include the content on save. + */ + includeText?: boolean; +} +export interface WorkDoneProgressOptions { + workDoneProgress?: boolean; +} +/** + * The WorkDoneProgressOptions namespace provides helper functions to work with + * {@link WorkDoneProgressOptions} literals. + */ +export declare namespace WorkDoneProgressOptions { + function is(value: any): value is WorkDoneProgressOptions; + function hasWorkDoneProgress(value: any): value is { + workDoneProgress: boolean; + }; +} +/** + * Defines workspace specific capabilities of the server. + * + * @since 3.18.0 + */ +export interface WorkspaceOptions { + /** + * The server supports workspace folder. + * + * @since 3.6.0 + */ + workspaceFolders?: WorkspaceFoldersServerCapabilities; + /** + * The server is interested in notifications/requests for operations on files. + * + * @since 3.16.0 + */ + fileOperations?: FileOperationOptions; +} +/** + * Defines the capabilities provided by a language + * server. + */ +export interface ServerCapabilities { + /** + * The position encoding the server picked from the encodings offered + * by the client via the client capability `general.positionEncodings`. + * + * If the client didn't provide any position encodings the only valid + * value that a server can return is 'utf-16'. + * + * If omitted it defaults to 'utf-16'. + * + * @since 3.17.0 + */ + positionEncoding?: PositionEncodingKind; + /** + * Defines how text documents are synced. Is either a detailed structure + * defining each notification or for backwards compatibility the + * TextDocumentSyncKind number. + */ + textDocumentSync?: TextDocumentSyncOptions | TextDocumentSyncKind; + /** + * Defines how notebook documents are synced. + * + * @since 3.17.0 + */ + notebookDocumentSync?: NotebookDocumentSyncOptions | NotebookDocumentSyncRegistrationOptions; + /** + * The server provides completion support. + */ + completionProvider?: CompletionOptions; + /** + * The server provides hover support. + */ + hoverProvider?: boolean | HoverOptions; + /** + * The server provides signature help support. + */ + signatureHelpProvider?: SignatureHelpOptions; + /** + * The server provides Goto Declaration support. + */ + declarationProvider?: boolean | DeclarationOptions | DeclarationRegistrationOptions; + /** + * The server provides goto definition support. + */ + definitionProvider?: boolean | DefinitionOptions; + /** + * The server provides Goto Type Definition support. + */ + typeDefinitionProvider?: boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions; + /** + * The server provides Goto Implementation support. + */ + implementationProvider?: boolean | ImplementationOptions | ImplementationRegistrationOptions; + /** + * The server provides find references support. + */ + referencesProvider?: boolean | ReferenceOptions; + /** + * The server provides document highlight support. + */ + documentHighlightProvider?: boolean | DocumentHighlightOptions; + /** + * The server provides document symbol support. + */ + documentSymbolProvider?: boolean | DocumentSymbolOptions; + /** + * The server provides code actions. CodeActionOptions may only be + * specified if the client states that it supports + * `codeActionLiteralSupport` in its initial `initialize` request. + */ + codeActionProvider?: boolean | CodeActionOptions; + /** + * The server provides code lens. + */ + codeLensProvider?: CodeLensOptions; + /** + * The server provides document link support. + */ + documentLinkProvider?: DocumentLinkOptions; + /** + * The server provides color provider support. + */ + colorProvider?: boolean | DocumentColorOptions | DocumentColorRegistrationOptions; + /** + * The server provides workspace symbol support. + */ + workspaceSymbolProvider?: boolean | WorkspaceSymbolOptions; + /** + * The server provides document formatting. + */ + documentFormattingProvider?: boolean | DocumentFormattingOptions; + /** + * The server provides document range formatting. + */ + documentRangeFormattingProvider?: boolean | DocumentRangeFormattingOptions; + /** + * The server provides document formatting on typing. + */ + documentOnTypeFormattingProvider?: DocumentOnTypeFormattingOptions; + /** + * The server provides rename support. RenameOptions may only be + * specified if the client states that it supports + * `prepareSupport` in its initial `initialize` request. + */ + renameProvider?: boolean | RenameOptions; + /** + * The server provides folding provider support. + */ + foldingRangeProvider?: boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions; + /** + * The server provides selection range support. + */ + selectionRangeProvider?: boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions; + /** + * The server provides execute command support. + */ + executeCommandProvider?: ExecuteCommandOptions; + /** + * The server provides call hierarchy support. + * + * @since 3.16.0 + */ + callHierarchyProvider?: boolean | CallHierarchyOptions | CallHierarchyRegistrationOptions; + /** + * The server provides linked editing range support. + * + * @since 3.16.0 + */ + linkedEditingRangeProvider?: boolean | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions; + /** + * The server provides semantic tokens support. + * + * @since 3.16.0 + */ + semanticTokensProvider?: SemanticTokensOptions | SemanticTokensRegistrationOptions; + /** + * The server provides moniker support. + * + * @since 3.16.0 + */ + monikerProvider?: boolean | MonikerOptions | MonikerRegistrationOptions; + /** + * The server provides type hierarchy support. + * + * @since 3.17.0 + */ + typeHierarchyProvider?: boolean | TypeHierarchyOptions | TypeHierarchyRegistrationOptions; + /** + * The server provides inline values. + * + * @since 3.17.0 + */ + inlineValueProvider?: boolean | InlineValueOptions | InlineValueRegistrationOptions; + /** + * The server provides inlay hints. + * + * @since 3.17.0 + */ + inlayHintProvider?: boolean | InlayHintOptions | InlayHintRegistrationOptions; + /** + * The server has support for pull model diagnostics. + * + * @since 3.17.0 + */ + diagnosticProvider?: DiagnosticOptions | DiagnosticRegistrationOptions; + /** + * Inline completion options used during static registration. + * + * @since 3.18.0 + * @proposed + */ + inlineCompletionProvider?: boolean | InlineCompletionOptions; + /** + * Workspace specific server capabilities. + */ + workspace?: WorkspaceOptions; + /** + * Experimental server capabilities. + */ + experimental?: T; +} +/** + * Information about the server + * + * @since 3.15.0 + * @since 3.18.0 ServerInfo type name added. + */ +export interface ServerInfo { + /** + * The name of the server as defined by the server. + */ + name: string; + /** + * The server's version as defined by the server. + */ + version?: string; +} +/** + * Information about the client + * + * @since 3.15.0 + * @since 3.18.0 ClientInfo type name added. + */ +export interface ClientInfo { + /** + * The name of the client as defined by the client. + */ + name: string; + /** + * The client's version as defined by the client. + */ + version?: string; +} +/** + * The initialize request is sent from the client to the server. + * It is sent once as the request after starting up the server. + * The requests parameter is of type {@link InitializeParams} + * the response if of type {@link InitializeResult} of a Thenable that + * resolves to such. + */ +export declare namespace InitializeRequest { + const method: 'initialize'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType, never, InitializeError, void>; +} +/** + * The initialize parameters + */ +export interface _InitializeParams extends WorkDoneProgressParams { + /** + * The process Id of the parent process that started + * the server. + * + * Is `null` if the process has not been started by another process. + * If the parent process is not alive then the server should exit. + */ + processId: integer | null; + /** + * Information about the client + * + * @since 3.15.0 + */ + clientInfo?: ClientInfo; + /** + * The locale the client is currently showing the user interface + * in. This must not necessarily be the locale of the operating + * system. + * + * Uses IETF language tags as the value's syntax + * (See https://en.wikipedia.org/wiki/IETF_language_tag) + * + * @since 3.16.0 + */ + locale?: string; + /** + * The rootPath of the workspace. Is null + * if no folder is open. + * + * @deprecated in favour of rootUri. + */ + rootPath?: string | null; + /** + * The rootUri of the workspace. Is null if no + * folder is open. If both `rootPath` and `rootUri` are set + * `rootUri` wins. + * + * @deprecated in favour of workspaceFolders. + */ + rootUri: DocumentUri | null; + /** + * The capabilities provided by the client (editor or tool) + */ + capabilities: ClientCapabilities; + /** + * User provided initialization options. + */ + initializationOptions?: LSPAny; + /** + * The initial trace setting. If omitted trace is disabled ('off'). + */ + trace?: TraceValue; +} +export type InitializeParams = _InitializeParams & WorkspaceFoldersInitializeParams; +/** + * The result returned from an initialize request. + */ +export interface InitializeResult { + /** + * The capabilities the language server provides. + */ + capabilities: ServerCapabilities; + /** + * Information about the server. + * + * @since 3.15.0 + */ + serverInfo?: ServerInfo; + /** + * Custom initialization results. + */ + [custom: string]: LSPAny | ServerCapabilities | undefined; /** undefined is needed since serverInfo is optional */ +} +/** + * Known error codes for an `InitializeErrorCodes`; + */ +export declare namespace InitializeErrorCodes { + /** + * If the protocol version provided by the client can't be handled by the server. + * + * @deprecated This initialize error got replaced by client capabilities. There is + * no version handshake in version 3.0x + */ + const unknownProtocolVersion: 1; +} +export type InitializeErrorCodes = 1; +/** + * The data type of the ResponseError if the + * initialize request fails. + */ +export interface InitializeError { + /** + * Indicates whether the client execute the following retry logic: + * (1) show the message provided by the ResponseError to the user + * (2) user selects retry or cancel + * (3) if user selected retry the initialize method is sent again. + */ + retry: boolean; +} +export interface InitializedParams { +} +/** + * The initialized notification is sent from the client to the + * server after the client is fully initialized and the server + * is allowed to send requests from the server to the client. + */ +export declare namespace InitializedNotification { + const method: 'initialized'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * A shutdown request is sent from the client to the server. + * It is sent once when the client decides to shutdown the + * server. The only notification that is sent after a shutdown request + * is the exit event. + */ +export declare namespace ShutdownRequest { + const method: 'shutdown'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType0; +} +/** + * The exit event is sent from the client to the server to + * ask the server to exit its process. + */ +export declare namespace ExitNotification { + const method: 'exit'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType0; +} +export interface DidChangeConfigurationClientCapabilities { + /** + * Did change configuration notification supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * The configuration change notification is sent from the client to the server + * when the client's configuration has changed. The notification contains + * the changed configuration as defined by the language client. + */ +export declare namespace DidChangeConfigurationNotification { + const method: 'workspace/didChangeConfiguration'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +export interface DidChangeConfigurationRegistrationOptions { + section?: string | string[]; +} +/** + * The parameters of a change configuration notification. + */ +export interface DidChangeConfigurationParams { + /** + * The actual changed settings + */ + settings: LSPAny; +} +/** + * The message type + */ +export declare namespace MessageType { + /** + * An error message. + */ + const Error = 1; + /** + * A warning message. + */ + const Warning = 2; + /** + * An information message. + */ + const Info = 3; + /** + * A log message. + */ + const Log = 4; + /** + * A debug message. + * + * @since 3.18.0 + * @proposed + */ + const Debug = 5; +} +export type MessageType = 1 | 2 | 3 | 4 | 5; +/** + * The parameters of a notification message. + */ +export interface ShowMessageParams { + /** + * The message type. See {@link MessageType} + */ + type: MessageType; + /** + * The actual message. + */ + message: string; +} +/** + * The show message notification is sent from a server to a client to ask + * the client to display a particular message in the user interface. + */ +export declare namespace ShowMessageNotification { + const method: 'window/showMessage'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * @since 3.18.0 + */ +export interface ClientShowMessageActionItemOptions { + /** + * Whether the client supports additional attributes which + * are preserved and send back to the server in the + * request's response. + */ + additionalPropertiesSupport?: boolean; +} +/** + * Show message request client capabilities + */ +export interface ShowMessageRequestClientCapabilities { + /** + * Capabilities specific to the `MessageActionItem` type. + */ + messageActionItem?: ClientShowMessageActionItemOptions; +} +export interface MessageActionItem { + /** + * A short title like 'Retry', 'Open Log' etc. + */ + title: string; + /** + * Additional attributes that the client preserves and + * sends back to the server. This depends on the client + * capability window.messageActionItem.additionalPropertiesSupport + */ + [key: string]: string | boolean | integer | object; +} +export interface ShowMessageRequestParams { + /** + * The message type. See {@link MessageType} + */ + type: MessageType; + /** + * The actual message. + */ + message: string; + /** + * The message action items to present. + */ + actions?: MessageActionItem[]; +} +/** + * The show message request is sent from the server to the client to show a message + * and a set of options actions to the user. + */ +export declare namespace ShowMessageRequest { + const method: 'window/showMessageRequest'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * The log message notification is sent from the server to the client to ask + * the client to log a particular message. + */ +export declare namespace LogMessageNotification { + const method: 'window/logMessage'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * The log message parameters. + */ +export interface LogMessageParams { + /** + * The message type. See {@link MessageType} + */ + type: MessageType; + /** + * The actual message. + */ + message: string; +} +/** + * The telemetry event notification is sent from the server to the client to ask + * the client to log telemetry data. + */ +export declare namespace TelemetryEventNotification { + const method: 'telemetry/event'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +export interface TextDocumentSyncClientCapabilities { + /** + * Whether text document synchronization supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * The client supports sending will save notifications. + */ + willSave?: boolean; + /** + * The client supports sending a will save request and + * waits for a response providing text edits which will + * be applied to the document before it is saved. + */ + willSaveWaitUntil?: boolean; + /** + * The client supports did save notifications. + */ + didSave?: boolean; +} +/** + * Defines how the host (editor) should sync + * document changes to the language server. + */ +export declare namespace TextDocumentSyncKind { + /** + * Documents should not be synced at all. + */ + const None = 0; + /** + * Documents are synced by always sending the full content + * of the document. + */ + const Full = 1; + /** + * Documents are synced by sending the full content on open. + * After that only incremental updates to the document are + * send. + */ + const Incremental = 2; +} +export type TextDocumentSyncKind = 0 | 1 | 2; +export interface TextDocumentSyncOptions { + /** + * Open and close notifications are sent to the server. If omitted open close notification should not + * be sent. + */ + openClose?: boolean; + /** + * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full + * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None. + */ + change?: TextDocumentSyncKind; + /** + * If present will save notifications are sent to the server. If omitted the notification should not be + * sent. + */ + willSave?: boolean; + /** + * If present will save wait until requests are sent to the server. If omitted the request should not be + * sent. + */ + willSaveWaitUntil?: boolean; + /** + * If present save notifications are sent to the server. If omitted the notification should not be + * sent. + */ + save?: boolean | SaveOptions; +} +/** + * The parameters sent in an open text document notification + */ +export interface DidOpenTextDocumentParams { + /** + * The document that was opened. + */ + textDocument: TextDocumentItem; +} +/** + * The document open notification is sent from the client to the server to signal + * newly opened text documents. The document's truth is now managed by the client + * and the server must not try to read the document's truth using the document's + * uri. Open in this sense means it is managed by the client. It doesn't necessarily + * mean that its content is presented in an editor. An open notification must not + * be sent more than once without a corresponding close notification send before. + * This means open and close notification must be balanced and the max open count + * is one. + */ +export declare namespace DidOpenTextDocumentNotification { + const method: 'textDocument/didOpen'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * @since 3.18.0 + */ +export interface TextDocumentContentChangeWholeDocument { + /** + * The new text of the whole document. + */ + text: string; +} +/** + * @since 3.18.0 + */ +export interface TextDocumentContentChangePartial { + /** + * The range of the document that changed. + */ + range: Range; + /** + * The optional length of the range that got replaced. + * + * @deprecated use range instead. + */ + rangeLength?: uinteger; + /** + * The new text for the provided range. + */ + text: string; +} +/** + * An event describing a change to a text document. If only a text is provided + * it is considered to be the full content of the document. + */ +export type TextDocumentContentChangeEvent = TextDocumentContentChangePartial | TextDocumentContentChangeWholeDocument; +export declare namespace TextDocumentContentChangeEvent { + /** + * Checks whether the information describes a delta event. + */ + function isIncremental(event: TextDocumentContentChangeEvent): event is { + range: Range; + rangeLength?: uinteger; + text: string; + }; + /** + * Checks whether the information describes a full replacement event. + */ + function isFull(event: TextDocumentContentChangeEvent): event is { + text: string; + }; +} +/** + * The change text document notification's parameters. + */ +export interface DidChangeTextDocumentParams { + /** + * The document that did change. The version number points + * to the version after all provided content changes have + * been applied. + */ + textDocument: VersionedTextDocumentIdentifier; + /** + * The actual content changes. The content changes describe single state changes + * to the document. So if there are two content changes c1 (at array index 0) and + * c2 (at array index 1) for a document in state S then c1 moves the document from + * S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed + * on the state S'. + * + * To mirror the content of a document using change events use the following approach: + * - start with the same initial content + * - apply the 'textDocument/didChange' notifications in the order you receive them. + * - apply the `TextDocumentContentChangeEvent`s in a single notification in the order + * you receive them. + */ + contentChanges: TextDocumentContentChangeEvent[]; +} +/** + * Describe options to be used when registered for text document change events. + */ +export interface TextDocumentChangeRegistrationOptions extends TextDocumentRegistrationOptions { + /** + * How documents are synced to the server. + */ + syncKind: TextDocumentSyncKind; +} +/** + * The document change notification is sent from the client to the server to signal + * changes to a text document. + */ +export declare namespace DidChangeTextDocumentNotification { + const method: 'textDocument/didChange'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * The parameters sent in a close text document notification + */ +export interface DidCloseTextDocumentParams { + /** + * The document that was closed. + */ + textDocument: TextDocumentIdentifier; +} +/** + * The document close notification is sent from the client to the server when + * the document got closed in the client. The document's truth now exists where + * the document's uri points to (e.g. if the document's uri is a file uri the + * truth now exists on disk). As with the open notification the close notification + * is about managing the document's content. Receiving a close notification + * doesn't mean that the document was open in an editor before. A close + * notification requires a previous open notification to be sent. + */ +export declare namespace DidCloseTextDocumentNotification { + const method: 'textDocument/didClose'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * The parameters sent in a save text document notification + */ +export interface DidSaveTextDocumentParams { + /** + * The document that was saved. + */ + textDocument: TextDocumentIdentifier; + /** + * Optional the content when saved. Depends on the includeText value + * when the save notification was requested. + */ + text?: string; +} +/** + * Save registration options. + */ +export interface TextDocumentSaveRegistrationOptions extends TextDocumentRegistrationOptions, SaveOptions { +} +/** + * The document save notification is sent from the client to the server when + * the document got saved in the client. + */ +export declare namespace DidSaveTextDocumentNotification { + const method: 'textDocument/didSave'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * Represents reasons why a text document is saved. + */ +export declare namespace TextDocumentSaveReason { + /** + * Manually triggered, e.g. by the user pressing save, by starting debugging, + * or by an API call. + */ + const Manual: 1; + /** + * Automatic after a delay. + */ + const AfterDelay: 2; + /** + * When the editor lost focus. + */ + const FocusOut: 3; +} +export type TextDocumentSaveReason = 1 | 2 | 3; +/** + * The parameters sent in a will save text document notification. + */ +export interface WillSaveTextDocumentParams { + /** + * The document that will be saved. + */ + textDocument: TextDocumentIdentifier; + /** + * The 'TextDocumentSaveReason'. + */ + reason: TextDocumentSaveReason; +} +/** + * A document will save notification is sent from the client to the server before + * the document is actually saved. + */ +export declare namespace WillSaveTextDocumentNotification { + const method: 'textDocument/willSave'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * A document will save request is sent from the client to the server before + * the document is actually saved. The request can return an array of TextEdits + * which will be applied to the text document before it is saved. Please note that + * clients might drop results if computing the text edits took too long or if a + * server constantly fails on this request. This is done to keep the save fast and + * reliable. + */ +export declare namespace WillSaveTextDocumentWaitUntilRequest { + const method: 'textDocument/willSaveWaitUntil'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +export interface DidChangeWatchedFilesClientCapabilities { + /** + * Did change watched files notification supports dynamic registration. Please note + * that the current protocol doesn't support static configuration for file changes + * from the server side. + */ + dynamicRegistration?: boolean; + /** + * Whether the client has support for {@link RelativePattern relative pattern} + * or not. + * + * @since 3.17.0 + */ + relativePatternSupport?: boolean; +} +/** + * The watched files notification is sent from the client to the server when + * the client detects changes to file watched by the language client. + */ +export declare namespace DidChangeWatchedFilesNotification { + const method: 'workspace/didChangeWatchedFiles'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * The watched files change notification's parameters. + */ +export interface DidChangeWatchedFilesParams { + /** + * The actual file events. + */ + changes: FileEvent[]; +} +/** + * The file event type + */ +export declare namespace FileChangeType { + /** + * The file got created. + */ + const Created = 1; + /** + * The file got changed. + */ + const Changed = 2; + /** + * The file got deleted. + */ + const Deleted = 3; +} +export type FileChangeType = 1 | 2 | 3; +/** + * An event describing a file change. + */ +export interface FileEvent { + /** + * The file's uri. + */ + uri: DocumentUri; + /** + * The change type. + */ + type: FileChangeType; +} +/** + * Describe options to be used when registered for text document change events. + */ +export interface DidChangeWatchedFilesRegistrationOptions { + /** + * The watchers to register. + */ + watchers: FileSystemWatcher[]; +} +/** + * The glob pattern to watch relative to the base path. Glob patterns can have the following syntax: + * - `*` to match one or more characters in a path segment + * - `?` to match on one character in a path segment + * - `**` to match any number of path segments, including none + * - `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files) + * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`) + * + * @since 3.17.0 + */ +export type Pattern = string; +/** + * A relative pattern is a helper to construct glob patterns that are matched + * relatively to a base URI. The common value for a `baseUri` is a workspace + * folder root, but it can be another absolute URI as well. + * + * @since 3.17.0 + */ +export interface RelativePattern { + /** + * A workspace folder or a base URI to which this pattern will be matched + * against relatively. + */ + baseUri: WorkspaceFolder | URI; + /** + * The actual glob pattern; + */ + pattern: Pattern; +} +export declare namespace RelativePattern { + function is(value: any): value is RelativePattern; +} +/** + * The glob pattern. Either a string pattern or a relative pattern. + * + * @since 3.17.0 + */ +export type GlobPattern = Pattern | RelativePattern; +export interface FileSystemWatcher { + /** + * The glob pattern to watch. See {@link GlobPattern glob pattern} for more detail. + * + * @since 3.17.0 support for relative patterns. + */ + globPattern: GlobPattern; + /** + * The kind of events of interest. If omitted it defaults + * to WatchKind.Create | WatchKind.Change | WatchKind.Delete + * which is 7. + */ + kind?: WatchKind; +} +export declare namespace WatchKind { + /** + * Interested in create events. + */ + const Create: 1; + /** + * Interested in change events + */ + const Change: 2; + /** + * Interested in delete events + */ + const Delete: 4; +} +export type WatchKind = uinteger; +/** + * @since 3.18.0 + */ +export interface ClientDiagnosticsTagOptions { + /** + * The tags supported by the client. + */ + valueSet: DiagnosticTag[]; +} +/** + * General diagnostics capabilities for pull and push model. + */ +export interface DiagnosticsCapabilities { + /** + * Whether the clients accepts diagnostics with related information. + */ + relatedInformation?: boolean; + /** + * Client supports the tag property to provide meta data about a diagnostic. + * Clients supporting tags have to handle unknown tags gracefully. + * + * @since 3.15.0 + */ + tagSupport?: ClientDiagnosticsTagOptions; + /** + * Client supports a codeDescription property + * + * @since 3.16.0 + */ + codeDescriptionSupport?: boolean; + /** + * Whether code action supports the `data` property which is + * preserved between a `textDocument/publishDiagnostics` and + * `textDocument/codeAction` request. + * + * @since 3.16.0 + */ + dataSupport?: boolean; +} +/** + * The publish diagnostic client capabilities. + */ +export interface PublishDiagnosticsClientCapabilities extends DiagnosticsCapabilities { + /** + * Whether the client interprets the version property of the + * `textDocument/publishDiagnostics` notification's parameter. + * + * @since 3.15.0 + */ + versionSupport?: boolean; +} +/** + * The publish diagnostic notification's parameters. + */ +export interface PublishDiagnosticsParams { + /** + * The URI for which diagnostic information is reported. + */ + uri: DocumentUri; + /** + * Optional the version number of the document the diagnostics are published for. + * + * @since 3.15.0 + */ + version?: integer; + /** + * An array of diagnostic information items. + */ + diagnostics: Diagnostic[]; +} +/** + * Diagnostics notification are sent from the server to the client to signal + * results of validation runs. + */ +export declare namespace PublishDiagnosticsNotification { + const method: 'textDocument/publishDiagnostics'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * The client supports the following `CompletionList` specific + * capabilities. + * + * @since 3.17.0 + */ +export interface CompletionListCapabilities { + /** + * The client supports the following itemDefaults on + * a completion list. + * + * The value lists the supported property names of the + * `CompletionList.itemDefaults` object. If omitted + * no properties are supported. + * + * @since 3.17.0 + */ + itemDefaults?: string[]; +} +/** + * @since 3.18.0 + */ +export interface CompletionItemTagOptions { + /** + * The tags supported by the client. + */ + valueSet: CompletionItemTag[]; +} +/** + * @since 3.18.0 + */ +export interface ClientCompletionItemResolveOptions { + /** + * The properties that a client can resolve lazily. + */ + properties: string[]; +} +/** + * @since 3.18.0 + */ +export interface ClientCompletionItemInsertTextModeOptions { + valueSet: InsertTextMode[]; +} +/** + * @since 3.18.0 + */ +export interface ClientCompletionItemOptions { + /** + * Client supports snippets as insert text. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Placeholders with equal identifiers are linked, + * that is typing in one will update others too. + */ + snippetSupport?: boolean; + /** + * Client supports commit characters on a completion item. + */ + commitCharactersSupport?: boolean; + /** + * Client supports the following content formats for the documentation + * property. The order describes the preferred format of the client. + */ + documentationFormat?: MarkupKind[]; + /** + * Client supports the deprecated property on a completion item. + */ + deprecatedSupport?: boolean; + /** + * Client supports the preselect property on a completion item. + */ + preselectSupport?: boolean; + /** + * Client supports the tag property on a completion item. Clients supporting + * tags have to handle unknown tags gracefully. Clients especially need to + * preserve unknown tags when sending a completion item back to the server in + * a resolve call. + * + * @since 3.15.0 + */ + tagSupport?: CompletionItemTagOptions; + /** + * Client support insert replace edit to control different behavior if a + * completion item is inserted in the text or should replace text. + * + * @since 3.16.0 + */ + insertReplaceSupport?: boolean; + /** + * Indicates which properties a client can resolve lazily on a completion + * item. Before version 3.16.0 only the predefined properties `documentation` + * and `details` could be resolved lazily. + * + * @since 3.16.0 + */ + resolveSupport?: ClientCompletionItemResolveOptions; + /** + * The client supports the `insertTextMode` property on + * a completion item to override the whitespace handling mode + * as defined by the client (see `insertTextMode`). + * + * @since 3.16.0 + */ + insertTextModeSupport?: ClientCompletionItemInsertTextModeOptions; + /** + * The client has support for completion item label + * details (see also `CompletionItemLabelDetails`). + * + * @since 3.17.0 + */ + labelDetailsSupport?: boolean; +} +/** + * @since 3.18.0 + */ +export interface ClientCompletionItemOptionsKind { + /** + * The completion item kind values the client supports. When this + * property exists the client also guarantees that it will + * handle values outside its set gracefully and falls back + * to a default value when unknown. + * + * If this property is not present the client only supports + * the completion items kinds from `Text` to `Reference` as defined in + * the initial version of the protocol. + */ + valueSet?: CompletionItemKind[]; +} +/** + * Completion client capabilities + */ +export interface CompletionClientCapabilities { + /** + * Whether completion supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * The client supports the following `CompletionItem` specific + * capabilities. + */ + completionItem?: ClientCompletionItemOptions; + completionItemKind?: ClientCompletionItemOptionsKind; + /** + * Defines how the client handles whitespace and indentation + * when accepting a completion item that uses multi line + * text in either `insertText` or `textEdit`. + * + * @since 3.17.0 + */ + insertTextMode?: InsertTextMode; + /** + * The client supports to send additional context information for a + * `textDocument/completion` request. + */ + contextSupport?: boolean; + /** + * The client supports the following `CompletionList` specific + * capabilities. + * + * @since 3.17.0 + */ + completionList?: CompletionListCapabilities; +} +/** + * How a completion was triggered + */ +export declare namespace CompletionTriggerKind { + /** + * Completion was triggered by typing an identifier (24x7 code + * complete), manual invocation (e.g Ctrl+Space) or via API. + */ + const Invoked: 1; + /** + * Completion was triggered by a trigger character specified by + * the `triggerCharacters` properties of the `CompletionRegistrationOptions`. + */ + const TriggerCharacter: 2; + /** + * Completion was re-triggered as current completion list is incomplete + */ + const TriggerForIncompleteCompletions: 3; +} +export type CompletionTriggerKind = 1 | 2 | 3; +/** + * Contains additional information about the context in which a completion request is triggered. + */ +export interface CompletionContext { + /** + * How the completion was triggered. + */ + triggerKind: CompletionTriggerKind; + /** + * The trigger character (a single character) that has trigger code complete. + * Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter` + */ + triggerCharacter?: string; +} +/** + * Completion parameters + */ +export interface CompletionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { + /** + * The completion context. This is only available it the client specifies + * to send this using the client capability `textDocument.completion.contextSupport === true` + */ + context?: CompletionContext; +} +/** + * @since 3.18.0 + */ +export interface ServerCompletionItemOptions { + /** + * The server has support for completion item label + * details (see also `CompletionItemLabelDetails`) when + * receiving a completion item in a resolve call. + * + * @since 3.17.0 + */ + labelDetailsSupport?: boolean; +} +/** + * Completion options. + */ +export interface CompletionOptions extends WorkDoneProgressOptions { + /** + * Most tools trigger completion request automatically without explicitly requesting + * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user + * starts to type an identifier. For example if the user types `c` in a JavaScript file + * code complete will automatically pop up present `console` besides others as a + * completion item. Characters that make up identifiers don't need to be listed here. + * + * If code complete should automatically be trigger on characters not being valid inside + * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`. + */ + triggerCharacters?: string[]; + /** + * The list of all possible characters that commit a completion. This field can be used + * if clients don't support individual commit characters per completion item. See + * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport` + * + * If a server provides both `allCommitCharacters` and commit characters on an individual + * completion item the ones on the completion item win. + * + * @since 3.2.0 + */ + allCommitCharacters?: string[]; + /** + * The server provides support to resolve additional + * information for a completion item. + */ + resolveProvider?: boolean; + /** + * The server supports the following `CompletionItem` specific + * capabilities. + * + * @since 3.17.0 + */ + completionItem?: ServerCompletionItemOptions; +} +/** + * Registration options for a {@link CompletionRequest}. + */ +export interface CompletionRegistrationOptions extends TextDocumentRegistrationOptions, CompletionOptions { +} +/** + * Request to request completion at a given text document position. The request's + * parameter is of type {@link TextDocumentPosition} the response + * is of type {@link CompletionItem CompletionItem[]} or {@link CompletionList} + * or a Thenable that resolves to such. + * + * The request can delay the computation of the {@link CompletionItem.detail `detail`} + * and {@link CompletionItem.documentation `documentation`} properties to the `completionItem/resolve` + * request. However, properties that are needed for the initial sorting and filtering, like `sortText`, + * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve. + */ +export declare namespace CompletionRequest { + const method: 'textDocument/completion'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Request to resolve additional information for a given completion item.The request's + * parameter is of type {@link CompletionItem} the response + * is of type {@link CompletionItem} or a Thenable that resolves to such. + */ +export declare namespace CompletionResolveRequest { + const method: 'completionItem/resolve'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +export interface HoverClientCapabilities { + /** + * Whether hover supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Client supports the following content formats for the content + * property. The order describes the preferred format of the client. + */ + contentFormat?: MarkupKind[]; +} +/** + * Hover options. + */ +export interface HoverOptions extends WorkDoneProgressOptions { +} +/** + * Parameters for a {@link HoverRequest}. + */ +export interface HoverParams extends TextDocumentPositionParams, WorkDoneProgressParams { +} +/** + * Registration options for a {@link HoverRequest}. + */ +export interface HoverRegistrationOptions extends TextDocumentRegistrationOptions, HoverOptions { +} +/** + * Request to request hover information at a given text document position. The request's + * parameter is of type {@link TextDocumentPosition} the response is of + * type {@link Hover} or a Thenable that resolves to such. + */ +export declare namespace HoverRequest { + const method: 'textDocument/hover'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * @since 3.18.0 + */ +export interface ClientSignatureParameterInformationOptions { + /** + * The client supports processing label offsets instead of a + * simple label string. + * + * @since 3.14.0 + */ + labelOffsetSupport?: boolean; +} +/** + * @since 3.18.0 + */ +export interface ClientSignatureInformationOptions { + /** + * Client supports the following content formats for the documentation + * property. The order describes the preferred format of the client. + */ + documentationFormat?: MarkupKind[]; + /** + * Client capabilities specific to parameter information. + */ + parameterInformation?: ClientSignatureParameterInformationOptions; + /** + * The client supports the `activeParameter` property on `SignatureInformation` + * literal. + * + * @since 3.16.0 + */ + activeParameterSupport?: boolean; + /** + * The client supports the `activeParameter` property on + * `SignatureHelp`/`SignatureInformation` being set to `null` to + * indicate that no parameter should be active. + * + * @since 3.18.0 + * @proposed + */ + noActiveParameterSupport?: boolean; +} +/** + * Client Capabilities for a {@link SignatureHelpRequest}. + */ +export interface SignatureHelpClientCapabilities { + /** + * Whether signature help supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * The client supports the following `SignatureInformation` + * specific properties. + */ + signatureInformation?: ClientSignatureInformationOptions; + /** + * The client supports to send additional context information for a + * `textDocument/signatureHelp` request. A client that opts into + * contextSupport will also support the `retriggerCharacters` on + * `SignatureHelpOptions`. + * + * @since 3.15.0 + */ + contextSupport?: boolean; +} +/** + * Server Capabilities for a {@link SignatureHelpRequest}. + */ +export interface SignatureHelpOptions extends WorkDoneProgressOptions { + /** + * List of characters that trigger signature help automatically. + */ + triggerCharacters?: string[]; + /** + * List of characters that re-trigger signature help. + * + * These trigger characters are only active when signature help is already showing. All trigger characters + * are also counted as re-trigger characters. + * + * @since 3.15.0 + */ + retriggerCharacters?: string[]; +} +/** + * How a signature help was triggered. + * + * @since 3.15.0 + */ +export declare namespace SignatureHelpTriggerKind { + /** + * Signature help was invoked manually by the user or by a command. + */ + const Invoked: 1; + /** + * Signature help was triggered by a trigger character. + */ + const TriggerCharacter: 2; + /** + * Signature help was triggered by the cursor moving or by the document content changing. + */ + const ContentChange: 3; +} +export type SignatureHelpTriggerKind = 1 | 2 | 3; +/** + * Additional information about the context in which a signature help request was triggered. + * + * @since 3.15.0 + */ +export interface SignatureHelpContext { + /** + * Action that caused signature help to be triggered. + */ + triggerKind: SignatureHelpTriggerKind; + /** + * Character that caused signature help to be triggered. + * + * This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter` + */ + triggerCharacter?: string; + /** + * `true` if signature help was already showing when it was triggered. + * + * Retriggers occurs when the signature help is already active and can be caused by actions such as + * typing a trigger character, a cursor move, or document content changes. + */ + isRetrigger: boolean; + /** + * The currently active `SignatureHelp`. + * + * The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on + * the user navigating through available signatures. + */ + activeSignatureHelp?: SignatureHelp; +} +/** + * Parameters for a {@link SignatureHelpRequest}. + */ +export interface SignatureHelpParams extends TextDocumentPositionParams, WorkDoneProgressParams { + /** + * The signature help context. This is only available if the client specifies + * to send this using the client capability `textDocument.signatureHelp.contextSupport === true` + * + * @since 3.15.0 + */ + context?: SignatureHelpContext; +} +/** + * Registration options for a {@link SignatureHelpRequest}. + */ +export interface SignatureHelpRegistrationOptions extends TextDocumentRegistrationOptions, SignatureHelpOptions { +} +export declare namespace SignatureHelpRequest { + const method: 'textDocument/signatureHelp'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Client Capabilities for a {@link DefinitionRequest}. + */ +export interface DefinitionClientCapabilities { + /** + * Whether definition supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * The client supports additional metadata in the form of definition links. + * + * @since 3.14.0 + */ + linkSupport?: boolean; +} +/** + * Server Capabilities for a {@link DefinitionRequest}. + */ +export interface DefinitionOptions extends WorkDoneProgressOptions { +} +/** + * Parameters for a {@link DefinitionRequest}. + */ +export interface DefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * Registration options for a {@link DefinitionRequest}. + */ +export interface DefinitionRegistrationOptions extends TextDocumentRegistrationOptions, DefinitionOptions { +} +/** + * A request to resolve the definition location of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPosition} + * the response is of either type {@link Definition} or a typed array of + * {@link DefinitionLink} or a Thenable that resolves to such. + */ +export declare namespace DefinitionRequest { + const method: 'textDocument/definition'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Client Capabilities for a {@link ReferencesRequest}. + */ +export interface ReferenceClientCapabilities { + /** + * Whether references supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * Parameters for a {@link ReferencesRequest}. + */ +export interface ReferenceParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { + context: ReferenceContext; +} +/** + * Reference options. + */ +export interface ReferenceOptions extends WorkDoneProgressOptions { +} +/** + * Registration options for a {@link ReferencesRequest}. + */ +export interface ReferenceRegistrationOptions extends TextDocumentRegistrationOptions, ReferenceOptions { +} +/** + * A request to resolve project-wide references for the symbol denoted + * by the given text document position. The request's parameter is of + * type {@link ReferenceParams} the response is of type + * {@link Location Location[]} or a Thenable that resolves to such. + */ +export declare namespace ReferencesRequest { + const method: 'textDocument/references'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Client Capabilities for a {@link DocumentHighlightRequest}. + */ +export interface DocumentHighlightClientCapabilities { + /** + * Whether document highlight supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * Parameters for a {@link DocumentHighlightRequest}. + */ +export interface DocumentHighlightParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * Provider options for a {@link DocumentHighlightRequest}. + */ +export interface DocumentHighlightOptions extends WorkDoneProgressOptions { +} +/** + * Registration options for a {@link DocumentHighlightRequest}. + */ +export interface DocumentHighlightRegistrationOptions extends TextDocumentRegistrationOptions, DocumentHighlightOptions { +} +/** + * Request to resolve a {@link DocumentHighlight} for a given + * text document position. The request's parameter is of type {@link TextDocumentPosition} + * the request response is an array of type {@link DocumentHighlight} + * or a Thenable that resolves to such. + */ +export declare namespace DocumentHighlightRequest { + const method: 'textDocument/documentHighlight'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Client Capabilities for a {@link DocumentSymbolRequest}. + */ +export interface DocumentSymbolClientCapabilities { + /** + * Whether document symbol supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Specific capabilities for the `SymbolKind` in the + * `textDocument/documentSymbol` request. + */ + symbolKind?: ClientSymbolKindOptions; + /** + * The client supports hierarchical document symbols. + */ + hierarchicalDocumentSymbolSupport?: boolean; + /** + * The client supports tags on `SymbolInformation`. Tags are supported on + * `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. + * Clients supporting tags have to handle unknown tags gracefully. + * + * @since 3.16.0 + */ + tagSupport?: ClientSymbolTagOptions; + /** + * The client supports an additional label presented in the UI when + * registering a document symbol provider. + * + * @since 3.16.0 + */ + labelSupport?: boolean; +} +/** + * Parameters for a {@link DocumentSymbolRequest}. + */ +export interface DocumentSymbolParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; +} +/** + * Provider options for a {@link DocumentSymbolRequest}. + */ +export interface DocumentSymbolOptions extends WorkDoneProgressOptions { + /** + * A human-readable string that is shown when multiple outlines trees + * are shown for the same document. + * + * @since 3.16.0 + */ + label?: string; +} +/** + * Registration options for a {@link DocumentSymbolRequest}. + */ +export interface DocumentSymbolRegistrationOptions extends TextDocumentRegistrationOptions, DocumentSymbolOptions { +} +/** + * A request to list all symbols found in a given text document. The request's + * parameter is of type {@link TextDocumentIdentifier} the + * response is of type {@link SymbolInformation SymbolInformation[]} or a Thenable + * that resolves to such. + */ +export declare namespace DocumentSymbolRequest { + const method: 'textDocument/documentSymbol'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * @since 3.18.0 + */ +export interface ClientCodeActionKindOptions { + /** + * The code action kind values the client supports. When this + * property exists the client also guarantees that it will + * handle values outside its set gracefully and falls back + * to a default value when unknown. + */ + valueSet: CodeActionKind[]; +} +/** + * @since 3.18.0 + */ +export interface ClientCodeActionLiteralOptions { + /** + * The code action kind is support with the following value + * set. + */ + codeActionKind: ClientCodeActionKindOptions; +} +/** + * @since 3.18.0 + */ +export interface ClientCodeActionResolveOptions { + /** + * The properties that a client can resolve lazily. + */ + properties: string[]; +} +/** + * The Client Capabilities of a {@link CodeActionRequest}. + */ +export interface CodeActionClientCapabilities { + /** + * Whether code action supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * The client support code action literals of type `CodeAction` as a valid + * response of the `textDocument/codeAction` request. If the property is not + * set the request can only return `Command` literals. + * + * @since 3.8.0 + */ + codeActionLiteralSupport?: ClientCodeActionLiteralOptions; + /** + * Whether code action supports the `isPreferred` property. + * + * @since 3.15.0 + */ + isPreferredSupport?: boolean; + /** + * Whether code action supports the `disabled` property. + * + * @since 3.16.0 + */ + disabledSupport?: boolean; + /** + * Whether code action supports the `data` property which is + * preserved between a `textDocument/codeAction` and a + * `codeAction/resolve` request. + * + * @since 3.16.0 + */ + dataSupport?: boolean; + /** + * Whether the client supports resolving additional code action + * properties via a separate `codeAction/resolve` request. + * + * @since 3.16.0 + */ + resolveSupport?: ClientCodeActionResolveOptions; + /** + * Whether the client honors the change annotations in + * text edits and resource operations returned via the + * `CodeAction#edit` property by for example presenting + * the workspace edit in the user interface and asking + * for confirmation. + * + * @since 3.16.0 + */ + honorsChangeAnnotations?: boolean; + /** + * Whether the client supports documentation for a class of + * code actions. + * + * @since 3.18.0 + * @proposed + */ + documentationSupport?: boolean; +} +/** + * The parameters of a {@link CodeActionRequest}. + */ +export interface CodeActionParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The document in which the command was invoked. + */ + textDocument: TextDocumentIdentifier; + /** + * The range for which the command was invoked. + */ + range: Range; + /** + * Context carrying additional information. + */ + context: CodeActionContext; +} +/** + * Documentation for a class of code actions. + * + * @since 3.18.0 + * @proposed + */ +export interface CodeActionKindDocumentation { + /** + * The kind of the code action being documented. + * + * If the kind is generic, such as `CodeActionKind.Refactor`, the documentation will be shown whenever any + * refactorings are returned. If the kind if more specific, such as `CodeActionKind.RefactorExtract`, the + * documentation will only be shown when extract refactoring code actions are returned. + */ + kind: CodeActionKind; + /** + * Command that is ued to display the documentation to the user. + * + * The title of this documentation code action is taken from {@linkcode Command.title} + */ + command: Command; +} +/** + * Provider options for a {@link CodeActionRequest}. + */ +export interface CodeActionOptions extends WorkDoneProgressOptions { + /** + * CodeActionKinds that this server may return. + * + * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server + * may list out every specific kind they provide. + */ + codeActionKinds?: CodeActionKind[]; + /** + * Static documentation for a class of code actions. + * + * Documentation from the provider should be shown in the code actions menu if either: + * + * - Code actions of `kind` are requested by the editor. In this case, the editor will show the documentation that + * most closely matches the requested code action kind. For example, if a provider has documentation for + * both `Refactor` and `RefactorExtract`, when the user requests code actions for `RefactorExtract`, + * the editor will use the documentation for `RefactorExtract` instead of the documentation for `Refactor`. + * + * - Any code actions of `kind` are returned by the provider. + * + * At most one documentation entry should be shown per provider. + * + * @since 3.18.0 + * @proposed + */ + documentation?: CodeActionKindDocumentation[]; + /** + * The server provides support to resolve additional + * information for a code action. + * + * @since 3.16.0 + */ + resolveProvider?: boolean; +} +/** + * Registration options for a {@link CodeActionRequest}. + */ +export interface CodeActionRegistrationOptions extends TextDocumentRegistrationOptions, CodeActionOptions { +} +/** + * A request to provide commands for the given text document and range. + */ +export declare namespace CodeActionRequest { + const method: 'textDocument/codeAction'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Request to resolve additional information for a given code action.The request's + * parameter is of type {@link CodeAction} the response + * is of type {@link CodeAction} or a Thenable that resolves to such. + */ +export declare namespace CodeActionResolveRequest { + const method: 'codeAction/resolve'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * @since 3.18.0 + */ +export interface ClientSymbolKindOptions { + /** + * The symbol kind values the client supports. When this + * property exists the client also guarantees that it will + * handle values outside its set gracefully and falls back + * to a default value when unknown. + * + * If this property is not present the client only supports + * the symbol kinds from `File` to `Array` as defined in + * the initial version of the protocol. + */ + valueSet?: SymbolKind[]; +} +/** + * @since 3.18.0 + */ +export interface ClientSymbolTagOptions { + /** + * The tags supported by the client. + */ + valueSet: SymbolTag[]; +} +/** + * @since 3.18.0 + */ +export interface ClientSymbolResolveOptions { + /** + * The properties that a client can resolve lazily. Usually + * `location.range` + */ + properties: string[]; +} +/** + * Client capabilities for a {@link WorkspaceSymbolRequest}. + */ +export interface WorkspaceSymbolClientCapabilities { + /** + * Symbol request supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request. + */ + symbolKind?: ClientSymbolKindOptions; + /** + * The client supports tags on `SymbolInformation`. + * Clients supporting tags have to handle unknown tags gracefully. + * + * @since 3.16.0 + */ + tagSupport?: ClientSymbolTagOptions; + /** + * The client support partial workspace symbols. The client will send the + * request `workspaceSymbol/resolve` to the server to resolve additional + * properties. + * + * @since 3.17.0 + */ + resolveSupport?: ClientSymbolResolveOptions; +} +/** + * The parameters of a {@link WorkspaceSymbolRequest}. + */ +export interface WorkspaceSymbolParams extends WorkDoneProgressParams, PartialResultParams { + /** + * A query string to filter symbols by. Clients may send an empty + * string here to request all symbols. + */ + query: string; +} +/** + * Server capabilities for a {@link WorkspaceSymbolRequest}. + */ +export interface WorkspaceSymbolOptions extends WorkDoneProgressOptions { + /** + * The server provides support to resolve additional + * information for a workspace symbol. + * + * @since 3.17.0 + */ + resolveProvider?: boolean; +} +/** + * Registration options for a {@link WorkspaceSymbolRequest}. + */ +export interface WorkspaceSymbolRegistrationOptions extends WorkspaceSymbolOptions { +} +/** + * A request to list project-wide symbols matching the query string given + * by the {@link WorkspaceSymbolParams}. The response is + * of type {@link SymbolInformation SymbolInformation[]} or a Thenable that + * resolves to such. + * + * @since 3.17.0 - support for WorkspaceSymbol in the returned data. Clients + * need to advertise support for WorkspaceSymbols via the client capability + * `workspace.symbol.resolveSupport`. + * + */ +export declare namespace WorkspaceSymbolRequest { + const method: 'workspace/symbol'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * A request to resolve the range inside the workspace + * symbol's location. + * + * @since 3.17.0 + */ +export declare namespace WorkspaceSymbolResolveRequest { + const method: 'workspaceSymbol/resolve'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * The client capabilities of a {@link CodeLensRequest}. + */ +export interface CodeLensClientCapabilities { + /** + * Whether code lens supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * @since 3.16.0 + */ +export interface CodeLensWorkspaceClientCapabilities { + /** + * Whether the client implementation supports a refresh request sent from the + * server to the client. + * + * Note that this event is global and will force the client to refresh all + * code lenses currently shown. It should be used with absolute care and is + * useful for situation where a server for example detect a project wide + * change that requires such a calculation. + */ + refreshSupport?: boolean; +} +/** + * The parameters of a {@link CodeLensRequest}. + */ +export interface CodeLensParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The document to request code lens for. + */ + textDocument: TextDocumentIdentifier; +} +/** + * Code Lens provider options of a {@link CodeLensRequest}. + */ +export interface CodeLensOptions extends WorkDoneProgressOptions { + /** + * Code lens has a resolve provider as well. + */ + resolveProvider?: boolean; +} +/** + * Registration options for a {@link CodeLensRequest}. + */ +export interface CodeLensRegistrationOptions extends TextDocumentRegistrationOptions, CodeLensOptions { +} +/** + * A request to provide code lens for the given text document. + */ +export declare namespace CodeLensRequest { + const method: 'textDocument/codeLens'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * A request to resolve a command for a given code lens. + */ +export declare namespace CodeLensResolveRequest { + const method: 'codeLens/resolve'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * A request to refresh all code actions + * + * @since 3.16.0 + */ +export declare namespace CodeLensRefreshRequest { + const method: `workspace/codeLens/refresh`; + const messageDirection: MessageDirection; + const type: ProtocolRequestType0; +} +/** + * The client capabilities of a {@link DocumentLinkRequest}. + */ +export interface DocumentLinkClientCapabilities { + /** + * Whether document link supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Whether the client supports the `tooltip` property on `DocumentLink`. + * + * @since 3.15.0 + */ + tooltipSupport?: boolean; +} +/** + * The parameters of a {@link DocumentLinkRequest}. + */ +export interface DocumentLinkParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The document to provide document links for. + */ + textDocument: TextDocumentIdentifier; +} +/** + * Provider options for a {@link DocumentLinkRequest}. + */ +export interface DocumentLinkOptions extends WorkDoneProgressOptions { + /** + * Document links have a resolve provider as well. + */ + resolveProvider?: boolean; +} +/** + * Registration options for a {@link DocumentLinkRequest}. + */ +export interface DocumentLinkRegistrationOptions extends TextDocumentRegistrationOptions, DocumentLinkOptions { +} +/** + * A request to provide document links + */ +export declare namespace DocumentLinkRequest { + const method: 'textDocument/documentLink'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Request to resolve additional information for a given document link. The request's + * parameter is of type {@link DocumentLink} the response + * is of type {@link DocumentLink} or a Thenable that resolves to such. + */ +export declare namespace DocumentLinkResolveRequest { + const method: 'documentLink/resolve'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Client capabilities of a {@link DocumentFormattingRequest}. + */ +export interface DocumentFormattingClientCapabilities { + /** + * Whether formatting supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * The parameters of a {@link DocumentFormattingRequest}. + */ +export interface DocumentFormattingParams extends WorkDoneProgressParams { + /** + * The document to format. + */ + textDocument: TextDocumentIdentifier; + /** + * The format options. + */ + options: FormattingOptions; +} +/** + * Provider options for a {@link DocumentFormattingRequest}. + */ +export interface DocumentFormattingOptions extends WorkDoneProgressOptions { +} +/** + * Registration options for a {@link DocumentFormattingRequest}. + */ +export interface DocumentFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentFormattingOptions { +} +/** + * A request to format a whole document. + */ +export declare namespace DocumentFormattingRequest { + const method: 'textDocument/formatting'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Client capabilities of a {@link DocumentRangeFormattingRequest}. + */ +export interface DocumentRangeFormattingClientCapabilities { + /** + * Whether range formatting supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Whether the client supports formatting multiple ranges at once. + * + * @since 3.18.0 + * @proposed + */ + rangesSupport?: boolean; +} +/** + * The parameters of a {@link DocumentRangeFormattingRequest}. + */ +export interface DocumentRangeFormattingParams extends WorkDoneProgressParams { + /** + * The document to format. + */ + textDocument: TextDocumentIdentifier; + /** + * The range to format + */ + range: Range; + /** + * The format options + */ + options: FormattingOptions; +} +/** + * The parameters of a {@link DocumentRangesFormattingRequest}. + * + * @since 3.18.0 + * @proposed + */ +export interface DocumentRangesFormattingParams extends WorkDoneProgressParams { + /** + * The document to format. + */ + textDocument: TextDocumentIdentifier; + /** + * The ranges to format + */ + ranges: Range[]; + /** + * The format options + */ + options: FormattingOptions; +} +/** + * Provider options for a {@link DocumentRangeFormattingRequest}. + */ +export interface DocumentRangeFormattingOptions extends WorkDoneProgressOptions { + /** + * Whether the server supports formatting multiple ranges at once. + * + * @since 3.18.0 + * @proposed + */ + rangesSupport?: boolean; +} +/** + * Registration options for a {@link DocumentRangeFormattingRequest}. + */ +export interface DocumentRangeFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentRangeFormattingOptions { +} +/** + * A request to format a range in a document. + */ +export declare namespace DocumentRangeFormattingRequest { + const method: 'textDocument/rangeFormatting'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * A request to format ranges in a document. + * + * @since 3.18.0 + * @proposed + */ +export declare namespace DocumentRangesFormattingRequest { + const method: 'textDocument/rangesFormatting'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Client capabilities of a {@link DocumentOnTypeFormattingRequest}. + */ +export interface DocumentOnTypeFormattingClientCapabilities { + /** + * Whether on type formatting supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * The parameters of a {@link DocumentOnTypeFormattingRequest}. + */ +export interface DocumentOnTypeFormattingParams { + /** + * The document to format. + */ + textDocument: TextDocumentIdentifier; + /** + * The position around which the on type formatting should happen. + * This is not necessarily the exact position where the character denoted + * by the property `ch` got typed. + */ + position: Position; + /** + * The character that has been typed that triggered the formatting + * on type request. That is not necessarily the last character that + * got inserted into the document since the client could auto insert + * characters as well (e.g. like automatic brace completion). + */ + ch: string; + /** + * The formatting options. + */ + options: FormattingOptions; +} +/** + * Provider options for a {@link DocumentOnTypeFormattingRequest}. + */ +export interface DocumentOnTypeFormattingOptions { + /** + * A character on which formatting should be triggered, like `{`. + */ + firstTriggerCharacter: string; + /** + * More trigger characters. + */ + moreTriggerCharacter?: string[]; +} +/** + * Registration options for a {@link DocumentOnTypeFormattingRequest}. + */ +export interface DocumentOnTypeFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentOnTypeFormattingOptions { +} +/** + * A request to format a document on type. + */ +export declare namespace DocumentOnTypeFormattingRequest { + const method: 'textDocument/onTypeFormatting'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +export declare namespace PrepareSupportDefaultBehavior { + /** + * The client's default behavior is to select the identifier + * according the to language's syntax rule. + */ + const Identifier: 1; +} +export type PrepareSupportDefaultBehavior = 1; +export interface RenameClientCapabilities { + /** + * Whether rename supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Client supports testing for validity of rename operations + * before execution. + * + * @since 3.12.0 + */ + prepareSupport?: boolean; + /** + * Client supports the default behavior result. + * + * The value indicates the default behavior used by the + * client. + * + * @since 3.16.0 + */ + prepareSupportDefaultBehavior?: PrepareSupportDefaultBehavior; + /** + * Whether the client honors the change annotations in + * text edits and resource operations returned via the + * rename request's workspace edit by for example presenting + * the workspace edit in the user interface and asking + * for confirmation. + * + * @since 3.16.0 + */ + honorsChangeAnnotations?: boolean; +} +/** + * The parameters of a {@link RenameRequest}. + */ +export interface RenameParams extends WorkDoneProgressParams { + /** + * The document to rename. + */ + textDocument: TextDocumentIdentifier; + /** + * The position at which this request was sent. + */ + position: Position; + /** + * The new name of the symbol. If the given name is not valid the + * request must return a {@link ResponseError} with an + * appropriate message set. + */ + newName: string; +} +/** + * Provider options for a {@link RenameRequest}. + */ +export interface RenameOptions extends WorkDoneProgressOptions { + /** + * Renames should be checked and tested before being executed. + * + * @since version 3.12.0 + */ + prepareProvider?: boolean; +} +/** + * Registration options for a {@link RenameRequest}. + */ +export interface RenameRegistrationOptions extends TextDocumentRegistrationOptions, RenameOptions { +} +/** + * A request to rename a symbol. + */ +export declare namespace RenameRequest { + const method: 'textDocument/rename'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +export interface PrepareRenameParams extends TextDocumentPositionParams, WorkDoneProgressParams { +} +/** + * @since 3.18.0 + */ +export interface PrepareRenamePlaceholder { + range: Range; + placeholder: string; +} +/** + * @since 3.18.0 + */ +export interface PrepareRenameDefaultBehavior { + defaultBehavior: boolean; +} +export type PrepareRenameResult = Range | PrepareRenamePlaceholder | PrepareRenameDefaultBehavior; +/** + * A request to test and perform the setup necessary for a rename. + * + * @since 3.16 - support for default behavior + */ +export declare namespace PrepareRenameRequest { + const method: 'textDocument/prepareRename'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * The client capabilities of a {@link ExecuteCommandRequest}. + */ +export interface ExecuteCommandClientCapabilities { + /** + * Execute command supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * The parameters of a {@link ExecuteCommandRequest}. + */ +export interface ExecuteCommandParams extends WorkDoneProgressParams { + /** + * The identifier of the actual command handler. + */ + command: string; + /** + * Arguments that the command should be invoked with. + */ + arguments?: LSPAny[]; +} +/** + * The server capabilities of a {@link ExecuteCommandRequest}. + */ +export interface ExecuteCommandOptions extends WorkDoneProgressOptions { + /** + * The commands to be executed on the server + */ + commands: string[]; +} +/** + * Registration options for a {@link ExecuteCommandRequest}. + */ +export interface ExecuteCommandRegistrationOptions extends ExecuteCommandOptions { +} +/** + * A request send from the client to the server to execute a command. The request might return + * a workspace edit which the client will apply to the workspace. + */ +export declare namespace ExecuteCommandRequest { + const method: 'workspace/executeCommand'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * @since 3.18.0 + */ +export interface ChangeAnnotationsSupportOptions { + /** + * Whether the client groups edits with equal labels into tree nodes, + * for instance all edits labelled with "Changes in Strings" would + * be a tree node. + */ + groupsOnLabel?: boolean; +} +export interface WorkspaceEditClientCapabilities { + /** + * The client supports versioned document changes in `WorkspaceEdit`s + */ + documentChanges?: boolean; + /** + * The resource operations the client supports. Clients should at least + * support 'create', 'rename' and 'delete' files and folders. + * + * @since 3.13.0 + */ + resourceOperations?: ResourceOperationKind[]; + /** + * The failure handling strategy of a client if applying the workspace edit + * fails. + * + * @since 3.13.0 + */ + failureHandling?: FailureHandlingKind; + /** + * Whether the client normalizes line endings to the client specific + * setting. + * If set to `true` the client will normalize line ending characters + * in a workspace edit to the client-specified new line + * character. + * + * @since 3.16.0 + */ + normalizesLineEndings?: boolean; + /** + * Whether the client in general supports change annotations on text edits, + * create file, rename file and delete file changes. + * + * @since 3.16.0 + */ + changeAnnotationSupport?: ChangeAnnotationsSupportOptions; + /** + * Whether the client supports `WorkspaceEditMetadata` in `WorkspaceEdit`s. + * + * @since 3.18.0 + * @proposed + */ + metadataSupport?: boolean; + /** + * Whether the client supports snippets as text edits. + * + * @since 3.18.0 + * @proposed + */ + snippetEditSupport?: boolean; +} +/** + * The parameters passed via an apply workspace edit request. + */ +export interface ApplyWorkspaceEditParams { + /** + * An optional label of the workspace edit. This label is + * presented in the user interface for example on an undo + * stack to undo the workspace edit. + */ + label?: string; + /** + * The edits to apply. + */ + edit: WorkspaceEdit; + /** + * Additional data about the edit. + * + * @since 3.18.0 + * @proposed + */ + metadata?: WorkspaceEditMetadata; +} +/** + * The result returned from the apply workspace edit request. + * + * @since 3.17 renamed from ApplyWorkspaceEditResponse + */ +export interface ApplyWorkspaceEditResult { + /** + * Indicates whether the edit was applied or not. + */ + applied: boolean; + /** + * An optional textual description for why the edit was not applied. + * This may be used by the server for diagnostic logging or to provide + * a suitable error for a request that triggered the edit. + */ + failureReason?: string; + /** + * Depending on the client's failure handling strategy `failedChange` might + * contain the index of the change that failed. This property is only available + * if the client signals a `failureHandlingStrategy` in its client capabilities. + */ + failedChange?: uinteger; +} +/** + * @deprecated Use ApplyWorkspaceEditResult instead. + */ +export type ApplyWorkspaceEditResponse = ApplyWorkspaceEditResult; +/** + * A request sent from the server to the client to modified certain resources. + */ +export declare namespace ApplyWorkspaceEditRequest { + const method: 'workspace/applyEdit'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +export { ImplementationRequest, ImplementationParams, ImplementationRegistrationOptions, ImplementationOptions, TypeDefinitionRequest, TypeDefinitionParams, TypeDefinitionRegistrationOptions, TypeDefinitionOptions, WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFoldersChangeEvent, ConfigurationRequest, ConfigurationParams, ConfigurationItem, DocumentColorRequest, ColorPresentationRequest, DocumentColorOptions, DocumentColorParams, ColorPresentationParams, DocumentColorRegistrationOptions, FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeRegistrationOptions, FoldingRangeRefreshRequest, DeclarationClientCapabilities, DeclarationRequest, DeclarationParams, DeclarationRegistrationOptions, DeclarationOptions, SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeParams, SelectionRangeRequest, SelectionRangeRegistrationOptions, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, WorkDoneProgress, WorkDoneProgressCreateParams, WorkDoneProgressCreateRequest, WorkDoneProgressCancelParams, WorkDoneProgressCancelNotification, CallHierarchyClientCapabilities, CallHierarchyOptions, CallHierarchyRegistrationOptions, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCallsRequest, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCallsRequest, CallHierarchyPrepareParams, CallHierarchyPrepareRequest, SemanticTokensPartialResult, SemanticTokensDeltaPartialResult, TokenFormat, SemanticTokensClientCapabilities, SemanticTokensOptions, SemanticTokensRegistrationOptions, SemanticTokensParams, SemanticTokensRequest, SemanticTokensDeltaParams, SemanticTokensDeltaRequest, SemanticTokensRangeParams, SemanticTokensRangeRequest, SemanticTokensRefreshRequest, SemanticTokensRegistrationType, ShowDocumentParams, ShowDocumentRequest, ShowDocumentResult, ShowDocumentClientCapabilities, LinkedEditingRangeClientCapabilities, LinkedEditingRanges, LinkedEditingRangeOptions, LinkedEditingRangeParams, LinkedEditingRangeRegistrationOptions, LinkedEditingRangeRequest, FileOperationOptions, FileOperationClientCapabilities, FileOperationRegistrationOptions, FileOperationPatternOptions, FileOperationPatternKind, DidCreateFilesNotification, CreateFilesParams, FileCreate, WillCreateFilesRequest, DidRenameFilesNotification, RenameFilesParams, FileRename, WillRenameFilesRequest, DidDeleteFilesNotification, DeleteFilesParams, FileDelete, WillDeleteFilesRequest, UniquenessLevel, MonikerKind, Moniker, MonikerClientCapabilities, MonikerOptions, MonikerRegistrationOptions, MonikerParams, MonikerRequest, TypeHierarchyClientCapabilities, TypeHierarchyOptions, TypeHierarchyRegistrationOptions, TypeHierarchyPrepareParams, TypeHierarchyPrepareRequest, TypeHierarchySubtypesParams, TypeHierarchySubtypesRequest, TypeHierarchySupertypesParams, TypeHierarchySupertypesRequest, InlineValueClientCapabilities, InlineValueOptions, InlineValueRegistrationOptions, InlineValueWorkspaceClientCapabilities, InlineValueParams, InlineValueRequest, InlineValueRefreshRequest, InlayHintClientCapabilities, InlayHintOptions, InlayHintRegistrationOptions, InlayHintWorkspaceClientCapabilities, InlayHintParams, InlayHintRequest, InlayHintResolveRequest, InlayHintRefreshRequest, DiagnosticClientCapabilities, DiagnosticOptions, DiagnosticRegistrationOptions, DiagnosticServerCancellationData, DocumentDiagnosticParams, DocumentDiagnosticReportKind, FullDocumentDiagnosticReport, RelatedFullDocumentDiagnosticReport, UnchangedDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DocumentDiagnosticRequest, PreviousResultId, WorkspaceDiagnosticParams, WorkspaceFullDocumentDiagnosticReport, WorkspaceUnchangedDocumentDiagnosticReport, WorkspaceDocumentDiagnosticReport, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult, WorkspaceDiagnosticRequest, DiagnosticRefreshRequest, NotebookDocumentSyncClientCapabilities, NotebookCellKind, ExecutionSummary, NotebookCell, NotebookDocument, NotebookDocumentIdentifier, VersionedNotebookDocumentIdentifier, NotebookDocumentSyncOptions, NotebookDocumentSyncRegistrationOptions, NotebookDocumentSyncRegistrationType, DidOpenNotebookDocumentParams, DidOpenNotebookDocumentNotification, NotebookCellArrayChange, NotebookDocumentChangeEvent, DidChangeNotebookDocumentParams, DidChangeNotebookDocumentNotification, DidSaveNotebookDocumentParams, DidSaveNotebookDocumentNotification, DidCloseNotebookDocumentParams, DidCloseNotebookDocumentNotification, InlineCompletionClientCapabilities, InlineCompletionOptions, InlineCompletionParams, InlineCompletionRegistrationOptions, InlineCompletionRequest, }; +export { DocumentColorOptions as ColorProviderOptions, DocumentColorOptions as ColorOptions, FoldingRangeOptions as FoldingRangeProviderOptions, SelectionRangeOptions as SelectionRangeProviderOptions, DocumentColorRegistrationOptions as ColorRegistrationOptions }; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts" index f48f83714b3b9cfdd49f75d11d97a7bafd60b9f6..8c8609c86aa716a3eb998fbaa024b42bde42f551 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts" @@ -1,3 +1,37 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f8d1db1f521b60c8d9fd9b49d230ce6981ff7468c63e6ac27f82ed7b67500e67 -size 1932 +import { RequestHandler } from 'vscode-jsonrpc'; +import { Declaration, DeclarationLink, Location, LocationLink } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +/** + * @since 3.14.0 + */ +export interface DeclarationClientCapabilities { + /** + * Whether declaration supports dynamic registration. If this is set to `true` + * the client supports the new `DeclarationRegistrationOptions` return value + * for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; + /** + * The client supports additional metadata in the form of declaration links. + */ + linkSupport?: boolean; +} +export interface DeclarationOptions extends WorkDoneProgressOptions { +} +export interface DeclarationRegistrationOptions extends DeclarationOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions { +} +export interface DeclarationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * A request to resolve the type definition locations of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPositionParams} + * the response is of type {@link Declaration} or a typed array of {@link DeclarationLink} + * or a Thenable that resolves to such. + */ +export declare namespace DeclarationRequest { + const method: 'textDocument/declaration'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js" index 16d1e4e102e739ca8ff2f05b1826a2072fce1846..1e3f05a7fcaa8bb2a9a4aec9969ee9482762bf1b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js" @@ -1,3 +1,22 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:09401a8ad7075385bebc0f56e0a107404dd1669c6a7f4fb58d7d7033f2a72c68 -size 1284 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DeclarationRequest = void 0; +const messages_1 = require("./messages"); +// @ts-ignore: to avoid inlining LocationLink as dynamic import +let __noDynamicImport; +/** + * A request to resolve the type definition locations of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPositionParams} + * the response is of type {@link Declaration} or a typed array of {@link DeclarationLink} + * or a Thenable that resolves to such. + */ +var DeclarationRequest; +(function (DeclarationRequest) { + DeclarationRequest.method = 'textDocument/declaration'; + DeclarationRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method); +})(DeclarationRequest || (exports.DeclarationRequest = DeclarationRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts" index 66ac3c9fbba6b4cae08a27d52a775c4e8aa1e053..3b322a27a142a5a2e8dbf2c9ae4ecab9ad6974dd 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts" @@ -1,3 +1,341 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8d277593403560b6cbe716084083b595c806417583a23d1d3421d3dfbcdf6ba2 -size 10665 +import { RequestHandler0, RequestHandler, ProgressType } from 'vscode-jsonrpc'; +import { TextDocumentIdentifier, Diagnostic, DocumentUri, integer } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType0, ProtocolRequestType } from './messages'; +import type { PartialResultParams, StaticRegistrationOptions, WorkDoneProgressParams, TextDocumentRegistrationOptions, WorkDoneProgressOptions, DiagnosticsCapabilities } from './protocol'; +/** + * Client capabilities specific to diagnostic pull requests. + * + * @since 3.17.0 + */ +export type DiagnosticClientCapabilities = DiagnosticsCapabilities & { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + * return value for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; + /** + * Whether the clients supports related documents for document diagnostic pulls. + */ + relatedDocumentSupport?: boolean; +}; +/** + * Workspace client capabilities specific to diagnostic pull requests. + * + * @since 3.17.0 + */ +export type DiagnosticWorkspaceClientCapabilities = { + /** + * Whether the client implementation supports a refresh request sent from + * the server to the client. + * + * Note that this event is global and will force the client to refresh all + * pulled diagnostics currently shown. It should be used with absolute care and + * is useful for situation where a server for example detects a project wide + * change that requires such a calculation. + */ + refreshSupport?: boolean; +}; +/** + * Diagnostic options. + * + * @since 3.17.0 + */ +export type DiagnosticOptions = WorkDoneProgressOptions & { + /** + * An optional identifier under which the diagnostics are + * managed by the client. + */ + identifier?: string; + /** + * Whether the language has inter file dependencies meaning that + * editing code in one file can result in a different diagnostic + * set in another file. Inter file dependencies are common for + * most programming languages and typically uncommon for linters. + */ + interFileDependencies: boolean; + /** + * The server provides support for workspace diagnostics as well. + */ + workspaceDiagnostics: boolean; +}; +/** + * Diagnostic registration options. + * + * @since 3.17.0 + */ +export type DiagnosticRegistrationOptions = TextDocumentRegistrationOptions & DiagnosticOptions & StaticRegistrationOptions; +export type $DiagnosticServerCapabilities = { + diagnosticProvider?: DiagnosticOptions; +}; +/** + * Cancellation data returned from a diagnostic request. + * + * @since 3.17.0 + */ +export type DiagnosticServerCancellationData = { + retriggerRequest: boolean; +}; +/** + * @since 3.17.0 + */ +export declare namespace DiagnosticServerCancellationData { + function is(value: any): value is DiagnosticServerCancellationData; +} +/** + * Parameters of the document diagnostic request. + * + * @since 3.17.0 + */ +export type DocumentDiagnosticParams = WorkDoneProgressParams & PartialResultParams & { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The additional identifier provided during registration. + */ + identifier?: string; + /** + * The result id of a previous response if provided. + */ + previousResultId?: string; +}; +/** + * The document diagnostic report kinds. + * + * @since 3.17.0 + */ +export declare namespace DocumentDiagnosticReportKind { + /** + * A diagnostic report with a full + * set of problems. + */ + const Full = "full"; + /** + * A report indicating that the last + * returned report is still accurate. + */ + const Unchanged = "unchanged"; +} +export type DocumentDiagnosticReportKind = 'full' | 'unchanged'; +/** + * A diagnostic report with a full set of problems. + * + * @since 3.17.0 + */ +export type FullDocumentDiagnosticReport = { + /** + * A full document diagnostic report. + */ + kind: typeof DocumentDiagnosticReportKind.Full; + /** + * An optional result id. If provided it will + * be sent on the next diagnostic request for the + * same document. + */ + resultId?: string; + /** + * The actual items. + */ + items: Diagnostic[]; +}; +/** + * A full diagnostic report with a set of related documents. + * + * @since 3.17.0 + */ +export type RelatedFullDocumentDiagnosticReport = FullDocumentDiagnosticReport & { + /** + * Diagnostics of related documents. This information is useful + * in programming languages where code in a file A can generate + * diagnostics in a file B which A depends on. An example of + * such a language is C/C++ where marco definitions in a file + * a.cpp and result in errors in a header file b.hpp. + * + * @since 3.17.0 + */ + relatedDocuments?: { + [uri: DocumentUri]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; + }; +}; +/** + * A diagnostic report indicating that the last returned + * report is still accurate. + * + * @since 3.17.0 + */ +export type UnchangedDocumentDiagnosticReport = { + /** + * A document diagnostic report indicating + * no changes to the last result. A server can + * only return `unchanged` if result ids are + * provided. + */ + kind: typeof DocumentDiagnosticReportKind.Unchanged; + /** + * A result id which will be sent on the next + * diagnostic request for the same document. + */ + resultId: string; +}; +/** + * An unchanged diagnostic report with a set of related documents. + * + * @since 3.17.0 + */ +export type RelatedUnchangedDocumentDiagnosticReport = UnchangedDocumentDiagnosticReport & { + /** + * Diagnostics of related documents. This information is useful + * in programming languages where code in a file A can generate + * diagnostics in a file B which A depends on. An example of + * such a language is C/C++ where marco definitions in a file + * a.cpp and result in errors in a header file b.hpp. + * + * @since 3.17.0 + */ + relatedDocuments?: { + [uri: DocumentUri]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; + }; +}; +/** + * The result of a document diagnostic pull request. A report can + * either be a full report containing all diagnostics for the + * requested document or an unchanged report indicating that nothing + * has changed in terms of diagnostics in comparison to the last + * pull request. + * + * @since 3.17.0 + */ +export type DocumentDiagnosticReport = RelatedFullDocumentDiagnosticReport | RelatedUnchangedDocumentDiagnosticReport; +/** + * A partial result for a document diagnostic report. + * + * @since 3.17.0 + */ +export type DocumentDiagnosticReportPartialResult = { + relatedDocuments: { + [uri: DocumentUri]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; + }; +}; +/** + * The document diagnostic request definition. + * + * @since 3.17.0 + */ +export declare namespace DocumentDiagnosticRequest { + const method: 'textDocument/diagnostic'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + const partialResult: ProgressType; + type HandlerSignature = RequestHandler; +} +/** + * A previous result id in a workspace pull request. + * + * @since 3.17.0 + */ +export type PreviousResultId = { + /** + * The URI for which the client knowns a + * result id. + */ + uri: DocumentUri; + /** + * The value of the previous result id. + */ + value: string; +}; +/** + * Parameters of the workspace diagnostic request. + * + * @since 3.17.0 + */ +export type WorkspaceDiagnosticParams = WorkDoneProgressParams & PartialResultParams & { + /** + * The additional identifier provided during registration. + */ + identifier?: string; + /** + * The currently known diagnostic reports with their + * previous result ids. + */ + previousResultIds: PreviousResultId[]; +}; +/** + * A full document diagnostic report for a workspace diagnostic result. + * + * @since 3.17.0 + */ +export type WorkspaceFullDocumentDiagnosticReport = FullDocumentDiagnosticReport & { + /** + * The URI for which diagnostic information is reported. + */ + uri: DocumentUri; + /** + * The version number for which the diagnostics are reported. + * If the document is not marked as open `null` can be provided. + */ + version: integer | null; +}; +/** + * An unchanged document diagnostic report for a workspace diagnostic result. + * + * @since 3.17.0 + */ +export type WorkspaceUnchangedDocumentDiagnosticReport = UnchangedDocumentDiagnosticReport & { + /** + * The URI for which diagnostic information is reported. + */ + uri: DocumentUri; + /** + * The version number for which the diagnostics are reported. + * If the document is not marked as open `null` can be provided. + */ + version: integer | null; +}; +/** + * A workspace diagnostic document report. + * + * @since 3.17.0 + */ +export type WorkspaceDocumentDiagnosticReport = WorkspaceFullDocumentDiagnosticReport | WorkspaceUnchangedDocumentDiagnosticReport; +/** + * A workspace diagnostic report. + * + * @since 3.17.0 + */ +export type WorkspaceDiagnosticReport = { + items: WorkspaceDocumentDiagnosticReport[]; +}; +/** + * A partial result for a workspace diagnostic report. + * + * @since 3.17.0 + */ +export type WorkspaceDiagnosticReportPartialResult = { + items: WorkspaceDocumentDiagnosticReport[]; +}; +/** + * The workspace diagnostic request definition. + * + * @since 3.17.0 + */ +export declare namespace WorkspaceDiagnosticRequest { + const method: 'workspace/diagnostic'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + const partialResult: ProgressType; + type HandlerSignature = RequestHandler; +} +/** + * The diagnostic refresh request definition. + * + * @since 3.17.0 + */ +export declare namespace DiagnosticRefreshRequest { + const method: `workspace/diagnostic/refresh`; + const messageDirection: MessageDirection; + const type: ProtocolRequestType0; + type HandlerSignature = RequestHandler0; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js" index 8ff3aad71ffc5ed237486a0a4ea6e09081427d52..0171619070c2ade7b59d424fbed7d14aac564c45 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js" @@ -1,3 +1,74 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b84b5c65f0603de770ce37aa8d4e8a989f1c6c67c34cc1e57b2d6a47da3a6d8b -size 3422 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = void 0; +const vscode_jsonrpc_1 = require("vscode-jsonrpc"); +const Is = require("./utils/is"); +const messages_1 = require("./messages"); +/** + * @since 3.17.0 + */ +var DiagnosticServerCancellationData; +(function (DiagnosticServerCancellationData) { + function is(value) { + const candidate = value; + return candidate && Is.boolean(candidate.retriggerRequest); + } + DiagnosticServerCancellationData.is = is; +})(DiagnosticServerCancellationData || (exports.DiagnosticServerCancellationData = DiagnosticServerCancellationData = {})); +/** + * The document diagnostic report kinds. + * + * @since 3.17.0 + */ +var DocumentDiagnosticReportKind; +(function (DocumentDiagnosticReportKind) { + /** + * A diagnostic report with a full + * set of problems. + */ + DocumentDiagnosticReportKind.Full = 'full'; + /** + * A report indicating that the last + * returned report is still accurate. + */ + DocumentDiagnosticReportKind.Unchanged = 'unchanged'; +})(DocumentDiagnosticReportKind || (exports.DocumentDiagnosticReportKind = DocumentDiagnosticReportKind = {})); +/** + * The document diagnostic request definition. + * + * @since 3.17.0 + */ +var DocumentDiagnosticRequest; +(function (DocumentDiagnosticRequest) { + DocumentDiagnosticRequest.method = 'textDocument/diagnostic'; + DocumentDiagnosticRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentDiagnosticRequest.type = new messages_1.ProtocolRequestType(DocumentDiagnosticRequest.method); + DocumentDiagnosticRequest.partialResult = new vscode_jsonrpc_1.ProgressType(); +})(DocumentDiagnosticRequest || (exports.DocumentDiagnosticRequest = DocumentDiagnosticRequest = {})); +/** + * The workspace diagnostic request definition. + * + * @since 3.17.0 + */ +var WorkspaceDiagnosticRequest; +(function (WorkspaceDiagnosticRequest) { + WorkspaceDiagnosticRequest.method = 'workspace/diagnostic'; + WorkspaceDiagnosticRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WorkspaceDiagnosticRequest.type = new messages_1.ProtocolRequestType(WorkspaceDiagnosticRequest.method); + WorkspaceDiagnosticRequest.partialResult = new vscode_jsonrpc_1.ProgressType(); +})(WorkspaceDiagnosticRequest || (exports.WorkspaceDiagnosticRequest = WorkspaceDiagnosticRequest = {})); +/** + * The diagnostic refresh request definition. + * + * @since 3.17.0 + */ +var DiagnosticRefreshRequest; +(function (DiagnosticRefreshRequest) { + DiagnosticRefreshRequest.method = `workspace/diagnostic/refresh`; + DiagnosticRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + DiagnosticRefreshRequest.type = new messages_1.ProtocolRequestType0(DiagnosticRefreshRequest.method); +})(DiagnosticRefreshRequest || (exports.DiagnosticRefreshRequest = DiagnosticRefreshRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts" index 7d5b973524e96a3493d16c1e039a28c11d0f6db6..f3571c4fb2e626fd46091f9537a05a211a619b72 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts" @@ -1,3 +1,306 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:77afb3c5f47b721ab94b2b2faace898f0b4e1e4f7cec679baeaa2f9a6f530079 -size 9608 +import { NotificationHandler, RequestHandler } from 'vscode-jsonrpc'; +import { WorkspaceEdit } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolNotificationType, ProtocolRequestType } from './messages'; +/** + * Options for notifications/requests for user operations on files. + * + * @since 3.16.0 + */ +export interface FileOperationOptions { + /** + * The server is interested in receiving didCreateFiles notifications. + */ + didCreate?: FileOperationRegistrationOptions; + /** + * The server is interested in receiving willCreateFiles requests. + */ + willCreate?: FileOperationRegistrationOptions; + /** + * The server is interested in receiving didRenameFiles notifications. + */ + didRename?: FileOperationRegistrationOptions; + /** + * The server is interested in receiving willRenameFiles requests. + */ + willRename?: FileOperationRegistrationOptions; + /** + * The server is interested in receiving didDeleteFiles file notifications. + */ + didDelete?: FileOperationRegistrationOptions; + /** + * The server is interested in receiving willDeleteFiles file requests. + */ + willDelete?: FileOperationRegistrationOptions; +} +/** + * The options to register for file operations. + * + * @since 3.16.0 + */ +export interface FileOperationRegistrationOptions { + /** + * The actual filters. + */ + filters: FileOperationFilter[]; +} +/** + * A pattern kind describing if a glob pattern matches a file a folder or + * both. + * + * @since 3.16.0 + */ +export declare namespace FileOperationPatternKind { + /** + * The pattern matches a file only. + */ + const file: 'file'; + /** + * The pattern matches a folder only. + */ + const folder: 'folder'; +} +export type FileOperationPatternKind = 'file' | 'folder'; +/** + * Matching options for the file operation pattern. + * + * @since 3.16.0 + */ +export interface FileOperationPatternOptions { + /** + * The pattern should be matched ignoring casing. + */ + ignoreCase?: boolean; +} +/** + * A pattern to describe in which file operation requests or notifications + * the server is interested in receiving. + * + * @since 3.16.0 + */ +interface FileOperationPattern { + /** + * The glob pattern to match. Glob patterns can have the following syntax: + * - `*` to match one or more characters in a path segment + * - `?` to match on one character in a path segment + * - `**` to match any number of path segments, including none + * - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files) + * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`) + */ + glob: string; + /** + * Whether to match files or folders with this pattern. + * + * Matches both if undefined. + */ + matches?: FileOperationPatternKind; + /** + * Additional options used during matching. + */ + options?: FileOperationPatternOptions; +} +/** + * A filter to describe in which file operation requests or notifications + * the server is interested in receiving. + * + * @since 3.16.0 + */ +export interface FileOperationFilter { + /** + * A Uri scheme like `file` or `untitled`. + */ + scheme?: string; + /** + * The actual file operation pattern. + */ + pattern: FileOperationPattern; +} +/** + * Capabilities relating to events from file operations by the user in the client. + * + * These events do not come from the file system, they come from user operations + * like renaming a file in the UI. + * + * @since 3.16.0 + */ +export interface FileOperationClientCapabilities { + /** + * Whether the client supports dynamic registration for file requests/notifications. + */ + dynamicRegistration?: boolean; + /** + * The client has support for sending didCreateFiles notifications. + */ + didCreate?: boolean; + /** + * The client has support for sending willCreateFiles requests. + */ + willCreate?: boolean; + /** + * The client has support for sending didRenameFiles notifications. + */ + didRename?: boolean; + /** + * The client has support for sending willRenameFiles requests. + */ + willRename?: boolean; + /** + * The client has support for sending didDeleteFiles notifications. + */ + didDelete?: boolean; + /** + * The client has support for sending willDeleteFiles requests. + */ + willDelete?: boolean; +} +/** + * The parameters sent in notifications/requests for user-initiated creation of + * files. + * + * @since 3.16.0 + */ +export interface CreateFilesParams { + /** + * An array of all files/folders created in this operation. + */ + files: FileCreate[]; +} +/** + * Represents information on a file/folder create. + * + * @since 3.16.0 + */ +export interface FileCreate { + /** + * A file:// URI for the location of the file/folder being created. + */ + uri: string; +} +/** + * The parameters sent in notifications/requests for user-initiated renames of + * files. + * + * @since 3.16.0 + */ +export interface RenameFilesParams { + /** + * An array of all files/folders renamed in this operation. When a folder is renamed, only + * the folder will be included, and not its children. + */ + files: FileRename[]; +} +/** + * Represents information on a file/folder rename. + * + * @since 3.16.0 + */ +export interface FileRename { + /** + * A file:// URI for the original location of the file/folder being renamed. + */ + oldUri: string; + /** + * A file:// URI for the new location of the file/folder being renamed. + */ + newUri: string; +} +/** + * The parameters sent in notifications/requests for user-initiated deletes of + * files. + * + * @since 3.16.0 + */ +export interface DeleteFilesParams { + /** + * An array of all files/folders deleted in this operation. + */ + files: FileDelete[]; +} +/** + * Represents information on a file/folder delete. + * + * @since 3.16.0 + */ +export interface FileDelete { + /** + * A file:// URI for the location of the file/folder being deleted. + */ + uri: string; +} +/** + * The will create files request is sent from the client to the server before files are actually + * created as long as the creation is triggered from within the client. + * + * The request can return a `WorkspaceEdit` which will be applied to workspace before the + * files are created. Hence the `WorkspaceEdit` can not manipulate the content of the file + * to be created. + * + * @since 3.16.0 + */ +export declare namespace WillCreateFilesRequest { + const method: 'workspace/willCreateFiles'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * The did create files notification is sent from the client to the server when + * files were created from within the client. + * + * @since 3.16.0 + */ +export declare namespace DidCreateFilesNotification { + const method: 'workspace/didCreateFiles'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + type HandlerSignature = NotificationHandler; +} +/** + * The will rename files request is sent from the client to the server before files are actually + * renamed as long as the rename is triggered from within the client. + * + * @since 3.16.0 + */ +export declare namespace WillRenameFilesRequest { + const method: 'workspace/willRenameFiles'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * The did rename files notification is sent from the client to the server when + * files were renamed from within the client. + * + * @since 3.16.0 + */ +export declare namespace DidRenameFilesNotification { + const method: 'workspace/didRenameFiles'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + type HandlerSignature = NotificationHandler; +} +/** + * The will delete files request is sent from the client to the server before files are actually + * deleted as long as the deletion is triggered from within the client. + * + * @since 3.16.0 + */ +export declare namespace DidDeleteFilesNotification { + const method: 'workspace/didDeleteFiles'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + type HandlerSignature = NotificationHandler; +} +/** + * The did delete files notification is sent from the client to the server when + * files were deleted from within the client. + * + * @since 3.16.0 + */ +export declare namespace WillDeleteFilesRequest { + const method: 'workspace/willDeleteFiles'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js" index 9f992748276563635f8f9a74d272e8a43bd4daf7..e85e52a034e86312a825135ddcc5e503f2f4f55e 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js" @@ -1,3 +1,101 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:daba5d474d73127f5ee5335d717f04169a5cb8b228ac401e83c9a2798315ed5f -size 5071 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.DidRenameFilesNotification = exports.WillRenameFilesRequest = exports.DidCreateFilesNotification = exports.WillCreateFilesRequest = exports.FileOperationPatternKind = void 0; +const messages_1 = require("./messages"); +/** + * A pattern kind describing if a glob pattern matches a file a folder or + * both. + * + * @since 3.16.0 + */ +var FileOperationPatternKind; +(function (FileOperationPatternKind) { + /** + * The pattern matches a file only. + */ + FileOperationPatternKind.file = 'file'; + /** + * The pattern matches a folder only. + */ + FileOperationPatternKind.folder = 'folder'; +})(FileOperationPatternKind || (exports.FileOperationPatternKind = FileOperationPatternKind = {})); +/** + * The will create files request is sent from the client to the server before files are actually + * created as long as the creation is triggered from within the client. + * + * The request can return a `WorkspaceEdit` which will be applied to workspace before the + * files are created. Hence the `WorkspaceEdit` can not manipulate the content of the file + * to be created. + * + * @since 3.16.0 + */ +var WillCreateFilesRequest; +(function (WillCreateFilesRequest) { + WillCreateFilesRequest.method = 'workspace/willCreateFiles'; + WillCreateFilesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WillCreateFilesRequest.type = new messages_1.ProtocolRequestType(WillCreateFilesRequest.method); +})(WillCreateFilesRequest || (exports.WillCreateFilesRequest = WillCreateFilesRequest = {})); +/** + * The did create files notification is sent from the client to the server when + * files were created from within the client. + * + * @since 3.16.0 + */ +var DidCreateFilesNotification; +(function (DidCreateFilesNotification) { + DidCreateFilesNotification.method = 'workspace/didCreateFiles'; + DidCreateFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidCreateFilesNotification.type = new messages_1.ProtocolNotificationType(DidCreateFilesNotification.method); +})(DidCreateFilesNotification || (exports.DidCreateFilesNotification = DidCreateFilesNotification = {})); +/** + * The will rename files request is sent from the client to the server before files are actually + * renamed as long as the rename is triggered from within the client. + * + * @since 3.16.0 + */ +var WillRenameFilesRequest; +(function (WillRenameFilesRequest) { + WillRenameFilesRequest.method = 'workspace/willRenameFiles'; + WillRenameFilesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WillRenameFilesRequest.type = new messages_1.ProtocolRequestType(WillRenameFilesRequest.method); +})(WillRenameFilesRequest || (exports.WillRenameFilesRequest = WillRenameFilesRequest = {})); +/** + * The did rename files notification is sent from the client to the server when + * files were renamed from within the client. + * + * @since 3.16.0 + */ +var DidRenameFilesNotification; +(function (DidRenameFilesNotification) { + DidRenameFilesNotification.method = 'workspace/didRenameFiles'; + DidRenameFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidRenameFilesNotification.type = new messages_1.ProtocolNotificationType(DidRenameFilesNotification.method); +})(DidRenameFilesNotification || (exports.DidRenameFilesNotification = DidRenameFilesNotification = {})); +/** + * The will delete files request is sent from the client to the server before files are actually + * deleted as long as the deletion is triggered from within the client. + * + * @since 3.16.0 + */ +var DidDeleteFilesNotification; +(function (DidDeleteFilesNotification) { + DidDeleteFilesNotification.method = 'workspace/didDeleteFiles'; + DidDeleteFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidDeleteFilesNotification.type = new messages_1.ProtocolNotificationType(DidDeleteFilesNotification.method); +})(DidDeleteFilesNotification || (exports.DidDeleteFilesNotification = DidDeleteFilesNotification = {})); +/** + * The did delete files notification is sent from the client to the server when + * files were deleted from within the client. + * + * @since 3.16.0 + */ +var WillDeleteFilesRequest; +(function (WillDeleteFilesRequest) { + WillDeleteFilesRequest.method = 'workspace/willDeleteFiles'; + WillDeleteFilesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WillDeleteFilesRequest.type = new messages_1.ProtocolRequestType(WillDeleteFilesRequest.method); +})(WillDeleteFilesRequest || (exports.WillDeleteFilesRequest = WillDeleteFilesRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts" index b7fc15e20110ccf059e0b795fe113adf71343fb5..008bab7ee92a25fe99a879387b8455903b3d8b2f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts" @@ -1,3 +1,117 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ad47f9de57c207624e1912d531ba574bd37696f1c4b2094129e74161a8276e5c -size 4201 +import { RequestHandler, RequestHandler0 } from 'vscode-jsonrpc'; +import { TextDocumentIdentifier, uinteger, FoldingRange, FoldingRangeKind } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType, ProtocolRequestType0 } from './messages'; +import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +/** + * @since 3.18.0 + */ +export interface ClientFoldingRangeKindOptions { + /** + * The folding range kind values the client supports. When this + * property exists the client also guarantees that it will + * handle values outside its set gracefully and falls back + * to a default value when unknown. + */ + valueSet?: FoldingRangeKind[]; +} +/** + * @since 3.18.0 + */ +export interface ClientFoldingRangeOptions { + /** + * If set, the client signals that it supports setting collapsedText on + * folding ranges to display custom labels instead of the default text. + * + * @since 3.17.0 + */ + collapsedText?: boolean; +} +export interface FoldingRangeClientCapabilities { + /** + * Whether implementation supports dynamic registration for folding range + * providers. If this is set to `true` the client supports the new + * `FoldingRangeRegistrationOptions` return value for the corresponding + * server capability as well. + */ + dynamicRegistration?: boolean; + /** + * The maximum number of folding ranges that the client prefers to receive + * per document. The value serves as a hint, servers are free to follow the + * limit. + */ + rangeLimit?: uinteger; + /** + * If set, the client signals that it only supports folding complete lines. + * If set, client will ignore specified `startCharacter` and `endCharacter` + * properties in a FoldingRange. + */ + lineFoldingOnly?: boolean; + /** + * Specific options for the folding range kind. + * + * @since 3.17.0 + */ + foldingRangeKind?: ClientFoldingRangeKindOptions; + /** + * Specific options for the folding range. + * + * @since 3.17.0 + */ + foldingRange?: ClientFoldingRangeOptions; +} +/** + * Client workspace capabilities specific to folding ranges + * + * @since 3.18.0 + * @proposed + */ +export interface FoldingRangeWorkspaceClientCapabilities { + /** + * Whether the client implementation supports a refresh request sent from the + * server to the client. + * + * Note that this event is global and will force the client to refresh all + * folding ranges currently shown. It should be used with absolute care and is + * useful for situation where a server for example detects a project wide + * change that requires such a calculation. + * + * @since 3.18.0 + * @proposed + */ + refreshSupport?: boolean; +} +export interface FoldingRangeOptions extends WorkDoneProgressOptions { +} +export interface FoldingRangeRegistrationOptions extends TextDocumentRegistrationOptions, FoldingRangeOptions, StaticRegistrationOptions { +} +/** + * Parameters for a {@link FoldingRangeRequest}. + */ +export interface FoldingRangeParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; +} +/** + * A request to provide folding ranges in a document. The request's + * parameter is of type {@link FoldingRangeParams}, the + * response is of type {@link FoldingRangeList} or a Thenable + * that resolves to such. + */ +export declare namespace FoldingRangeRequest { + const method: 'textDocument/foldingRange'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * @since 3.18.0 + * @proposed + */ +export declare namespace FoldingRangeRefreshRequest { + const method: `workspace/foldingRange/refresh`; + const messageDirection: MessageDirection; + const type: ProtocolRequestType0; + type HandlerSignature = RequestHandler0; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js" index bc770a6ae7f62557c8162296f3b26260ea1c7830..846d0575cea0e9cf69f77fdc80f94b5f6b393182 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js" @@ -1,3 +1,30 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d8836bd17fa7fc6554cd2825d8a77cd0522f97e162c1426b67294a76ec7ecf2d -size 1649 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FoldingRangeRefreshRequest = exports.FoldingRangeRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to provide folding ranges in a document. The request's + * parameter is of type {@link FoldingRangeParams}, the + * response is of type {@link FoldingRangeList} or a Thenable + * that resolves to such. + */ +var FoldingRangeRequest; +(function (FoldingRangeRequest) { + FoldingRangeRequest.method = 'textDocument/foldingRange'; + FoldingRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer; + FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method); +})(FoldingRangeRequest || (exports.FoldingRangeRequest = FoldingRangeRequest = {})); +/** + * @since 3.18.0 + * @proposed + */ +var FoldingRangeRefreshRequest; +(function (FoldingRangeRefreshRequest) { + FoldingRangeRefreshRequest.method = `workspace/foldingRange/refresh`; + FoldingRangeRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + FoldingRangeRefreshRequest.type = new messages_1.ProtocolRequestType0(FoldingRangeRefreshRequest.method); +})(FoldingRangeRefreshRequest || (exports.FoldingRangeRefreshRequest = FoldingRangeRefreshRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts" index 3bc6cbc2855781689a3519aaf6f639d6c265a6f5..119e20962744bc92a5118176a381d6070bdee11c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts" @@ -1,3 +1,38 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bac171d09621591ee5fcddc28e031b348b0e038d12cc1ca2cf99cbaa27479999 -size 1940 +import { RequestHandler } from 'vscode-jsonrpc'; +import { Definition, DefinitionLink, Location, LocationLink } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +/** + * @since 3.6.0 + */ +export interface ImplementationClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `ImplementationRegistrationOptions` return value + * for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; + /** + * The client supports additional metadata in the form of definition links. + * + * @since 3.14.0 + */ + linkSupport?: boolean; +} +export interface ImplementationOptions extends WorkDoneProgressOptions { +} +export interface ImplementationRegistrationOptions extends TextDocumentRegistrationOptions, ImplementationOptions, StaticRegistrationOptions { +} +export interface ImplementationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * A request to resolve the implementation locations of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPositionParams} + * the response is of type {@link Definition} or a Thenable that resolves to such. + */ +export declare namespace ImplementationRequest { + const method: 'textDocument/implementation'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js" index 5ca347de5df812fff6621eef672fbea2cbac304d..9715ee841f04c696cb518d036f71bb9aa6f73407 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js" @@ -1,3 +1,21 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:79b56dfe6e27810c419237690641848225218b45258775ead61f5313214a3798 -size 1268 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ImplementationRequest = void 0; +const messages_1 = require("./messages"); +// @ts-ignore: to avoid inlining LocationLink as dynamic import +let __noDynamicImport; +/** + * A request to resolve the implementation locations of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPositionParams} + * the response is of type {@link Definition} or a Thenable that resolves to such. + */ +var ImplementationRequest; +(function (ImplementationRequest) { + ImplementationRequest.method = 'textDocument/implementation'; + ImplementationRequest.messageDirection = messages_1.MessageDirection.clientToServer; + ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method); +})(ImplementationRequest || (exports.ImplementationRequest = ImplementationRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.d.ts" index a2ede1ebf5974472de67762a71762db67daae145..8725e435fd0fe99da2fd43d81343a395a860d5ed 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.d.ts" @@ -1,3 +1,114 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7492435f6bd59911a1e64e6658565f77ae39b4c69dd21ee489a877972c3c1153 -size 3755 +import { RequestHandler, RequestHandler0 } from 'vscode-jsonrpc'; +import { Range, TextDocumentIdentifier, InlayHint } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType, ProtocolRequestType0 } from './messages'; +import type { StaticRegistrationOptions, TextDocumentRegistrationOptions, WorkDoneProgressOptions, WorkDoneProgressParams } from './protocol'; +/** + * @since 3.18.0 + */ +export interface ClientInlayHintResolveOptions { + /** + * The properties that a client can resolve lazily. + */ + properties: string[]; +} +/** + * Inlay hint client capabilities. + * + * @since 3.17.0 + */ +export type InlayHintClientCapabilities = { + /** + * Whether inlay hints support dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Indicates which properties a client can resolve lazily on an inlay + * hint. + */ + resolveSupport?: ClientInlayHintResolveOptions; +}; +/** + * Client workspace capabilities specific to inlay hints. + * + * @since 3.17.0 + */ +export type InlayHintWorkspaceClientCapabilities = { + /** + * Whether the client implementation supports a refresh request sent from + * the server to the client. + * + * Note that this event is global and will force the client to refresh all + * inlay hints currently shown. It should be used with absolute care and + * is useful for situation where a server for example detects a project wide + * change that requires such a calculation. + */ + refreshSupport?: boolean; +}; +/** + * Inlay hint options used during static registration. + * + * @since 3.17.0 + */ +export type InlayHintOptions = WorkDoneProgressOptions & { + /** + * The server provides support to resolve additional + * information for an inlay hint item. + */ + resolveProvider?: boolean; +}; +/** + * Inlay hint options used during static or dynamic registration. + * + * @since 3.17.0 + */ +export type InlayHintRegistrationOptions = InlayHintOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions; +/** + * A parameter literal used in inlay hint requests. + * + * @since 3.17.0 + */ +export type InlayHintParams = WorkDoneProgressParams & { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The document range for which inlay hints should be computed. + */ + range: Range; +}; +/** + * A request to provide inlay hints in a document. The request's parameter is of + * type {@link InlayHintsParams}, the response is of type + * {@link InlayHint InlayHint[]} or a Thenable that resolves to such. + * + * @since 3.17.0 + */ +export declare namespace InlayHintRequest { + const method: 'textDocument/inlayHint'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * A request to resolve additional properties for an inlay hint. + * The request's parameter is of type {@link InlayHint}, the response is + * of type {@link InlayHint} or a Thenable that resolves to such. + * + * @since 3.17.0 + */ +export declare namespace InlayHintResolveRequest { + const method: 'inlayHint/resolve'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * @since 3.17.0 + */ +export declare namespace InlayHintRefreshRequest { + const method: `workspace/inlayHint/refresh`; + const messageDirection: MessageDirection; + const type: ProtocolRequestType0; + type HandlerSignature = RequestHandler0; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js" index 14958750ec3558f33bdc0fe9e2e5a43a5e58eb78..b1e915ae7971e19a004dded0675a030a6c01809a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js" @@ -1,3 +1,43 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8280db098391a468bf82117cd14536be14aac082d822c66e77c16ac6634e80d0 -size 2269 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to provide inlay hints in a document. The request's parameter is of + * type {@link InlayHintsParams}, the response is of type + * {@link InlayHint InlayHint[]} or a Thenable that resolves to such. + * + * @since 3.17.0 + */ +var InlayHintRequest; +(function (InlayHintRequest) { + InlayHintRequest.method = 'textDocument/inlayHint'; + InlayHintRequest.messageDirection = messages_1.MessageDirection.clientToServer; + InlayHintRequest.type = new messages_1.ProtocolRequestType(InlayHintRequest.method); +})(InlayHintRequest || (exports.InlayHintRequest = InlayHintRequest = {})); +/** + * A request to resolve additional properties for an inlay hint. + * The request's parameter is of type {@link InlayHint}, the response is + * of type {@link InlayHint} or a Thenable that resolves to such. + * + * @since 3.17.0 + */ +var InlayHintResolveRequest; +(function (InlayHintResolveRequest) { + InlayHintResolveRequest.method = 'inlayHint/resolve'; + InlayHintResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + InlayHintResolveRequest.type = new messages_1.ProtocolRequestType(InlayHintResolveRequest.method); +})(InlayHintResolveRequest || (exports.InlayHintResolveRequest = InlayHintResolveRequest = {})); +/** + * @since 3.17.0 + */ +var InlayHintRefreshRequest; +(function (InlayHintRefreshRequest) { + InlayHintRefreshRequest.method = `workspace/inlayHint/refresh`; + InlayHintRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + InlayHintRefreshRequest.type = new messages_1.ProtocolRequestType0(InlayHintRefreshRequest.method); +})(InlayHintRefreshRequest || (exports.InlayHintRefreshRequest = InlayHintRefreshRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.d.ts" index a78f32faa7b942424d5756aa1c752f0a838a5ce8..56a37679a4197fe37fce22c060c20ec7216f83a3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.d.ts" @@ -1,3 +1,57 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7d40ae7bd3141e4fbad1572e9461e44eb631f3c3db8429d78a26ac7359d6e4e5 -size 2200 +import { InlineCompletionItem, InlineCompletionContext, InlineCompletionList } from 'vscode-languageserver-types'; +import { RequestHandler } from 'vscode-jsonrpc'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { TextDocumentRegistrationOptions, WorkDoneProgressOptions, StaticRegistrationOptions, WorkDoneProgressParams, TextDocumentPositionParams } from './protocol'; +/** + * Client capabilities specific to inline completions. + * + * @since 3.18.0 + * @proposed + */ +export type InlineCompletionClientCapabilities = { + /** + * Whether implementation supports dynamic registration for inline completion providers. + */ + dynamicRegistration?: boolean; +}; +/** + * Inline completion options used during static registration. + * + * @since 3.18.0 + * @proposed + */ +export type InlineCompletionOptions = WorkDoneProgressOptions; +/** + * Inline completion options used during static or dynamic registration. + * + * @since 3.18.0 + * @proposed + */ +export type InlineCompletionRegistrationOptions = InlineCompletionOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions; +/** + * A parameter literal used in inline completion requests. + * + * @since 3.18.0 + * @proposed + */ +export type InlineCompletionParams = WorkDoneProgressParams & TextDocumentPositionParams & { + /** + * Additional information about the context in which inline completions were + * requested. + */ + context: InlineCompletionContext; +}; +/** + * A request to provide inline completions in a document. The request's parameter is of + * type {@link InlineCompletionParams}, the response is of type + * {@link InlineCompletion InlineCompletion[]} or a Thenable that resolves to such. + * + * @since 3.18.0 + * @proposed + */ +export declare namespace InlineCompletionRequest { + const method: 'textDocument/inlineCompletion'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js" index 6204b96aacb024656a32ef757ff8cce51af3d7e1..8b92cd45ddc021adb5ca85f250720368e7e2f13d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js" @@ -1,3 +1,22 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bfeda404f7a717423cdc7f477062671ed4fc7a9f4d938fc5a4dd7a5241ed1c2f -size 1218 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InlineCompletionRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to provide inline completions in a document. The request's parameter is of + * type {@link InlineCompletionParams}, the response is of type + * {@link InlineCompletion InlineCompletion[]} or a Thenable that resolves to such. + * + * @since 3.18.0 + * @proposed + */ +var InlineCompletionRequest; +(function (InlineCompletionRequest) { + InlineCompletionRequest.method = 'textDocument/inlineCompletion'; + InlineCompletionRequest.messageDirection = messages_1.MessageDirection.clientToServer; + InlineCompletionRequest.type = new messages_1.ProtocolRequestType(InlineCompletionRequest.method); +})(InlineCompletionRequest || (exports.InlineCompletionRequest = InlineCompletionRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.d.ts" index 83a79a2fdf1789a3c9971f07dea0e15a4ae9dfac..c835a2979c1cd383d5319419f65ccec8b8bf4aa3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.d.ts" @@ -1,3 +1,86 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6ae49bf0bdc093ec209b0d2ae86a903be5813093dc25f612b9f84d85c3d43ba4 -size 3015 +import { TextDocumentIdentifier, Range, InlineValue, InlineValueContext } from 'vscode-languageserver-types'; +import { RequestHandler, RequestHandler0 } from 'vscode-jsonrpc'; +import { MessageDirection, ProtocolRequestType, ProtocolRequestType0 } from './messages'; +import type { TextDocumentRegistrationOptions, WorkDoneProgressOptions, StaticRegistrationOptions, WorkDoneProgressParams } from './protocol'; +/** + * Client capabilities specific to inline values. + * + * @since 3.17.0 + */ +export type InlineValueClientCapabilities = { + /** + * Whether implementation supports dynamic registration for inline value providers. + */ + dynamicRegistration?: boolean; +}; +/** + * Client workspace capabilities specific to inline values. + * + * @since 3.17.0 + */ +export type InlineValueWorkspaceClientCapabilities = { + /** + * Whether the client implementation supports a refresh request sent from the + * server to the client. + * + * Note that this event is global and will force the client to refresh all + * inline values currently shown. It should be used with absolute care and is + * useful for situation where a server for example detects a project wide + * change that requires such a calculation. + */ + refreshSupport?: boolean; +}; +/** + * Inline value options used during static registration. + * + * @since 3.17.0 + */ +export type InlineValueOptions = WorkDoneProgressOptions; +/** + * Inline value options used during static or dynamic registration. + * + * @since 3.17.0 + */ +export type InlineValueRegistrationOptions = InlineValueOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions; +/** + * A parameter literal used in inline value requests. + * + * @since 3.17.0 + */ +export type InlineValueParams = WorkDoneProgressParams & { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The document range for which inline values should be computed. + */ + range: Range; + /** + * Additional information about the context in which inline values were + * requested. + */ + context: InlineValueContext; +}; +/** + * A request to provide inline values in a document. The request's parameter is of + * type {@link InlineValueParams}, the response is of type + * {@link InlineValue InlineValue[]} or a Thenable that resolves to such. + * + * @since 3.17.0 + */ +export declare namespace InlineValueRequest { + const method: 'textDocument/inlineValue'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * @since 3.17.0 + */ +export declare namespace InlineValueRefreshRequest { + const method: `workspace/inlineValue/refresh`; + const messageDirection: MessageDirection; + const type: ProtocolRequestType0; + type HandlerSignature = RequestHandler0; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js" index 634b3e4342d76661e633b01a534cd17c32ba2a0c..8e81b66cf2bbea42d07d21e2a22ced05a3dc7ea3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js" @@ -1,3 +1,30 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6d5358d073b4b1031ebae006447b57ee09cff71cfaaaa671f2dfa1096ad0d5da -size 1638 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InlineValueRefreshRequest = exports.InlineValueRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to provide inline values in a document. The request's parameter is of + * type {@link InlineValueParams}, the response is of type + * {@link InlineValue InlineValue[]} or a Thenable that resolves to such. + * + * @since 3.17.0 + */ +var InlineValueRequest; +(function (InlineValueRequest) { + InlineValueRequest.method = 'textDocument/inlineValue'; + InlineValueRequest.messageDirection = messages_1.MessageDirection.clientToServer; + InlineValueRequest.type = new messages_1.ProtocolRequestType(InlineValueRequest.method); +})(InlineValueRequest || (exports.InlineValueRequest = InlineValueRequest = {})); +/** + * @since 3.17.0 + */ +var InlineValueRefreshRequest; +(function (InlineValueRefreshRequest) { + InlineValueRefreshRequest.method = `workspace/inlineValue/refresh`; + InlineValueRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + InlineValueRefreshRequest.type = new messages_1.ProtocolRequestType0(InlineValueRefreshRequest.method); +})(InlineValueRefreshRequest || (exports.InlineValueRefreshRequest = InlineValueRefreshRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.js" index 83d548798d3c3a1e69433df6ecebcb58f280d51f..c29ba0d283666a0e268ed2f2cba2d0b2418dbc0c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.js" @@ -1,3 +1,954 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e67bd8c6fe8487880c6b0ec1dd1222063e5f677f5406be435a210cca1cda9be1 -size 56358 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CodeActionResolveRequest = exports.CodeActionRequest = exports.DocumentSymbolRequest = exports.DocumentHighlightRequest = exports.ReferencesRequest = exports.DefinitionRequest = exports.SignatureHelpRequest = exports.SignatureHelpTriggerKind = exports.HoverRequest = exports.CompletionResolveRequest = exports.CompletionRequest = exports.CompletionTriggerKind = exports.PublishDiagnosticsNotification = exports.WatchKind = exports.RelativePattern = exports.FileChangeType = exports.DidChangeWatchedFilesNotification = exports.WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentNotification = exports.TextDocumentSaveReason = exports.DidSaveTextDocumentNotification = exports.DidCloseTextDocumentNotification = exports.DidChangeTextDocumentNotification = exports.TextDocumentContentChangeEvent = exports.DidOpenTextDocumentNotification = exports.TextDocumentSyncKind = exports.TelemetryEventNotification = exports.LogMessageNotification = exports.ShowMessageRequest = exports.ShowMessageNotification = exports.MessageType = exports.DidChangeConfigurationNotification = exports.ExitNotification = exports.ShutdownRequest = exports.InitializedNotification = exports.InitializeErrorCodes = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.PositionEncodingKind = exports.RegularExpressionEngineKind = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.NotebookCellTextDocumentFilter = exports.NotebookDocumentFilter = exports.TextDocumentFilter = void 0; +exports.MonikerKind = exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRefreshRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangesFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = exports.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = exports.CodeLensRequest = exports.WorkspaceSymbolResolveRequest = exports.WorkspaceSymbolRequest = void 0; +exports.InlineCompletionRequest = exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = exports.InlineValueRefreshRequest = exports.InlineValueRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchySubtypesRequest = exports.TypeHierarchyPrepareRequest = exports.MonikerRequest = void 0; +const messages_1 = require("./messages"); +const vscode_languageserver_types_1 = require("vscode-languageserver-types"); +const Is = require("./utils/is"); +const protocol_implementation_1 = require("./protocol.implementation"); +Object.defineProperty(exports, "ImplementationRequest", { enumerable: true, get: function () { return protocol_implementation_1.ImplementationRequest; } }); +const protocol_typeDefinition_1 = require("./protocol.typeDefinition"); +Object.defineProperty(exports, "TypeDefinitionRequest", { enumerable: true, get: function () { return protocol_typeDefinition_1.TypeDefinitionRequest; } }); +const protocol_workspaceFolder_1 = require("./protocol.workspaceFolder"); +Object.defineProperty(exports, "WorkspaceFoldersRequest", { enumerable: true, get: function () { return protocol_workspaceFolder_1.WorkspaceFoldersRequest; } }); +Object.defineProperty(exports, "DidChangeWorkspaceFoldersNotification", { enumerable: true, get: function () { return protocol_workspaceFolder_1.DidChangeWorkspaceFoldersNotification; } }); +const protocol_configuration_1 = require("./protocol.configuration"); +Object.defineProperty(exports, "ConfigurationRequest", { enumerable: true, get: function () { return protocol_configuration_1.ConfigurationRequest; } }); +const protocol_colorProvider_1 = require("./protocol.colorProvider"); +Object.defineProperty(exports, "DocumentColorRequest", { enumerable: true, get: function () { return protocol_colorProvider_1.DocumentColorRequest; } }); +Object.defineProperty(exports, "ColorPresentationRequest", { enumerable: true, get: function () { return protocol_colorProvider_1.ColorPresentationRequest; } }); +const protocol_foldingRange_1 = require("./protocol.foldingRange"); +Object.defineProperty(exports, "FoldingRangeRequest", { enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRequest; } }); +Object.defineProperty(exports, "FoldingRangeRefreshRequest", { enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRefreshRequest; } }); +const protocol_declaration_1 = require("./protocol.declaration"); +Object.defineProperty(exports, "DeclarationRequest", { enumerable: true, get: function () { return protocol_declaration_1.DeclarationRequest; } }); +const protocol_selectionRange_1 = require("./protocol.selectionRange"); +Object.defineProperty(exports, "SelectionRangeRequest", { enumerable: true, get: function () { return protocol_selectionRange_1.SelectionRangeRequest; } }); +const protocol_progress_1 = require("./protocol.progress"); +Object.defineProperty(exports, "WorkDoneProgress", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgress; } }); +Object.defineProperty(exports, "WorkDoneProgressCreateRequest", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCreateRequest; } }); +Object.defineProperty(exports, "WorkDoneProgressCancelNotification", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCancelNotification; } }); +const protocol_callHierarchy_1 = require("./protocol.callHierarchy"); +Object.defineProperty(exports, "CallHierarchyIncomingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyIncomingCallsRequest; } }); +Object.defineProperty(exports, "CallHierarchyOutgoingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest; } }); +Object.defineProperty(exports, "CallHierarchyPrepareRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyPrepareRequest; } }); +const protocol_semanticTokens_1 = require("./protocol.semanticTokens"); +Object.defineProperty(exports, "TokenFormat", { enumerable: true, get: function () { return protocol_semanticTokens_1.TokenFormat; } }); +Object.defineProperty(exports, "SemanticTokensRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRequest; } }); +Object.defineProperty(exports, "SemanticTokensDeltaRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensDeltaRequest; } }); +Object.defineProperty(exports, "SemanticTokensRangeRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRangeRequest; } }); +Object.defineProperty(exports, "SemanticTokensRefreshRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRefreshRequest; } }); +Object.defineProperty(exports, "SemanticTokensRegistrationType", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRegistrationType; } }); +const protocol_showDocument_1 = require("./protocol.showDocument"); +Object.defineProperty(exports, "ShowDocumentRequest", { enumerable: true, get: function () { return protocol_showDocument_1.ShowDocumentRequest; } }); +const protocol_linkedEditingRange_1 = require("./protocol.linkedEditingRange"); +Object.defineProperty(exports, "LinkedEditingRangeRequest", { enumerable: true, get: function () { return protocol_linkedEditingRange_1.LinkedEditingRangeRequest; } }); +const protocol_fileOperations_1 = require("./protocol.fileOperations"); +Object.defineProperty(exports, "FileOperationPatternKind", { enumerable: true, get: function () { return protocol_fileOperations_1.FileOperationPatternKind; } }); +Object.defineProperty(exports, "DidCreateFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidCreateFilesNotification; } }); +Object.defineProperty(exports, "WillCreateFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillCreateFilesRequest; } }); +Object.defineProperty(exports, "DidRenameFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidRenameFilesNotification; } }); +Object.defineProperty(exports, "WillRenameFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillRenameFilesRequest; } }); +Object.defineProperty(exports, "DidDeleteFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidDeleteFilesNotification; } }); +Object.defineProperty(exports, "WillDeleteFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillDeleteFilesRequest; } }); +const protocol_moniker_1 = require("./protocol.moniker"); +Object.defineProperty(exports, "UniquenessLevel", { enumerable: true, get: function () { return protocol_moniker_1.UniquenessLevel; } }); +Object.defineProperty(exports, "MonikerKind", { enumerable: true, get: function () { return protocol_moniker_1.MonikerKind; } }); +Object.defineProperty(exports, "MonikerRequest", { enumerable: true, get: function () { return protocol_moniker_1.MonikerRequest; } }); +const protocol_typeHierarchy_1 = require("./protocol.typeHierarchy"); +Object.defineProperty(exports, "TypeHierarchyPrepareRequest", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchyPrepareRequest; } }); +Object.defineProperty(exports, "TypeHierarchySubtypesRequest", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchySubtypesRequest; } }); +Object.defineProperty(exports, "TypeHierarchySupertypesRequest", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchySupertypesRequest; } }); +const protocol_inlineValue_1 = require("./protocol.inlineValue"); +Object.defineProperty(exports, "InlineValueRequest", { enumerable: true, get: function () { return protocol_inlineValue_1.InlineValueRequest; } }); +Object.defineProperty(exports, "InlineValueRefreshRequest", { enumerable: true, get: function () { return protocol_inlineValue_1.InlineValueRefreshRequest; } }); +const protocol_inlayHint_1 = require("./protocol.inlayHint"); +Object.defineProperty(exports, "InlayHintRequest", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintRequest; } }); +Object.defineProperty(exports, "InlayHintResolveRequest", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintResolveRequest; } }); +Object.defineProperty(exports, "InlayHintRefreshRequest", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintRefreshRequest; } }); +const protocol_diagnostic_1 = require("./protocol.diagnostic"); +Object.defineProperty(exports, "DiagnosticServerCancellationData", { enumerable: true, get: function () { return protocol_diagnostic_1.DiagnosticServerCancellationData; } }); +Object.defineProperty(exports, "DocumentDiagnosticReportKind", { enumerable: true, get: function () { return protocol_diagnostic_1.DocumentDiagnosticReportKind; } }); +Object.defineProperty(exports, "DocumentDiagnosticRequest", { enumerable: true, get: function () { return protocol_diagnostic_1.DocumentDiagnosticRequest; } }); +Object.defineProperty(exports, "WorkspaceDiagnosticRequest", { enumerable: true, get: function () { return protocol_diagnostic_1.WorkspaceDiagnosticRequest; } }); +Object.defineProperty(exports, "DiagnosticRefreshRequest", { enumerable: true, get: function () { return protocol_diagnostic_1.DiagnosticRefreshRequest; } }); +const protocol_notebook_1 = require("./protocol.notebook"); +Object.defineProperty(exports, "NotebookCellKind", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCellKind; } }); +Object.defineProperty(exports, "ExecutionSummary", { enumerable: true, get: function () { return protocol_notebook_1.ExecutionSummary; } }); +Object.defineProperty(exports, "NotebookCell", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCell; } }); +Object.defineProperty(exports, "NotebookDocument", { enumerable: true, get: function () { return protocol_notebook_1.NotebookDocument; } }); +Object.defineProperty(exports, "NotebookDocumentSyncRegistrationType", { enumerable: true, get: function () { return protocol_notebook_1.NotebookDocumentSyncRegistrationType; } }); +Object.defineProperty(exports, "DidOpenNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidOpenNotebookDocumentNotification; } }); +Object.defineProperty(exports, "NotebookCellArrayChange", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCellArrayChange; } }); +Object.defineProperty(exports, "DidChangeNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidChangeNotebookDocumentNotification; } }); +Object.defineProperty(exports, "DidSaveNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidSaveNotebookDocumentNotification; } }); +Object.defineProperty(exports, "DidCloseNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidCloseNotebookDocumentNotification; } }); +const protocol_inlineCompletion_1 = require("./protocol.inlineCompletion"); +Object.defineProperty(exports, "InlineCompletionRequest", { enumerable: true, get: function () { return protocol_inlineCompletion_1.InlineCompletionRequest; } }); +// @ts-ignore: to avoid inlining LocationLink as dynamic import +let __noDynamicImport; +/** + * The TextDocumentFilter namespace provides helper functions to work with + * {@link TextDocumentFilter} literals. + * + * @since 3.17.0 + */ +var TextDocumentFilter; +(function (TextDocumentFilter) { + function is(value) { + const candidate = value; + return Is.string(candidate) || (Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern)); + } + TextDocumentFilter.is = is; +})(TextDocumentFilter || (exports.TextDocumentFilter = TextDocumentFilter = {})); +/** + * The NotebookDocumentFilter namespace provides helper functions to work with + * {@link NotebookDocumentFilter} literals. + * + * @since 3.17.0 + */ +var NotebookDocumentFilter; +(function (NotebookDocumentFilter) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && (Is.string(candidate.notebookType) || Is.string(candidate.scheme) || Is.string(candidate.pattern)); + } + NotebookDocumentFilter.is = is; +})(NotebookDocumentFilter || (exports.NotebookDocumentFilter = NotebookDocumentFilter = {})); +/** + * The NotebookCellTextDocumentFilter namespace provides helper functions to work with + * {@link NotebookCellTextDocumentFilter} literals. + * + * @since 3.17.0 + */ +var NotebookCellTextDocumentFilter; +(function (NotebookCellTextDocumentFilter) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) + && (Is.string(candidate.notebook) || NotebookDocumentFilter.is(candidate.notebook)) + && (candidate.language === undefined || Is.string(candidate.language)); + } + NotebookCellTextDocumentFilter.is = is; +})(NotebookCellTextDocumentFilter || (exports.NotebookCellTextDocumentFilter = NotebookCellTextDocumentFilter = {})); +/** + * The DocumentSelector namespace provides helper functions to work with + * {@link DocumentSelector}s. + */ +var DocumentSelector; +(function (DocumentSelector) { + function is(value) { + if (!Array.isArray(value)) { + return false; + } + for (const elem of value) { + if (!Is.string(elem) && !TextDocumentFilter.is(elem) && !NotebookCellTextDocumentFilter.is(elem)) { + return false; + } + } + return true; + } + DocumentSelector.is = is; +})(DocumentSelector || (exports.DocumentSelector = DocumentSelector = {})); +/** + * The `client/registerCapability` request is sent from the server to the client to register a new capability + * handler on the client side. + */ +var RegistrationRequest; +(function (RegistrationRequest) { + RegistrationRequest.method = 'client/registerCapability'; + RegistrationRequest.messageDirection = messages_1.MessageDirection.serverToClient; + RegistrationRequest.type = new messages_1.ProtocolRequestType(RegistrationRequest.method); +})(RegistrationRequest || (exports.RegistrationRequest = RegistrationRequest = {})); +/** + * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability + * handler on the client side. + */ +var UnregistrationRequest; +(function (UnregistrationRequest) { + UnregistrationRequest.method = 'client/unregisterCapability'; + UnregistrationRequest.messageDirection = messages_1.MessageDirection.serverToClient; + UnregistrationRequest.type = new messages_1.ProtocolRequestType(UnregistrationRequest.method); +})(UnregistrationRequest || (exports.UnregistrationRequest = UnregistrationRequest = {})); +var ResourceOperationKind; +(function (ResourceOperationKind) { + /** + * Supports creating new files and folders. + */ + ResourceOperationKind.Create = 'create'; + /** + * Supports renaming existing files and folders. + */ + ResourceOperationKind.Rename = 'rename'; + /** + * Supports deleting existing files and folders. + */ + ResourceOperationKind.Delete = 'delete'; +})(ResourceOperationKind || (exports.ResourceOperationKind = ResourceOperationKind = {})); +var FailureHandlingKind; +(function (FailureHandlingKind) { + /** + * Applying the workspace change is simply aborted if one of the changes provided + * fails. All operations executed before the failing operation stay executed. + */ + FailureHandlingKind.Abort = 'abort'; + /** + * All operations are executed transactional. That means they either all + * succeed or no changes at all are applied to the workspace. + */ + FailureHandlingKind.Transactional = 'transactional'; + /** + * If the workspace edit contains only textual file changes they are executed transactional. + * If resource changes (create, rename or delete file) are part of the change the failure + * handling strategy is abort. + */ + FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional'; + /** + * The client tries to undo the operations already executed. But there is no + * guarantee that this is succeeding. + */ + FailureHandlingKind.Undo = 'undo'; +})(FailureHandlingKind || (exports.FailureHandlingKind = FailureHandlingKind = {})); +/** + * Regular Expression Engines + * + * @since 3.18.0 + * @proposed + */ +var RegularExpressionEngineKind; +(function (RegularExpressionEngineKind) { + RegularExpressionEngineKind.ES2020 = 'ES2020'; +})(RegularExpressionEngineKind || (exports.RegularExpressionEngineKind = RegularExpressionEngineKind = {})); +/** + * A set of predefined position encoding kinds. + * + * @since 3.17.0 + */ +var PositionEncodingKind; +(function (PositionEncodingKind) { + /** + * Character offsets count UTF-8 code units (e.g. bytes). + */ + PositionEncodingKind.UTF8 = 'utf-8'; + /** + * Character offsets count UTF-16 code units. + * + * This is the default and must always be supported + * by servers + */ + PositionEncodingKind.UTF16 = 'utf-16'; + /** + * Character offsets count UTF-32 code units. + * + * Implementation note: these are the same as Unicode codepoints, + * so this `PositionEncodingKind` may also be used for an + * encoding-agnostic representation of character offsets. + */ + PositionEncodingKind.UTF32 = 'utf-32'; +})(PositionEncodingKind || (exports.PositionEncodingKind = PositionEncodingKind = {})); +/** + * The StaticRegistrationOptions namespace provides helper functions to work with + * {@link StaticRegistrationOptions} literals. + */ +var StaticRegistrationOptions; +(function (StaticRegistrationOptions) { + function hasId(value) { + const candidate = value; + return candidate && Is.string(candidate.id) && candidate.id.length > 0; + } + StaticRegistrationOptions.hasId = hasId; +})(StaticRegistrationOptions || (exports.StaticRegistrationOptions = StaticRegistrationOptions = {})); +/** + * The TextDocumentRegistrationOptions namespace provides helper functions to work with + * {@link TextDocumentRegistrationOptions} literals. + */ +var TextDocumentRegistrationOptions; +(function (TextDocumentRegistrationOptions) { + function is(value) { + const candidate = value; + return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector)); + } + TextDocumentRegistrationOptions.is = is; +})(TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = TextDocumentRegistrationOptions = {})); +/** + * The WorkDoneProgressOptions namespace provides helper functions to work with + * {@link WorkDoneProgressOptions} literals. + */ +var WorkDoneProgressOptions; +(function (WorkDoneProgressOptions) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress)); + } + WorkDoneProgressOptions.is = is; + function hasWorkDoneProgress(value) { + const candidate = value; + return candidate && Is.boolean(candidate.workDoneProgress); + } + WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress; +})(WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = WorkDoneProgressOptions = {})); +/** + * The initialize request is sent from the client to the server. + * It is sent once as the request after starting up the server. + * The requests parameter is of type {@link InitializeParams} + * the response if of type {@link InitializeResult} of a Thenable that + * resolves to such. + */ +var InitializeRequest; +(function (InitializeRequest) { + InitializeRequest.method = 'initialize'; + InitializeRequest.messageDirection = messages_1.MessageDirection.clientToServer; + InitializeRequest.type = new messages_1.ProtocolRequestType(InitializeRequest.method); +})(InitializeRequest || (exports.InitializeRequest = InitializeRequest = {})); +/** + * Known error codes for an `InitializeErrorCodes`; + */ +var InitializeErrorCodes; +(function (InitializeErrorCodes) { + /** + * If the protocol version provided by the client can't be handled by the server. + * + * @deprecated This initialize error got replaced by client capabilities. There is + * no version handshake in version 3.0x + */ + InitializeErrorCodes.unknownProtocolVersion = 1; +})(InitializeErrorCodes || (exports.InitializeErrorCodes = InitializeErrorCodes = {})); +/** + * The initialized notification is sent from the client to the + * server after the client is fully initialized and the server + * is allowed to send requests from the server to the client. + */ +var InitializedNotification; +(function (InitializedNotification) { + InitializedNotification.method = 'initialized'; + InitializedNotification.messageDirection = messages_1.MessageDirection.clientToServer; + InitializedNotification.type = new messages_1.ProtocolNotificationType(InitializedNotification.method); +})(InitializedNotification || (exports.InitializedNotification = InitializedNotification = {})); +//---- Shutdown Method ---- +/** + * A shutdown request is sent from the client to the server. + * It is sent once when the client decides to shutdown the + * server. The only notification that is sent after a shutdown request + * is the exit event. + */ +var ShutdownRequest; +(function (ShutdownRequest) { + ShutdownRequest.method = 'shutdown'; + ShutdownRequest.messageDirection = messages_1.MessageDirection.clientToServer; + ShutdownRequest.type = new messages_1.ProtocolRequestType0(ShutdownRequest.method); +})(ShutdownRequest || (exports.ShutdownRequest = ShutdownRequest = {})); +//---- Exit Notification ---- +/** + * The exit event is sent from the client to the server to + * ask the server to exit its process. + */ +var ExitNotification; +(function (ExitNotification) { + ExitNotification.method = 'exit'; + ExitNotification.messageDirection = messages_1.MessageDirection.clientToServer; + ExitNotification.type = new messages_1.ProtocolNotificationType0(ExitNotification.method); +})(ExitNotification || (exports.ExitNotification = ExitNotification = {})); +/** + * The configuration change notification is sent from the client to the server + * when the client's configuration has changed. The notification contains + * the changed configuration as defined by the language client. + */ +var DidChangeConfigurationNotification; +(function (DidChangeConfigurationNotification) { + DidChangeConfigurationNotification.method = 'workspace/didChangeConfiguration'; + DidChangeConfigurationNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType(DidChangeConfigurationNotification.method); +})(DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = DidChangeConfigurationNotification = {})); +//---- Message show and log notifications ---- +/** + * The message type + */ +var MessageType; +(function (MessageType) { + /** + * An error message. + */ + MessageType.Error = 1; + /** + * A warning message. + */ + MessageType.Warning = 2; + /** + * An information message. + */ + MessageType.Info = 3; + /** + * A log message. + */ + MessageType.Log = 4; + /** + * A debug message. + * + * @since 3.18.0 + * @proposed + */ + MessageType.Debug = 5; +})(MessageType || (exports.MessageType = MessageType = {})); +/** + * The show message notification is sent from a server to a client to ask + * the client to display a particular message in the user interface. + */ +var ShowMessageNotification; +(function (ShowMessageNotification) { + ShowMessageNotification.method = 'window/showMessage'; + ShowMessageNotification.messageDirection = messages_1.MessageDirection.serverToClient; + ShowMessageNotification.type = new messages_1.ProtocolNotificationType(ShowMessageNotification.method); +})(ShowMessageNotification || (exports.ShowMessageNotification = ShowMessageNotification = {})); +/** + * The show message request is sent from the server to the client to show a message + * and a set of options actions to the user. + */ +var ShowMessageRequest; +(function (ShowMessageRequest) { + ShowMessageRequest.method = 'window/showMessageRequest'; + ShowMessageRequest.messageDirection = messages_1.MessageDirection.serverToClient; + ShowMessageRequest.type = new messages_1.ProtocolRequestType(ShowMessageRequest.method); +})(ShowMessageRequest || (exports.ShowMessageRequest = ShowMessageRequest = {})); +/** + * The log message notification is sent from the server to the client to ask + * the client to log a particular message. + */ +var LogMessageNotification; +(function (LogMessageNotification) { + LogMessageNotification.method = 'window/logMessage'; + LogMessageNotification.messageDirection = messages_1.MessageDirection.serverToClient; + LogMessageNotification.type = new messages_1.ProtocolNotificationType(LogMessageNotification.method); +})(LogMessageNotification || (exports.LogMessageNotification = LogMessageNotification = {})); +//---- Telemetry notification +/** + * The telemetry event notification is sent from the server to the client to ask + * the client to log telemetry data. + */ +var TelemetryEventNotification; +(function (TelemetryEventNotification) { + TelemetryEventNotification.method = 'telemetry/event'; + TelemetryEventNotification.messageDirection = messages_1.MessageDirection.serverToClient; + TelemetryEventNotification.type = new messages_1.ProtocolNotificationType(TelemetryEventNotification.method); +})(TelemetryEventNotification || (exports.TelemetryEventNotification = TelemetryEventNotification = {})); +/** + * Defines how the host (editor) should sync + * document changes to the language server. + */ +var TextDocumentSyncKind; +(function (TextDocumentSyncKind) { + /** + * Documents should not be synced at all. + */ + TextDocumentSyncKind.None = 0; + /** + * Documents are synced by always sending the full content + * of the document. + */ + TextDocumentSyncKind.Full = 1; + /** + * Documents are synced by sending the full content on open. + * After that only incremental updates to the document are + * send. + */ + TextDocumentSyncKind.Incremental = 2; +})(TextDocumentSyncKind || (exports.TextDocumentSyncKind = TextDocumentSyncKind = {})); +/** + * The document open notification is sent from the client to the server to signal + * newly opened text documents. The document's truth is now managed by the client + * and the server must not try to read the document's truth using the document's + * uri. Open in this sense means it is managed by the client. It doesn't necessarily + * mean that its content is presented in an editor. An open notification must not + * be sent more than once without a corresponding close notification send before. + * This means open and close notification must be balanced and the max open count + * is one. + */ +var DidOpenTextDocumentNotification; +(function (DidOpenTextDocumentNotification) { + DidOpenTextDocumentNotification.method = 'textDocument/didOpen'; + DidOpenTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method); +})(DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = DidOpenTextDocumentNotification = {})); +var TextDocumentContentChangeEvent; +(function (TextDocumentContentChangeEvent) { + /** + * Checks whether the information describes a delta event. + */ + function isIncremental(event) { + const candidate = event; + return candidate !== undefined && candidate !== null && + typeof candidate.text === 'string' && candidate.range !== undefined && + (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number'); + } + TextDocumentContentChangeEvent.isIncremental = isIncremental; + /** + * Checks whether the information describes a full replacement event. + */ + function isFull(event) { + const candidate = event; + return candidate !== undefined && candidate !== null && + typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined; + } + TextDocumentContentChangeEvent.isFull = isFull; +})(TextDocumentContentChangeEvent || (exports.TextDocumentContentChangeEvent = TextDocumentContentChangeEvent = {})); +/** + * The document change notification is sent from the client to the server to signal + * changes to a text document. + */ +var DidChangeTextDocumentNotification; +(function (DidChangeTextDocumentNotification) { + DidChangeTextDocumentNotification.method = 'textDocument/didChange'; + DidChangeTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method); +})(DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = DidChangeTextDocumentNotification = {})); +/** + * The document close notification is sent from the client to the server when + * the document got closed in the client. The document's truth now exists where + * the document's uri points to (e.g. if the document's uri is a file uri the + * truth now exists on disk). As with the open notification the close notification + * is about managing the document's content. Receiving a close notification + * doesn't mean that the document was open in an editor before. A close + * notification requires a previous open notification to be sent. + */ +var DidCloseTextDocumentNotification; +(function (DidCloseTextDocumentNotification) { + DidCloseTextDocumentNotification.method = 'textDocument/didClose'; + DidCloseTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method); +})(DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = DidCloseTextDocumentNotification = {})); +/** + * The document save notification is sent from the client to the server when + * the document got saved in the client. + */ +var DidSaveTextDocumentNotification; +(function (DidSaveTextDocumentNotification) { + DidSaveTextDocumentNotification.method = 'textDocument/didSave'; + DidSaveTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method); +})(DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = DidSaveTextDocumentNotification = {})); +/** + * Represents reasons why a text document is saved. + */ +var TextDocumentSaveReason; +(function (TextDocumentSaveReason) { + /** + * Manually triggered, e.g. by the user pressing save, by starting debugging, + * or by an API call. + */ + TextDocumentSaveReason.Manual = 1; + /** + * Automatic after a delay. + */ + TextDocumentSaveReason.AfterDelay = 2; + /** + * When the editor lost focus. + */ + TextDocumentSaveReason.FocusOut = 3; +})(TextDocumentSaveReason || (exports.TextDocumentSaveReason = TextDocumentSaveReason = {})); +/** + * A document will save notification is sent from the client to the server before + * the document is actually saved. + */ +var WillSaveTextDocumentNotification; +(function (WillSaveTextDocumentNotification) { + WillSaveTextDocumentNotification.method = 'textDocument/willSave'; + WillSaveTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method); +})(WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = WillSaveTextDocumentNotification = {})); +/** + * A document will save request is sent from the client to the server before + * the document is actually saved. The request can return an array of TextEdits + * which will be applied to the text document before it is saved. Please note that + * clients might drop results if computing the text edits took too long or if a + * server constantly fails on this request. This is done to keep the save fast and + * reliable. + */ +var WillSaveTextDocumentWaitUntilRequest; +(function (WillSaveTextDocumentWaitUntilRequest) { + WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil'; + WillSaveTextDocumentWaitUntilRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method); +})(WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = WillSaveTextDocumentWaitUntilRequest = {})); +/** + * The watched files notification is sent from the client to the server when + * the client detects changes to file watched by the language client. + */ +var DidChangeWatchedFilesNotification; +(function (DidChangeWatchedFilesNotification) { + DidChangeWatchedFilesNotification.method = 'workspace/didChangeWatchedFiles'; + DidChangeWatchedFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType(DidChangeWatchedFilesNotification.method); +})(DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = DidChangeWatchedFilesNotification = {})); +/** + * The file event type + */ +var FileChangeType; +(function (FileChangeType) { + /** + * The file got created. + */ + FileChangeType.Created = 1; + /** + * The file got changed. + */ + FileChangeType.Changed = 2; + /** + * The file got deleted. + */ + FileChangeType.Deleted = 3; +})(FileChangeType || (exports.FileChangeType = FileChangeType = {})); +var RelativePattern; +(function (RelativePattern) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && (vscode_languageserver_types_1.URI.is(candidate.baseUri) || vscode_languageserver_types_1.WorkspaceFolder.is(candidate.baseUri)) && Is.string(candidate.pattern); + } + RelativePattern.is = is; +})(RelativePattern || (exports.RelativePattern = RelativePattern = {})); +var WatchKind; +(function (WatchKind) { + /** + * Interested in create events. + */ + WatchKind.Create = 1; + /** + * Interested in change events + */ + WatchKind.Change = 2; + /** + * Interested in delete events + */ + WatchKind.Delete = 4; +})(WatchKind || (exports.WatchKind = WatchKind = {})); +/** + * Diagnostics notification are sent from the server to the client to signal + * results of validation runs. + */ +var PublishDiagnosticsNotification; +(function (PublishDiagnosticsNotification) { + PublishDiagnosticsNotification.method = 'textDocument/publishDiagnostics'; + PublishDiagnosticsNotification.messageDirection = messages_1.MessageDirection.serverToClient; + PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType(PublishDiagnosticsNotification.method); +})(PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = PublishDiagnosticsNotification = {})); +/** + * How a completion was triggered + */ +var CompletionTriggerKind; +(function (CompletionTriggerKind) { + /** + * Completion was triggered by typing an identifier (24x7 code + * complete), manual invocation (e.g Ctrl+Space) or via API. + */ + CompletionTriggerKind.Invoked = 1; + /** + * Completion was triggered by a trigger character specified by + * the `triggerCharacters` properties of the `CompletionRegistrationOptions`. + */ + CompletionTriggerKind.TriggerCharacter = 2; + /** + * Completion was re-triggered as current completion list is incomplete + */ + CompletionTriggerKind.TriggerForIncompleteCompletions = 3; +})(CompletionTriggerKind || (exports.CompletionTriggerKind = CompletionTriggerKind = {})); +/** + * Request to request completion at a given text document position. The request's + * parameter is of type {@link TextDocumentPosition} the response + * is of type {@link CompletionItem CompletionItem[]} or {@link CompletionList} + * or a Thenable that resolves to such. + * + * The request can delay the computation of the {@link CompletionItem.detail `detail`} + * and {@link CompletionItem.documentation `documentation`} properties to the `completionItem/resolve` + * request. However, properties that are needed for the initial sorting and filtering, like `sortText`, + * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve. + */ +var CompletionRequest; +(function (CompletionRequest) { + CompletionRequest.method = 'textDocument/completion'; + CompletionRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method); +})(CompletionRequest || (exports.CompletionRequest = CompletionRequest = {})); +/** + * Request to resolve additional information for a given completion item.The request's + * parameter is of type {@link CompletionItem} the response + * is of type {@link CompletionItem} or a Thenable that resolves to such. + */ +var CompletionResolveRequest; +(function (CompletionResolveRequest) { + CompletionResolveRequest.method = 'completionItem/resolve'; + CompletionResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method); +})(CompletionResolveRequest || (exports.CompletionResolveRequest = CompletionResolveRequest = {})); +/** + * Request to request hover information at a given text document position. The request's + * parameter is of type {@link TextDocumentPosition} the response is of + * type {@link Hover} or a Thenable that resolves to such. + */ +var HoverRequest; +(function (HoverRequest) { + HoverRequest.method = 'textDocument/hover'; + HoverRequest.messageDirection = messages_1.MessageDirection.clientToServer; + HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method); +})(HoverRequest || (exports.HoverRequest = HoverRequest = {})); +/** + * How a signature help was triggered. + * + * @since 3.15.0 + */ +var SignatureHelpTriggerKind; +(function (SignatureHelpTriggerKind) { + /** + * Signature help was invoked manually by the user or by a command. + */ + SignatureHelpTriggerKind.Invoked = 1; + /** + * Signature help was triggered by a trigger character. + */ + SignatureHelpTriggerKind.TriggerCharacter = 2; + /** + * Signature help was triggered by the cursor moving or by the document content changing. + */ + SignatureHelpTriggerKind.ContentChange = 3; +})(SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = SignatureHelpTriggerKind = {})); +var SignatureHelpRequest; +(function (SignatureHelpRequest) { + SignatureHelpRequest.method = 'textDocument/signatureHelp'; + SignatureHelpRequest.messageDirection = messages_1.MessageDirection.clientToServer; + SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method); +})(SignatureHelpRequest || (exports.SignatureHelpRequest = SignatureHelpRequest = {})); +/** + * A request to resolve the definition location of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPosition} + * the response is of either type {@link Definition} or a typed array of + * {@link DefinitionLink} or a Thenable that resolves to such. + */ +var DefinitionRequest; +(function (DefinitionRequest) { + DefinitionRequest.method = 'textDocument/definition'; + DefinitionRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method); +})(DefinitionRequest || (exports.DefinitionRequest = DefinitionRequest = {})); +/** + * A request to resolve project-wide references for the symbol denoted + * by the given text document position. The request's parameter is of + * type {@link ReferenceParams} the response is of type + * {@link Location Location[]} or a Thenable that resolves to such. + */ +var ReferencesRequest; +(function (ReferencesRequest) { + ReferencesRequest.method = 'textDocument/references'; + ReferencesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method); +})(ReferencesRequest || (exports.ReferencesRequest = ReferencesRequest = {})); +/** + * Request to resolve a {@link DocumentHighlight} for a given + * text document position. The request's parameter is of type {@link TextDocumentPosition} + * the request response is an array of type {@link DocumentHighlight} + * or a Thenable that resolves to such. + */ +var DocumentHighlightRequest; +(function (DocumentHighlightRequest) { + DocumentHighlightRequest.method = 'textDocument/documentHighlight'; + DocumentHighlightRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method); +})(DocumentHighlightRequest || (exports.DocumentHighlightRequest = DocumentHighlightRequest = {})); +/** + * A request to list all symbols found in a given text document. The request's + * parameter is of type {@link TextDocumentIdentifier} the + * response is of type {@link SymbolInformation SymbolInformation[]} or a Thenable + * that resolves to such. + */ +var DocumentSymbolRequest; +(function (DocumentSymbolRequest) { + DocumentSymbolRequest.method = 'textDocument/documentSymbol'; + DocumentSymbolRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method); +})(DocumentSymbolRequest || (exports.DocumentSymbolRequest = DocumentSymbolRequest = {})); +/** + * A request to provide commands for the given text document and range. + */ +var CodeActionRequest; +(function (CodeActionRequest) { + CodeActionRequest.method = 'textDocument/codeAction'; + CodeActionRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method); +})(CodeActionRequest || (exports.CodeActionRequest = CodeActionRequest = {})); +/** + * Request to resolve additional information for a given code action.The request's + * parameter is of type {@link CodeAction} the response + * is of type {@link CodeAction} or a Thenable that resolves to such. + */ +var CodeActionResolveRequest; +(function (CodeActionResolveRequest) { + CodeActionResolveRequest.method = 'codeAction/resolve'; + CodeActionResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CodeActionResolveRequest.type = new messages_1.ProtocolRequestType(CodeActionResolveRequest.method); +})(CodeActionResolveRequest || (exports.CodeActionResolveRequest = CodeActionResolveRequest = {})); +/** + * A request to list project-wide symbols matching the query string given + * by the {@link WorkspaceSymbolParams}. The response is + * of type {@link SymbolInformation SymbolInformation[]} or a Thenable that + * resolves to such. + * + * @since 3.17.0 - support for WorkspaceSymbol in the returned data. Clients + * need to advertise support for WorkspaceSymbols via the client capability + * `workspace.symbol.resolveSupport`. + * + */ +var WorkspaceSymbolRequest; +(function (WorkspaceSymbolRequest) { + WorkspaceSymbolRequest.method = 'workspace/symbol'; + WorkspaceSymbolRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method); +})(WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = WorkspaceSymbolRequest = {})); +/** + * A request to resolve the range inside the workspace + * symbol's location. + * + * @since 3.17.0 + */ +var WorkspaceSymbolResolveRequest; +(function (WorkspaceSymbolResolveRequest) { + WorkspaceSymbolResolveRequest.method = 'workspaceSymbol/resolve'; + WorkspaceSymbolResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WorkspaceSymbolResolveRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolResolveRequest.method); +})(WorkspaceSymbolResolveRequest || (exports.WorkspaceSymbolResolveRequest = WorkspaceSymbolResolveRequest = {})); +/** + * A request to provide code lens for the given text document. + */ +var CodeLensRequest; +(function (CodeLensRequest) { + CodeLensRequest.method = 'textDocument/codeLens'; + CodeLensRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CodeLensRequest.type = new messages_1.ProtocolRequestType(CodeLensRequest.method); +})(CodeLensRequest || (exports.CodeLensRequest = CodeLensRequest = {})); +/** + * A request to resolve a command for a given code lens. + */ +var CodeLensResolveRequest; +(function (CodeLensResolveRequest) { + CodeLensResolveRequest.method = 'codeLens/resolve'; + CodeLensResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CodeLensResolveRequest.type = new messages_1.ProtocolRequestType(CodeLensResolveRequest.method); +})(CodeLensResolveRequest || (exports.CodeLensResolveRequest = CodeLensResolveRequest = {})); +/** + * A request to refresh all code actions + * + * @since 3.16.0 + */ +var CodeLensRefreshRequest; +(function (CodeLensRefreshRequest) { + CodeLensRefreshRequest.method = `workspace/codeLens/refresh`; + CodeLensRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + CodeLensRefreshRequest.type = new messages_1.ProtocolRequestType0(CodeLensRefreshRequest.method); +})(CodeLensRefreshRequest || (exports.CodeLensRefreshRequest = CodeLensRefreshRequest = {})); +/** + * A request to provide document links + */ +var DocumentLinkRequest; +(function (DocumentLinkRequest) { + DocumentLinkRequest.method = 'textDocument/documentLink'; + DocumentLinkRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method); +})(DocumentLinkRequest || (exports.DocumentLinkRequest = DocumentLinkRequest = {})); +/** + * Request to resolve additional information for a given document link. The request's + * parameter is of type {@link DocumentLink} the response + * is of type {@link DocumentLink} or a Thenable that resolves to such. + */ +var DocumentLinkResolveRequest; +(function (DocumentLinkResolveRequest) { + DocumentLinkResolveRequest.method = 'documentLink/resolve'; + DocumentLinkResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType(DocumentLinkResolveRequest.method); +})(DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = DocumentLinkResolveRequest = {})); +/** + * A request to format a whole document. + */ +var DocumentFormattingRequest; +(function (DocumentFormattingRequest) { + DocumentFormattingRequest.method = 'textDocument/formatting'; + DocumentFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method); +})(DocumentFormattingRequest || (exports.DocumentFormattingRequest = DocumentFormattingRequest = {})); +/** + * A request to format a range in a document. + */ +var DocumentRangeFormattingRequest; +(function (DocumentRangeFormattingRequest) { + DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting'; + DocumentRangeFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method); +})(DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = DocumentRangeFormattingRequest = {})); +/** + * A request to format ranges in a document. + * + * @since 3.18.0 + * @proposed + */ +var DocumentRangesFormattingRequest; +(function (DocumentRangesFormattingRequest) { + DocumentRangesFormattingRequest.method = 'textDocument/rangesFormatting'; + DocumentRangesFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentRangesFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangesFormattingRequest.method); +})(DocumentRangesFormattingRequest || (exports.DocumentRangesFormattingRequest = DocumentRangesFormattingRequest = {})); +/** + * A request to format a document on type. + */ +var DocumentOnTypeFormattingRequest; +(function (DocumentOnTypeFormattingRequest) { + DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting'; + DocumentOnTypeFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method); +})(DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = DocumentOnTypeFormattingRequest = {})); +//---- Rename ---------------------------------------------- +var PrepareSupportDefaultBehavior; +(function (PrepareSupportDefaultBehavior) { + /** + * The client's default behavior is to select the identifier + * according the to language's syntax rule. + */ + PrepareSupportDefaultBehavior.Identifier = 1; +})(PrepareSupportDefaultBehavior || (exports.PrepareSupportDefaultBehavior = PrepareSupportDefaultBehavior = {})); +/** + * A request to rename a symbol. + */ +var RenameRequest; +(function (RenameRequest) { + RenameRequest.method = 'textDocument/rename'; + RenameRequest.messageDirection = messages_1.MessageDirection.clientToServer; + RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method); +})(RenameRequest || (exports.RenameRequest = RenameRequest = {})); +/** + * A request to test and perform the setup necessary for a rename. + * + * @since 3.16 - support for default behavior + */ +var PrepareRenameRequest; +(function (PrepareRenameRequest) { + PrepareRenameRequest.method = 'textDocument/prepareRename'; + PrepareRenameRequest.messageDirection = messages_1.MessageDirection.clientToServer; + PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method); +})(PrepareRenameRequest || (exports.PrepareRenameRequest = PrepareRenameRequest = {})); +/** + * A request send from the client to the server to execute a command. The request might return + * a workspace edit which the client will apply to the workspace. + */ +var ExecuteCommandRequest; +(function (ExecuteCommandRequest) { + ExecuteCommandRequest.method = 'workspace/executeCommand'; + ExecuteCommandRequest.messageDirection = messages_1.MessageDirection.clientToServer; + ExecuteCommandRequest.type = new messages_1.ProtocolRequestType(ExecuteCommandRequest.method); +})(ExecuteCommandRequest || (exports.ExecuteCommandRequest = ExecuteCommandRequest = {})); +/** + * A request sent from the server to the client to modified certain resources. + */ +var ApplyWorkspaceEditRequest; +(function (ApplyWorkspaceEditRequest) { + ApplyWorkspaceEditRequest.method = 'workspace/applyEdit'; + ApplyWorkspaceEditRequest.messageDirection = messages_1.MessageDirection.serverToClient; + ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit'); +})(ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = ApplyWorkspaceEditRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts" index 69579fadc79c2538c502e05bf3422aaf9dbe881d..d3297a52bec777aa5fb80a68541c4ab58f3ea659 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts" @@ -1,3 +1,52 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:818d9a0841c884447fbd61b934c6743aea1fa6f1c0159ef44ef55b8f02b9120f -size 2176 +import { RequestHandler } from 'vscode-jsonrpc'; +import { Range } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { StaticRegistrationOptions, TextDocumentPositionParams, TextDocumentRegistrationOptions, WorkDoneProgressOptions, WorkDoneProgressParams } from './protocol'; +/** + * Client capabilities for the linked editing range request. + * + * @since 3.16.0 + */ +export interface LinkedEditingRangeClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + * return value for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; +} +export interface LinkedEditingRangeParams extends TextDocumentPositionParams, WorkDoneProgressParams { +} +export interface LinkedEditingRangeOptions extends WorkDoneProgressOptions { +} +export interface LinkedEditingRangeRegistrationOptions extends TextDocumentRegistrationOptions, LinkedEditingRangeOptions, StaticRegistrationOptions { +} +/** + * The result of a linked editing range request. + * + * @since 3.16.0 + */ +export interface LinkedEditingRanges { + /** + * A list of ranges that can be edited together. The ranges must have + * identical length and contain identical text content. The ranges cannot overlap. + */ + ranges: Range[]; + /** + * An optional word pattern (regular expression) that describes valid contents for + * the given ranges. If no pattern is provided, the client configuration's word + * pattern will be used. + */ + wordPattern?: string; +} +/** + * A request to provide ranges that can be edited together. + * + * @since 3.16.0 + */ +export declare namespace LinkedEditingRangeRequest { + const method: 'textDocument/linkedEditingRange'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js" index 9bc06894b55d3d74c9bbc891203837720be2ff11..f4351229b9e41ac82fbfa75cd618ae619c6945b3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js" @@ -1,3 +1,19 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fdf8ed295232ae94f41eb2f3921b69766f7a149e5eaf0858353cd8a9d345f6e5 -size 1051 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LinkedEditingRangeRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to provide ranges that can be edited together. + * + * @since 3.16.0 + */ +var LinkedEditingRangeRequest; +(function (LinkedEditingRangeRequest) { + LinkedEditingRangeRequest.method = 'textDocument/linkedEditingRange'; + LinkedEditingRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer; + LinkedEditingRangeRequest.type = new messages_1.ProtocolRequestType(LinkedEditingRangeRequest.method); +})(LinkedEditingRangeRequest || (exports.LinkedEditingRangeRequest = LinkedEditingRangeRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts" index cf15fb346c7048e9263a381110cbe502473b83ea..7bbdddc2c265fe7d7ca0d4a015e5e96b9662cd1c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts" @@ -1,3 +1,106 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:80ca6e12029d689b45326d13816c8374a1b3804a57e67940da2a2e9ed0689917 -size 3316 +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { WorkDoneProgressOptions, WorkDoneProgressParams, PartialResultParams, TextDocumentRegistrationOptions, TextDocumentPositionParams } from './protocol'; +/** + * Moniker uniqueness level to define scope of the moniker. + * + * @since 3.16.0 + */ +export declare namespace UniquenessLevel { + /** + * The moniker is only unique inside a document + */ + const document = "document"; + /** + * The moniker is unique inside a project for which a dump got created + */ + const project = "project"; + /** + * The moniker is unique inside the group to which a project belongs + */ + const group = "group"; + /** + * The moniker is unique inside the moniker scheme. + */ + const scheme = "scheme"; + /** + * The moniker is globally unique + */ + const global = "global"; +} +export type UniquenessLevel = 'document' | 'project' | 'group' | 'scheme' | 'global'; +/** + * The moniker kind. + * + * @since 3.16.0 + */ +export declare namespace MonikerKind { + /** + * The moniker represent a symbol that is imported into a project + */ + const $import = "import"; + /** + * The moniker represents a symbol that is exported from a project + */ + const $export = "export"; + /** + * The moniker represents a symbol that is local to a project (e.g. a local + * variable of a function, a class not visible outside the project, ...) + */ + const local = "local"; +} +export type MonikerKind = 'import' | 'export' | 'local'; +/** + * Moniker definition to match LSIF 0.5 moniker definition. + * + * @since 3.16.0 + */ +export interface Moniker { + /** + * The scheme of the moniker. For example tsc or .Net + */ + scheme: string; + /** + * The identifier of the moniker. The value is opaque in LSIF however + * schema owners are allowed to define the structure if they want. + */ + identifier: string; + /** + * The scope in which the moniker is unique + */ + unique: UniquenessLevel; + /** + * The moniker kind if known. + */ + kind?: MonikerKind; +} +/** + * Client capabilities specific to the moniker request. + * + * @since 3.16.0 + */ +export interface MonikerClientCapabilities { + /** + * Whether moniker supports dynamic registration. If this is set to `true` + * the client supports the new `MonikerRegistrationOptions` return value + * for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; +} +export interface MonikerServerCapabilities { +} +export interface MonikerOptions extends WorkDoneProgressOptions { +} +export interface MonikerRegistrationOptions extends TextDocumentRegistrationOptions, MonikerOptions { +} +export interface MonikerParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * A request to get the moniker of a symbol at a given text document position. + * The request parameter is of type {@link TextDocumentPositionParams}. + * The response is of type {@link Moniker Moniker[]} or `null`. + */ +export declare namespace MonikerRequest { + const method: 'textDocument/moniker'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js" index 669596a21628e2c0af91cbb18ecb17857bcecb21..d437a306894900ae3ebe7f01f0e3340ba9443200 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js" @@ -1,3 +1,68 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:699d94f47df5644f638b7bef6693def4c9c633a42dc17c895661b4a7ea1f2dcf -size 2500 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = void 0; +const messages_1 = require("./messages"); +/** + * Moniker uniqueness level to define scope of the moniker. + * + * @since 3.16.0 + */ +var UniquenessLevel; +(function (UniquenessLevel) { + /** + * The moniker is only unique inside a document + */ + UniquenessLevel.document = 'document'; + /** + * The moniker is unique inside a project for which a dump got created + */ + UniquenessLevel.project = 'project'; + /** + * The moniker is unique inside the group to which a project belongs + */ + UniquenessLevel.group = 'group'; + /** + * The moniker is unique inside the moniker scheme. + */ + UniquenessLevel.scheme = 'scheme'; + /** + * The moniker is globally unique + */ + UniquenessLevel.global = 'global'; +})(UniquenessLevel || (exports.UniquenessLevel = UniquenessLevel = {})); +/** + * The moniker kind. + * + * @since 3.16.0 + */ +var MonikerKind; +(function (MonikerKind) { + /** + * The moniker represent a symbol that is imported into a project + */ + MonikerKind.$import = 'import'; + /** + * The moniker represents a symbol that is exported from a project + */ + MonikerKind.$export = 'export'; + /** + * The moniker represents a symbol that is local to a project (e.g. a local + * variable of a function, a class not visible outside the project, ...) + */ + MonikerKind.local = 'local'; +})(MonikerKind || (exports.MonikerKind = MonikerKind = {})); +/** + * A request to get the moniker of a symbol at a given text document position. + * The request parameter is of type {@link TextDocumentPositionParams}. + * The response is of type {@link Moniker Moniker[]} or `null`. + */ +var MonikerRequest; +(function (MonikerRequest) { + MonikerRequest.method = 'textDocument/moniker'; + MonikerRequest.messageDirection = messages_1.MessageDirection.clientToServer; + MonikerRequest.type = new messages_1.ProtocolRequestType(MonikerRequest.method); +})(MonikerRequest || (exports.MonikerRequest = MonikerRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts" index 1006e31b372f39a4a4bee9c3dbd8f4974b3b824f..ffb4e58c65bd40efc0d77897264f17789423c771 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts" @@ -1,3 +1,428 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4fcd26f382423b1f6f44001fd4ab6b04f7c97dbfdba83a0064a6db5437e9b595 -size 12396 +import { URI, integer, DocumentUri, uinteger, TextDocumentItem, TextDocumentIdentifier, VersionedTextDocumentIdentifier, LSPObject } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolNotificationType, RegistrationType } from './messages'; +import type { StaticRegistrationOptions, NotebookDocumentFilter, TextDocumentContentChangeEvent } from './protocol'; +/** + * Notebook specific client capabilities. + * + * @since 3.17.0 + */ +export type NotebookDocumentSyncClientCapabilities = { + /** + * Whether implementation supports dynamic registration. If this is + * set to `true` the client supports the new + * `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + * return value for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; + /** + * The client supports sending execution summary data per cell. + */ + executionSummarySupport?: boolean; +}; +/** + * A notebook cell kind. + * + * @since 3.17.0 + */ +export declare namespace NotebookCellKind { + /** + * A markup-cell is formatted source that is used for display. + */ + const Markup: 1; + /** + * A code-cell is source code. + */ + const Code: 2; + function is(value: any): value is NotebookCellKind; +} +export type NotebookCellKind = 1 | 2; +export type ExecutionSummary = { + /** + * A strict monotonically increasing value + * indicating the execution order of a cell + * inside a notebook. + */ + executionOrder: uinteger; + /** + * Whether the execution was successful or + * not if known by the client. + */ + success?: boolean; +}; +export declare namespace ExecutionSummary { + function create(executionOrder: number, success?: boolean): ExecutionSummary; + function is(value: any): value is ExecutionSummary; + function equals(one: ExecutionSummary | undefined, other: ExecutionSummary | undefined): boolean; +} +/** + * A notebook cell. + * + * A cell's document URI must be unique across ALL notebook + * cells and can therefore be used to uniquely identify a + * notebook cell or the cell's text document. + * + * @since 3.17.0 + */ +export type NotebookCell = { + /** + * The cell's kind + */ + kind: NotebookCellKind; + /** + * The URI of the cell's text document + * content. + */ + document: DocumentUri; + /** + * Additional metadata stored with the cell. + * + * Note: should always be an object literal (e.g. LSPObject) + */ + metadata?: LSPObject; + /** + * Additional execution summary information + * if supported by the client. + */ + executionSummary?: ExecutionSummary; +}; +export declare namespace NotebookCell { + function create(kind: NotebookCellKind, document: DocumentUri): NotebookCell; + function is(value: any): value is NotebookCell; + function diff(one: NotebookCell, two: NotebookCell): Set; +} +/** + * A notebook document. + * + * @since 3.17.0 + */ +export type NotebookDocument = { + /** + * The notebook document's uri. + */ + uri: URI; + /** + * The type of the notebook. + */ + notebookType: string; + /** + * The version number of this document (it will increase after each + * change, including undo/redo). + */ + version: integer; + /** + * Additional metadata stored with the notebook + * document. + * + * Note: should always be an object literal (e.g. LSPObject) + */ + metadata?: LSPObject; + /** + * The cells of a notebook. + */ + cells: NotebookCell[]; +}; +export declare namespace NotebookDocument { + function create(uri: URI, notebookType: string, version: integer, cells: NotebookCell[]): NotebookDocument; + function is(value: any): value is NotebookDocument; +} +/** + * A literal to identify a notebook document in the client. + * + * @since 3.17.0 + */ +export type NotebookDocumentIdentifier = { + /** + * The notebook document's uri. + */ + uri: URI; +}; +/** + * A versioned notebook document identifier. + * + * @since 3.17.0 + */ +export type VersionedNotebookDocumentIdentifier = { + /** + * The version number of this notebook document. + */ + version: integer; + /** + * The notebook document's uri. + */ + uri: URI; +}; +/** + * @since 3.18.0 + */ +export interface NotebookCellLanguage { + language: string; +} +/** + * @since 3.18.0 + */ +export interface NotebookDocumentFilterWithNotebook { + /** + * The notebook to be synced If a string + * value is provided it matches against the + * notebook type. '*' matches every notebook. + */ + notebook: string | NotebookDocumentFilter; + /** + * The cells of the matching notebook to be synced. + */ + cells?: NotebookCellLanguage[]; +} +/** + * @since 3.18.0 + */ +export interface NotebookDocumentFilterWithCells { + /** + * The notebook to be synced If a string + * value is provided it matches against the + * notebook type. '*' matches every notebook. + */ + notebook?: string | NotebookDocumentFilter; + /** + * The cells of the matching notebook to be synced. + */ + cells: NotebookCellLanguage[]; +} +/** + * Options specific to a notebook plus its cells + * to be synced to the server. + * + * If a selector provides a notebook document + * filter but no cell selector all cells of a + * matching notebook document will be synced. + * + * If a selector provides no notebook document + * filter but only a cell selector all notebook + * document that contain at least one matching + * cell will be synced. + * + * @since 3.17.0 + */ +export type NotebookDocumentSyncOptions = { + /** + * The notebooks to be synced + */ + notebookSelector: (NotebookDocumentFilterWithNotebook | NotebookDocumentFilterWithCells)[]; + /** + * Whether save notification should be forwarded to + * the server. Will only be honored if mode === `notebook`. + */ + save?: boolean; +}; +/** + * Registration options specific to a notebook. + * + * @since 3.17.0 + */ +export type NotebookDocumentSyncRegistrationOptions = NotebookDocumentSyncOptions & StaticRegistrationOptions; +export declare namespace NotebookDocumentSyncRegistrationType { + const method: 'notebookDocument/sync'; + const messageDirection: MessageDirection; + const type: RegistrationType; +} +/** + * The params sent in an open notebook document notification. + * + * @since 3.17.0 + */ +export type DidOpenNotebookDocumentParams = { + /** + * The notebook document that got opened. + */ + notebookDocument: NotebookDocument; + /** + * The text documents that represent the content + * of a notebook cell. + */ + cellTextDocuments: TextDocumentItem[]; +}; +/** + * A notification sent when a notebook opens. + * + * @since 3.17.0 + */ +export declare namespace DidOpenNotebookDocumentNotification { + const method: 'notebookDocument/didOpen'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method; +} +/** + * A change describing how to move a `NotebookCell` + * array from state S to S'. + * + * @since 3.17.0 + */ +export type NotebookCellArrayChange = { + /** + * The start oftest of the cell that changed. + */ + start: uinteger; + /** + * The deleted cells + */ + deleteCount: uinteger; + /** + * The new cells, if any + */ + cells?: NotebookCell[]; +}; +export declare namespace NotebookCellArrayChange { + function is(value: any): value is NotebookCellArrayChange; + function create(start: uinteger, deleteCount: uinteger, cells?: NotebookCell[]): NotebookCellArrayChange; +} +/** + * Structural changes to cells in a notebook document. + * + * @since 3.18.0 + */ +export interface NotebookDocumentCellChangeStructure { + /** + * The change to the cell array. + */ + array: NotebookCellArrayChange; + /** + * Additional opened cell text documents. + */ + didOpen?: TextDocumentItem[]; + /** + * Additional closed cell text documents. + */ + didClose?: TextDocumentIdentifier[]; +} +/** + * Content changes to a cell in a notebook document. + * + * @since 3.18.0 + */ +export interface NotebookDocumentCellContentChanges { + document: VersionedTextDocumentIdentifier; + changes: TextDocumentContentChangeEvent[]; +} +/** + * Cell changes to a notebook document. + * + * @since 3.18.0 + */ +export interface NotebookDocumentCellChanges { + /** + * Changes to the cell structure to add or + * remove cells. + */ + structure?: NotebookDocumentCellChangeStructure; + /** + * Changes to notebook cells properties like its + * kind, execution summary or metadata. + */ + data?: NotebookCell[]; + /** + * Changes to the text content of notebook cells. + */ + textContent?: NotebookDocumentCellContentChanges[]; +} +/** + * A change event for a notebook document. + * + * @since 3.17.0 + */ +export type NotebookDocumentChangeEvent = { + /** + * The changed meta data if any. + * + * Note: should always be an object literal (e.g. LSPObject) + */ + metadata?: LSPObject; + /** + * Changes to cells + */ + cells?: NotebookDocumentCellChanges; +}; +/** + * The params sent in a change notebook document notification. + * + * @since 3.17.0 + */ +export type DidChangeNotebookDocumentParams = { + /** + * The notebook document that did change. The version number points + * to the version after all provided changes have been applied. If + * only the text document content of a cell changes the notebook version + * doesn't necessarily have to change. + */ + notebookDocument: VersionedNotebookDocumentIdentifier; + /** + * The actual changes to the notebook document. + * + * The changes describe single state changes to the notebook document. + * So if there are two changes c1 (at array index 0) and c2 (at array + * index 1) for a notebook in state S then c1 moves the notebook from + * S to S' and c2 from S' to S''. So c1 is computed on the state S and + * c2 is computed on the state S'. + * + * To mirror the content of a notebook using change events use the following approach: + * - start with the same initial content + * - apply the 'notebookDocument/didChange' notifications in the order you receive them. + * - apply the `NotebookChangeEvent`s in a single notification in the order + * you receive them. + */ + change: NotebookDocumentChangeEvent; +}; +export declare namespace DidChangeNotebookDocumentNotification { + const method: 'notebookDocument/didChange'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method; +} +/** + * The params sent in a save notebook document notification. + * + * @since 3.17.0 + */ +export type DidSaveNotebookDocumentParams = { + /** + * The notebook document that got saved. + */ + notebookDocument: NotebookDocumentIdentifier; +}; +/** + * A notification sent when a notebook document is saved. + * + * @since 3.17.0 + */ +export declare namespace DidSaveNotebookDocumentNotification { + const method: 'notebookDocument/didSave'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method; +} +/** + * The params sent in a close notebook document notification. + * + * @since 3.17.0 + */ +export type DidCloseNotebookDocumentParams = { + /** + * The notebook document that got closed. + */ + notebookDocument: NotebookDocumentIdentifier; + /** + * The text documents that represent the content + * of a notebook cell that got closed. + */ + cellTextDocuments: TextDocumentIdentifier[]; +}; +/** + * A notification sent when a notebook closes. + * + * @since 3.17.0 + */ +export declare namespace DidCloseNotebookDocumentNotification { + const method: 'notebookDocument/didClose'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js" index 8cf370c77178070bf115d87af67d6e75d7db5deb..29ff6caeb083266e93a5833096802c37e692e4ca 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js" @@ -1,3 +1,214 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ba47b70c1635748d3609a70328cf8b9d40e4e5caf3612d09b7899779b0fa020d -size 10070 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = void 0; +const vscode_languageserver_types_1 = require("vscode-languageserver-types"); +const Is = require("./utils/is"); +const messages_1 = require("./messages"); +/** + * A notebook cell kind. + * + * @since 3.17.0 + */ +var NotebookCellKind; +(function (NotebookCellKind) { + /** + * A markup-cell is formatted source that is used for display. + */ + NotebookCellKind.Markup = 1; + /** + * A code-cell is source code. + */ + NotebookCellKind.Code = 2; + function is(value) { + return value === 1 || value === 2; + } + NotebookCellKind.is = is; +})(NotebookCellKind || (exports.NotebookCellKind = NotebookCellKind = {})); +var ExecutionSummary; +(function (ExecutionSummary) { + function create(executionOrder, success) { + const result = { executionOrder }; + if (success === true || success === false) { + result.success = success; + } + return result; + } + ExecutionSummary.create = create; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && vscode_languageserver_types_1.uinteger.is(candidate.executionOrder) && (candidate.success === undefined || Is.boolean(candidate.success)); + } + ExecutionSummary.is = is; + function equals(one, other) { + if (one === other) { + return true; + } + if (one === null || one === undefined || other === null || other === undefined) { + return false; + } + return one.executionOrder === other.executionOrder && one.success === other.success; + } + ExecutionSummary.equals = equals; +})(ExecutionSummary || (exports.ExecutionSummary = ExecutionSummary = {})); +var NotebookCell; +(function (NotebookCell) { + function create(kind, document) { + return { kind, document }; + } + NotebookCell.create = create; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && NotebookCellKind.is(candidate.kind) && vscode_languageserver_types_1.DocumentUri.is(candidate.document) && + (candidate.metadata === undefined || Is.objectLiteral(candidate.metadata)); + } + NotebookCell.is = is; + function diff(one, two) { + const result = new Set(); + if (one.document !== two.document) { + result.add('document'); + } + if (one.kind !== two.kind) { + result.add('kind'); + } + if (one.executionSummary !== two.executionSummary) { + result.add('executionSummary'); + } + if ((one.metadata !== undefined || two.metadata !== undefined) && !equalsMetadata(one.metadata, two.metadata)) { + result.add('metadata'); + } + if ((one.executionSummary !== undefined || two.executionSummary !== undefined) && !ExecutionSummary.equals(one.executionSummary, two.executionSummary)) { + result.add('executionSummary'); + } + return result; + } + NotebookCell.diff = diff; + function equalsMetadata(one, other) { + if (one === other) { + return true; + } + if (one === null || one === undefined || other === null || other === undefined) { + return false; + } + if (typeof one !== typeof other) { + return false; + } + if (typeof one !== 'object') { + return false; + } + const oneArray = Array.isArray(one); + const otherArray = Array.isArray(other); + if (oneArray !== otherArray) { + return false; + } + if (oneArray && otherArray) { + if (one.length !== other.length) { + return false; + } + for (let i = 0; i < one.length; i++) { + if (!equalsMetadata(one[i], other[i])) { + return false; + } + } + } + if (Is.objectLiteral(one) && Is.objectLiteral(other)) { + const oneKeys = Object.keys(one); + const otherKeys = Object.keys(other); + if (oneKeys.length !== otherKeys.length) { + return false; + } + oneKeys.sort(); + otherKeys.sort(); + if (!equalsMetadata(oneKeys, otherKeys)) { + return false; + } + for (let i = 0; i < oneKeys.length; i++) { + const prop = oneKeys[i]; + if (!equalsMetadata(one[prop], other[prop])) { + return false; + } + } + } + return true; + } +})(NotebookCell || (exports.NotebookCell = NotebookCell = {})); +var NotebookDocument; +(function (NotebookDocument) { + function create(uri, notebookType, version, cells) { + return { uri, notebookType, version, cells }; + } + NotebookDocument.create = create; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.uri) && vscode_languageserver_types_1.integer.is(candidate.version) && Is.typedArray(candidate.cells, NotebookCell.is); + } + NotebookDocument.is = is; +})(NotebookDocument || (exports.NotebookDocument = NotebookDocument = {})); +var NotebookDocumentSyncRegistrationType; +(function (NotebookDocumentSyncRegistrationType) { + NotebookDocumentSyncRegistrationType.method = 'notebookDocument/sync'; + NotebookDocumentSyncRegistrationType.messageDirection = messages_1.MessageDirection.clientToServer; + NotebookDocumentSyncRegistrationType.type = new messages_1.RegistrationType(NotebookDocumentSyncRegistrationType.method); +})(NotebookDocumentSyncRegistrationType || (exports.NotebookDocumentSyncRegistrationType = NotebookDocumentSyncRegistrationType = {})); +/** + * A notification sent when a notebook opens. + * + * @since 3.17.0 + */ +var DidOpenNotebookDocumentNotification; +(function (DidOpenNotebookDocumentNotification) { + DidOpenNotebookDocumentNotification.method = 'notebookDocument/didOpen'; + DidOpenNotebookDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidOpenNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenNotebookDocumentNotification.method); + DidOpenNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method; +})(DidOpenNotebookDocumentNotification || (exports.DidOpenNotebookDocumentNotification = DidOpenNotebookDocumentNotification = {})); +var NotebookCellArrayChange; +(function (NotebookCellArrayChange) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && vscode_languageserver_types_1.uinteger.is(candidate.start) && vscode_languageserver_types_1.uinteger.is(candidate.deleteCount) && (candidate.cells === undefined || Is.typedArray(candidate.cells, NotebookCell.is)); + } + NotebookCellArrayChange.is = is; + function create(start, deleteCount, cells) { + const result = { start, deleteCount }; + if (cells !== undefined) { + result.cells = cells; + } + return result; + } + NotebookCellArrayChange.create = create; +})(NotebookCellArrayChange || (exports.NotebookCellArrayChange = NotebookCellArrayChange = {})); +var DidChangeNotebookDocumentNotification; +(function (DidChangeNotebookDocumentNotification) { + DidChangeNotebookDocumentNotification.method = 'notebookDocument/didChange'; + DidChangeNotebookDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidChangeNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeNotebookDocumentNotification.method); + DidChangeNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method; +})(DidChangeNotebookDocumentNotification || (exports.DidChangeNotebookDocumentNotification = DidChangeNotebookDocumentNotification = {})); +/** + * A notification sent when a notebook document is saved. + * + * @since 3.17.0 + */ +var DidSaveNotebookDocumentNotification; +(function (DidSaveNotebookDocumentNotification) { + DidSaveNotebookDocumentNotification.method = 'notebookDocument/didSave'; + DidSaveNotebookDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidSaveNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveNotebookDocumentNotification.method); + DidSaveNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method; +})(DidSaveNotebookDocumentNotification || (exports.DidSaveNotebookDocumentNotification = DidSaveNotebookDocumentNotification = {})); +/** + * A notification sent when a notebook closes. + * + * @since 3.17.0 + */ +var DidCloseNotebookDocumentNotification; +(function (DidCloseNotebookDocumentNotification) { + DidCloseNotebookDocumentNotification.method = 'notebookDocument/didClose'; + DidCloseNotebookDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidCloseNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseNotebookDocumentNotification.method); + DidCloseNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method; +})(DidCloseNotebookDocumentNotification || (exports.DidCloseNotebookDocumentNotification = DidCloseNotebookDocumentNotification = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts" index eab8fcb7423949ac5676954dbf75c1b4307ce25b..1e08fb5f63ca5bec45638c97c4cbd54fcb4c315c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts" @@ -1,3 +1,107 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:96c0c4b30165eaedb3ade3b4e9f491113a1816c448d67fff542b2793bf565b04 -size 4220 +import { NotificationHandler, RequestHandler, ProgressType, ProgressToken } from 'vscode-jsonrpc'; +import { uinteger } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType, ProtocolNotificationType } from './messages'; +export interface WorkDoneProgressBegin { + kind: 'begin'; + /** + * Mandatory title of the progress operation. Used to briefly inform about + * the kind of operation being performed. + * + * Examples: "Indexing" or "Linking dependencies". + */ + title: string; + /** + * Controls if a cancel button should show to allow the user to cancel the + * long running operation. Clients that don't support cancellation are allowed + * to ignore the setting. + */ + cancellable?: boolean; + /** + * Optional, more detailed associated progress message. Contains + * complementary information to the `title`. + * + * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". + * If unset, the previous progress message (if any) is still valid. + */ + message?: string; + /** + * Optional progress percentage to display (value 100 is considered 100%). + * If not provided infinite progress is assumed and clients are allowed + * to ignore the `percentage` value in subsequent in report notifications. + * + * The value should be steadily rising. Clients are free to ignore values + * that are not following this rule. The value range is [0, 100]. + */ + percentage?: uinteger; +} +export interface WorkDoneProgressReport { + kind: 'report'; + /** + * Controls enablement state of a cancel button. + * + * Clients that don't support cancellation or don't support controlling the button's + * enablement state are allowed to ignore the property. + */ + cancellable?: boolean; + /** + * Optional, more detailed associated progress message. Contains + * complementary information to the `title`. + * + * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". + * If unset, the previous progress message (if any) is still valid. + */ + message?: string; + /** + * Optional progress percentage to display (value 100 is considered 100%). + * If not provided infinite progress is assumed and clients are allowed + * to ignore the `percentage` value in subsequent in report notifications. + * + * The value should be steadily rising. Clients are free to ignore values + * that are not following this rule. The value range is [0, 100] + */ + percentage?: uinteger; +} +export interface WorkDoneProgressEnd { + kind: 'end'; + /** + * Optional, a final message indicating to for example indicate the outcome + * of the operation. + */ + message?: string; +} +export declare namespace WorkDoneProgress { + const type: ProgressType; + function is(value: ProgressType): value is typeof type; +} +export interface WorkDoneProgressCreateParams { + /** + * The token to be used to report progress. + */ + token: ProgressToken; +} +/** + * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress + * reporting from the server. + */ +export declare namespace WorkDoneProgressCreateRequest { + const method: 'window/workDoneProgress/create'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +export interface WorkDoneProgressCancelParams { + /** + * The token to be used to report progress. + */ + token: ProgressToken; +} +/** + * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress + * initiated on the server side. + */ +export declare namespace WorkDoneProgressCancelNotification { + const method: 'window/workDoneProgress/cancel'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + type HandlerSignature = NotificationHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js" index 2e3b239ee63abe014e58393b52d7b2f2bf4d5de5..0942da58ed6a21b3b4ab436e8a3d46e0a7c7f08f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js" @@ -1,3 +1,37 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b221eff10e410b1e452b98e0b5dbdeca9efc777dc1edc1c6ea90d3950a24dc60 -size 2259 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = void 0; +const vscode_jsonrpc_1 = require("vscode-jsonrpc"); +const messages_1 = require("./messages"); +var WorkDoneProgress; +(function (WorkDoneProgress) { + WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType(); + function is(value) { + return value === WorkDoneProgress.type; + } + WorkDoneProgress.is = is; +})(WorkDoneProgress || (exports.WorkDoneProgress = WorkDoneProgress = {})); +/** + * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress + * reporting from the server. + */ +var WorkDoneProgressCreateRequest; +(function (WorkDoneProgressCreateRequest) { + WorkDoneProgressCreateRequest.method = 'window/workDoneProgress/create'; + WorkDoneProgressCreateRequest.messageDirection = messages_1.MessageDirection.serverToClient; + WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType(WorkDoneProgressCreateRequest.method); +})(WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = WorkDoneProgressCreateRequest = {})); +/** + * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress + * initiated on the server side. + */ +var WorkDoneProgressCancelNotification; +(function (WorkDoneProgressCancelNotification) { + WorkDoneProgressCancelNotification.method = 'window/workDoneProgress/cancel'; + WorkDoneProgressCancelNotification.messageDirection = messages_1.MessageDirection.clientToServer; + WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType(WorkDoneProgressCancelNotification.method); +})(WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = WorkDoneProgressCancelNotification = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts" index 34b943dc09897aa548f959ea7481369434a600a4..db45ae7d31a6a0d9298d29533f672aff995d7248 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts" @@ -1,3 +1,41 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b5d49f459d2efc77cff4ab27d929aa67d0c9121bc20763d84942c7fca2cc7b8f -size 1916 +import { RequestHandler } from 'vscode-jsonrpc'; +import { TextDocumentIdentifier, Position, SelectionRange } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { TextDocumentRegistrationOptions, WorkDoneProgressOptions, StaticRegistrationOptions, WorkDoneProgressParams, PartialResultParams } from './protocol'; +export interface SelectionRangeClientCapabilities { + /** + * Whether implementation supports dynamic registration for selection range providers. If this is set to `true` + * the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server + * capability as well. + */ + dynamicRegistration?: boolean; +} +export interface SelectionRangeOptions extends WorkDoneProgressOptions { +} +export interface SelectionRangeRegistrationOptions extends SelectionRangeOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions { +} +/** + * A parameter literal used in selection range requests. + */ +export interface SelectionRangeParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The positions inside the text document. + */ + positions: Position[]; +} +/** + * A request to provide selection ranges in a document. The request's + * parameter is of type {@link SelectionRangeParams}, the + * response is of type {@link SelectionRange SelectionRange[]} or a Thenable + * that resolves to such. + */ +export declare namespace SelectionRangeRequest { + const method: 'textDocument/selectionRange'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js" index 0a2fddf0508218c3b215a070b69ef7006cf3ccf6..eddb4c0003501485483a7046b7c374ec11038b9d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js" @@ -1,3 +1,20 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7c64653cdda9575a929711913e474014ba60b5cb53219476546601cfa4518c7a -size 1158 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SelectionRangeRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to provide selection ranges in a document. The request's + * parameter is of type {@link SelectionRangeParams}, the + * response is of type {@link SelectionRange SelectionRange[]} or a Thenable + * that resolves to such. + */ +var SelectionRangeRequest; +(function (SelectionRangeRequest) { + SelectionRangeRequest.method = 'textDocument/selectionRange'; + SelectionRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer; + SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method); +})(SelectionRangeRequest || (exports.SelectionRangeRequest = SelectionRangeRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts" index 777f5a80c237a0341ebd3fbf4c8575c04c27e629..3d4d36e842f79119c49ec6ece623b6c502f0d273 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts" @@ -1,3 +1,237 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4dd1d7faa5b83c2d7ed6946e456dd1e8eba71263b46ab34b9cec5b1f2c2ad3da -size 8259 +import { TextDocumentIdentifier, Range, uinteger, SemanticTokensEdit, SemanticTokensLegend, SemanticTokens, SemanticTokensDelta } from 'vscode-languageserver-types'; +import { RequestHandler0, RequestHandler } from 'vscode-jsonrpc'; +import { MessageDirection, ProtocolRequestType, ProtocolRequestType0, RegistrationType } from './messages'; +import type { PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions } from './protocol'; +/** + * @since 3.16.0 + */ +export interface SemanticTokensPartialResult { + data: uinteger[]; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensDeltaPartialResult { + edits: SemanticTokensEdit[]; +} +export declare namespace TokenFormat { + const Relative: 'relative'; +} +export type TokenFormat = 'relative'; +/** + * @since 3.18.0 + */ +export interface ClientSemanticTokensRequestFullDelta { + /** + * The client will send the `textDocument/semanticTokens/full/delta` request if + * the server provides a corresponding handler. + */ + delta?: boolean; +} +/** + * @since 3.18.0 + */ +export interface ClientSemanticTokensRequestOptions { + /** + * The client will send the `textDocument/semanticTokens/range` request if + * the server provides a corresponding handler. + */ + range?: boolean | {}; + /** + * The client will send the `textDocument/semanticTokens/full` request if + * the server provides a corresponding handler. + */ + full?: boolean | ClientSemanticTokensRequestFullDelta; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + * return value for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; + /** + * Which requests the client supports and might send to the server + * depending on the server's capability. Please note that clients might not + * show semantic tokens or degrade some of the user experience if a range + * or full request is advertised by the client but not provided by the + * server. If for example the client capability `requests.full` and + * `request.range` are both set to true but the server only provides a + * range provider the client might not render a minimap correctly or might + * even decide to not show any semantic tokens at all. + */ + requests: ClientSemanticTokensRequestOptions; + /** + * The token types that the client supports. + */ + tokenTypes: string[]; + /** + * The token modifiers that the client supports. + */ + tokenModifiers: string[]; + /** + * The token formats the clients supports. + */ + formats: TokenFormat[]; + /** + * Whether the client supports tokens that can overlap each other. + */ + overlappingTokenSupport?: boolean; + /** + * Whether the client supports tokens that can span multiple lines. + */ + multilineTokenSupport?: boolean; + /** + * Whether the client allows the server to actively cancel a + * semantic token request, e.g. supports returning + * LSPErrorCodes.ServerCancelled. If a server does the client + * needs to retrigger the request. + * + * @since 3.17.0 + */ + serverCancelSupport?: boolean; + /** + * Whether the client uses semantic tokens to augment existing + * syntax tokens. If set to `true` client side created syntax + * tokens and semantic tokens are both used for colorization. If + * set to `false` the client only uses the returned semantic tokens + * for colorization. + * + * If the value is `undefined` then the client behavior is not + * specified. + * + * @since 3.17.0 + */ + augmentsSyntaxTokens?: boolean; +} +/** + * Semantic tokens options to support deltas for full documents + * + * @since 3.18.0 + */ +export interface SemanticTokensFullDelta { + /** + * The server supports deltas for full documents. + */ + delta?: boolean; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensOptions extends WorkDoneProgressOptions { + /** + * The legend used by the server + */ + legend: SemanticTokensLegend; + /** + * Server supports providing semantic tokens for a specific range + * of a document. + */ + range?: boolean | {}; + /** + * Server supports providing semantic tokens for a full document. + */ + full?: boolean | SemanticTokensFullDelta; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensRegistrationOptions extends TextDocumentRegistrationOptions, SemanticTokensOptions, StaticRegistrationOptions { +} +export declare namespace SemanticTokensRegistrationType { + const method: 'textDocument/semanticTokens'; + const type: RegistrationType; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokensRequest { + const method: 'textDocument/semanticTokens/full'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + const registrationMethod: typeof SemanticTokensRegistrationType.method; + type HandlerSignature = RequestHandler; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensDeltaParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The result id of a previous response. The result Id can either point to a full response + * or a delta response depending on what was received last. + */ + previousResultId: string; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokensDeltaRequest { + const method: 'textDocument/semanticTokens/full/delta'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + const registrationMethod: typeof SemanticTokensRegistrationType.method; + type HandlerSignature = RequestHandler; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensRangeParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The range the semantic tokens are requested for. + */ + range: Range; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokensRangeRequest { + const method: 'textDocument/semanticTokens/range'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + const registrationMethod: typeof SemanticTokensRegistrationType.method; + type HandlerSignature = RequestHandler; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensWorkspaceClientCapabilities { + /** + * Whether the client implementation supports a refresh request sent from + * the server to the client. + * + * Note that this event is global and will force the client to refresh all + * semantic tokens currently shown. It should be used with absolute care + * and is useful for situation where a server for example detects a project + * wide change that requires such a calculation. + */ + refreshSupport?: boolean; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokensRefreshRequest { + const method: `workspace/semanticTokens/refresh`; + const messageDirection: MessageDirection; + const type: ProtocolRequestType0; + type HandlerSignature = RequestHandler0; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js" index f16a8cd34843520d45ed28a6d19095a5da36f84e..9ce0712a11e7af3944061dea102165d9ce6d6613 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js" @@ -1,3 +1,57 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5377897acf8d7703d304cc5ec5fe3aa446a9f588fbef714cd61b2e04cad08c01 -size 3443 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.SemanticTokensRegistrationType = exports.TokenFormat = void 0; +const messages_1 = require("./messages"); +//------- 'textDocument/semanticTokens' ----- +var TokenFormat; +(function (TokenFormat) { + TokenFormat.Relative = 'relative'; +})(TokenFormat || (exports.TokenFormat = TokenFormat = {})); +var SemanticTokensRegistrationType; +(function (SemanticTokensRegistrationType) { + SemanticTokensRegistrationType.method = 'textDocument/semanticTokens'; + SemanticTokensRegistrationType.type = new messages_1.RegistrationType(SemanticTokensRegistrationType.method); +})(SemanticTokensRegistrationType || (exports.SemanticTokensRegistrationType = SemanticTokensRegistrationType = {})); +/** + * @since 3.16.0 + */ +var SemanticTokensRequest; +(function (SemanticTokensRequest) { + SemanticTokensRequest.method = 'textDocument/semanticTokens/full'; + SemanticTokensRequest.messageDirection = messages_1.MessageDirection.clientToServer; + SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method); + SemanticTokensRequest.registrationMethod = SemanticTokensRegistrationType.method; +})(SemanticTokensRequest || (exports.SemanticTokensRequest = SemanticTokensRequest = {})); +/** + * @since 3.16.0 + */ +var SemanticTokensDeltaRequest; +(function (SemanticTokensDeltaRequest) { + SemanticTokensDeltaRequest.method = 'textDocument/semanticTokens/full/delta'; + SemanticTokensDeltaRequest.messageDirection = messages_1.MessageDirection.clientToServer; + SemanticTokensDeltaRequest.type = new messages_1.ProtocolRequestType(SemanticTokensDeltaRequest.method); + SemanticTokensDeltaRequest.registrationMethod = SemanticTokensRegistrationType.method; +})(SemanticTokensDeltaRequest || (exports.SemanticTokensDeltaRequest = SemanticTokensDeltaRequest = {})); +/** + * @since 3.16.0 + */ +var SemanticTokensRangeRequest; +(function (SemanticTokensRangeRequest) { + SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range'; + SemanticTokensRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer; + SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method); + SemanticTokensRangeRequest.registrationMethod = SemanticTokensRegistrationType.method; +})(SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = SemanticTokensRangeRequest = {})); +/** + * @since 3.16.0 + */ +var SemanticTokensRefreshRequest; +(function (SemanticTokensRefreshRequest) { + SemanticTokensRefreshRequest.method = `workspace/semanticTokens/refresh`; + SemanticTokensRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + SemanticTokensRefreshRequest.type = new messages_1.ProtocolRequestType0(SemanticTokensRefreshRequest.method); +})(SemanticTokensRefreshRequest || (exports.SemanticTokensRefreshRequest = SemanticTokensRefreshRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts" index 48bfbefdfa6a60c8656dc90ba29cad2e23a415b4..0475e75b076d2604a9b97fca1fe00dc410b4edac 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts" @@ -1,3 +1,72 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a61f7b50171225629903175e062d3f43225e6eba24eb2e50f88ca05fb441aa6 -size 2202 +import { HandlerResult, RequestHandler } from 'vscode-jsonrpc'; +import { Range, URI } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +/** + * Client capabilities for the showDocument request. + * + * @since 3.16.0 + */ +export interface ShowDocumentClientCapabilities { + /** + * The client has support for the showDocument + * request. + */ + support: boolean; +} +/** + * Params to show a resource in the UI. + * + * @since 3.16.0 + */ +export interface ShowDocumentParams { + /** + * The uri to show. + */ + uri: URI; + /** + * Indicates to show the resource in an external program. + * To show, for example, `https://code.visualstudio.com/` + * in the default WEB browser set `external` to `true`. + */ + external?: boolean; + /** + * An optional property to indicate whether the editor + * showing the document should take focus or not. + * Clients might ignore this property if an external + * program is started. + */ + takeFocus?: boolean; + /** + * An optional selection range if the document is a text + * document. Clients might ignore the property if an + * external program is started or the file is not a text + * file. + */ + selection?: Range; +} +/** + * The result of a showDocument request. + * + * @since 3.16.0 + */ +export interface ShowDocumentResult { + /** + * A boolean indicating if the show was successful. + */ + success: boolean; +} +/** + * A request to show a document. This request might open an + * external program depending on the value of the URI to open. + * For example a request to open `https://code.visualstudio.com/` + * will very likely open the URI in a WEB browser. + * + * @since 3.16.0 +*/ +export declare namespace ShowDocumentRequest { + const method: 'window/showDocument'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; + type MiddlewareSignature = (params: ShowDocumentParams, next: HandlerSignature) => HandlerResult; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js" index 8bf7e2c82ff1b902f6fe33ecb572a35d0d2a9543..1c9fed6a7e2de73067a7b61c98b87e15d9ec6b0f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js" @@ -1,3 +1,22 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7aa2daf8ad5de78b1476926e4ab6b658974cc37a4982a21b0d561809181b5df6 -size 1156 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ShowDocumentRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to show a document. This request might open an + * external program depending on the value of the URI to open. + * For example a request to open `https://code.visualstudio.com/` + * will very likely open the URI in a WEB browser. + * + * @since 3.16.0 +*/ +var ShowDocumentRequest; +(function (ShowDocumentRequest) { + ShowDocumentRequest.method = 'window/showDocument'; + ShowDocumentRequest.messageDirection = messages_1.MessageDirection.serverToClient; + ShowDocumentRequest.type = new messages_1.ProtocolRequestType(ShowDocumentRequest.method); +})(ShowDocumentRequest || (exports.ShowDocumentRequest = ShowDocumentRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts" index d91233cb62fcc441dfa4ebae066082f46f8a28fd..1ce7edaa71968875391e5dcefc7c02303bdf3b12 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts" @@ -1,3 +1,38 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eec5fe9863d12133a6b4803b62741054a3481fc0fcbf2be6bf26c681935cdfdc -size 1939 +import { RequestHandler } from 'vscode-jsonrpc'; +import { Definition, DefinitionLink, LocationLink, Location } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +/** + * Since 3.6.0 + */ +export interface TypeDefinitionClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `TypeDefinitionRegistrationOptions` return value + * for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; + /** + * The client supports additional metadata in the form of definition links. + * + * Since 3.14.0 + */ + linkSupport?: boolean; +} +export interface TypeDefinitionOptions extends WorkDoneProgressOptions { +} +export interface TypeDefinitionRegistrationOptions extends TextDocumentRegistrationOptions, TypeDefinitionOptions, StaticRegistrationOptions { +} +export interface TypeDefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * A request to resolve the type definition locations of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPositionParams} + * the response is of type {@link Definition} or a Thenable that resolves to such. + */ +export declare namespace TypeDefinitionRequest { + const method: 'textDocument/typeDefinition'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js" index ce3077e0de3fd9e6668fc66b5152fbcb48b84ba2..fa3c7f22fdef053d054aeba8345b0934ed394565 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js" @@ -1,3 +1,21 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:217939c6b9ff65f57b493297ed123f79f8599995b40ac2ccdf6f222da18830f0 -size 1268 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypeDefinitionRequest = void 0; +const messages_1 = require("./messages"); +// @ts-ignore: to avoid inlining LocatioLink as dynamic import +let __noDynamicImport; +/** + * A request to resolve the type definition locations of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPositionParams} + * the response is of type {@link Definition} or a Thenable that resolves to such. + */ +var TypeDefinitionRequest; +(function (TypeDefinitionRequest) { + TypeDefinitionRequest.method = 'textDocument/typeDefinition'; + TypeDefinitionRequest.messageDirection = messages_1.MessageDirection.clientToServer; + TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method); +})(TypeDefinitionRequest || (exports.TypeDefinitionRequest = TypeDefinitionRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.d.ts" index 2e85399d1b4b49caf96eb51f76c0adbe3550214d..2b0d04318339a6768dbec12daea229ceb133b99c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.d.ts" @@ -1,3 +1,83 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:daad4c291d7d4ab0ca94693295f33533c6fc44c9ab31806a949367207c4b27fe -size 3291 +import { RequestHandler } from 'vscode-jsonrpc'; +import { TypeHierarchyItem } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +/** + * @since 3.17.0 + */ +export type TypeHierarchyClientCapabilities = { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + * return value for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; +}; +/** + * Type hierarchy options used during static registration. + * + * @since 3.17.0 + */ +export type TypeHierarchyOptions = WorkDoneProgressOptions; +/** + * Type hierarchy options used during static or dynamic registration. + * + * @since 3.17.0 + */ +export type TypeHierarchyRegistrationOptions = TextDocumentRegistrationOptions & TypeHierarchyOptions & StaticRegistrationOptions; +/** + * The parameter of a `textDocument/prepareTypeHierarchy` request. + * + * @since 3.17.0 + */ +export type TypeHierarchyPrepareParams = TextDocumentPositionParams & WorkDoneProgressParams; +/** + * A request to result a `TypeHierarchyItem` in a document at a given position. + * Can be used as an input to a subtypes or supertypes type hierarchy. + * + * @since 3.17.0 + */ +export declare namespace TypeHierarchyPrepareRequest { + const method: 'textDocument/prepareTypeHierarchy'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * The parameter of a `typeHierarchy/supertypes` request. + * + * @since 3.17.0 + */ +export type TypeHierarchySupertypesParams = WorkDoneProgressParams & PartialResultParams & { + item: TypeHierarchyItem; +}; +/** + * A request to resolve the supertypes for a given `TypeHierarchyItem`. + * + * @since 3.17.0 + */ +export declare namespace TypeHierarchySupertypesRequest { + const method: 'typeHierarchy/supertypes'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * The parameter of a `typeHierarchy/subtypes` request. + * + * @since 3.17.0 + */ +export type TypeHierarchySubtypesParams = WorkDoneProgressParams & PartialResultParams & { + item: TypeHierarchyItem; +}; +/** + * A request to resolve the subtypes for a given `TypeHierarchyItem`. + * + * @since 3.17.0 + */ +export declare namespace TypeHierarchySubtypesRequest { + const method: 'typeHierarchy/subtypes'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js" index a8f4386f98fef9040d14d28020b2a531e37c102e..dcc2f999e6d675c217ded0f1fc85e2d4c0ec1bb7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js" @@ -1,3 +1,42 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:74a73fc3bd417f76c040849e9ecc3e532d072afdafaa1977379fff8711522e41 -size 2400 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) TypeFox, Microsoft and others. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypeHierarchySubtypesRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchyPrepareRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to result a `TypeHierarchyItem` in a document at a given position. + * Can be used as an input to a subtypes or supertypes type hierarchy. + * + * @since 3.17.0 + */ +var TypeHierarchyPrepareRequest; +(function (TypeHierarchyPrepareRequest) { + TypeHierarchyPrepareRequest.method = 'textDocument/prepareTypeHierarchy'; + TypeHierarchyPrepareRequest.messageDirection = messages_1.MessageDirection.clientToServer; + TypeHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(TypeHierarchyPrepareRequest.method); +})(TypeHierarchyPrepareRequest || (exports.TypeHierarchyPrepareRequest = TypeHierarchyPrepareRequest = {})); +/** + * A request to resolve the supertypes for a given `TypeHierarchyItem`. + * + * @since 3.17.0 + */ +var TypeHierarchySupertypesRequest; +(function (TypeHierarchySupertypesRequest) { + TypeHierarchySupertypesRequest.method = 'typeHierarchy/supertypes'; + TypeHierarchySupertypesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + TypeHierarchySupertypesRequest.type = new messages_1.ProtocolRequestType(TypeHierarchySupertypesRequest.method); +})(TypeHierarchySupertypesRequest || (exports.TypeHierarchySupertypesRequest = TypeHierarchySupertypesRequest = {})); +/** + * A request to resolve the subtypes for a given `TypeHierarchyItem`. + * + * @since 3.17.0 + */ +var TypeHierarchySubtypesRequest; +(function (TypeHierarchySubtypesRequest) { + TypeHierarchySubtypesRequest.method = 'typeHierarchy/subtypes'; + TypeHierarchySubtypesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + TypeHierarchySubtypesRequest.type = new messages_1.ProtocolRequestType(TypeHierarchySubtypesRequest.method); +})(TypeHierarchySubtypesRequest || (exports.TypeHierarchySubtypesRequest = TypeHierarchySubtypesRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.d.ts" index 1023cdb32acf5f73c50c06b617ceb74969fe2275..3a5e89ac1ab8f60e0dcc420965780953d687a49a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.d.ts" @@ -1,3 +1,74 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:05f6b2b3bef27dfc0e2464197510d08f275f2464363b441def7f309cbf42f51d -size 2899 +import { WorkspaceFolder } from 'vscode-languageserver-types'; +import { RequestHandler0, NotificationHandler, HandlerResult, CancellationToken } from 'vscode-jsonrpc'; +import { MessageDirection, ProtocolRequestType0, ProtocolNotificationType } from './messages'; +export interface WorkspaceFoldersInitializeParams { + /** + * The workspace folders configured in the client when the server starts. + * + * This property is only available if the client supports workspace folders. + * It can be `null` if the client supports workspace folders but none are + * configured. + * + * @since 3.6.0 + */ + workspaceFolders?: WorkspaceFolder[] | null; +} +export interface WorkspaceFoldersServerCapabilities { + /** + * The server has support for workspace folders + */ + supported?: boolean; + /** + * Whether the server wants to receive workspace folder + * change notifications. + * + * If a string is provided the string is treated as an ID + * under which the notification is registered on the client + * side. The ID can be used to unregister for these events + * using the `client/unregisterCapability` request. + */ + changeNotifications?: string | boolean; +} +/** + * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders. + */ +export declare namespace WorkspaceFoldersRequest { + const method: 'workspace/workspaceFolders'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType0; + type HandlerSignature = RequestHandler0; + type MiddlewareSignature = (token: CancellationToken, next: HandlerSignature) => HandlerResult; +} +/** + * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace + * folder configuration changes. + */ +export declare namespace DidChangeWorkspaceFoldersNotification { + const method: 'workspace/didChangeWorkspaceFolders'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + type HandlerSignature = NotificationHandler; + type MiddlewareSignature = (params: DidChangeWorkspaceFoldersParams, next: HandlerSignature) => void; +} +/** + * The parameters of a `workspace/didChangeWorkspaceFolders` notification. + */ +export interface DidChangeWorkspaceFoldersParams { + /** + * The actual workspace folder change event. + */ + event: WorkspaceFoldersChangeEvent; +} +/** + * The workspace folder change event. + */ +export interface WorkspaceFoldersChangeEvent { + /** + * The array of added workspace folders + */ + added: WorkspaceFolder[]; + /** + * The array of the removed workspace folders + */ + removed: WorkspaceFolder[]; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js" index 1c294b5c15926cd0bfe8a3b50ed90c4acd14cf56..b5aef519797a93668b0edf0ef2e24b48b2f9bdb3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js" @@ -1,3 +1,27 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5342621209c458b684ca4df20529f6200db9110b38a607120a7e34132703465a -size 1825 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = void 0; +const messages_1 = require("./messages"); +/** + * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders. + */ +var WorkspaceFoldersRequest; +(function (WorkspaceFoldersRequest) { + WorkspaceFoldersRequest.method = 'workspace/workspaceFolders'; + WorkspaceFoldersRequest.messageDirection = messages_1.MessageDirection.serverToClient; + WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0(WorkspaceFoldersRequest.method); +})(WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = WorkspaceFoldersRequest = {})); +/** + * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace + * folder configuration changes. + */ +var DidChangeWorkspaceFoldersNotification; +(function (DidChangeWorkspaceFoldersNotification) { + DidChangeWorkspaceFoldersNotification.method = 'workspace/didChangeWorkspaceFolders'; + DidChangeWorkspaceFoldersNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType(DidChangeWorkspaceFoldersNotification.method); +})(DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = DidChangeWorkspaceFoldersNotification = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/utils/is.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/utils/is.d.ts" index e2651b0bf450668ca327da059dfa56728e734fb7..e486414296582e8ec316818c46d076a993d34b77 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/utils/is.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/utils/is.d.ts" @@ -1,3 +1,9 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d7a48988ed49ecb85bf47987be5652cdf9cbca8d9ce336642a2a3350a368ab2f -size 598 +export declare function boolean(value: any): value is boolean; +export declare function string(value: any): value is string; +export declare function number(value: any): value is number; +export declare function error(value: any): value is Error; +export declare function func(value: any): value is Function; +export declare function array(value: any): value is T[]; +export declare function stringArray(value: any): value is string[]; +export declare function typedArray(value: any, check: (value: any) => boolean): value is T[]; +export declare function objectLiteral(value: any): value is object; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js" index 33a51f97b7df49dbe4c046461b324759121416aa..2ba4e8484543c2bf1bb00f3336197035e8a0f531 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js" @@ -1,3 +1,46 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:48d411e47ba4e27a0a36a06b7f5237856045163dab1a06ffb9db1dca5dc4b996 -size 1814 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.objectLiteral = exports.typedArray = exports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0; +function boolean(value) { + return value === true || value === false; +} +exports.boolean = boolean; +function string(value) { + return typeof value === 'string' || value instanceof String; +} +exports.string = string; +function number(value) { + return typeof value === 'number' || value instanceof Number; +} +exports.number = number; +function error(value) { + return value instanceof Error; +} +exports.error = error; +function func(value) { + return typeof value === 'function'; +} +exports.func = func; +function array(value) { + return Array.isArray(value); +} +exports.array = array; +function stringArray(value) { + return array(value) && value.every(elem => string(elem)); +} +exports.stringArray = stringArray; +function typedArray(value, check) { + return Array.isArray(value) && value.every(check); +} +exports.typedArray = typedArray; +function objectLiteral(value) { + // Strictly speaking class instances pass this check as well. Since the LSP + // doesn't use classes we ignore this for now. If we do we need to add something + // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null` + return value !== null && typeof value === 'object'; +} +exports.objectLiteral = objectLiteral; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts" index 5603ef6a8c1b3655d4262d25c46657b5035c11fc..06e8b5f84c9b3b40a177dcb064b2b1f01adadb65 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d789022bf705385490fe89811bc7850225c207f37dd706ada2509eb1d8f31f12 -size 608 +/// +import { MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, ProtocolConnection } from '../common/api'; +export * from 'vscode-jsonrpc/node'; +export * from '../common/api'; +export declare function createProtocolConnection(input: MessageReader, output: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection; +export declare function createProtocolConnection(input: NodeJS.ReadableStream, output: NodeJS.WritableStream, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/node/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/node/main.js" index c29c1dfd84385a9b92831a2625e6ea08f92999fd..ecc68b31babcf2c3ae810b397ee15a7e9b7a9f93 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/node/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/lib/node/main.js" @@ -1,3 +1,28 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cc35a5ff1df065eae9ca4b1c2504ac7af6f0c50c9c8b3bfee510718f7249e688 -size 1512 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createProtocolConnection = void 0; +const node_1 = require("vscode-jsonrpc/node"); +__exportStar(require("vscode-jsonrpc/node"), exports); +__exportStar(require("../common/api"), exports); +function createProtocolConnection(input, output, logger, options) { + return (0, node_1.createMessageConnection)(input, output, logger, options); +} +exports.createProtocolConnection = createProtocolConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/metaModel.schema.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/metaModel.schema.json" index 3c919f3adff90c963070ca37eed216286162516c..2d8f47d61544d2b49b27ea81e62222722775d76e 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/metaModel.schema.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/metaModel.schema.json" @@ -1,3 +1,783 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ff1a28440feb03a40b9a6cbde40bab06c129f321962c675292ff3f63aa53ef47 -size 21796 +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "AndType": { + "additionalProperties": false, + "description": "Represents an `and`type (e.g. TextDocumentParams & WorkDoneProgressParams`).", + "properties": { + "items": { + "items": { + "$ref": "#/definitions/Type" + }, + "type": "array" + }, + "kind": { + "const": "and", + "type": "string" + } + }, + "required": [ + "kind", + "items" + ], + "type": "object" + }, + "ArrayType": { + "additionalProperties": false, + "description": "Represents an array type (e.g. `TextDocument[]`).", + "properties": { + "element": { + "$ref": "#/definitions/Type" + }, + "kind": { + "const": "array", + "type": "string" + } + }, + "required": [ + "kind", + "element" + ], + "type": "object" + }, + "BaseType": { + "additionalProperties": false, + "description": "Represents a base type like `string` or `DocumentUri`.", + "properties": { + "kind": { + "const": "base", + "type": "string" + }, + "name": { + "$ref": "#/definitions/BaseTypes" + } + }, + "required": [ + "kind", + "name" + ], + "type": "object" + }, + "BaseTypes": { + "enum": [ + "URI", + "DocumentUri", + "integer", + "uinteger", + "decimal", + "RegExp", + "string", + "boolean", + "null" + ], + "type": "string" + }, + "BooleanLiteralType": { + "additionalProperties": false, + "description": "Represents a boolean literal type (e.g. `kind: true`).", + "properties": { + "kind": { + "const": "booleanLiteral", + "type": "string" + }, + "value": { + "type": "boolean" + } + }, + "required": [ + "kind", + "value" + ], + "type": "object" + }, + "Enumeration": { + "additionalProperties": false, + "description": "Defines an enumeration.", + "properties": { + "deprecated": { + "description": "Whether the enumeration is deprecated or not. If deprecated the property contains the deprecation message.", + "type": "string" + }, + "documentation": { + "description": "An optional documentation.", + "type": "string" + }, + "name": { + "description": "The name of the enumeration.", + "type": "string" + }, + "proposed": { + "description": "Whether this is a proposed enumeration. If omitted, the enumeration is final.", + "type": "boolean" + }, + "since": { + "description": "Since when (release number) this enumeration is available. Is undefined if not known.", + "type": "string" + }, + "supportsCustomValues": { + "description": "Whether the enumeration supports custom values (e.g. values which are not part of the set defined in `values`). If omitted no custom values are supported.", + "type": "boolean" + }, + "type": { + "$ref": "#/definitions/EnumerationType", + "description": "The type of the elements." + }, + "values": { + "description": "The enum values.", + "items": { + "$ref": "#/definitions/EnumerationEntry" + }, + "type": "array" + } + }, + "required": [ + "name", + "type", + "values" + ], + "type": "object" + }, + "EnumerationEntry": { + "additionalProperties": false, + "description": "Defines an enumeration entry.", + "properties": { + "deprecated": { + "description": "Whether the enum entry is deprecated or not. If deprecated the property contains the deprecation message.", + "type": "string" + }, + "documentation": { + "description": "An optional documentation.", + "type": "string" + }, + "name": { + "description": "The name of the enum item.", + "type": "string" + }, + "proposed": { + "description": "Whether this is a proposed enumeration entry. If omitted, the enumeration entry is final.", + "type": "boolean" + }, + "since": { + "description": "Since when (release number) this enumeration entry is available. Is undefined if not known.", + "type": "string" + }, + "value": { + "description": "The value.", + "type": [ + "string", + "number" + ] + } + }, + "required": [ + "name", + "value" + ], + "type": "object" + }, + "EnumerationType": { + "additionalProperties": false, + "properties": { + "kind": { + "const": "base", + "type": "string" + }, + "name": { + "enum": [ + "string", + "integer", + "uinteger" + ], + "type": "string" + } + }, + "required": [ + "kind", + "name" + ], + "type": "object" + }, + "IntegerLiteralType": { + "additionalProperties": false, + "properties": { + "kind": { + "const": "integerLiteral", + "description": "Represents an integer literal type (e.g. `kind: 1`).", + "type": "string" + }, + "value": { + "type": "number" + } + }, + "required": [ + "kind", + "value" + ], + "type": "object" + }, + "MapKeyType": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "base", + "type": "string" + }, + "name": { + "enum": [ + "URI", + "DocumentUri", + "string", + "integer" + ], + "type": "string" + } + }, + "required": [ + "kind", + "name" + ], + "type": "object" + }, + { + "$ref": "#/definitions/ReferenceType" + } + ], + "description": "Represents a type that can be used as a key in a map type. If a reference type is used then the type must either resolve to a `string` or `integer` type. (e.g. `type ChangeAnnotationIdentifier === string`)." + }, + "MapType": { + "additionalProperties": false, + "description": "Represents a JSON object map (e.g. `interface Map { [key: K] => V; }`).", + "properties": { + "key": { + "$ref": "#/definitions/MapKeyType" + }, + "kind": { + "const": "map", + "type": "string" + }, + "value": { + "$ref": "#/definitions/Type" + } + }, + "required": [ + "kind", + "key", + "value" + ], + "type": "object" + }, + "MessageDirection": { + "description": "Indicates in which direction a message is sent in the protocol.", + "enum": [ + "clientToServer", + "serverToClient", + "both" + ], + "type": "string" + }, + "MetaData": { + "additionalProperties": false, + "properties": { + "version": { + "description": "The protocol version.", + "type": "string" + } + }, + "required": [ + "version" + ], + "type": "object" + }, + "MetaModel": { + "additionalProperties": false, + "description": "The actual meta model.", + "properties": { + "enumerations": { + "description": "The enumerations.", + "items": { + "$ref": "#/definitions/Enumeration" + }, + "type": "array" + }, + "metaData": { + "$ref": "#/definitions/MetaData", + "description": "Additional meta data." + }, + "notifications": { + "description": "The notifications.", + "items": { + "$ref": "#/definitions/Notification" + }, + "type": "array" + }, + "requests": { + "description": "The requests.", + "items": { + "$ref": "#/definitions/Request" + }, + "type": "array" + }, + "structures": { + "description": "The structures.", + "items": { + "$ref": "#/definitions/Structure" + }, + "type": "array" + }, + "typeAliases": { + "description": "The type aliases.", + "items": { + "$ref": "#/definitions/TypeAlias" + }, + "type": "array" + } + }, + "required": [ + "metaData", + "requests", + "notifications", + "structures", + "enumerations", + "typeAliases" + ], + "type": "object" + }, + "Notification": { + "additionalProperties": false, + "description": "Represents a LSP notification", + "properties": { + "deprecated": { + "description": "Whether the notification is deprecated or not. If deprecated the property contains the deprecation message.", + "type": "string" + }, + "documentation": { + "description": "An optional documentation;", + "type": "string" + }, + "messageDirection": { + "$ref": "#/definitions/MessageDirection", + "description": "The direction in which this notification is sent in the protocol." + }, + "method": { + "description": "The request's method name.", + "type": "string" + }, + "params": { + "anyOf": [ + { + "$ref": "#/definitions/Type" + }, + { + "items": { + "$ref": "#/definitions/Type" + }, + "type": "array" + } + ], + "description": "The parameter type(s) if any." + }, + "proposed": { + "description": "Whether this is a proposed notification. If omitted the notification is final.", + "type": "boolean" + }, + "registrationMethod": { + "description": "Optional a dynamic registration method if it different from the request's method.", + "type": "string" + }, + "registrationOptions": { + "$ref": "#/definitions/Type", + "description": "Optional registration options if the notification supports dynamic registration." + }, + "since": { + "description": "Since when (release number) this notification is available. Is undefined if not known.", + "type": "string" + } + }, + "required": [ + "method", + "messageDirection" + ], + "type": "object" + }, + "OrType": { + "additionalProperties": false, + "description": "Represents an `or` type (e.g. `Location | LocationLink`).", + "properties": { + "items": { + "items": { + "$ref": "#/definitions/Type" + }, + "type": "array" + }, + "kind": { + "const": "or", + "type": "string" + } + }, + "required": [ + "kind", + "items" + ], + "type": "object" + }, + "Property": { + "additionalProperties": false, + "description": "Represents an object property.", + "properties": { + "deprecated": { + "description": "Whether the property is deprecated or not. If deprecated the property contains the deprecation message.", + "type": "string" + }, + "documentation": { + "description": "An optional documentation.", + "type": "string" + }, + "name": { + "description": "The property name;", + "type": "string" + }, + "optional": { + "description": "Whether the property is optional. If omitted, the property is mandatory.", + "type": "boolean" + }, + "proposed": { + "description": "Whether this is a proposed property. If omitted, the structure is final.", + "type": "boolean" + }, + "since": { + "description": "Since when (release number) this property is available. Is undefined if not known.", + "type": "string" + }, + "type": { + "$ref": "#/definitions/Type", + "description": "The type of the property" + } + }, + "required": [ + "name", + "type" + ], + "type": "object" + }, + "ReferenceType": { + "additionalProperties": false, + "description": "Represents a reference to another type (e.g. `TextDocument`). This is either a `Structure`, a `Enumeration` or a `TypeAlias` in the same meta model.", + "properties": { + "kind": { + "const": "reference", + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "kind", + "name" + ], + "type": "object" + }, + "Request": { + "additionalProperties": false, + "description": "Represents a LSP request", + "properties": { + "deprecated": { + "description": "Whether the request is deprecated or not. If deprecated the property contains the deprecation message.", + "type": "string" + }, + "documentation": { + "description": "An optional documentation;", + "type": "string" + }, + "errorData": { + "$ref": "#/definitions/Type", + "description": "An optional error data type." + }, + "messageDirection": { + "$ref": "#/definitions/MessageDirection", + "description": "The direction in which this request is sent in the protocol." + }, + "method": { + "description": "The request's method name.", + "type": "string" + }, + "params": { + "anyOf": [ + { + "$ref": "#/definitions/Type" + }, + { + "items": { + "$ref": "#/definitions/Type" + }, + "type": "array" + } + ], + "description": "The parameter type(s) if any." + }, + "partialResult": { + "$ref": "#/definitions/Type", + "description": "Optional partial result type if the request supports partial result reporting." + }, + "proposed": { + "description": "Whether this is a proposed feature. If omitted the feature is final.", + "type": "boolean" + }, + "registrationMethod": { + "description": "Optional a dynamic registration method if it different from the request's method.", + "type": "string" + }, + "registrationOptions": { + "$ref": "#/definitions/Type", + "description": "Optional registration options if the request supports dynamic registration." + }, + "result": { + "$ref": "#/definitions/Type", + "description": "The result type." + }, + "since": { + "description": "Since when (release number) this request is available. Is undefined if not known.", + "type": "string" + } + }, + "required": [ + "method", + "result", + "messageDirection" + ], + "type": "object" + }, + "StringLiteralType": { + "additionalProperties": false, + "description": "Represents a string literal type (e.g. `kind: 'rename'`).", + "properties": { + "kind": { + "const": "stringLiteral", + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "kind", + "value" + ], + "type": "object" + }, + "Structure": { + "additionalProperties": false, + "description": "Defines the structure of an object literal.", + "properties": { + "deprecated": { + "description": "Whether the structure is deprecated or not. If deprecated the property contains the deprecation message.", + "type": "string" + }, + "documentation": { + "description": "An optional documentation;", + "type": "string" + }, + "extends": { + "description": "Structures extended from. This structures form a polymorphic type hierarchy.", + "items": { + "$ref": "#/definitions/Type" + }, + "type": "array" + }, + "mixins": { + "description": "Structures to mix in. The properties of these structures are `copied` into this structure. Mixins don't form a polymorphic type hierarchy in LSP.", + "items": { + "$ref": "#/definitions/Type" + }, + "type": "array" + }, + "name": { + "description": "The name of the structure.", + "type": "string" + }, + "properties": { + "description": "The properties.", + "items": { + "$ref": "#/definitions/Property" + }, + "type": "array" + }, + "proposed": { + "description": "Whether this is a proposed structure. If omitted, the structure is final.", + "type": "boolean" + }, + "since": { + "description": "Since when (release number) this structure is available. Is undefined if not known.", + "type": "string" + } + }, + "required": [ + "name", + "properties" + ], + "type": "object" + }, + "StructureLiteral": { + "additionalProperties": false, + "description": "Defines an unnamed structure of an object literal.", + "properties": { + "deprecated": { + "description": "Whether the literal is deprecated or not. If deprecated the property contains the deprecation message.", + "type": "string" + }, + "documentation": { + "description": "An optional documentation.", + "type": "string" + }, + "properties": { + "description": "The properties.", + "items": { + "$ref": "#/definitions/Property" + }, + "type": "array" + }, + "proposed": { + "description": "Whether this is a proposed structure. If omitted, the structure is final.", + "type": "boolean" + }, + "since": { + "description": "Since when (release number) this structure is available. Is undefined if not known.", + "type": "string" + } + }, + "required": [ + "properties" + ], + "type": "object" + }, + "StructureLiteralType": { + "additionalProperties": false, + "description": "Represents a literal structure (e.g. `property: { start: uinteger; end: uinteger; }`).", + "properties": { + "kind": { + "const": "literal", + "type": "string" + }, + "value": { + "$ref": "#/definitions/StructureLiteral" + } + }, + "required": [ + "kind", + "value" + ], + "type": "object" + }, + "TupleType": { + "additionalProperties": false, + "description": "Represents a `tuple` type (e.g. `[integer, integer]`).", + "properties": { + "items": { + "items": { + "$ref": "#/definitions/Type" + }, + "type": "array" + }, + "kind": { + "const": "tuple", + "type": "string" + } + }, + "required": [ + "kind", + "items" + ], + "type": "object" + }, + "Type": { + "anyOf": [ + { + "$ref": "#/definitions/BaseType" + }, + { + "$ref": "#/definitions/ReferenceType" + }, + { + "$ref": "#/definitions/ArrayType" + }, + { + "$ref": "#/definitions/MapType" + }, + { + "$ref": "#/definitions/AndType" + }, + { + "$ref": "#/definitions/OrType" + }, + { + "$ref": "#/definitions/TupleType" + }, + { + "$ref": "#/definitions/StructureLiteralType" + }, + { + "$ref": "#/definitions/StringLiteralType" + }, + { + "$ref": "#/definitions/IntegerLiteralType" + }, + { + "$ref": "#/definitions/BooleanLiteralType" + } + ] + }, + "TypeAlias": { + "additionalProperties": false, + "description": "Defines a type alias. (e.g. `type Definition = Location | LocationLink`)", + "properties": { + "deprecated": { + "description": "Whether the type alias is deprecated or not. If deprecated the property contains the deprecation message.", + "type": "string" + }, + "documentation": { + "description": "An optional documentation.", + "type": "string" + }, + "name": { + "description": "The name of the type alias.", + "type": "string" + }, + "proposed": { + "description": "Whether this is a proposed type alias. If omitted, the type alias is final.", + "type": "boolean" + }, + "since": { + "description": "Since when (release number) this structure is available. Is undefined if not known.", + "type": "string" + }, + "type": { + "$ref": "#/definitions/Type", + "description": "The aliased type." + } + }, + "required": [ + "name", + "type" + ], + "type": "object" + }, + "TypeKind": { + "enum": [ + "base", + "reference", + "array", + "map", + "and", + "or", + "tuple", + "literal", + "stringLiteral", + "integerLiteral", + "booleanLiteral" + ], + "type": "string" + } + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/node.cmd" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/node.cmd" index d6820389cf905e2639588cfaf3d1dd49787060d0..791e6e36ca158adb27a1ca664413568656ce2781 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/node.cmd" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/node.cmd" @@ -1,3 +1,5 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fad7474018db5e3ef38b97374d82fb3b5c56a16aee423f482b6732800007f533 -size 213 +@echo off +REM This file is necessary to ensure that under Windows we don't +REM run the node.js file in the Windows Script Host when using +REM node in packakge.json scripts. See also PATHEXT setting +node.exe %* \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/node.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/node.d.ts" index d4501421d4bd489c9190700a07b50dd52678f01e..b4c4fcd723edbd7b4ea066a4059cf8393e46aa88 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/node.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/node.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c98df0145d99011af92c397fa787fc39d42cc04019614ab5581febe71fb32e1 -size 382 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/node/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/node.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/node.js" index 6ca9fea0ab31ba44f19549c8fa3b28a055f235c0..388e3197ebb862634cda424e9d707896b40627da 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/node.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/node.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20ed9d05087fa65ed99369c32ebaad6d2714c56d38b6b58e660ec428d1280054 -size 408 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/node/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/package.json" index 06d6a20a55345b168c3e0e5f541dd6dc282aa713..8087d84bd3c6f08bd088cb3efdc37bac9135930b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/package.json" @@ -1,3 +1,45 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:04686210513d81f0a14e8c0d23eaebdef87696b18b3211fdb9edd6211cba2220 -size 2600 +{ + "name": "vscode-languageserver-protocol", + "description": "VSCode Language Server Protocol implementation", + "version": "3.17.6-next.5", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-languageserver-node.git", + "directory": "protocol" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "main": "./lib/node/main.js", + "browser": { + "./lib/node/main.js": "./lib/browser/main.js" + }, + "typings": "./lib/common/api.d.ts", + "dependencies": { + "vscode-jsonrpc": "9.0.0-next.3", + "vscode-languageserver-types": "3.17.6-next.4" + }, + "scripts": { + "prepublishOnly": "echo \"⛔ Can only publish from a secure pipeline ⛔\" && node ../build/npm/fail", + "prepack": "npm run all:publish", + "postpublish": "node ../build/npm/post-publish.js", + "preversion": "npm test", + "compile": "node ../build/bin/tsc -b ./tsconfig.json", + "watch": "node ../build/bin/tsc -b ./tsconfig.watch.json -w", + "clean": "node ../node_modules/rimraf/dist/esm/bin.mjs lib && node ../node_modules/rimraf/dist/esm/bin.mjs dist", + "lint": "node ../node_modules/eslint/bin/eslint.js --ext ts src", + "test": "npm run test:node && npm run test:browser", + "test:node": "node ../node_modules/mocha/bin/_mocha", + "test:browser": "npm run webpack:test:silent && node ../build/bin/runBrowserTests.js http://127.0.0.1:8080/protocol/src/browser/test/", + "webpack:test": "cd ../types && npm run compile:esm && cd ../protocol && node ../build/bin/webpack --mode none --config ./src/browser/test/webpack.config.js", + "webpack:test:silent": "cd ../types && npm run compile:esm && cd ../protocol && node ../build/bin/webpack --no-stats --mode none --config ./src/browser/test/webpack.config.js", + "compile:metaModelTool": "cd ../tools && npm run compile && cd ../protocol", + "generate:metaModel": "node ../tools/lib/generator-main.js -p ./src/common/tsconfig.json > ./metaModel.json", + "generate:metaModelSchema": "ts-json-schema-generator --tsconfig ../tools/tsconfig.json --path ../tools/src/metaModel.ts > ./metaModel.schema.json", + "all": "npm run clean && npm run compile && npm run lint && npm run test && npm run compile:metaModelTool && npm run generate:metaModel && npm run generate:metaModelSchema", + "compile:publish": "node ../build/bin/tsc -b ./tsconfig.publish.json", + "all:publish": "git clean -xfd . && npm install && npm run compile:publish && npm run lint && npm run test && npm run compile:metaModelTool && npm run generate:metaModel && npm run generate:metaModelSchema" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/thirdpartynotices.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/thirdpartynotices.txt" index 54a2efc3a3447e903f30209d65107ca6f758e3f2..b7a903077dd86a250f408b0f0ae6120c6fd2e9a5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/thirdpartynotices.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-protocol/thirdpartynotices.txt" @@ -1,3 +1,31 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9265d27cf75775aa5ae19c5ba01846fb70ecd5121f8c39c81bef7e03f007072c -size 1823 +THIRD-PARTY SOFTWARE NOTICES AND INFORMATION +For Microsoft vscode-languageclient + +This project incorporates material from the project(s) listed below (collectively, “Third Party Code”). +Microsoft is not the original author of the Third Party Code. The original copyright notice and license +under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed +to you under their original license terms set forth below. Microsoft reserves all other rights not expressly +granted, whether by implication, estoppel or otherwise. + +1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped) + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/License.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/License.txt" index 71c73d0cbbb244fd8977b1334dae3ac9800e0c19..a07e3ae825f86b6d1f966659954bffc0768bef66 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/License.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/License.txt" @@ -1,3 +1,11 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec9ee83580841e8eb687aca9867f221503809ba6426c7f876ede17d91b9fcfd0 -size 1095 +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/README.md" index e9c6eb5f37284df53bf84345b201075944df1825..984e5977725ed1683077cc1bd281a98b1e3d6965 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/README.md" @@ -1,3 +1,17 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c31480dfffc99a3d05854212e305f1c20b0890d872cfa91aab69430124ead604 -size 1098 +# VSCode Language Server Types + +[![NPM Version](https://img.shields.io/npm/v/vscode-languageserver-types.svg)](https://npmjs.org/package/vscode-languageserver-types) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-languageserver-types.svg)](https://npmjs.org/package/vscode-languageserver-types) +[![Build Status](https://dev.azure.com/ms/vscode-languageserver-node/_apis/build/status/microsoft.vscode-languageserver-node?branchName=main)](https://dev.azure.com/ms/vscode-languageserver-node/_build/latest?definitionId=439&branchName=main) + +Npm module containing the types used by the VSCode language client and [Node.js](https://nodejs.org/) language server + +Click [here](https://code.visualstudio.com/docs/extensions/example-language-server) for a detailed document on how +to implement language servers for [VSCode](https://code.visualstudio.com/). + +## History + +For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md) + +## License +[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt) diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/esm/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/esm/main.d.ts" index abeff85eb1518fad9d9571c4721bcb96e5f1fe76..45182bf26d3eb5ebf622ba6451f59986e47e1a57 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/esm/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/esm/main.d.ts" @@ -1,3 +1,3358 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5eb79440b2a125665064595312683eb13ca236987f6bd60408c3681d983d7a7b -size 106599 +/** + * A tagging type for string properties that are actually document URIs. + */ +export type DocumentUri = string; +export declare namespace DocumentUri { + function is(value: any): value is DocumentUri; +} +/** + * A tagging type for string properties that are actually URIs + * + * @since 3.16.0 + */ +export type URI = string; +export declare namespace URI { + function is(value: any): value is URI; +} +/** + * Defines an integer in the range of -2^31 to 2^31 - 1. + */ +export type integer = number; +export declare namespace integer { + const MIN_VALUE = -2147483648; + const MAX_VALUE = 2147483647; + function is(value: any): value is integer; +} +/** + * Defines an unsigned integer in the range of 0 to 2^31 - 1. + */ +export type uinteger = number; +export declare namespace uinteger { + const MIN_VALUE = 0; + const MAX_VALUE = 2147483647; + function is(value: any): value is uinteger; +} +/** + * Defines a decimal number. Since decimal numbers are very + * rare in the language server specification we denote the + * exact range with every decimal using the mathematics + * interval notations (e.g. [0, 1] denotes all decimals d with + * 0 <= d <= 1. + */ +export type decimal = number; +/** + * The LSP any type. + * + * In the current implementation we map LSPAny to any. This is due to the fact + * that the TypeScript compilers can't infer string access signatures for + * interface correctly (it can though for types). See the following issue for + * details: https://github.com/microsoft/TypeScript/issues/15300. + * + * When the issue is addressed LSPAny can be defined as follows: + * + * ```ts + * export type LSPAny = LSPObject | LSPArray | string | integer | uinteger | decimal | boolean | null | undefined; + * export type LSPObject = { [key: string]: LSPAny }; + * export type LSPArray = LSPAny[]; + * ``` + * + * Please note that strictly speaking a property with the value `undefined` + * can't be converted into JSON preserving the property name. However for + * convenience it is allowed and assumed that all these properties are + * optional as well. + * + * @since 3.17.0 + */ +export type LSPAny = any; +export type LSPObject = object; +export type LSPArray = any[]; +/** + * Position in a text document expressed as zero-based line and character + * offset. Prior to 3.17 the offsets were always based on a UTF-16 string + * representation. So a string of the form `a𐐀b` the character offset of the + * character `a` is 0, the character offset of `𐐀` is 1 and the character + * offset of b is 3 since `𐐀` is represented using two code units in UTF-16. + * Since 3.17 clients and servers can agree on a different string encoding + * representation (e.g. UTF-8). The client announces it's supported encoding + * via the client capability [`general.positionEncodings`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#clientCapabilities). + * The value is an array of position encodings the client supports, with + * decreasing preference (e.g. the encoding at index `0` is the most preferred + * one). To stay backwards compatible the only mandatory encoding is UTF-16 + * represented via the string `utf-16`. The server can pick one of the + * encodings offered by the client and signals that encoding back to the + * client via the initialize result's property + * [`capabilities.positionEncoding`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#serverCapabilities). If the string value + * `utf-16` is missing from the client's capability `general.positionEncodings` + * servers can safely assume that the client supports UTF-16. If the server + * omits the position encoding in its initialize result the encoding defaults + * to the string value `utf-16`. Implementation considerations: since the + * conversion from one encoding into another requires the content of the + * file / line the conversion is best done where the file is read which is + * usually on the server side. + * + * Positions are line end character agnostic. So you can not specify a position + * that denotes `\r|\n` or `\n|` where `|` represents the character offset. + * + * @since 3.17.0 - support for negotiated position encoding. + */ +export interface Position { + /** + * Line position in a document (zero-based). + * + * If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document. + * If a line number is negative, it defaults to 0. + */ + line: uinteger; + /** + * Character offset on a line in a document (zero-based). + * + * The meaning of this offset is determined by the negotiated + * `PositionEncodingKind`. + * + * If the character value is greater than the line length it defaults back to the + * line length. + */ + character: uinteger; +} +/** + * The Position namespace provides helper functions to work with + * {@link Position} literals. + */ +export declare namespace Position { + /** + * Creates a new Position literal from the given line and character. + * @param line The position's line. + * @param character The position's character. + */ + function create(line: uinteger, character: uinteger): Position; + /** + * Checks whether the given literal conforms to the {@link Position} interface. + */ + function is(value: any): value is Position; +} +/** + * A range in a text document expressed as (zero-based) start and end positions. + * + * If you want to specify a range that contains a line including the line ending + * character(s) then use an end position denoting the start of the next line. + * For example: + * ```ts + * { + * start: { line: 5, character: 23 } + * end : { line 6, character : 0 } + * } + * ``` + */ +export interface Range { + /** + * The range's start position. + */ + start: Position; + /** + * The range's end position. + */ + end: Position; +} +/** + * The Range namespace provides helper functions to work with + * {@link Range} literals. + */ +export declare namespace Range { + /** + * Create a new Range literal. + * @param start The range's start position. + * @param end The range's end position. + */ + function create(start: Position, end: Position): Range; + /** + * Create a new Range literal. + * @param startLine The start line number. + * @param startCharacter The start character. + * @param endLine The end line number. + * @param endCharacter The end character. + */ + function create(startLine: uinteger, startCharacter: uinteger, endLine: uinteger, endCharacter: uinteger): Range; + /** + * Checks whether the given literal conforms to the {@link Range} interface. + */ + function is(value: any): value is Range; +} +/** + * Represents a location inside a resource, such as a line + * inside a text file. + */ +export interface Location { + uri: DocumentUri; + range: Range; +} +/** + * The Location namespace provides helper functions to work with + * {@link Location} literals. + */ +export declare namespace Location { + /** + * Creates a Location literal. + * @param uri The location's uri. + * @param range The location's range. + */ + function create(uri: DocumentUri, range: Range): Location; + /** + * Checks whether the given literal conforms to the {@link Location} interface. + */ + function is(value: any): value is Location; +} +/** + * Represents the connection of two locations. Provides additional metadata over normal {@link Location locations}, + * including an origin range. + */ +export interface LocationLink { + /** + * Span of the origin of this link. + * + * Used as the underlined span for mouse interaction. Defaults to the word range at + * the definition position. + */ + originSelectionRange?: Range; + /** + * The target resource identifier of this link. + */ + targetUri: DocumentUri; + /** + * The full target range of this link. If the target for example is a symbol then target range is the + * range enclosing this symbol not including leading/trailing whitespace but everything else + * like comments. This information is typically used to highlight the range in the editor. + */ + targetRange: Range; + /** + * The range that should be selected and revealed when this link is being followed, e.g the name of a function. + * Must be contained by the `targetRange`. See also `DocumentSymbol#range` + */ + targetSelectionRange: Range; +} +/** + * The LocationLink namespace provides helper functions to work with + * {@link LocationLink} literals. + */ +export declare namespace LocationLink { + /** + * Creates a LocationLink literal. + * @param targetUri The definition's uri. + * @param targetRange The full range of the definition. + * @param targetSelectionRange The span of the symbol definition at the target. + * @param originSelectionRange The span of the symbol being defined in the originating source file. + */ + function create(targetUri: DocumentUri, targetRange: Range, targetSelectionRange: Range, originSelectionRange?: Range): LocationLink; + /** + * Checks whether the given literal conforms to the {@link LocationLink} interface. + */ + function is(value: any): value is LocationLink; +} +/** + * Represents a color in RGBA space. + */ +export interface Color { + /** + * The red component of this color in the range [0-1]. + */ + readonly red: decimal; + /** + * The green component of this color in the range [0-1]. + */ + readonly green: decimal; + /** + * The blue component of this color in the range [0-1]. + */ + readonly blue: decimal; + /** + * The alpha component of this color in the range [0-1]. + */ + readonly alpha: decimal; +} +/** + * The Color namespace provides helper functions to work with + * {@link Color} literals. + */ +export declare namespace Color { + /** + * Creates a new Color literal. + */ + function create(red: decimal, green: decimal, blue: decimal, alpha: decimal): Color; + /** + * Checks whether the given literal conforms to the {@link Color} interface. + */ + function is(value: any): value is Color; +} +/** + * Represents a color range from a document. + */ +export interface ColorInformation { + /** + * The range in the document where this color appears. + */ + range: Range; + /** + * The actual color value for this color range. + */ + color: Color; +} +/** + * The ColorInformation namespace provides helper functions to work with + * {@link ColorInformation} literals. + */ +export declare namespace ColorInformation { + /** + * Creates a new ColorInformation literal. + */ + function create(range: Range, color: Color): ColorInformation; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value: any): value is ColorInformation; +} +export interface ColorPresentation { + /** + * The label of this color presentation. It will be shown on the color + * picker header. By default this is also the text that is inserted when selecting + * this color presentation. + */ + label: string; + /** + * An {@link TextEdit edit} which is applied to a document when selecting + * this presentation for the color. When `falsy` the {@link ColorPresentation.label label} + * is used. + */ + textEdit?: TextEdit; + /** + * An optional array of additional {@link TextEdit text edits} that are applied when + * selecting this color presentation. Edits must not overlap with the main {@link ColorPresentation.textEdit edit} nor with themselves. + */ + additionalTextEdits?: TextEdit[]; +} +/** + * The Color namespace provides helper functions to work with + * {@link ColorPresentation} literals. + */ +export declare namespace ColorPresentation { + /** + * Creates a new ColorInformation literal. + */ + function create(label: string, textEdit?: TextEdit, additionalTextEdits?: TextEdit[]): ColorPresentation; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value: any): value is ColorPresentation; +} +/** + * A set of predefined range kinds. + */ +export declare namespace FoldingRangeKind { + /** + * Folding range for a comment + */ + const Comment = "comment"; + /** + * Folding range for an import or include + */ + const Imports = "imports"; + /** + * Folding range for a region (e.g. `#region`) + */ + const Region = "region"; +} +/** + * A predefined folding range kind. + * + * The type is a string since the value set is extensible + */ +export type FoldingRangeKind = string; +/** + * Represents a folding range. To be valid, start and end line must be bigger than zero and smaller + * than the number of lines in the document. Clients are free to ignore invalid ranges. + */ +export interface FoldingRange { + /** + * The zero-based start line of the range to fold. The folded area starts after the line's last character. + * To be valid, the end must be zero or larger and smaller than the number of lines in the document. + */ + startLine: uinteger; + /** + * The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line. + */ + startCharacter?: uinteger; + /** + * The zero-based end line of the range to fold. The folded area ends with the line's last character. + * To be valid, the end must be zero or larger and smaller than the number of lines in the document. + */ + endLine: uinteger; + /** + * The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line. + */ + endCharacter?: uinteger; + /** + * Describes the kind of the folding range such as 'comment' or 'region'. The kind + * is used to categorize folding ranges and used by commands like 'Fold all comments'. + * See {@link FoldingRangeKind} for an enumeration of standardized kinds. + */ + kind?: FoldingRangeKind; + /** + * The text that the client should show when the specified range is + * collapsed. If not defined or not supported by the client, a default + * will be chosen by the client. + * + * @since 3.17.0 + */ + collapsedText?: string; +} +/** + * The folding range namespace provides helper functions to work with + * {@link FoldingRange} literals. + */ +export declare namespace FoldingRange { + /** + * Creates a new FoldingRange literal. + */ + function create(startLine: uinteger, endLine: uinteger, startCharacter?: uinteger, endCharacter?: uinteger, kind?: FoldingRangeKind, collapsedText?: string): FoldingRange; + /** + * Checks whether the given literal conforms to the {@link FoldingRange} interface. + */ + function is(value: any): value is FoldingRange; +} +/** + * Represents a related message and source code location for a diagnostic. This should be + * used to point to code locations that cause or related to a diagnostics, e.g when duplicating + * a symbol in a scope. + */ +export interface DiagnosticRelatedInformation { + /** + * The location of this related diagnostic information. + */ + location: Location; + /** + * The message of this related diagnostic information. + */ + message: string; +} +/** + * The DiagnosticRelatedInformation namespace provides helper functions to work with + * {@link DiagnosticRelatedInformation} literals. + */ +export declare namespace DiagnosticRelatedInformation { + /** + * Creates a new DiagnosticRelatedInformation literal. + */ + function create(location: Location, message: string): DiagnosticRelatedInformation; + /** + * Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface. + */ + function is(value: any): value is DiagnosticRelatedInformation; +} +/** + * The diagnostic's severity. + */ +export declare namespace DiagnosticSeverity { + /** + * Reports an error. + */ + const Error: 1; + /** + * Reports a warning. + */ + const Warning: 2; + /** + * Reports an information. + */ + const Information: 3; + /** + * Reports a hint. + */ + const Hint: 4; +} +export type DiagnosticSeverity = 1 | 2 | 3 | 4; +/** + * The diagnostic tags. + * + * @since 3.15.0 + */ +export declare namespace DiagnosticTag { + /** + * Unused or unnecessary code. + * + * Clients are allowed to render diagnostics with this tag faded out instead of having + * an error squiggle. + */ + const Unnecessary: 1; + /** + * Deprecated or obsolete code. + * + * Clients are allowed to rendered diagnostics with this tag strike through. + */ + const Deprecated: 2; +} +export type DiagnosticTag = 1 | 2; +/** + * Structure to capture a description for an error code. + * + * @since 3.16.0 + */ +export interface CodeDescription { + /** + * An URI to open with more information about the diagnostic error. + */ + href: URI; +} +/** + * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes. + * + * @since 3.16.0 + */ +export declare namespace CodeDescription { + function is(value: any): value is CodeDescription; +} +/** + * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects + * are only valid in the scope of a resource. + */ +export interface Diagnostic { + /** + * The range at which the message applies + */ + range: Range; + /** + * The diagnostic's severity. Can be omitted. If omitted it is up to the + * client to interpret diagnostics as error, warning, info or hint. + */ + severity?: DiagnosticSeverity; + /** + * The diagnostic's code, which usually appear in the user interface. + */ + code?: integer | string; + /** + * An optional property to describe the error code. + * Requires the code field (above) to be present/not null. + * + * @since 3.16.0 + */ + codeDescription?: CodeDescription; + /** + * A human-readable string describing the source of this + * diagnostic, e.g. 'typescript' or 'super lint'. It usually + * appears in the user interface. + */ + source?: string; + /** + * The diagnostic's message. It usually appears in the user interface + */ + message: string; + /** + * Additional metadata about the diagnostic. + * + * @since 3.15.0 + */ + tags?: DiagnosticTag[]; + /** + * An array of related diagnostic information, e.g. when symbol-names within + * a scope collide all definitions can be marked via this property. + */ + relatedInformation?: DiagnosticRelatedInformation[]; + /** + * A data entry field that is preserved between a `textDocument/publishDiagnostics` + * notification and `textDocument/codeAction` request. + * + * @since 3.16.0 + */ + data?: LSPAny; +} +/** + * The Diagnostic namespace provides helper functions to work with + * {@link Diagnostic} literals. + */ +export declare namespace Diagnostic { + /** + * Creates a new Diagnostic literal. + */ + function create(range: Range, message: string, severity?: DiagnosticSeverity, code?: integer | string, source?: string, relatedInformation?: DiagnosticRelatedInformation[]): Diagnostic; + /** + * Checks whether the given literal conforms to the {@link Diagnostic} interface. + */ + function is(value: any): value is Diagnostic; +} +/** + * Represents a reference to a command. Provides a title which + * will be used to represent a command in the UI and, optionally, + * an array of arguments which will be passed to the command handler + * function when invoked. + */ +export interface Command { + /** + * Title of the command, like `save`. + */ + title: string; + /** + * An optional tooltip. + * + * @since 3.18.0 + * @proposed + */ + tooltip?: string; + /** + * The identifier of the actual command handler. + */ + command: string; + /** + * Arguments that the command handler should be + * invoked with. + */ + arguments?: LSPAny[]; +} +/** + * The Command namespace provides helper functions to work with + * {@link Command} literals. + */ +export declare namespace Command { + /** + * Creates a new Command literal. + */ + function create(title: string, command: string, ...args: any[]): Command; + /** + * Checks whether the given literal conforms to the {@link Command} interface. + */ + function is(value: any): value is Command; +} +/** + * A text edit applicable to a text document. + */ +export interface TextEdit { + /** + * The range of the text document to be manipulated. To insert + * text into a document create a range where start === end. + */ + range: Range; + /** + * The string to be inserted. For delete operations use an + * empty string. + */ + newText: string; +} +/** + * The TextEdit namespace provides helper function to create replace, + * insert and delete edits more easily. + */ +export declare namespace TextEdit { + /** + * Creates a replace text edit. + * @param range The range of text to be replaced. + * @param newText The new text. + */ + function replace(range: Range, newText: string): TextEdit; + /** + * Creates an insert text edit. + * @param position The position to insert the text at. + * @param newText The text to be inserted. + */ + function insert(position: Position, newText: string): TextEdit; + /** + * Creates a delete text edit. + * @param range The range of text to be deleted. + */ + function del(range: Range): TextEdit; + function is(value: any): value is TextEdit; +} +/** + * Additional information that describes document changes. + * + * @since 3.16.0 + */ +export interface ChangeAnnotation { + /** + * A human-readable string describing the actual change. The string + * is rendered prominent in the user interface. + */ + label: string; + /** + * A flag which indicates that user confirmation is needed + * before applying the change. + */ + needsConfirmation?: boolean; + /** + * A human-readable string which is rendered less prominent in + * the user interface. + */ + description?: string; +} +export declare namespace ChangeAnnotation { + function create(label: string, needsConfirmation?: boolean, description?: string): ChangeAnnotation; + function is(value: any): value is ChangeAnnotation; +} +export declare namespace ChangeAnnotationIdentifier { + function is(value: any): value is ChangeAnnotationIdentifier; +} +/** + * An identifier to refer to a change annotation stored with a workspace edit. + */ +export type ChangeAnnotationIdentifier = string; +/** + * A special text edit with an additional change annotation. + * + * @since 3.16.0. + */ +export interface AnnotatedTextEdit extends TextEdit { + /** + * The actual identifier of the change annotation + */ + annotationId: ChangeAnnotationIdentifier; +} +export declare namespace AnnotatedTextEdit { + /** + * Creates an annotated replace text edit. + * + * @param range The range of text to be replaced. + * @param newText The new text. + * @param annotation The annotation. + */ + function replace(range: Range, newText: string, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + /** + * Creates an annotated insert text edit. + * + * @param position The position to insert the text at. + * @param newText The text to be inserted. + * @param annotation The annotation. + */ + function insert(position: Position, newText: string, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + /** + * Creates an annotated delete text edit. + * + * @param range The range of text to be deleted. + * @param annotation The annotation. + */ + function del(range: Range, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + function is(value: any): value is AnnotatedTextEdit; +} +/** + * Describes textual changes on a text document. A TextDocumentEdit describes all changes + * on a document version Si and after they are applied move the document to version Si+1. + * So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any + * kind of ordering. However the edits must be non overlapping. + */ +export interface TextDocumentEdit { + /** + * The text document to change. + */ + textDocument: OptionalVersionedTextDocumentIdentifier; + /** + * The edits to be applied. + * + * @since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a + * client capability. + * + * @since 3.18.0 - support for SnippetTextEdit. This is guarded using a + * client capability. + */ + edits: (TextEdit | AnnotatedTextEdit | SnippetTextEdit)[]; +} +/** + * The TextDocumentEdit namespace provides helper function to create + * an edit that manipulates a text document. + */ +export declare namespace TextDocumentEdit { + /** + * Creates a new `TextDocumentEdit` + */ + function create(textDocument: OptionalVersionedTextDocumentIdentifier, edits: (TextEdit | AnnotatedTextEdit | SnippetTextEdit)[]): TextDocumentEdit; + function is(value: any): value is TextDocumentEdit; +} +/** + * A generic resource operation. + */ +interface ResourceOperation { + /** + * The resource operation kind. + */ + kind: string; + /** + * An optional annotation identifier describing the operation. + * + * @since 3.16.0 + */ + annotationId?: ChangeAnnotationIdentifier; +} +/** + * Options to create a file. + */ +export interface CreateFileOptions { + /** + * Overwrite existing file. Overwrite wins over `ignoreIfExists` + */ + overwrite?: boolean; + /** + * Ignore if exists. + */ + ignoreIfExists?: boolean; +} +/** + * Create file operation. + */ +export interface CreateFile extends ResourceOperation { + /** + * A create + */ + kind: 'create'; + /** + * The resource to create. + */ + uri: DocumentUri; + /** + * Additional options + */ + options?: CreateFileOptions; +} +export declare namespace CreateFile { + function create(uri: DocumentUri, options?: CreateFileOptions, annotation?: ChangeAnnotationIdentifier): CreateFile; + function is(value: any): value is CreateFile; +} +/** + * Rename file options + */ +export interface RenameFileOptions { + /** + * Overwrite target if existing. Overwrite wins over `ignoreIfExists` + */ + overwrite?: boolean; + /** + * Ignores if target exists. + */ + ignoreIfExists?: boolean; +} +/** + * Rename file operation + */ +export interface RenameFile extends ResourceOperation { + /** + * A rename + */ + kind: 'rename'; + /** + * The old (existing) location. + */ + oldUri: DocumentUri; + /** + * The new location. + */ + newUri: DocumentUri; + /** + * Rename options. + */ + options?: RenameFileOptions; +} +export declare namespace RenameFile { + function create(oldUri: DocumentUri, newUri: DocumentUri, options?: RenameFileOptions, annotation?: ChangeAnnotationIdentifier): RenameFile; + function is(value: any): value is RenameFile; +} +/** + * Delete file options + */ +export interface DeleteFileOptions { + /** + * Delete the content recursively if a folder is denoted. + */ + recursive?: boolean; + /** + * Ignore the operation if the file doesn't exist. + */ + ignoreIfNotExists?: boolean; +} +/** + * Delete file operation + */ +export interface DeleteFile extends ResourceOperation { + /** + * A delete + */ + kind: 'delete'; + /** + * The file to delete. + */ + uri: DocumentUri; + /** + * Delete options. + */ + options?: DeleteFileOptions; +} +export declare namespace DeleteFile { + function create(uri: DocumentUri, options?: DeleteFileOptions, annotation?: ChangeAnnotationIdentifier): DeleteFile; + function is(value: any): value is DeleteFile; +} +/** + * A workspace edit represents changes to many resources managed in the workspace. The edit + * should either provide `changes` or `documentChanges`. If documentChanges are present + * they are preferred over `changes` if the client can handle versioned document edits. + * + * Since version 3.13.0 a workspace edit can contain resource operations as well. If resource + * operations are present clients need to execute the operations in the order in which they + * are provided. So a workspace edit for example can consist of the following two changes: + * (1) a create file a.txt and (2) a text document edit which insert text into file a.txt. + * + * An invalid sequence (e.g. (1) delete file a.txt and (2) insert text into file a.txt) will + * cause failure of the operation. How the client recovers from the failure is described by + * the client capability: `workspace.workspaceEdit.failureHandling` + */ +export interface WorkspaceEdit { + /** + * Holds changes to existing resources. + */ + changes?: { + [uri: DocumentUri]: TextEdit[]; + }; + /** + * Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes + * are either an array of `TextDocumentEdit`s to express changes to n different text documents + * where each text document edit addresses a specific version of a text document. Or it can contain + * above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations. + * + * Whether a client supports versioned document edits is expressed via + * `workspace.workspaceEdit.documentChanges` client capability. + * + * If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then + * only plain `TextEdit`s using the `changes` property are supported. + */ + documentChanges?: (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[]; + /** + * A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and + * delete file / folder operations. + * + * Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`. + * + * @since 3.16.0 + */ + changeAnnotations?: { + [id: ChangeAnnotationIdentifier]: ChangeAnnotation; + }; +} +export declare namespace WorkspaceEdit { + function is(value: any): value is WorkspaceEdit; +} +/** + * Additional data about a workspace edit. + * + * @since 3.18.0 + * @proposed + */ +export interface WorkspaceEditMetadata { + /** + * Signal to the editor that this edit is a refactoring. + */ + isRefactoring?: boolean; +} +/** + * A change to capture text edits for existing resources. + */ +export interface TextEditChange { + /** + * Gets all text edits for this change. + * + * @return An array of text edits. + * + * @since 3.16.0 - support for annotated text edits. This is usually + * guarded using a client capability. + * + * @since 3.18.0 - support for snippet text edits. This is usually + * guarded using a client capability. + */ + all(): (TextEdit | AnnotatedTextEdit | SnippetTextEdit)[]; + /** + * Clears the edits for this change. + */ + clear(): void; + /** + * Adds a text edit. + * + * @param edit the text edit to add. + * + * @since 3.16.0 - support for annotated text edits. This is usually + * guarded using a client capability. + * + * @since 3.18.0 - support for snippet text edits. This is usually + * guarded using a client capability. + */ + add(edit: TextEdit | AnnotatedTextEdit | SnippetTextEdit): void; + /** + * Insert the given text at the given position. + * + * @param position A position. + * @param newText A string. + * @param annotation An optional annotation. + */ + insert(position: Position, newText: string): void; + insert(position: Position, newText: string, annotation: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; + /** + * Replace the given range with given text for the given resource. + * + * @param range A range. + * @param newText A string. + * @param annotation An optional annotation. + */ + replace(range: Range, newText: string): void; + replace(range: Range, newText: string, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; + /** + * Delete the text at the given range. + * + * @param range A range. + * @param annotation An optional annotation. + */ + delete(range: Range): void; + delete(range: Range, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; +} +/** + * An interactive text edit. + * + * @since 3.18.0 + * @proposed + */ +export interface SnippetTextEdit { + /** + * The range of the text document to be manipulated. + */ + range: Range; + /** + * The snippet to be inserted. + */ + snippet: StringValue; + /** + * The actual identifier of the snippet edit. + */ + annotationId?: ChangeAnnotationIdentifier; +} +export declare namespace SnippetTextEdit { + function is(value: any): value is SnippetTextEdit; +} +/** + * A workspace change helps constructing changes to a workspace. + */ +export declare class WorkspaceChange { + private _workspaceEdit; + private _textEditChanges; + private _changeAnnotations; + constructor(workspaceEdit?: WorkspaceEdit); + /** + * Returns the underlying {@link WorkspaceEdit} literal + * use to be returned from a workspace edit operation like rename. + */ + get edit(): WorkspaceEdit; + /** + * Returns the {@link TextEditChange} to manage text edits + * for resources. + */ + getTextEditChange(textDocument: OptionalVersionedTextDocumentIdentifier): TextEditChange; + getTextEditChange(uri: DocumentUri): TextEditChange; + private initDocumentChanges; + private initChanges; + createFile(uri: DocumentUri, options?: CreateFileOptions): void; + createFile(uri: DocumentUri, annotation: ChangeAnnotation | ChangeAnnotationIdentifier, options?: CreateFileOptions): ChangeAnnotationIdentifier; + renameFile(oldUri: DocumentUri, newUri: DocumentUri, options?: RenameFileOptions): void; + renameFile(oldUri: DocumentUri, newUri: DocumentUri, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier, options?: RenameFileOptions): ChangeAnnotationIdentifier; + deleteFile(uri: DocumentUri, options?: DeleteFileOptions): void; + deleteFile(uri: DocumentUri, annotation: ChangeAnnotation | ChangeAnnotationIdentifier, options?: DeleteFileOptions): ChangeAnnotationIdentifier; +} +/** + * A literal to identify a text document in the client. + */ +export interface TextDocumentIdentifier { + /** + * The text document's uri. + */ + uri: DocumentUri; +} +/** + * The TextDocumentIdentifier namespace provides helper functions to work with + * {@link TextDocumentIdentifier} literals. + */ +export declare namespace TextDocumentIdentifier { + /** + * Creates a new TextDocumentIdentifier literal. + * @param uri The document's uri. + */ + function create(uri: DocumentUri): TextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface. + */ + function is(value: any): value is TextDocumentIdentifier; +} +/** + * A text document identifier to denote a specific version of a text document. + */ +export interface VersionedTextDocumentIdentifier extends TextDocumentIdentifier { + /** + * The version number of this document. + */ + version: integer; +} +/** + * The VersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link VersionedTextDocumentIdentifier} literals. + */ +export declare namespace VersionedTextDocumentIdentifier { + /** + * Creates a new VersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri: DocumentUri, version: integer): VersionedTextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface. + */ + function is(value: any): value is VersionedTextDocumentIdentifier; +} +/** + * A text document identifier to optionally denote a specific version of a text document. + */ +export interface OptionalVersionedTextDocumentIdentifier extends TextDocumentIdentifier { + /** + * The version number of this document. If a versioned text document identifier + * is sent from the server to the client and the file is not open in the editor + * (the server has not received an open notification before) the server can send + * `null` to indicate that the version is unknown and the content on disk is the + * truth (as specified with document content ownership). + */ + version: integer | null; +} +/** + * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link OptionalVersionedTextDocumentIdentifier} literals. + */ +export declare namespace OptionalVersionedTextDocumentIdentifier { + /** + * Creates a new OptionalVersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri: DocumentUri, version: integer | null): OptionalVersionedTextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface. + */ + function is(value: any): value is OptionalVersionedTextDocumentIdentifier; +} +/** + * An item to transfer a text document from the client to the + * server. + */ +export interface TextDocumentItem { + /** + * The text document's uri. + */ + uri: DocumentUri; + /** + * The text document's language identifier. + */ + languageId: LanguageKind; + /** + * The version number of this document (it will increase after each + * change, including undo/redo). + */ + version: integer; + /** + * The content of the opened text document. + */ + text: string; +} +/** + * Predefined Language kinds + * @since 3.18.0 + * @proposed + */ +export declare namespace LanguageKind { + const ABAP: "abap"; + const WindowsBat: "bat"; + const BibTeX: "bibtex"; + const Clojure: "clojure"; + const Coffeescript: "coffeescript"; + const C: "c"; + const CPP: "cpp"; + const CSharp: "csharp"; + const CSS: "css"; + /** + * @since 3.18.0 + * @proposed + */ + const D: "d"; + /** + * @since 3.18.0 + * @proposed + */ + const Delphi: "pascal"; + const Diff: "diff"; + const Dart: "dart"; + const Dockerfile: "dockerfile"; + const Elixir: "elixir"; + const Erlang: "erlang"; + const FSharp: "fsharp"; + const GitCommit: "git-commit"; + const GitRebase: "rebase"; + const Go: "go"; + const Groovy: "groovy"; + const Handlebars: "handlebars"; + const Haskell: "haskell"; + const HTML: "html"; + const Ini: "ini"; + const Java: "java"; + const JavaScript: "javascript"; + const JavaScriptReact: "javascriptreact"; + const JSON: "json"; + const LaTeX: "latex"; + const Less: "less"; + const Lua: "lua"; + const Makefile: "makefile"; + const Markdown: "markdown"; + const ObjectiveC: "objective-c"; + const ObjectiveCPP: "objective-cpp"; + /** + * @since 3.18.0 + * @proposed + */ + const Pascal: "pascal"; + const Perl: "perl"; + const Perl6: "perl6"; + const PHP: "php"; + const Powershell: "powershell"; + const Pug: "jade"; + const Python: "python"; + const R: "r"; + const Razor: "razor"; + const Ruby: "ruby"; + const Rust: "rust"; + const SCSS: "scss"; + const SASS: "sass"; + const Scala: "scala"; + const ShaderLab: "shaderlab"; + const ShellScript: "shellscript"; + const SQL: "sql"; + const Swift: "swift"; + const TypeScript: "typescript"; + const TypeScriptReact: "typescriptreact"; + const TeX: "tex"; + const VisualBasic: "vb"; + const XML: "xml"; + const XSL: "xsl"; + const YAML: "yaml"; +} +export type LanguageKind = string; +/** + * The TextDocumentItem namespace provides helper functions to work with + * {@link TextDocumentItem} literals. + */ +export declare namespace TextDocumentItem { + /** + * Creates a new TextDocumentItem literal. + * @param uri The document's uri. + * @param languageId The document's language identifier. + * @param version The document's version number. + * @param text The document's text. + */ + function create(uri: DocumentUri, languageId: LanguageKind, version: integer, text: string): TextDocumentItem; + /** + * Checks whether the given literal conforms to the {@link TextDocumentItem} interface. + */ + function is(value: any): value is TextDocumentItem; +} +/** + * Describes the content type that a client supports in various + * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. + * + * Please note that `MarkupKinds` must not start with a `$`. This kinds + * are reserved for internal usage. + */ +export declare namespace MarkupKind { + /** + * Plain text is supported as a content format + */ + const PlainText: 'plaintext'; + /** + * Markdown is supported as a content format + */ + const Markdown: 'markdown'; + /** + * Checks whether the given value is a value of the {@link MarkupKind} type. + */ + function is(value: any): value is MarkupKind; +} +export type MarkupKind = 'plaintext' | 'markdown'; +/** + * A `MarkupContent` literal represents a string value which content is interpreted base on its + * kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds. + * + * If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues. + * See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting + * + * Here is an example how such a string can be constructed using JavaScript / TypeScript: + * ```ts + * let markdown: MarkdownContent = { + * kind: MarkupKind.Markdown, + * value: [ + * '# Header', + * 'Some text', + * '```typescript', + * 'someCode();', + * '```' + * ].join('\n') + * }; + * ``` + * + * *Please Note* that clients might sanitize the return markdown. A client could decide to + * remove HTML from the markdown to avoid script execution. + */ +export interface MarkupContent { + /** + * The type of the Markup + */ + kind: MarkupKind; + /** + * The content itself + */ + value: string; +} +export declare namespace MarkupContent { + /** + * Checks whether the given value conforms to the {@link MarkupContent} interface. + */ + function is(value: any): value is MarkupContent; +} +/** + * The kind of a completion entry. + */ +export declare namespace CompletionItemKind { + const Text: 1; + const Method: 2; + const Function: 3; + const Constructor: 4; + const Field: 5; + const Variable: 6; + const Class: 7; + const Interface: 8; + const Module: 9; + const Property: 10; + const Unit: 11; + const Value: 12; + const Enum: 13; + const Keyword: 14; + const Snippet: 15; + const Color: 16; + const File: 17; + const Reference: 18; + const Folder: 19; + const EnumMember: 20; + const Constant: 21; + const Struct: 22; + const Event: 23; + const Operator: 24; + const TypeParameter: 25; +} +export type CompletionItemKind = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25; +/** + * Defines whether the insert text in a completion item should be interpreted as + * plain text or a snippet. + */ +export declare namespace InsertTextFormat { + /** + * The primary text to be inserted is treated as a plain string. + */ + const PlainText: 1; + /** + * The primary text to be inserted is treated as a snippet. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Placeholders with equal identifiers are linked, + * that is typing in one will update others too. + * + * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax + */ + const Snippet: 2; +} +export type InsertTextFormat = 1 | 2; +/** + * Completion item tags are extra annotations that tweak the rendering of a completion + * item. + * + * @since 3.15.0 + */ +export declare namespace CompletionItemTag { + /** + * Render a completion as obsolete, usually using a strike-out. + */ + const Deprecated = 1; +} +export type CompletionItemTag = 1; +/** + * A special text edit to provide an insert and a replace operation. + * + * @since 3.16.0 + */ +export interface InsertReplaceEdit { + /** + * The string to be inserted. + */ + newText: string; + /** + * The range if the insert is requested + */ + insert: Range; + /** + * The range if the replace is requested. + */ + replace: Range; +} +/** + * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits. + * + * @since 3.16.0 + */ +export declare namespace InsertReplaceEdit { + /** + * Creates a new insert / replace edit + */ + function create(newText: string, insert: Range, replace: Range): InsertReplaceEdit; + /** + * Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface. + */ + function is(value: TextEdit | InsertReplaceEdit): value is InsertReplaceEdit; +} +/** + * How whitespace and indentation is handled during completion + * item insertion. + * + * @since 3.16.0 + */ +export declare namespace InsertTextMode { + /** + * The insertion or replace strings is taken as it is. If the + * value is multi line the lines below the cursor will be + * inserted using the indentation defined in the string value. + * The client will not apply any kind of adjustments to the + * string. + */ + const asIs: 1; + /** + * The editor adjusts leading whitespace of new lines so that + * they match the indentation up to the cursor of the line for + * which the item is accepted. + * + * Consider a line like this: <2tabs><3tabs>foo. Accepting a + * multi line completion item is indented using 2 tabs and all + * following lines inserted will be indented using 2 tabs as well. + */ + const adjustIndentation: 2; +} +export type InsertTextMode = 1 | 2; +/** + * Additional details for a completion item label. + * + * @since 3.17.0 + */ +export interface CompletionItemLabelDetails { + /** + * An optional string which is rendered less prominently directly after {@link CompletionItem.label label}, + * without any spacing. Should be used for function signatures and type annotations. + */ + detail?: string; + /** + * An optional string which is rendered less prominently after {@link CompletionItem.detail}. Should be used + * for fully qualified names and file paths. + */ + description?: string; +} +export declare namespace CompletionItemLabelDetails { + function is(value: any): value is CompletionItemLabelDetails; +} +/** + * A completion item represents a text snippet that is + * proposed to complete text that is being typed. + */ +export interface CompletionItem { + /** + * The label of this completion item. + * + * The label property is also by default the text that + * is inserted when selecting this completion. + * + * If label details are provided the label itself should + * be an unqualified name of the completion item. + */ + label: string; + /** + * Additional details for the label + * + * @since 3.17.0 + */ + labelDetails?: CompletionItemLabelDetails; + /** + * The kind of this completion item. Based of the kind + * an icon is chosen by the editor. + */ + kind?: CompletionItemKind; + /** + * Tags for this completion item. + * + * @since 3.15.0 + */ + tags?: CompletionItemTag[]; + /** + * A human-readable string with additional information + * about this item, like type or symbol information. + */ + detail?: string; + /** + * A human-readable string that represents a doc-comment. + */ + documentation?: string | MarkupContent; + /** + * Indicates if this item is deprecated. + * @deprecated Use `tags` instead. + */ + deprecated?: boolean; + /** + * Select this item when showing. + * + * *Note* that only one completion item can be selected and that the + * tool / client decides which item that is. The rule is that the *first* + * item of those that match best is selected. + */ + preselect?: boolean; + /** + * A string that should be used when comparing this item + * with other items. When `falsy` the {@link CompletionItem.label label} + * is used. + */ + sortText?: string; + /** + * A string that should be used when filtering a set of + * completion items. When `falsy` the {@link CompletionItem.label label} + * is used. + */ + filterText?: string; + /** + * A string that should be inserted into a document when selecting + * this completion. When `falsy` the {@link CompletionItem.label label} + * is used. + * + * The `insertText` is subject to interpretation by the client side. + * Some tools might not take the string literally. For example + * VS Code when code complete is requested in this example + * `con` and a completion item with an `insertText` of + * `console` is provided it will only insert `sole`. Therefore it is + * recommended to use `textEdit` instead since it avoids additional client + * side interpretation. + */ + insertText?: string; + /** + * The format of the insert text. The format applies to both the + * `insertText` property and the `newText` property of a provided + * `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`. + * + * Please note that the insertTextFormat doesn't apply to + * `additionalTextEdits`. + */ + insertTextFormat?: InsertTextFormat; + /** + * How whitespace and indentation is handled during completion + * item insertion. If not provided the clients default value depends on + * the `textDocument.completion.insertTextMode` client capability. + * + * @since 3.16.0 + */ + insertTextMode?: InsertTextMode; + /** + * An {@link TextEdit edit} which is applied to a document when selecting + * this completion. When an edit is provided the value of + * {@link CompletionItem.insertText insertText} is ignored. + * + * Most editors support two different operations when accepting a completion + * item. One is to insert a completion text and the other is to replace an + * existing text with a completion text. Since this can usually not be + * predetermined by a server it can report both ranges. Clients need to + * signal support for `InsertReplaceEdits` via the + * `textDocument.completion.insertReplaceSupport` client capability + * property. + * + * *Note 1:* The text edit's range as well as both ranges from an insert + * replace edit must be a [single line] and they must contain the position + * at which completion has been requested. + * *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range + * must be a prefix of the edit's replace range, that means it must be + * contained and starting at the same position. + * + * @since 3.16.0 additional type `InsertReplaceEdit` + */ + textEdit?: TextEdit | InsertReplaceEdit; + /** + * The edit text used if the completion item is part of a CompletionList and + * CompletionList defines an item default for the text edit range. + * + * Clients will only honor this property if they opt into completion list + * item defaults using the capability `completionList.itemDefaults`. + * + * If not provided and a list's default range is provided the label + * property is used as a text. + * + * @since 3.17.0 + */ + textEditText?: string; + /** + * An optional array of additional {@link TextEdit text edits} that are applied when + * selecting this completion. Edits must not overlap (including the same insert position) + * with the main {@link CompletionItem.textEdit edit} nor with themselves. + * + * Additional text edits should be used to change text unrelated to the current cursor position + * (for example adding an import statement at the top of the file if the completion item will + * insert an unqualified type). + */ + additionalTextEdits?: TextEdit[]; + /** + * An optional set of characters that when pressed while this completion is active will accept it first and + * then type that character. *Note* that all commit characters should have `length=1` and that superfluous + * characters will be ignored. + */ + commitCharacters?: string[]; + /** + * An optional {@link Command command} that is executed *after* inserting this completion. *Note* that + * additional modifications to the current document should be described with the + * {@link CompletionItem.additionalTextEdits additionalTextEdits}-property. + */ + command?: Command; + /** + * A data entry field that is preserved on a completion item between a + * {@link CompletionRequest} and a {@link CompletionResolveRequest}. + */ + data?: LSPAny; +} +/** + * The CompletionItem namespace provides functions to deal with + * completion items. + */ +export declare namespace CompletionItem { + /** + * Create a completion item and seed it with a label. + * @param label The completion item's label + */ + function create(label: string): CompletionItem; +} +/** + * Edit range variant that includes ranges for insert and replace operations. + * + * @since 3.18.0 + */ +export interface EditRangeWithInsertReplace { + insert: Range; + replace: Range; +} +/** + * In many cases the items of an actual completion result share the same + * value for properties like `commitCharacters` or the range of a text + * edit. A completion list can therefore define item defaults which will + * be used if a completion item itself doesn't specify the value. + * + * If a completion list specifies a default value and a completion item + * also specifies a corresponding value the one from the item is used. + * + * Servers are only allowed to return default values if the client + * signals support for this via the `completionList.itemDefaults` + * capability. + * + * @since 3.17.0 + */ +export interface CompletionItemDefaults { + /** + * A default commit character set. + * + * @since 3.17.0 + */ + commitCharacters?: string[]; + /** + * A default edit range. + * + * @since 3.17.0 + */ + editRange?: Range | EditRangeWithInsertReplace; + /** + * A default insert text format. + * + * @since 3.17.0 + */ + insertTextFormat?: InsertTextFormat; + /** + * A default insert text mode. + * + * @since 3.17.0 + */ + insertTextMode?: InsertTextMode; + /** + * A default data value. + * + * @since 3.17.0 + */ + data?: LSPAny; +} +/** + * Represents a collection of {@link CompletionItem completion items} to be presented + * in the editor. + */ +export interface CompletionList { + /** + * This list it not complete. Further typing results in recomputing this list. + * + * Recomputed lists have all their items replaced (not appended) in the + * incomplete completion sessions. + */ + isIncomplete: boolean; + /** + * In many cases the items of an actual completion result share the same + * value for properties like `commitCharacters` or the range of a text + * edit. A completion list can therefore define item defaults which will + * be used if a completion item itself doesn't specify the value. + * + * If a completion list specifies a default value and a completion item + * also specifies a corresponding value the one from the item is used. + * + * Servers are only allowed to return default values if the client + * signals support for this via the `completionList.itemDefaults` + * capability. + * + * @since 3.17.0 + */ + itemDefaults?: CompletionItemDefaults; + /** + * The completion items. + */ + items: CompletionItem[]; +} +/** + * The CompletionList namespace provides functions to deal with + * completion lists. + */ +export declare namespace CompletionList { + /** + * Creates a new completion list. + * + * @param items The completion items. + * @param isIncomplete The list is not complete. + */ + function create(items?: CompletionItem[], isIncomplete?: boolean): CompletionList; +} +/** + * @since 3.18.0 + * @deprecated use MarkupContent instead. + */ +export interface MarkedStringWithLanguage { + language: string; + value: string; +} +/** + * MarkedString can be used to render human readable text. It is either a markdown string + * or a code-block that provides a language and a code snippet. The language identifier + * is semantically equal to the optional language identifier in fenced code blocks in GitHub + * issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting + * + * The pair of a language and a value is an equivalent to markdown: + * ```${language} + * ${value} + * ``` + * + * Note that markdown strings will be sanitized - that means html will be escaped. + * @deprecated use MarkupContent instead. + */ +export type MarkedString = string | MarkedStringWithLanguage; +export declare namespace MarkedString { + /** + * Creates a marked string from plain text. + * + * @param plainText The plain text. + */ + function fromPlainText(plainText: string): string; + /** + * Checks whether the given value conforms to the {@link MarkedString} type. + */ + function is(value: any): value is MarkedString; +} +/** + * The result of a hover request. + */ +export interface Hover { + /** + * The hover's content + */ + contents: MarkupContent | MarkedString | MarkedString[]; + /** + * An optional range inside the text document that is used to + * visualize the hover, e.g. by changing the background color. + */ + range?: Range; +} +export declare namespace Hover { + /** + * Checks whether the given value conforms to the {@link Hover} interface. + */ + function is(value: any): value is Hover; +} +/** + * Represents a parameter of a callable-signature. A parameter can + * have a label and a doc-comment. + */ +export interface ParameterInformation { + /** + * The label of this parameter information. + * + * Either a string or an inclusive start and exclusive end offsets within its containing + * signature label. (see SignatureInformation.label). The offsets are based on a UTF-16 + * string representation as `Position` and `Range` does. + * + * To avoid ambiguities a server should use the [start, end] offset value instead of using + * a substring. Whether a client support this is controlled via `labelOffsetSupport` client + * capability. + * + * *Note*: a label of type string should be a substring of its containing signature label. + * Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`. + */ + label: string | [uinteger, uinteger]; + /** + * The human-readable doc-comment of this parameter. Will be shown + * in the UI but can be omitted. + */ + documentation?: string | MarkupContent; +} +/** + * The ParameterInformation namespace provides helper functions to work with + * {@link ParameterInformation} literals. + */ +export declare namespace ParameterInformation { + /** + * Creates a new parameter information literal. + * + * @param label A label string. + * @param documentation A doc string. + */ + function create(label: string | [uinteger, uinteger], documentation?: string): ParameterInformation; +} +/** + * Represents the signature of something callable. A signature + * can have a label, like a function-name, a doc-comment, and + * a set of parameters. + */ +export interface SignatureInformation { + /** + * The label of this signature. Will be shown in + * the UI. + */ + label: string; + /** + * The human-readable doc-comment of this signature. Will be shown + * in the UI but can be omitted. + */ + documentation?: string | MarkupContent; + /** + * The parameters of this signature. + */ + parameters?: ParameterInformation[]; + /** + * The index of the active parameter. + * + * If `null`, no parameter of the signature is active (for example a named + * argument that does not match any declared parameters). This is only valid + * if the client specifies the client capability + * `textDocument.signatureHelp.noActiveParameterSupport === true` + * + * If provided (or `null`), this is used in place of + * `SignatureHelp.activeParameter`. + * + * @since 3.16.0 + */ + activeParameter?: uinteger | null; +} +/** + * The SignatureInformation namespace provides helper functions to work with + * {@link SignatureInformation} literals. + */ +export declare namespace SignatureInformation { + function create(label: string, documentation?: string, ...parameters: ParameterInformation[]): SignatureInformation; +} +/** + * Signature help represents the signature of something + * callable. There can be multiple signature but only one + * active and only one active parameter. + */ +export interface SignatureHelp { + /** + * One or more signatures. + */ + signatures: SignatureInformation[]; + /** + * The active signature. If omitted or the value lies outside the + * range of `signatures` the value defaults to zero or is ignored if + * the `SignatureHelp` has no signatures. + * + * Whenever possible implementors should make an active decision about + * the active signature and shouldn't rely on a default value. + * + * In future version of the protocol this property might become + * mandatory to better express this. + */ + activeSignature?: uinteger; + /** + * The active parameter of the active signature. + * + * If `null`, no parameter of the signature is active (for example a named + * argument that does not match any declared parameters). This is only valid + * if the client specifies the client capability + * `textDocument.signatureHelp.noActiveParameterSupport === true` + * + * If omitted or the value lies outside the range of + * `signatures[activeSignature].parameters` defaults to 0 if the active + * signature has parameters. + * + * If the active signature has no parameters it is ignored. + * + * In future version of the protocol this property might become + * mandatory (but still nullable) to better express the active parameter if + * the active signature does have any. + */ + activeParameter?: uinteger | null; +} +/** + * The definition of a symbol represented as one or many {@link Location locations}. + * For most programming languages there is only one location at which a symbol is + * defined. + * + * Servers should prefer returning `DefinitionLink` over `Definition` if supported + * by the client. + */ +export type Definition = Location | Location[]; +/** + * Information about where a symbol is defined. + * + * Provides additional metadata over normal {@link Location location} definitions, including the range of + * the defining symbol + */ +export type DefinitionLink = LocationLink; +/** + * The declaration of a symbol representation as one or many {@link Location locations}. + */ +export type Declaration = Location | Location[]; +/** + * Information about where a symbol is declared. + * + * Provides additional metadata over normal {@link Location location} declarations, including the range of + * the declaring symbol. + * + * Servers should prefer returning `DeclarationLink` over `Declaration` if supported + * by the client. + */ +export type DeclarationLink = LocationLink; +/** + * Value-object that contains additional information when + * requesting references. + */ +export interface ReferenceContext { + /** + * Include the declaration of the current symbol. + */ + includeDeclaration: boolean; +} +/** + * A document highlight kind. + */ +export declare namespace DocumentHighlightKind { + /** + * A textual occurrence. + */ + const Text: 1; + /** + * Read-access of a symbol, like reading a variable. + */ + const Read: 2; + /** + * Write-access of a symbol, like writing to a variable. + */ + const Write: 3; +} +export type DocumentHighlightKind = 1 | 2 | 3; +/** + * A document highlight is a range inside a text document which deserves + * special attention. Usually a document highlight is visualized by changing + * the background color of its range. + */ +export interface DocumentHighlight { + /** + * The range this highlight applies to. + */ + range: Range; + /** + * The highlight kind, default is {@link DocumentHighlightKind.Text text}. + */ + kind?: DocumentHighlightKind; +} +/** + * DocumentHighlight namespace to provide helper functions to work with + * {@link DocumentHighlight} literals. + */ +export declare namespace DocumentHighlight { + /** + * Create a DocumentHighlight object. + * @param range The range the highlight applies to. + * @param kind The highlight kind + */ + function create(range: Range, kind?: DocumentHighlightKind): DocumentHighlight; +} +/** + * A symbol kind. + */ +export declare namespace SymbolKind { + const File: 1; + const Module: 2; + const Namespace: 3; + const Package: 4; + const Class: 5; + const Method: 6; + const Property: 7; + const Field: 8; + const Constructor: 9; + const Enum: 10; + const Interface: 11; + const Function: 12; + const Variable: 13; + const Constant: 14; + const String: 15; + const Number: 16; + const Boolean: 17; + const Array: 18; + const Object: 19; + const Key: 20; + const Null: 21; + const EnumMember: 22; + const Struct: 23; + const Event: 24; + const Operator: 25; + const TypeParameter: 26; +} +export type SymbolKind = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26; +/** + * Symbol tags are extra annotations that tweak the rendering of a symbol. + * + * @since 3.16 + */ +export declare namespace SymbolTag { + /** + * Render a symbol as obsolete, usually using a strike-out. + */ + const Deprecated: 1; +} +export type SymbolTag = 1; +/** + * A base for all symbol information. + */ +export interface BaseSymbolInformation { + /** + * The name of this symbol. + */ + name: string; + /** + * The kind of this symbol. + */ + kind: SymbolKind; + /** + * Tags for this symbol. + * + * @since 3.16.0 + */ + tags?: SymbolTag[]; + /** + * The name of the symbol containing this symbol. This information is for + * user interface purposes (e.g. to render a qualifier in the user interface + * if necessary). It can't be used to re-infer a hierarchy for the document + * symbols. + */ + containerName?: string; +} +/** + * Represents information about programming constructs like variables, classes, + * interfaces etc. + */ +export interface SymbolInformation extends BaseSymbolInformation { + /** + * Indicates if this symbol is deprecated. + * + * @deprecated Use tags instead + */ + deprecated?: boolean; + /** + * The location of this symbol. The location's range is used by a tool + * to reveal the location in the editor. If the symbol is selected in the + * tool the range's start information is used to position the cursor. So + * the range usually spans more than the actual symbol's name and does + * normally include things like visibility modifiers. + * + * The range doesn't have to denote a node range in the sense of an abstract + * syntax tree. It can therefore not be used to re-construct a hierarchy of + * the symbols. + */ + location: Location; +} +export declare namespace SymbolInformation { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the location of the symbol. + * @param uri The resource of the location of symbol. + * @param containerName The name of the symbol containing the symbol. + */ + function create(name: string, kind: SymbolKind, range: Range, uri: DocumentUri, containerName?: string): SymbolInformation; +} +/** + * Location with only uri and does not include range. + * + * @since 3.18.0 + */ +export interface LocationUriOnly { + uri: DocumentUri; +} +/** + * A special workspace symbol that supports locations without a range. + * + * See also SymbolInformation. + * + * @since 3.17.0 + */ +export interface WorkspaceSymbol extends BaseSymbolInformation { + /** + * The location of the symbol. Whether a server is allowed to + * return a location without a range depends on the client + * capability `workspace.symbol.resolveSupport`. + * + * See SymbolInformation#location for more details. + */ + location: Location | LocationUriOnly; + /** + * A data entry field that is preserved on a workspace symbol between a + * workspace symbol request and a workspace symbol resolve request. + */ + data?: LSPAny; +} +export declare namespace WorkspaceSymbol { + /** + * Create a new workspace symbol. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param uri The resource of the location of the symbol. + * @param range An options range of the location. + * @returns A WorkspaceSymbol. + */ + function create(name: string, kind: SymbolKind, uri: DocumentUri, range?: Range): WorkspaceSymbol; +} +/** + * Represents programming constructs like variables, classes, interfaces etc. + * that appear in a document. Document symbols can be hierarchical and they + * have two ranges: one that encloses its definition and one that points to + * its most interesting range, e.g. the range of an identifier. + */ +export interface DocumentSymbol { + /** + * The name of this symbol. Will be displayed in the user interface and therefore must not be + * an empty string or a string only consisting of white spaces. + */ + name: string; + /** + * More detail for this symbol, e.g the signature of a function. + */ + detail?: string; + /** + * The kind of this symbol. + */ + kind: SymbolKind; + /** + * Tags for this document symbol. + * + * @since 3.16.0 + */ + tags?: SymbolTag[]; + /** + * Indicates if this symbol is deprecated. + * + * @deprecated Use tags instead + */ + deprecated?: boolean; + /** + * The range enclosing this symbol not including leading/trailing whitespace but everything else + * like comments. This information is typically used to determine if the clients cursor is + * inside the symbol to reveal in the symbol in the UI. + */ + range: Range; + /** + * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. + * Must be contained by the `range`. + */ + selectionRange: Range; + /** + * Children of this symbol, e.g. properties of a class. + */ + children?: DocumentSymbol[]; +} +export declare namespace DocumentSymbol { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param detail The detail of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the symbol. + * @param selectionRange The selectionRange of the symbol. + * @param children Children of the symbol. + */ + function create(name: string, detail: string | undefined, kind: SymbolKind, range: Range, selectionRange: Range, children?: DocumentSymbol[]): DocumentSymbol; + /** + * Checks whether the given literal conforms to the {@link DocumentSymbol} interface. + */ + function is(value: any): value is DocumentSymbol; +} +/** + * The kind of a code action. + * + * Kinds are a hierarchical list of identifiers separated by `.`, e.g. `"refactor.extract.function"`. + * + * The set of kinds is open and client needs to announce the kinds it supports to the server during + * initialization. + */ +export type CodeActionKind = string; +/** + * A set of predefined code action kinds + */ +export declare namespace CodeActionKind { + /** + * Empty kind. + */ + const Empty: ''; + /** + * Base kind for quickfix actions: 'quickfix' + */ + const QuickFix: 'quickfix'; + /** + * Base kind for refactoring actions: 'refactor' + */ + const Refactor: 'refactor'; + /** + * Base kind for refactoring extraction actions: 'refactor.extract' + * + * Example extract actions: + * + * - Extract method + * - Extract function + * - Extract variable + * - Extract interface from class + * - ... + */ + const RefactorExtract: 'refactor.extract'; + /** + * Base kind for refactoring inline actions: 'refactor.inline' + * + * Example inline actions: + * + * - Inline function + * - Inline variable + * - Inline constant + * - ... + */ + const RefactorInline: 'refactor.inline'; + /** + * Base kind for refactoring move actions: `refactor.move` + * + * Example move actions: + * + * - Move a function to a new file + * - Move a property between classes + * - Move method to base class + * - ... + * + * @since 3.18.0 + * @proposed + */ + const RefactorMove: 'refactor.move'; + /** + * Base kind for refactoring rewrite actions: 'refactor.rewrite' + * + * Example rewrite actions: + * + * - Convert JavaScript function to class + * - Add or remove parameter + * - Encapsulate field + * - Make method static + * - Move method to base class + * - ... + */ + const RefactorRewrite: 'refactor.rewrite'; + /** + * Base kind for source actions: `source` + * + * Source code actions apply to the entire file. + */ + const Source: 'source'; + /** + * Base kind for an organize imports source action: `source.organizeImports` + */ + const SourceOrganizeImports: 'source.organizeImports'; + /** + * Base kind for auto-fix source actions: `source.fixAll`. + * + * Fix all actions automatically fix errors that have a clear fix that do not require user input. + * They should not suppress errors or perform unsafe fixes such as generating new types or classes. + * + * @since 3.15.0 + */ + const SourceFixAll: 'source.fixAll'; + /** + * Base kind for all code actions applying to the entire notebook's scope. CodeActionKinds using + * this should always begin with `notebook.` + * + * @since 3.18.0 + */ + const Notebook: 'notebook'; +} +/** + * The reason why code actions were requested. + * + * @since 3.17.0 + */ +export declare namespace CodeActionTriggerKind { + /** + * Code actions were explicitly requested by the user or by an extension. + */ + const Invoked: 1; + /** + * Code actions were requested automatically. + * + * This typically happens when current selection in a file changes, but can + * also be triggered when file content changes. + */ + const Automatic: 2; +} +export type CodeActionTriggerKind = 1 | 2; +/** + * Contains additional diagnostic information about the context in which + * a {@link CodeActionProvider.provideCodeActions code action} is run. + */ +export interface CodeActionContext { + /** + * An array of diagnostics known on the client side overlapping the range provided to the + * `textDocument/codeAction` request. They are provided so that the server knows which + * errors are currently presented to the user for the given range. There is no guarantee + * that these accurately reflect the error state of the resource. The primary parameter + * to compute code actions is the provided range. + */ + diagnostics: Diagnostic[]; + /** + * Requested kind of actions to return. + * + * Actions not of this kind are filtered out by the client before being shown. So servers + * can omit computing them. + */ + only?: CodeActionKind[]; + /** + * The reason why code actions were requested. + * + * @since 3.17.0 + */ + triggerKind?: CodeActionTriggerKind; +} +/** + * The CodeActionContext namespace provides helper functions to work with + * {@link CodeActionContext} literals. + */ +export declare namespace CodeActionContext { + /** + * Creates a new CodeActionContext literal. + */ + function create(diagnostics: Diagnostic[], only?: CodeActionKind[], triggerKind?: CodeActionTriggerKind): CodeActionContext; + /** + * Checks whether the given literal conforms to the {@link CodeActionContext} interface. + */ + function is(value: any): value is CodeActionContext; +} +/** + * Captures why the code action is currently disabled. + * + * @since 3.18.0 + */ +export interface CodeActionDisabled { + /** + * Human readable description of why the code action is currently disabled. + * + * This is displayed in the code actions UI. + */ + reason: string; +} +/** + * A code action represents a change that can be performed in code, e.g. to fix a problem or + * to refactor code. + * + * A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed. + */ +export interface CodeAction { + /** + * A short, human-readable, title for this code action. + */ + title: string; + /** + * The kind of the code action. + * + * Used to filter code actions. + */ + kind?: CodeActionKind; + /** + * The diagnostics that this code action resolves. + */ + diagnostics?: Diagnostic[]; + /** + * Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted + * by keybindings. + * + * A quick fix should be marked preferred if it properly addresses the underlying error. + * A refactoring should be marked preferred if it is the most reasonable choice of actions to take. + * + * @since 3.15.0 + */ + isPreferred?: boolean; + /** + * Marks that the code action cannot currently be applied. + * + * Clients should follow the following guidelines regarding disabled code actions: + * + * - Disabled code actions are not shown in automatic [lightbulbs](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) + * code action menus. + * + * - Disabled actions are shown as faded out in the code action menu when the user requests a more specific type + * of code action, such as refactorings. + * + * - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions) + * that auto applies a code action and only disabled code actions are returned, the client should show the user an + * error message with `reason` in the editor. + * + * @since 3.16.0 + */ + disabled?: CodeActionDisabled; + /** + * The workspace edit this code action performs. + */ + edit?: WorkspaceEdit; + /** + * A command this code action executes. If a code action + * provides an edit and a command, first the edit is + * executed and then the command. + */ + command?: Command; + /** + * A data entry field that is preserved on a code action between + * a `textDocument/codeAction` and a `codeAction/resolve` request. + * + * @since 3.16.0 + */ + data?: LSPAny; +} +export declare namespace CodeAction { + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param kind The kind of the code action. + */ + function create(title: string, kind?: CodeActionKind): CodeAction; + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param command The command to execute. + * @param kind The kind of the code action. + */ + function create(title: string, command: Command, kind?: CodeActionKind): CodeAction; + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param edit The edit to perform. + * @param kind The kind of the code action. + */ + function create(title: string, edit: WorkspaceEdit, kind?: CodeActionKind): CodeAction; + function is(value: any): value is CodeAction; +} +/** + * A code lens represents a {@link Command command} that should be shown along with + * source text, like the number of references, a way to run tests, etc. + * + * A code lens is _unresolved_ when no command is associated to it. For performance + * reasons the creation of a code lens and resolving should be done in two stages. + */ +export interface CodeLens { + /** + * The range in which this code lens is valid. Should only span a single line. + */ + range: Range; + /** + * The command this code lens represents. + */ + command?: Command; + /** + * A data entry field that is preserved on a code lens item between + * a {@link CodeLensRequest} and a {@link CodeLensResolveRequest} + */ + data?: LSPAny; +} +/** + * The CodeLens namespace provides helper functions to work with + * {@link CodeLens} literals. + */ +export declare namespace CodeLens { + /** + * Creates a new CodeLens literal. + */ + function create(range: Range, data?: LSPAny): CodeLens; + /** + * Checks whether the given literal conforms to the {@link CodeLens} interface. + */ + function is(value: any): value is CodeLens; +} +/** + * Value-object describing what options formatting should use. + */ +export interface FormattingOptions { + /** + * Size of a tab in spaces. + */ + tabSize: uinteger; + /** + * Prefer spaces over tabs. + */ + insertSpaces: boolean; + /** + * Trim trailing whitespace on a line. + * + * @since 3.15.0 + */ + trimTrailingWhitespace?: boolean; + /** + * Insert a newline character at the end of the file if one does not exist. + * + * @since 3.15.0 + */ + insertFinalNewline?: boolean; + /** + * Trim all newlines after the final newline at the end of the file. + * + * @since 3.15.0 + */ + trimFinalNewlines?: boolean; + /** + * Signature for further properties. + */ + [key: string]: boolean | integer | string | undefined; +} +/** + * The FormattingOptions namespace provides helper functions to work with + * {@link FormattingOptions} literals. + */ +export declare namespace FormattingOptions { + /** + * Creates a new FormattingOptions literal. + */ + function create(tabSize: uinteger, insertSpaces: boolean): FormattingOptions; + /** + * Checks whether the given literal conforms to the {@link FormattingOptions} interface. + */ + function is(value: any): value is FormattingOptions; +} +/** + * A document link is a range in a text document that links to an internal or external resource, like another + * text document or a web site. + */ +export interface DocumentLink { + /** + * The range this link applies to. + */ + range: Range; + /** + * The uri this link points to. If missing a resolve request is sent later. + */ + target?: URI; + /** + * The tooltip text when you hover over this link. + * + * If a tooltip is provided, is will be displayed in a string that includes instructions on how to + * trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS, + * user settings, and localization. + * + * @since 3.15.0 + */ + tooltip?: string; + /** + * A data entry field that is preserved on a document link between a + * DocumentLinkRequest and a DocumentLinkResolveRequest. + */ + data?: LSPAny; +} +/** + * The DocumentLink namespace provides helper functions to work with + * {@link DocumentLink} literals. + */ +export declare namespace DocumentLink { + /** + * Creates a new DocumentLink literal. + */ + function create(range: Range, target?: string, data?: LSPAny): DocumentLink; + /** + * Checks whether the given literal conforms to the {@link DocumentLink} interface. + */ + function is(value: any): value is DocumentLink; +} +/** + * A selection range represents a part of a selection hierarchy. A selection range + * may have a parent selection range that contains it. + */ +export interface SelectionRange { + /** + * The {@link Range range} of this selection range. + */ + range: Range; + /** + * The parent selection range containing this range. Therefore `parent.range` must contain `this.range`. + */ + parent?: SelectionRange; +} +/** + * The SelectionRange namespace provides helper function to work with + * SelectionRange literals. + */ +export declare namespace SelectionRange { + /** + * Creates a new SelectionRange + * @param range the range. + * @param parent an optional parent. + */ + function create(range: Range, parent?: SelectionRange): SelectionRange; + function is(value: any): value is SelectionRange; +} +/** + * Represents programming constructs like functions or constructors in the context + * of call hierarchy. + * + * @since 3.16.0 + */ +export interface CallHierarchyItem { + /** + * The name of this item. + */ + name: string; + /** + * The kind of this item. + */ + kind: SymbolKind; + /** + * Tags for this item. + */ + tags?: SymbolTag[]; + /** + * More detail for this item, e.g. the signature of a function. + */ + detail?: string; + /** + * The resource identifier of this item. + */ + uri: DocumentUri; + /** + * The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code. + */ + range: Range; + /** + * The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function. + * Must be contained by the {@link CallHierarchyItem.range `range`}. + */ + selectionRange: Range; + /** + * A data entry field that is preserved between a call hierarchy prepare and + * incoming calls or outgoing calls requests. + */ + data?: LSPAny; +} +/** + * Represents an incoming call, e.g. a caller of a method or constructor. + * + * @since 3.16.0 + */ +export interface CallHierarchyIncomingCall { + /** + * The item that makes the call. + */ + from: CallHierarchyItem; + /** + * The ranges at which the calls appear. This is relative to the caller + * denoted by {@link CallHierarchyIncomingCall.from `this.from`}. + */ + fromRanges: Range[]; +} +/** + * Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc. + * + * @since 3.16.0 + */ +export interface CallHierarchyOutgoingCall { + /** + * The item that is called. + */ + to: CallHierarchyItem; + /** + * The range at which this item is called. This is the range relative to the caller, e.g the item + * passed to {@link CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls `provideCallHierarchyOutgoingCalls`} + * and not {@link CallHierarchyOutgoingCall.to `this.to`}. + */ + fromRanges: Range[]; +} +/** + * A set of predefined token types. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ +export declare enum SemanticTokenTypes { + namespace = "namespace", + /** + * Represents a generic type. Acts as a fallback for types which can't be mapped to + * a specific type like class or enum. + */ + type = "type", + class = "class", + enum = "enum", + interface = "interface", + struct = "struct", + typeParameter = "typeParameter", + parameter = "parameter", + variable = "variable", + property = "property", + enumMember = "enumMember", + event = "event", + function = "function", + method = "method", + macro = "macro", + keyword = "keyword", + modifier = "modifier", + comment = "comment", + string = "string", + number = "number", + regexp = "regexp", + operator = "operator", + /** + * @since 3.17.0 + */ + decorator = "decorator", + /** + * @since 3.18.0 + */ + label = "label" +} +/** + * A set of predefined token modifiers. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ +export declare enum SemanticTokenModifiers { + declaration = "declaration", + definition = "definition", + readonly = "readonly", + static = "static", + deprecated = "deprecated", + abstract = "abstract", + async = "async", + modification = "modification", + documentation = "documentation", + defaultLibrary = "defaultLibrary" +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensLegend { + /** + * The token types a server uses. + */ + tokenTypes: string[]; + /** + * The token modifiers a server uses. + */ + tokenModifiers: string[]; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokens { + /** + * An optional result id. If provided and clients support delta updating + * the client will include the result id in the next semantic token request. + * A server can then instead of computing all semantic tokens again simply + * send a delta. + */ + resultId?: string; + /** + * The actual tokens. + */ + data: uinteger[]; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokens { + function is(value: any): value is SemanticTokens; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensEdit { + /** + * The start offset of the edit. + */ + start: uinteger; + /** + * The count of elements to remove. + */ + deleteCount: uinteger; + /** + * The elements to insert. + */ + data?: uinteger[]; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensDelta { + readonly resultId?: string; + /** + * The semantic token edits to transform a previous result into a new result. + */ + edits: SemanticTokensEdit[]; +} +/** + * @since 3.17.0 + */ +export type TypeHierarchyItem = { + /** + * The name of this item. + */ + name: string; + /** + * The kind of this item. + */ + kind: SymbolKind; + /** + * Tags for this item. + */ + tags?: SymbolTag[]; + /** + * More detail for this item, e.g. the signature of a function. + */ + detail?: string; + /** + * The resource identifier of this item. + */ + uri: DocumentUri; + /** + * The range enclosing this symbol not including leading/trailing whitespace + * but everything else, e.g. comments and code. + */ + range: Range; + /** + * The range that should be selected and revealed when this symbol is being + * picked, e.g. the name of a function. Must be contained by the + * {@link TypeHierarchyItem.range `range`}. + */ + selectionRange: Range; + /** + * A data entry field that is preserved between a type hierarchy prepare and + * supertypes or subtypes requests. It could also be used to identify the + * type hierarchy in the server, helping improve the performance on + * resolving supertypes and subtypes. + */ + data?: LSPAny; +}; +/** + * Provide inline value as text. + * + * @since 3.17.0 + */ +export type InlineValueText = { + /** + * The document range for which the inline value applies. + */ + range: Range; + /** + * The text of the inline value. + */ + text: string; +}; +/** + * The InlineValueText namespace provides functions to deal with InlineValueTexts. + * + * @since 3.17.0 + */ +export declare namespace InlineValueText { + /** + * Creates a new InlineValueText literal. + */ + function create(range: Range, text: string): InlineValueText; + function is(value: InlineValue | undefined | null): value is InlineValueText; +} +/** + * Provide inline value through a variable lookup. + * If only a range is specified, the variable name will be extracted from the underlying document. + * An optional variable name can be used to override the extracted name. + * + * @since 3.17.0 + */ +export type InlineValueVariableLookup = { + /** + * The document range for which the inline value applies. + * The range is used to extract the variable name from the underlying document. + */ + range: Range; + /** + * If specified the name of the variable to look up. + */ + variableName?: string; + /** + * How to perform the lookup. + */ + caseSensitiveLookup: boolean; +}; +/** + * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups. + * + * @since 3.17.0 + */ +export declare namespace InlineValueVariableLookup { + /** + * Creates a new InlineValueText literal. + */ + function create(range: Range, variableName: string | undefined, caseSensitiveLookup: boolean): InlineValueVariableLookup; + function is(value: InlineValue | undefined | null): value is InlineValueVariableLookup; +} +/** + * Provide an inline value through an expression evaluation. + * If only a range is specified, the expression will be extracted from the underlying document. + * An optional expression can be used to override the extracted expression. + * + * @since 3.17.0 + */ +export type InlineValueEvaluatableExpression = { + /** + * The document range for which the inline value applies. + * The range is used to extract the evaluatable expression from the underlying document. + */ + range: Range; + /** + * If specified the expression overrides the extracted expression. + */ + expression?: string; +}; +/** + * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression. + * + * @since 3.17.0 + */ +export declare namespace InlineValueEvaluatableExpression { + /** + * Creates a new InlineValueEvaluatableExpression literal. + */ + function create(range: Range, expression: string | undefined): InlineValueEvaluatableExpression; + function is(value: InlineValue | undefined | null): value is InlineValueEvaluatableExpression; +} +/** + * Inline value information can be provided by different means: + * - directly as a text value (class InlineValueText). + * - as a name to use for a variable lookup (class InlineValueVariableLookup) + * - as an evaluatable expression (class InlineValueEvaluatableExpression) + * The InlineValue types combines all inline value types into one type. + * + * @since 3.17.0 + */ +export type InlineValue = InlineValueText | InlineValueVariableLookup | InlineValueEvaluatableExpression; +/** + * @since 3.17.0 + */ +export type InlineValueContext = { + /** + * The stack frame (as a DAP Id) where the execution has stopped. + */ + frameId: integer; + /** + * The document range where execution has stopped. + * Typically the end position of the range denotes the line where the inline values are shown. + */ + stoppedLocation: Range; +}; +/** + * The InlineValueContext namespace provides helper functions to work with + * {@link InlineValueContext} literals. + * + * @since 3.17.0 + */ +export declare namespace InlineValueContext { + /** + * Creates a new InlineValueContext literal. + */ + function create(frameId: integer, stoppedLocation: Range): InlineValueContext; + /** + * Checks whether the given literal conforms to the {@link InlineValueContext} interface. + */ + function is(value: any): value is InlineValueContext; +} +/** + * Inlay hint kinds. + * + * @since 3.17.0 + */ +export declare namespace InlayHintKind { + /** + * An inlay hint that for a type annotation. + */ + const Type = 1; + /** + * An inlay hint that is for a parameter. + */ + const Parameter = 2; + function is(value: number): value is InlayHintKind; +} +export type InlayHintKind = 1 | 2; +/** + * An inlay hint label part allows for interactive and composite labels + * of inlay hints. + * + * @since 3.17.0 + */ +export type InlayHintLabelPart = { + /** + * The value of this label part. + */ + value: string; + /** + * The tooltip text when you hover over this label part. Depending on + * the client capability `inlayHint.resolveSupport` clients might resolve + * this property late using the resolve request. + */ + tooltip?: string | MarkupContent; + /** + * An optional source code location that represents this + * label part. + * + * The editor will use this location for the hover and for code navigation + * features: This part will become a clickable link that resolves to the + * definition of the symbol at the given location (not necessarily the + * location itself), it shows the hover that shows at the given location, + * and it shows a context menu with further code navigation commands. + * + * Depending on the client capability `inlayHint.resolveSupport` clients + * might resolve this property late using the resolve request. + */ + location?: Location; + /** + * An optional command for this label part. + * + * Depending on the client capability `inlayHint.resolveSupport` clients + * might resolve this property late using the resolve request. + */ + command?: Command; +}; +export declare namespace InlayHintLabelPart { + function create(value: string): InlayHintLabelPart; + function is(value: any): value is InlayHintLabelPart; +} +/** + * Inlay hint information. + * + * @since 3.17.0 + */ +export type InlayHint = { + /** + * The position of this hint. + * + * If multiple hints have the same position, they will be shown in the order + * they appear in the response. + */ + position: Position; + /** + * The label of this hint. A human readable string or an array of + * InlayHintLabelPart label parts. + * + * *Note* that neither the string nor the label part can be empty. + */ + label: string | InlayHintLabelPart[]; + /** + * The kind of this hint. Can be omitted in which case the client + * should fall back to a reasonable default. + */ + kind?: InlayHintKind; + /** + * Optional text edits that are performed when accepting this inlay hint. + * + * *Note* that edits are expected to change the document so that the inlay + * hint (or its nearest variant) is now part of the document and the inlay + * hint itself is now obsolete. + */ + textEdits?: TextEdit[]; + /** + * The tooltip text when you hover over this item. + */ + tooltip?: string | MarkupContent; + /** + * Render padding before the hint. + * + * Note: Padding should use the editor's background color, not the + * background color of the hint itself. That means padding can be used + * to visually align/separate an inlay hint. + */ + paddingLeft?: boolean; + /** + * Render padding after the hint. + * + * Note: Padding should use the editor's background color, not the + * background color of the hint itself. That means padding can be used + * to visually align/separate an inlay hint. + */ + paddingRight?: boolean; + /** + * A data entry field that is preserved on an inlay hint between + * a `textDocument/inlayHint` and a `inlayHint/resolve` request. + */ + data?: LSPAny; +}; +export declare namespace InlayHint { + function create(position: Position, label: string | InlayHintLabelPart[], kind?: InlayHintKind): InlayHint; + function is(value: any): value is InlayHint; +} +/** + * A string value used as a snippet is a template which allows to insert text + * and to control the editor cursor when insertion happens. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Variables are defined with `$name` and + * `${name:default value}`. + * + * @since 3.18.0 + * @proposed + */ +export interface StringValue { + /** + * The kind of string value. + */ + kind: 'snippet'; + /** + * The snippet string. + */ + value: string; +} +export declare namespace StringValue { + function createSnippet(value: string): StringValue; + function isSnippet(value: any): value is StringValue; +} +/** + * An inline completion item represents a text snippet that is proposed inline to complete text that is being typed. + * + * @since 3.18.0 + * @proposed + */ +export interface InlineCompletionItem { + /** + * The text to replace the range with. Must be set. + */ + insertText: string | StringValue; + /** + * A text that is used to decide if this inline completion should be shown. When `falsy` the {@link InlineCompletionItem.insertText} is used. + */ + filterText?: string; + /** + * The range to replace. Must begin and end on the same line. + */ + range?: Range; + /** + * An optional {@link Command} that is executed *after* inserting this completion. + */ + command?: Command; +} +export declare namespace InlineCompletionItem { + function create(insertText: string | StringValue, filterText?: string, range?: Range, command?: Command): InlineCompletionItem; +} +/** + * Represents a collection of {@link InlineCompletionItem inline completion items} to be presented in the editor. + * + * @since 3.18.0 + * @proposed + */ +export interface InlineCompletionList { + /** + * The inline completion items + */ + items: InlineCompletionItem[]; +} +export declare namespace InlineCompletionList { + function create(items: InlineCompletionItem[]): InlineCompletionList; +} +/** + * Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered. + * + * @since 3.18.0 + * @proposed + */ +export declare namespace InlineCompletionTriggerKind { + /** + * Completion was triggered explicitly by a user gesture. + */ + const Invoked: 1; + /** + * Completion was triggered automatically while editing. + */ + const Automatic: 2; +} +export type InlineCompletionTriggerKind = 1 | 2; +/** + * Describes the currently selected completion item. + * + * @since 3.18.0 + * @proposed + */ +export interface SelectedCompletionInfo { + /** + * The range that will be replaced if this completion item is accepted. + */ + range: Range; + /** + * The text the range will be replaced with if this completion is accepted. + */ + text: string; +} +export declare namespace SelectedCompletionInfo { + function create(range: Range, text: string): SelectedCompletionInfo; +} +/** + * Provides information about the context in which an inline completion was requested. + * + * @since 3.18.0 + * @proposed + */ +export interface InlineCompletionContext { + /** + * Describes how the inline completion was triggered. + */ + triggerKind: InlineCompletionTriggerKind; + /** + * Provides information about the currently selected item in the autocomplete widget if it is visible. + */ + selectedCompletionInfo?: SelectedCompletionInfo; +} +export declare namespace InlineCompletionContext { + function create(triggerKind: InlineCompletionTriggerKind, selectedCompletionInfo?: SelectedCompletionInfo): InlineCompletionContext; +} +/** + * A workspace folder inside a client. + */ +export interface WorkspaceFolder { + /** + * The associated URI for this workspace folder. + */ + uri: URI; + /** + * The name of the workspace folder. Used to refer to this + * workspace folder in the user interface. + */ + name: string; +} +export declare namespace WorkspaceFolder { + function is(value: any): value is WorkspaceFolder; +} +export declare const EOL: string[]; +/** + * A simple text document. Not to be implemented. The document keeps the content + * as string. + * + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +export interface TextDocument { + /** + * The associated URI for this document. Most documents have the __file__-scheme, indicating that they + * represent files on disk. However, some documents may have other schemes indicating that they are not + * available on disk. + * + * @readonly + */ + readonly uri: DocumentUri; + /** + * The identifier of the language associated with this document. + * + * @readonly + */ + readonly languageId: LanguageKind; + /** + * The version number of this document (it will increase after each + * change, including undo/redo). + * + * @readonly + */ + readonly version: integer; + /** + * Get the text of this document. A substring can be retrieved by + * providing a range. + * + * @param range (optional) An range within the document to return. + * If no range is passed, the full content is returned. + * Invalid range positions are adjusted as described in {@link Position.line Position.line} + * and {@link Position.character Position.character}. + * If the start range position is greater than the end range position, + * then the effect of getText is as if the two positions were swapped. + + * @return The text of this document or a substring of the text if a + * range is provided. + */ + getText(range?: Range): string; + /** + * Converts a zero-based offset to a position. + * + * @param offset A zero-based offset. + * @return A valid {@link Position position}. + */ + positionAt(offset: uinteger): Position; + /** + * Converts the position to a zero-based offset. + * Invalid positions are adjusted as described in {@link Position.line Position.line} + * and {@link Position.character Position.character}. + * + * @param position A position. + * @return A valid zero-based offset. + */ + offsetAt(position: Position): uinteger; + /** + * The number of lines in this document. + * + * @readonly + */ + readonly lineCount: uinteger; +} +/** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +export declare namespace TextDocument { + /** + * Creates a new ITextDocument literal from the given uri and content. + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param version The document's version. + * @param content The document's content. + */ + function create(uri: DocumentUri, languageId: LanguageKind, version: integer, content: string): TextDocument; + /** + * Checks whether the given literal conforms to the {@link ITextDocument} interface. + */ + function is(value: any): value is TextDocument; + function applyEdits(document: TextDocument, edits: TextEdit[]): string; +} +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/esm/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/esm/main.js" index bd10b17591abce85e88604906aa1c155a46dd681..61c721d65a202f40da34356dc13f55269dbd3d9c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/esm/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/esm/main.js" @@ -1,3 +1,2347 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:44876460641463ccf305ab1f93e23e0a48b463eef07b52abdc4301a244c3967a -size 81540 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +export var DocumentUri; +(function (DocumentUri) { + function is(value) { + return typeof value === 'string'; + } + DocumentUri.is = is; +})(DocumentUri || (DocumentUri = {})); +export var URI; +(function (URI) { + function is(value) { + return typeof value === 'string'; + } + URI.is = is; +})(URI || (URI = {})); +export var integer; +(function (integer) { + integer.MIN_VALUE = -2147483648; + integer.MAX_VALUE = 2147483647; + function is(value) { + return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE; + } + integer.is = is; +})(integer || (integer = {})); +export var uinteger; +(function (uinteger) { + uinteger.MIN_VALUE = 0; + uinteger.MAX_VALUE = 2147483647; + function is(value) { + return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE; + } + uinteger.is = is; +})(uinteger || (uinteger = {})); +/** + * The Position namespace provides helper functions to work with + * {@link Position} literals. + */ +export var Position; +(function (Position) { + /** + * Creates a new Position literal from the given line and character. + * @param line The position's line. + * @param character The position's character. + */ + function create(line, character) { + if (line === Number.MAX_VALUE) { + line = uinteger.MAX_VALUE; + } + if (character === Number.MAX_VALUE) { + character = uinteger.MAX_VALUE; + } + return { line, character }; + } + Position.create = create; + /** + * Checks whether the given literal conforms to the {@link Position} interface. + */ + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character); + } + Position.is = is; +})(Position || (Position = {})); +/** + * The Range namespace provides helper functions to work with + * {@link Range} literals. + */ +export var Range; +(function (Range) { + function create(one, two, three, four) { + if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) { + return { start: Position.create(one, two), end: Position.create(three, four) }; + } + else if (Position.is(one) && Position.is(two)) { + return { start: one, end: two }; + } + else { + throw new Error(`Range#create called with invalid arguments[${one}, ${two}, ${three}, ${four}]`); + } + } + Range.create = create; + /** + * Checks whether the given literal conforms to the {@link Range} interface. + */ + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end); + } + Range.is = is; +})(Range || (Range = {})); +/** + * The Location namespace provides helper functions to work with + * {@link Location} literals. + */ +export var Location; +(function (Location) { + /** + * Creates a Location literal. + * @param uri The location's uri. + * @param range The location's range. + */ + function create(uri, range) { + return { uri, range }; + } + Location.create = create; + /** + * Checks whether the given literal conforms to the {@link Location} interface. + */ + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri)); + } + Location.is = is; +})(Location || (Location = {})); +/** + * The LocationLink namespace provides helper functions to work with + * {@link LocationLink} literals. + */ +export var LocationLink; +(function (LocationLink) { + /** + * Creates a LocationLink literal. + * @param targetUri The definition's uri. + * @param targetRange The full range of the definition. + * @param targetSelectionRange The span of the symbol definition at the target. + * @param originSelectionRange The span of the symbol being defined in the originating source file. + */ + function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) { + return { targetUri, targetRange, targetSelectionRange, originSelectionRange }; + } + LocationLink.create = create; + /** + * Checks whether the given literal conforms to the {@link LocationLink} interface. + */ + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri) + && Range.is(candidate.targetSelectionRange) + && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange)); + } + LocationLink.is = is; +})(LocationLink || (LocationLink = {})); +/** + * The Color namespace provides helper functions to work with + * {@link Color} literals. + */ +export var Color; +(function (Color) { + /** + * Creates a new Color literal. + */ + function create(red, green, blue, alpha) { + return { + red, + green, + blue, + alpha, + }; + } + Color.create = create; + /** + * Checks whether the given literal conforms to the {@link Color} interface. + */ + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1) + && Is.numberRange(candidate.green, 0, 1) + && Is.numberRange(candidate.blue, 0, 1) + && Is.numberRange(candidate.alpha, 0, 1); + } + Color.is = is; +})(Color || (Color = {})); +/** + * The ColorInformation namespace provides helper functions to work with + * {@link ColorInformation} literals. + */ +export var ColorInformation; +(function (ColorInformation) { + /** + * Creates a new ColorInformation literal. + */ + function create(range, color) { + return { + range, + color, + }; + } + ColorInformation.create = create; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color); + } + ColorInformation.is = is; +})(ColorInformation || (ColorInformation = {})); +/** + * The Color namespace provides helper functions to work with + * {@link ColorPresentation} literals. + */ +export var ColorPresentation; +(function (ColorPresentation) { + /** + * Creates a new ColorInformation literal. + */ + function create(label, textEdit, additionalTextEdits) { + return { + label, + textEdit, + additionalTextEdits, + }; + } + ColorPresentation.create = create; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.label) + && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate)) + && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is)); + } + ColorPresentation.is = is; +})(ColorPresentation || (ColorPresentation = {})); +/** + * A set of predefined range kinds. + */ +export var FoldingRangeKind; +(function (FoldingRangeKind) { + /** + * Folding range for a comment + */ + FoldingRangeKind.Comment = 'comment'; + /** + * Folding range for an import or include + */ + FoldingRangeKind.Imports = 'imports'; + /** + * Folding range for a region (e.g. `#region`) + */ + FoldingRangeKind.Region = 'region'; +})(FoldingRangeKind || (FoldingRangeKind = {})); +/** + * The folding range namespace provides helper functions to work with + * {@link FoldingRange} literals. + */ +export var FoldingRange; +(function (FoldingRange) { + /** + * Creates a new FoldingRange literal. + */ + function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) { + const result = { + startLine, + endLine + }; + if (Is.defined(startCharacter)) { + result.startCharacter = startCharacter; + } + if (Is.defined(endCharacter)) { + result.endCharacter = endCharacter; + } + if (Is.defined(kind)) { + result.kind = kind; + } + if (Is.defined(collapsedText)) { + result.collapsedText = collapsedText; + } + return result; + } + FoldingRange.create = create; + /** + * Checks whether the given literal conforms to the {@link FoldingRange} interface. + */ + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine) + && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter)) + && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter)) + && (Is.undefined(candidate.kind) || Is.string(candidate.kind)); + } + FoldingRange.is = is; +})(FoldingRange || (FoldingRange = {})); +/** + * The DiagnosticRelatedInformation namespace provides helper functions to work with + * {@link DiagnosticRelatedInformation} literals. + */ +export var DiagnosticRelatedInformation; +(function (DiagnosticRelatedInformation) { + /** + * Creates a new DiagnosticRelatedInformation literal. + */ + function create(location, message) { + return { + location, + message + }; + } + DiagnosticRelatedInformation.create = create; + /** + * Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface. + */ + function is(value) { + const candidate = value; + return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message); + } + DiagnosticRelatedInformation.is = is; +})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {})); +/** + * The diagnostic's severity. + */ +export var DiagnosticSeverity; +(function (DiagnosticSeverity) { + /** + * Reports an error. + */ + DiagnosticSeverity.Error = 1; + /** + * Reports a warning. + */ + DiagnosticSeverity.Warning = 2; + /** + * Reports an information. + */ + DiagnosticSeverity.Information = 3; + /** + * Reports a hint. + */ + DiagnosticSeverity.Hint = 4; +})(DiagnosticSeverity || (DiagnosticSeverity = {})); +/** + * The diagnostic tags. + * + * @since 3.15.0 + */ +export var DiagnosticTag; +(function (DiagnosticTag) { + /** + * Unused or unnecessary code. + * + * Clients are allowed to render diagnostics with this tag faded out instead of having + * an error squiggle. + */ + DiagnosticTag.Unnecessary = 1; + /** + * Deprecated or obsolete code. + * + * Clients are allowed to rendered diagnostics with this tag strike through. + */ + DiagnosticTag.Deprecated = 2; +})(DiagnosticTag || (DiagnosticTag = {})); +/** + * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes. + * + * @since 3.16.0 + */ +export var CodeDescription; +(function (CodeDescription) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.href); + } + CodeDescription.is = is; +})(CodeDescription || (CodeDescription = {})); +/** + * The Diagnostic namespace provides helper functions to work with + * {@link Diagnostic} literals. + */ +export var Diagnostic; +(function (Diagnostic) { + /** + * Creates a new Diagnostic literal. + */ + function create(range, message, severity, code, source, relatedInformation) { + const result = { range, message }; + if (Is.defined(severity)) { + result.severity = severity; + } + if (Is.defined(code)) { + result.code = code; + } + if (Is.defined(source)) { + result.source = source; + } + if (Is.defined(relatedInformation)) { + result.relatedInformation = relatedInformation; + } + return result; + } + Diagnostic.create = create; + /** + * Checks whether the given literal conforms to the {@link Diagnostic} interface. + */ + function is(value) { + var _a; + const candidate = value; + return Is.defined(candidate) + && Range.is(candidate.range) + && Is.string(candidate.message) + && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) + && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) + && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href))) + && (Is.string(candidate.source) || Is.undefined(candidate.source)) + && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is)); + } + Diagnostic.is = is; +})(Diagnostic || (Diagnostic = {})); +/** + * The Command namespace provides helper functions to work with + * {@link Command} literals. + */ +export var Command; +(function (Command) { + /** + * Creates a new Command literal. + */ + function create(title, command, ...args) { + const result = { title, command }; + if (Is.defined(args) && args.length > 0) { + result.arguments = args; + } + return result; + } + Command.create = create; + /** + * Checks whether the given literal conforms to the {@link Command} interface. + */ + function is(value) { + const candidate = value; + return Is.defined(candidate) && Is.string(candidate.title) && (candidate.tooltip === undefined || Is.string(candidate.tooltip)) && Is.string(candidate.command); + } + Command.is = is; +})(Command || (Command = {})); +/** + * The TextEdit namespace provides helper function to create replace, + * insert and delete edits more easily. + */ +export var TextEdit; +(function (TextEdit) { + /** + * Creates a replace text edit. + * @param range The range of text to be replaced. + * @param newText The new text. + */ + function replace(range, newText) { + return { range, newText }; + } + TextEdit.replace = replace; + /** + * Creates an insert text edit. + * @param position The position to insert the text at. + * @param newText The text to be inserted. + */ + function insert(position, newText) { + return { range: { start: position, end: position }, newText }; + } + TextEdit.insert = insert; + /** + * Creates a delete text edit. + * @param range The range of text to be deleted. + */ + function del(range) { + return { range, newText: '' }; + } + TextEdit.del = del; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) + && Is.string(candidate.newText) + && Range.is(candidate.range); + } + TextEdit.is = is; +})(TextEdit || (TextEdit = {})); +export var ChangeAnnotation; +(function (ChangeAnnotation) { + function create(label, needsConfirmation, description) { + const result = { label }; + if (needsConfirmation !== undefined) { + result.needsConfirmation = needsConfirmation; + } + if (description !== undefined) { + result.description = description; + } + return result; + } + ChangeAnnotation.create = create; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.label) && + (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) && + (Is.string(candidate.description) || candidate.description === undefined); + } + ChangeAnnotation.is = is; +})(ChangeAnnotation || (ChangeAnnotation = {})); +export var ChangeAnnotationIdentifier; +(function (ChangeAnnotationIdentifier) { + function is(value) { + const candidate = value; + return Is.string(candidate); + } + ChangeAnnotationIdentifier.is = is; +})(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {})); +export var AnnotatedTextEdit; +(function (AnnotatedTextEdit) { + /** + * Creates an annotated replace text edit. + * + * @param range The range of text to be replaced. + * @param newText The new text. + * @param annotation The annotation. + */ + function replace(range, newText, annotation) { + return { range, newText, annotationId: annotation }; + } + AnnotatedTextEdit.replace = replace; + /** + * Creates an annotated insert text edit. + * + * @param position The position to insert the text at. + * @param newText The text to be inserted. + * @param annotation The annotation. + */ + function insert(position, newText, annotation) { + return { range: { start: position, end: position }, newText, annotationId: annotation }; + } + AnnotatedTextEdit.insert = insert; + /** + * Creates an annotated delete text edit. + * + * @param range The range of text to be deleted. + * @param annotation The annotation. + */ + function del(range, annotation) { + return { range, newText: '', annotationId: annotation }; + } + AnnotatedTextEdit.del = del; + function is(value) { + const candidate = value; + return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + AnnotatedTextEdit.is = is; +})(AnnotatedTextEdit || (AnnotatedTextEdit = {})); +/** + * The TextDocumentEdit namespace provides helper function to create + * an edit that manipulates a text document. + */ +export var TextDocumentEdit; +(function (TextDocumentEdit) { + /** + * Creates a new `TextDocumentEdit` + */ + function create(textDocument, edits) { + return { textDocument, edits }; + } + TextDocumentEdit.create = create; + function is(value) { + const candidate = value; + return Is.defined(candidate) + && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument) + && Array.isArray(candidate.edits); + } + TextDocumentEdit.is = is; +})(TextDocumentEdit || (TextDocumentEdit = {})); +export var CreateFile; +(function (CreateFile) { + function create(uri, options, annotation) { + const result = { + kind: 'create', + uri + }; + if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + CreateFile.create = create; + function is(value) { + const candidate = value; + return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined || + ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + CreateFile.is = is; +})(CreateFile || (CreateFile = {})); +export var RenameFile; +(function (RenameFile) { + function create(oldUri, newUri, options, annotation) { + const result = { + kind: 'rename', + oldUri, + newUri + }; + if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + RenameFile.create = create; + function is(value) { + const candidate = value; + return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined || + ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + RenameFile.is = is; +})(RenameFile || (RenameFile = {})); +export var DeleteFile; +(function (DeleteFile) { + function create(uri, options, annotation) { + const result = { + kind: 'delete', + uri + }; + if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + DeleteFile.create = create; + function is(value) { + const candidate = value; + return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined || + ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + DeleteFile.is = is; +})(DeleteFile || (DeleteFile = {})); +export var WorkspaceEdit; +(function (WorkspaceEdit) { + function is(value) { + const candidate = value; + return candidate && + (candidate.changes !== undefined || candidate.documentChanges !== undefined) && + (candidate.documentChanges === undefined || candidate.documentChanges.every((change) => { + if (Is.string(change.kind)) { + return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change); + } + else { + return TextDocumentEdit.is(change); + } + })); + } + WorkspaceEdit.is = is; +})(WorkspaceEdit || (WorkspaceEdit = {})); +class TextEditChangeImpl { + constructor(edits, changeAnnotations) { + this.edits = edits; + this.changeAnnotations = changeAnnotations; + } + insert(position, newText, annotation) { + let edit; + let id; + if (annotation === undefined) { + edit = TextEdit.insert(position, newText); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.insert(position, newText, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.insert(position, newText, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + } + replace(range, newText, annotation) { + let edit; + let id; + if (annotation === undefined) { + edit = TextEdit.replace(range, newText); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.replace(range, newText, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.replace(range, newText, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + } + delete(range, annotation) { + let edit; + let id; + if (annotation === undefined) { + edit = TextEdit.del(range); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.del(range, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.del(range, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + } + add(edit) { + this.edits.push(edit); + } + all() { + return this.edits; + } + clear() { + this.edits.splice(0, this.edits.length); + } + assertChangeAnnotations(value) { + if (value === undefined) { + throw new Error(`Text edit change is not configured to manage change annotations.`); + } + } +} +export var SnippetTextEdit; +(function (SnippetTextEdit) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) + && Range.is(candidate.range) + && StringValue.isSnippet(candidate.snippet) + && (candidate.annotationId === undefined || + (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId))); + } + SnippetTextEdit.is = is; +})(SnippetTextEdit || (SnippetTextEdit = {})); +/** + * A helper class + */ +class ChangeAnnotations { + constructor(annotations) { + this._annotations = annotations === undefined ? Object.create(null) : annotations; + this._counter = 0; + this._size = 0; + } + all() { + return this._annotations; + } + get size() { + return this._size; + } + manage(idOrAnnotation, annotation) { + let id; + if (ChangeAnnotationIdentifier.is(idOrAnnotation)) { + id = idOrAnnotation; + } + else { + id = this.nextId(); + annotation = idOrAnnotation; + } + if (this._annotations[id] !== undefined) { + throw new Error(`Id ${id} is already in use.`); + } + if (annotation === undefined) { + throw new Error(`No annotation provided for id ${id}`); + } + this._annotations[id] = annotation; + this._size++; + return id; + } + nextId() { + this._counter++; + return this._counter.toString(); + } +} +/** + * A workspace change helps constructing changes to a workspace. + */ +export class WorkspaceChange { + constructor(workspaceEdit) { + this._textEditChanges = Object.create(null); + if (workspaceEdit !== undefined) { + this._workspaceEdit = workspaceEdit; + if (workspaceEdit.documentChanges) { + this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations); + workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + workspaceEdit.documentChanges.forEach((change) => { + if (TextDocumentEdit.is(change)) { + const textEditChange = new TextEditChangeImpl(change.edits, this._changeAnnotations); + this._textEditChanges[change.textDocument.uri] = textEditChange; + } + }); + } + else if (workspaceEdit.changes) { + Object.keys(workspaceEdit.changes).forEach((key) => { + const textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]); + this._textEditChanges[key] = textEditChange; + }); + } + } + else { + this._workspaceEdit = {}; + } + } + /** + * Returns the underlying {@link WorkspaceEdit} literal + * use to be returned from a workspace edit operation like rename. + */ + get edit() { + this.initDocumentChanges(); + if (this._changeAnnotations !== undefined) { + if (this._changeAnnotations.size === 0) { + this._workspaceEdit.changeAnnotations = undefined; + } + else { + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + } + return this._workspaceEdit; + } + getTextEditChange(key) { + if (OptionalVersionedTextDocumentIdentifier.is(key)) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + const textDocument = { uri: key.uri, version: key.version }; + let result = this._textEditChanges[textDocument.uri]; + if (!result) { + const edits = []; + const textDocumentEdit = { + textDocument, + edits + }; + this._workspaceEdit.documentChanges.push(textDocumentEdit); + result = new TextEditChangeImpl(edits, this._changeAnnotations); + this._textEditChanges[textDocument.uri] = result; + } + return result; + } + else { + this.initChanges(); + if (this._workspaceEdit.changes === undefined) { + throw new Error('Workspace edit is not configured for normal text edit changes.'); + } + let result = this._textEditChanges[key]; + if (!result) { + const edits = []; + this._workspaceEdit.changes[key] = edits; + result = new TextEditChangeImpl(edits); + this._textEditChanges[key] = result; + } + return result; + } + } + initDocumentChanges() { + if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) { + this._changeAnnotations = new ChangeAnnotations(); + this._workspaceEdit.documentChanges = []; + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + } + initChanges() { + if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) { + this._workspaceEdit.changes = Object.create(null); + } + } + createFile(uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + let annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + let operation; + let id; + if (annotation === undefined) { + operation = CreateFile.create(uri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = CreateFile.create(uri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + } + renameFile(oldUri, newUri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + let annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + let operation; + let id; + if (annotation === undefined) { + operation = RenameFile.create(oldUri, newUri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = RenameFile.create(oldUri, newUri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + } + deleteFile(uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + let annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + let operation; + let id; + if (annotation === undefined) { + operation = DeleteFile.create(uri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = DeleteFile.create(uri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + } +} +/** + * The TextDocumentIdentifier namespace provides helper functions to work with + * {@link TextDocumentIdentifier} literals. + */ +export var TextDocumentIdentifier; +(function (TextDocumentIdentifier) { + /** + * Creates a new TextDocumentIdentifier literal. + * @param uri The document's uri. + */ + function create(uri) { + return { uri }; + } + TextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface. + */ + function is(value) { + const candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri); + } + TextDocumentIdentifier.is = is; +})(TextDocumentIdentifier || (TextDocumentIdentifier = {})); +/** + * The VersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link VersionedTextDocumentIdentifier} literals. + */ +export var VersionedTextDocumentIdentifier; +(function (VersionedTextDocumentIdentifier) { + /** + * Creates a new VersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri, version) { + return { uri, version }; + } + VersionedTextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface. + */ + function is(value) { + const candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version); + } + VersionedTextDocumentIdentifier.is = is; +})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {})); +/** + * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link OptionalVersionedTextDocumentIdentifier} literals. + */ +export var OptionalVersionedTextDocumentIdentifier; +(function (OptionalVersionedTextDocumentIdentifier) { + /** + * Creates a new OptionalVersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri, version) { + return { uri, version }; + } + OptionalVersionedTextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface. + */ + function is(value) { + const candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version)); + } + OptionalVersionedTextDocumentIdentifier.is = is; +})(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {})); +/** + * Predefined Language kinds + * @since 3.18.0 + * @proposed + */ +export var LanguageKind; +(function (LanguageKind) { + LanguageKind.ABAP = 'abap'; + LanguageKind.WindowsBat = 'bat'; + LanguageKind.BibTeX = 'bibtex'; + LanguageKind.Clojure = 'clojure'; + LanguageKind.Coffeescript = 'coffeescript'; + LanguageKind.C = 'c'; + LanguageKind.CPP = 'cpp'; + LanguageKind.CSharp = 'csharp'; + LanguageKind.CSS = 'css'; + /** + * @since 3.18.0 + * @proposed + */ + LanguageKind.D = 'd'; + /** + * @since 3.18.0 + * @proposed + */ + LanguageKind.Delphi = 'pascal'; + LanguageKind.Diff = 'diff'; + LanguageKind.Dart = 'dart'; + LanguageKind.Dockerfile = 'dockerfile'; + LanguageKind.Elixir = 'elixir'; + LanguageKind.Erlang = 'erlang'; + LanguageKind.FSharp = 'fsharp'; + LanguageKind.GitCommit = 'git-commit'; + LanguageKind.GitRebase = 'rebase'; + LanguageKind.Go = 'go'; + LanguageKind.Groovy = 'groovy'; + LanguageKind.Handlebars = 'handlebars'; + LanguageKind.Haskell = 'haskell'; + LanguageKind.HTML = 'html'; + LanguageKind.Ini = 'ini'; + LanguageKind.Java = 'java'; + LanguageKind.JavaScript = 'javascript'; + LanguageKind.JavaScriptReact = 'javascriptreact'; + LanguageKind.JSON = 'json'; + LanguageKind.LaTeX = 'latex'; + LanguageKind.Less = 'less'; + LanguageKind.Lua = 'lua'; + LanguageKind.Makefile = 'makefile'; + LanguageKind.Markdown = 'markdown'; + LanguageKind.ObjectiveC = 'objective-c'; + LanguageKind.ObjectiveCPP = 'objective-cpp'; + /** + * @since 3.18.0 + * @proposed + */ + LanguageKind.Pascal = 'pascal'; + LanguageKind.Perl = 'perl'; + LanguageKind.Perl6 = 'perl6'; + LanguageKind.PHP = 'php'; + LanguageKind.Powershell = 'powershell'; + LanguageKind.Pug = 'jade'; + LanguageKind.Python = 'python'; + LanguageKind.R = 'r'; + LanguageKind.Razor = 'razor'; + LanguageKind.Ruby = 'ruby'; + LanguageKind.Rust = 'rust'; + LanguageKind.SCSS = 'scss'; + LanguageKind.SASS = 'sass'; + LanguageKind.Scala = 'scala'; + LanguageKind.ShaderLab = 'shaderlab'; + LanguageKind.ShellScript = 'shellscript'; + LanguageKind.SQL = 'sql'; + LanguageKind.Swift = 'swift'; + LanguageKind.TypeScript = 'typescript'; + LanguageKind.TypeScriptReact = 'typescriptreact'; + LanguageKind.TeX = 'tex'; + LanguageKind.VisualBasic = 'vb'; + LanguageKind.XML = 'xml'; + LanguageKind.XSL = 'xsl'; + LanguageKind.YAML = 'yaml'; +})(LanguageKind || (LanguageKind = {})); +/** + * The TextDocumentItem namespace provides helper functions to work with + * {@link TextDocumentItem} literals. + */ +export var TextDocumentItem; +(function (TextDocumentItem) { + /** + * Creates a new TextDocumentItem literal. + * @param uri The document's uri. + * @param languageId The document's language identifier. + * @param version The document's version number. + * @param text The document's text. + */ + function create(uri, languageId, version, text) { + return { uri, languageId, version, text }; + } + TextDocumentItem.create = create; + /** + * Checks whether the given literal conforms to the {@link TextDocumentItem} interface. + */ + function is(value) { + const candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text); + } + TextDocumentItem.is = is; +})(TextDocumentItem || (TextDocumentItem = {})); +/** + * Describes the content type that a client supports in various + * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. + * + * Please note that `MarkupKinds` must not start with a `$`. This kinds + * are reserved for internal usage. + */ +export var MarkupKind; +(function (MarkupKind) { + /** + * Plain text is supported as a content format + */ + MarkupKind.PlainText = 'plaintext'; + /** + * Markdown is supported as a content format + */ + MarkupKind.Markdown = 'markdown'; + /** + * Checks whether the given value is a value of the {@link MarkupKind} type. + */ + function is(value) { + const candidate = value; + return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown; + } + MarkupKind.is = is; +})(MarkupKind || (MarkupKind = {})); +export var MarkupContent; +(function (MarkupContent) { + /** + * Checks whether the given value conforms to the {@link MarkupContent} interface. + */ + function is(value) { + const candidate = value; + return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value); + } + MarkupContent.is = is; +})(MarkupContent || (MarkupContent = {})); +/** + * The kind of a completion entry. + */ +export var CompletionItemKind; +(function (CompletionItemKind) { + CompletionItemKind.Text = 1; + CompletionItemKind.Method = 2; + CompletionItemKind.Function = 3; + CompletionItemKind.Constructor = 4; + CompletionItemKind.Field = 5; + CompletionItemKind.Variable = 6; + CompletionItemKind.Class = 7; + CompletionItemKind.Interface = 8; + CompletionItemKind.Module = 9; + CompletionItemKind.Property = 10; + CompletionItemKind.Unit = 11; + CompletionItemKind.Value = 12; + CompletionItemKind.Enum = 13; + CompletionItemKind.Keyword = 14; + CompletionItemKind.Snippet = 15; + CompletionItemKind.Color = 16; + CompletionItemKind.File = 17; + CompletionItemKind.Reference = 18; + CompletionItemKind.Folder = 19; + CompletionItemKind.EnumMember = 20; + CompletionItemKind.Constant = 21; + CompletionItemKind.Struct = 22; + CompletionItemKind.Event = 23; + CompletionItemKind.Operator = 24; + CompletionItemKind.TypeParameter = 25; +})(CompletionItemKind || (CompletionItemKind = {})); +/** + * Defines whether the insert text in a completion item should be interpreted as + * plain text or a snippet. + */ +export var InsertTextFormat; +(function (InsertTextFormat) { + /** + * The primary text to be inserted is treated as a plain string. + */ + InsertTextFormat.PlainText = 1; + /** + * The primary text to be inserted is treated as a snippet. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Placeholders with equal identifiers are linked, + * that is typing in one will update others too. + * + * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax + */ + InsertTextFormat.Snippet = 2; +})(InsertTextFormat || (InsertTextFormat = {})); +/** + * Completion item tags are extra annotations that tweak the rendering of a completion + * item. + * + * @since 3.15.0 + */ +export var CompletionItemTag; +(function (CompletionItemTag) { + /** + * Render a completion as obsolete, usually using a strike-out. + */ + CompletionItemTag.Deprecated = 1; +})(CompletionItemTag || (CompletionItemTag = {})); +/** + * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits. + * + * @since 3.16.0 + */ +export var InsertReplaceEdit; +(function (InsertReplaceEdit) { + /** + * Creates a new insert / replace edit + */ + function create(newText, insert, replace) { + return { newText, insert, replace }; + } + InsertReplaceEdit.create = create; + /** + * Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface. + */ + function is(value) { + const candidate = value; + return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace); + } + InsertReplaceEdit.is = is; +})(InsertReplaceEdit || (InsertReplaceEdit = {})); +/** + * How whitespace and indentation is handled during completion + * item insertion. + * + * @since 3.16.0 + */ +export var InsertTextMode; +(function (InsertTextMode) { + /** + * The insertion or replace strings is taken as it is. If the + * value is multi line the lines below the cursor will be + * inserted using the indentation defined in the string value. + * The client will not apply any kind of adjustments to the + * string. + */ + InsertTextMode.asIs = 1; + /** + * The editor adjusts leading whitespace of new lines so that + * they match the indentation up to the cursor of the line for + * which the item is accepted. + * + * Consider a line like this: <2tabs><3tabs>foo. Accepting a + * multi line completion item is indented using 2 tabs and all + * following lines inserted will be indented using 2 tabs as well. + */ + InsertTextMode.adjustIndentation = 2; +})(InsertTextMode || (InsertTextMode = {})); +export var CompletionItemLabelDetails; +(function (CompletionItemLabelDetails) { + function is(value) { + const candidate = value; + return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) && + (Is.string(candidate.description) || candidate.description === undefined); + } + CompletionItemLabelDetails.is = is; +})(CompletionItemLabelDetails || (CompletionItemLabelDetails = {})); +/** + * The CompletionItem namespace provides functions to deal with + * completion items. + */ +export var CompletionItem; +(function (CompletionItem) { + /** + * Create a completion item and seed it with a label. + * @param label The completion item's label + */ + function create(label) { + return { label }; + } + CompletionItem.create = create; +})(CompletionItem || (CompletionItem = {})); +/** + * The CompletionList namespace provides functions to deal with + * completion lists. + */ +export var CompletionList; +(function (CompletionList) { + /** + * Creates a new completion list. + * + * @param items The completion items. + * @param isIncomplete The list is not complete. + */ + function create(items, isIncomplete) { + return { items: items ? items : [], isIncomplete: !!isIncomplete }; + } + CompletionList.create = create; +})(CompletionList || (CompletionList = {})); +export var MarkedString; +(function (MarkedString) { + /** + * Creates a marked string from plain text. + * + * @param plainText The plain text. + */ + function fromPlainText(plainText) { + return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash + } + MarkedString.fromPlainText = fromPlainText; + /** + * Checks whether the given value conforms to the {@link MarkedString} type. + */ + function is(value) { + const candidate = value; + return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value)); + } + MarkedString.is = is; +})(MarkedString || (MarkedString = {})); +export var Hover; +(function (Hover) { + /** + * Checks whether the given value conforms to the {@link Hover} interface. + */ + function is(value) { + const candidate = value; + return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) || + MarkedString.is(candidate.contents) || + Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range)); + } + Hover.is = is; +})(Hover || (Hover = {})); +/** + * The ParameterInformation namespace provides helper functions to work with + * {@link ParameterInformation} literals. + */ +export var ParameterInformation; +(function (ParameterInformation) { + /** + * Creates a new parameter information literal. + * + * @param label A label string. + * @param documentation A doc string. + */ + function create(label, documentation) { + return documentation ? { label, documentation } : { label }; + } + ParameterInformation.create = create; +})(ParameterInformation || (ParameterInformation = {})); +/** + * The SignatureInformation namespace provides helper functions to work with + * {@link SignatureInformation} literals. + */ +export var SignatureInformation; +(function (SignatureInformation) { + function create(label, documentation, ...parameters) { + const result = { label }; + if (Is.defined(documentation)) { + result.documentation = documentation; + } + if (Is.defined(parameters)) { + result.parameters = parameters; + } + else { + result.parameters = []; + } + return result; + } + SignatureInformation.create = create; +})(SignatureInformation || (SignatureInformation = {})); +/** + * A document highlight kind. + */ +export var DocumentHighlightKind; +(function (DocumentHighlightKind) { + /** + * A textual occurrence. + */ + DocumentHighlightKind.Text = 1; + /** + * Read-access of a symbol, like reading a variable. + */ + DocumentHighlightKind.Read = 2; + /** + * Write-access of a symbol, like writing to a variable. + */ + DocumentHighlightKind.Write = 3; +})(DocumentHighlightKind || (DocumentHighlightKind = {})); +/** + * DocumentHighlight namespace to provide helper functions to work with + * {@link DocumentHighlight} literals. + */ +export var DocumentHighlight; +(function (DocumentHighlight) { + /** + * Create a DocumentHighlight object. + * @param range The range the highlight applies to. + * @param kind The highlight kind + */ + function create(range, kind) { + const result = { range }; + if (Is.number(kind)) { + result.kind = kind; + } + return result; + } + DocumentHighlight.create = create; +})(DocumentHighlight || (DocumentHighlight = {})); +/** + * A symbol kind. + */ +export var SymbolKind; +(function (SymbolKind) { + SymbolKind.File = 1; + SymbolKind.Module = 2; + SymbolKind.Namespace = 3; + SymbolKind.Package = 4; + SymbolKind.Class = 5; + SymbolKind.Method = 6; + SymbolKind.Property = 7; + SymbolKind.Field = 8; + SymbolKind.Constructor = 9; + SymbolKind.Enum = 10; + SymbolKind.Interface = 11; + SymbolKind.Function = 12; + SymbolKind.Variable = 13; + SymbolKind.Constant = 14; + SymbolKind.String = 15; + SymbolKind.Number = 16; + SymbolKind.Boolean = 17; + SymbolKind.Array = 18; + SymbolKind.Object = 19; + SymbolKind.Key = 20; + SymbolKind.Null = 21; + SymbolKind.EnumMember = 22; + SymbolKind.Struct = 23; + SymbolKind.Event = 24; + SymbolKind.Operator = 25; + SymbolKind.TypeParameter = 26; +})(SymbolKind || (SymbolKind = {})); +/** + * Symbol tags are extra annotations that tweak the rendering of a symbol. + * + * @since 3.16 + */ +export var SymbolTag; +(function (SymbolTag) { + /** + * Render a symbol as obsolete, usually using a strike-out. + */ + SymbolTag.Deprecated = 1; +})(SymbolTag || (SymbolTag = {})); +export var SymbolInformation; +(function (SymbolInformation) { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the location of the symbol. + * @param uri The resource of the location of symbol. + * @param containerName The name of the symbol containing the symbol. + */ + function create(name, kind, range, uri, containerName) { + const result = { + name, + kind, + location: { uri, range } + }; + if (containerName) { + result.containerName = containerName; + } + return result; + } + SymbolInformation.create = create; +})(SymbolInformation || (SymbolInformation = {})); +export var WorkspaceSymbol; +(function (WorkspaceSymbol) { + /** + * Create a new workspace symbol. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param uri The resource of the location of the symbol. + * @param range An options range of the location. + * @returns A WorkspaceSymbol. + */ + function create(name, kind, uri, range) { + return range !== undefined + ? { name, kind, location: { uri, range } } + : { name, kind, location: { uri } }; + } + WorkspaceSymbol.create = create; +})(WorkspaceSymbol || (WorkspaceSymbol = {})); +export var DocumentSymbol; +(function (DocumentSymbol) { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param detail The detail of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the symbol. + * @param selectionRange The selectionRange of the symbol. + * @param children Children of the symbol. + */ + function create(name, detail, kind, range, selectionRange, children) { + const result = { + name, + detail, + kind, + range, + selectionRange + }; + if (children !== undefined) { + result.children = children; + } + return result; + } + DocumentSymbol.create = create; + /** + * Checks whether the given literal conforms to the {@link DocumentSymbol} interface. + */ + function is(value) { + const candidate = value; + return candidate && + Is.string(candidate.name) && Is.number(candidate.kind) && + Range.is(candidate.range) && Range.is(candidate.selectionRange) && + (candidate.detail === undefined || Is.string(candidate.detail)) && + (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) && + (candidate.children === undefined || Array.isArray(candidate.children)) && + (candidate.tags === undefined || Array.isArray(candidate.tags)); + } + DocumentSymbol.is = is; +})(DocumentSymbol || (DocumentSymbol = {})); +/** + * A set of predefined code action kinds + */ +export var CodeActionKind; +(function (CodeActionKind) { + /** + * Empty kind. + */ + CodeActionKind.Empty = ''; + /** + * Base kind for quickfix actions: 'quickfix' + */ + CodeActionKind.QuickFix = 'quickfix'; + /** + * Base kind for refactoring actions: 'refactor' + */ + CodeActionKind.Refactor = 'refactor'; + /** + * Base kind for refactoring extraction actions: 'refactor.extract' + * + * Example extract actions: + * + * - Extract method + * - Extract function + * - Extract variable + * - Extract interface from class + * - ... + */ + CodeActionKind.RefactorExtract = 'refactor.extract'; + /** + * Base kind for refactoring inline actions: 'refactor.inline' + * + * Example inline actions: + * + * - Inline function + * - Inline variable + * - Inline constant + * - ... + */ + CodeActionKind.RefactorInline = 'refactor.inline'; + /** + * Base kind for refactoring move actions: `refactor.move` + * + * Example move actions: + * + * - Move a function to a new file + * - Move a property between classes + * - Move method to base class + * - ... + * + * @since 3.18.0 + * @proposed + */ + CodeActionKind.RefactorMove = 'refactor.move'; + /** + * Base kind for refactoring rewrite actions: 'refactor.rewrite' + * + * Example rewrite actions: + * + * - Convert JavaScript function to class + * - Add or remove parameter + * - Encapsulate field + * - Make method static + * - Move method to base class + * - ... + */ + CodeActionKind.RefactorRewrite = 'refactor.rewrite'; + /** + * Base kind for source actions: `source` + * + * Source code actions apply to the entire file. + */ + CodeActionKind.Source = 'source'; + /** + * Base kind for an organize imports source action: `source.organizeImports` + */ + CodeActionKind.SourceOrganizeImports = 'source.organizeImports'; + /** + * Base kind for auto-fix source actions: `source.fixAll`. + * + * Fix all actions automatically fix errors that have a clear fix that do not require user input. + * They should not suppress errors or perform unsafe fixes such as generating new types or classes. + * + * @since 3.15.0 + */ + CodeActionKind.SourceFixAll = 'source.fixAll'; + /** + * Base kind for all code actions applying to the entire notebook's scope. CodeActionKinds using + * this should always begin with `notebook.` + * + * @since 3.18.0 + */ + CodeActionKind.Notebook = 'notebook'; +})(CodeActionKind || (CodeActionKind = {})); +/** + * The reason why code actions were requested. + * + * @since 3.17.0 + */ +export var CodeActionTriggerKind; +(function (CodeActionTriggerKind) { + /** + * Code actions were explicitly requested by the user or by an extension. + */ + CodeActionTriggerKind.Invoked = 1; + /** + * Code actions were requested automatically. + * + * This typically happens when current selection in a file changes, but can + * also be triggered when file content changes. + */ + CodeActionTriggerKind.Automatic = 2; +})(CodeActionTriggerKind || (CodeActionTriggerKind = {})); +/** + * The CodeActionContext namespace provides helper functions to work with + * {@link CodeActionContext} literals. + */ +export var CodeActionContext; +(function (CodeActionContext) { + /** + * Creates a new CodeActionContext literal. + */ + function create(diagnostics, only, triggerKind) { + const result = { diagnostics }; + if (only !== undefined && only !== null) { + result.only = only; + } + if (triggerKind !== undefined && triggerKind !== null) { + result.triggerKind = triggerKind; + } + return result; + } + CodeActionContext.create = create; + /** + * Checks whether the given literal conforms to the {@link CodeActionContext} interface. + */ + function is(value) { + const candidate = value; + return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) + && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string)) + && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic); + } + CodeActionContext.is = is; +})(CodeActionContext || (CodeActionContext = {})); +export var CodeAction; +(function (CodeAction) { + function create(title, kindOrCommandOrEdit, kind) { + const result = { title }; + let checkKind = true; + if (typeof kindOrCommandOrEdit === 'string') { + checkKind = false; + result.kind = kindOrCommandOrEdit; + } + else if (Command.is(kindOrCommandOrEdit)) { + result.command = kindOrCommandOrEdit; + } + else { + result.edit = kindOrCommandOrEdit; + } + if (checkKind && kind !== undefined) { + result.kind = kind; + } + return result; + } + CodeAction.create = create; + function is(value) { + const candidate = value; + return candidate && Is.string(candidate.title) && + (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) && + (candidate.kind === undefined || Is.string(candidate.kind)) && + (candidate.edit !== undefined || candidate.command !== undefined) && + (candidate.command === undefined || Command.is(candidate.command)) && + (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) && + (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit)); + } + CodeAction.is = is; +})(CodeAction || (CodeAction = {})); +/** + * The CodeLens namespace provides helper functions to work with + * {@link CodeLens} literals. + */ +export var CodeLens; +(function (CodeLens) { + /** + * Creates a new CodeLens literal. + */ + function create(range, data) { + const result = { range }; + if (Is.defined(data)) { + result.data = data; + } + return result; + } + CodeLens.create = create; + /** + * Checks whether the given literal conforms to the {@link CodeLens} interface. + */ + function is(value) { + const candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command)); + } + CodeLens.is = is; +})(CodeLens || (CodeLens = {})); +/** + * The FormattingOptions namespace provides helper functions to work with + * {@link FormattingOptions} literals. + */ +export var FormattingOptions; +(function (FormattingOptions) { + /** + * Creates a new FormattingOptions literal. + */ + function create(tabSize, insertSpaces) { + return { tabSize, insertSpaces }; + } + FormattingOptions.create = create; + /** + * Checks whether the given literal conforms to the {@link FormattingOptions} interface. + */ + function is(value) { + const candidate = value; + return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces); + } + FormattingOptions.is = is; +})(FormattingOptions || (FormattingOptions = {})); +/** + * The DocumentLink namespace provides helper functions to work with + * {@link DocumentLink} literals. + */ +export var DocumentLink; +(function (DocumentLink) { + /** + * Creates a new DocumentLink literal. + */ + function create(range, target, data) { + return { range, target, data }; + } + DocumentLink.create = create; + /** + * Checks whether the given literal conforms to the {@link DocumentLink} interface. + */ + function is(value) { + const candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target)); + } + DocumentLink.is = is; +})(DocumentLink || (DocumentLink = {})); +/** + * The SelectionRange namespace provides helper function to work with + * SelectionRange literals. + */ +export var SelectionRange; +(function (SelectionRange) { + /** + * Creates a new SelectionRange + * @param range the range. + * @param parent an optional parent. + */ + function create(range, parent) { + return { range, parent }; + } + SelectionRange.create = create; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent)); + } + SelectionRange.is = is; +})(SelectionRange || (SelectionRange = {})); +/** + * A set of predefined token types. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ +export var SemanticTokenTypes; +(function (SemanticTokenTypes) { + SemanticTokenTypes["namespace"] = "namespace"; + /** + * Represents a generic type. Acts as a fallback for types which can't be mapped to + * a specific type like class or enum. + */ + SemanticTokenTypes["type"] = "type"; + SemanticTokenTypes["class"] = "class"; + SemanticTokenTypes["enum"] = "enum"; + SemanticTokenTypes["interface"] = "interface"; + SemanticTokenTypes["struct"] = "struct"; + SemanticTokenTypes["typeParameter"] = "typeParameter"; + SemanticTokenTypes["parameter"] = "parameter"; + SemanticTokenTypes["variable"] = "variable"; + SemanticTokenTypes["property"] = "property"; + SemanticTokenTypes["enumMember"] = "enumMember"; + SemanticTokenTypes["event"] = "event"; + SemanticTokenTypes["function"] = "function"; + SemanticTokenTypes["method"] = "method"; + SemanticTokenTypes["macro"] = "macro"; + SemanticTokenTypes["keyword"] = "keyword"; + SemanticTokenTypes["modifier"] = "modifier"; + SemanticTokenTypes["comment"] = "comment"; + SemanticTokenTypes["string"] = "string"; + SemanticTokenTypes["number"] = "number"; + SemanticTokenTypes["regexp"] = "regexp"; + SemanticTokenTypes["operator"] = "operator"; + /** + * @since 3.17.0 + */ + SemanticTokenTypes["decorator"] = "decorator"; + /** + * @since 3.18.0 + */ + SemanticTokenTypes["label"] = "label"; +})(SemanticTokenTypes || (SemanticTokenTypes = {})); +/** + * A set of predefined token modifiers. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ +export var SemanticTokenModifiers; +(function (SemanticTokenModifiers) { + SemanticTokenModifiers["declaration"] = "declaration"; + SemanticTokenModifiers["definition"] = "definition"; + SemanticTokenModifiers["readonly"] = "readonly"; + SemanticTokenModifiers["static"] = "static"; + SemanticTokenModifiers["deprecated"] = "deprecated"; + SemanticTokenModifiers["abstract"] = "abstract"; + SemanticTokenModifiers["async"] = "async"; + SemanticTokenModifiers["modification"] = "modification"; + SemanticTokenModifiers["documentation"] = "documentation"; + SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary"; +})(SemanticTokenModifiers || (SemanticTokenModifiers = {})); +/** + * @since 3.16.0 + */ +export var SemanticTokens; +(function (SemanticTokens) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') && + Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number'); + } + SemanticTokens.is = is; +})(SemanticTokens || (SemanticTokens = {})); +/** + * The InlineValueText namespace provides functions to deal with InlineValueTexts. + * + * @since 3.17.0 + */ +export var InlineValueText; +(function (InlineValueText) { + /** + * Creates a new InlineValueText literal. + */ + function create(range, text) { + return { range, text }; + } + InlineValueText.create = create; + function is(value) { + const candidate = value; + return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text); + } + InlineValueText.is = is; +})(InlineValueText || (InlineValueText = {})); +/** + * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups. + * + * @since 3.17.0 + */ +export var InlineValueVariableLookup; +(function (InlineValueVariableLookup) { + /** + * Creates a new InlineValueText literal. + */ + function create(range, variableName, caseSensitiveLookup) { + return { range, variableName, caseSensitiveLookup }; + } + InlineValueVariableLookup.create = create; + function is(value) { + const candidate = value; + return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup) + && (Is.string(candidate.variableName) || candidate.variableName === undefined); + } + InlineValueVariableLookup.is = is; +})(InlineValueVariableLookup || (InlineValueVariableLookup = {})); +/** + * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression. + * + * @since 3.17.0 + */ +export var InlineValueEvaluatableExpression; +(function (InlineValueEvaluatableExpression) { + /** + * Creates a new InlineValueEvaluatableExpression literal. + */ + function create(range, expression) { + return { range, expression }; + } + InlineValueEvaluatableExpression.create = create; + function is(value) { + const candidate = value; + return candidate !== undefined && candidate !== null && Range.is(candidate.range) + && (Is.string(candidate.expression) || candidate.expression === undefined); + } + InlineValueEvaluatableExpression.is = is; +})(InlineValueEvaluatableExpression || (InlineValueEvaluatableExpression = {})); +/** + * The InlineValueContext namespace provides helper functions to work with + * {@link InlineValueContext} literals. + * + * @since 3.17.0 + */ +export var InlineValueContext; +(function (InlineValueContext) { + /** + * Creates a new InlineValueContext literal. + */ + function create(frameId, stoppedLocation) { + return { frameId, stoppedLocation }; + } + InlineValueContext.create = create; + /** + * Checks whether the given literal conforms to the {@link InlineValueContext} interface. + */ + function is(value) { + const candidate = value; + return Is.defined(candidate) && Range.is(value.stoppedLocation); + } + InlineValueContext.is = is; +})(InlineValueContext || (InlineValueContext = {})); +/** + * Inlay hint kinds. + * + * @since 3.17.0 + */ +export var InlayHintKind; +(function (InlayHintKind) { + /** + * An inlay hint that for a type annotation. + */ + InlayHintKind.Type = 1; + /** + * An inlay hint that is for a parameter. + */ + InlayHintKind.Parameter = 2; + function is(value) { + return value === 1 || value === 2; + } + InlayHintKind.is = is; +})(InlayHintKind || (InlayHintKind = {})); +export var InlayHintLabelPart; +(function (InlayHintLabelPart) { + function create(value) { + return { value }; + } + InlayHintLabelPart.create = create; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) + && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) + && (candidate.location === undefined || Location.is(candidate.location)) + && (candidate.command === undefined || Command.is(candidate.command)); + } + InlayHintLabelPart.is = is; +})(InlayHintLabelPart || (InlayHintLabelPart = {})); +export var InlayHint; +(function (InlayHint) { + function create(position, label, kind) { + const result = { position, label }; + if (kind !== undefined) { + result.kind = kind; + } + return result; + } + InlayHint.create = create; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Position.is(candidate.position) + && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is)) + && (candidate.kind === undefined || InlayHintKind.is(candidate.kind)) + && (candidate.textEdits === undefined) || Is.typedArray(candidate.textEdits, TextEdit.is) + && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) + && (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft)) + && (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight)); + } + InlayHint.is = is; +})(InlayHint || (InlayHint = {})); +export var StringValue; +(function (StringValue) { + function createSnippet(value) { + return { kind: 'snippet', value }; + } + StringValue.createSnippet = createSnippet; + function isSnippet(value) { + const candidate = value; + return Is.objectLiteral(candidate) + && candidate.kind === 'snippet' + && Is.string(candidate.value); + } + StringValue.isSnippet = isSnippet; +})(StringValue || (StringValue = {})); +export var InlineCompletionItem; +(function (InlineCompletionItem) { + function create(insertText, filterText, range, command) { + return { insertText, filterText, range, command }; + } + InlineCompletionItem.create = create; +})(InlineCompletionItem || (InlineCompletionItem = {})); +export var InlineCompletionList; +(function (InlineCompletionList) { + function create(items) { + return { items }; + } + InlineCompletionList.create = create; +})(InlineCompletionList || (InlineCompletionList = {})); +/** + * Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered. + * + * @since 3.18.0 + * @proposed + */ +export var InlineCompletionTriggerKind; +(function (InlineCompletionTriggerKind) { + /** + * Completion was triggered explicitly by a user gesture. + */ + InlineCompletionTriggerKind.Invoked = 1; + /** + * Completion was triggered automatically while editing. + */ + InlineCompletionTriggerKind.Automatic = 2; +})(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {})); +export var SelectedCompletionInfo; +(function (SelectedCompletionInfo) { + function create(range, text) { + return { range, text }; + } + SelectedCompletionInfo.create = create; +})(SelectedCompletionInfo || (SelectedCompletionInfo = {})); +export var InlineCompletionContext; +(function (InlineCompletionContext) { + function create(triggerKind, selectedCompletionInfo) { + return { triggerKind, selectedCompletionInfo }; + } + InlineCompletionContext.create = create; +})(InlineCompletionContext || (InlineCompletionContext = {})); +export var WorkspaceFolder; +(function (WorkspaceFolder) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name); + } + WorkspaceFolder.is = is; +})(WorkspaceFolder || (WorkspaceFolder = {})); +export const EOL = ['\n', '\r\n', '\r']; +/** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +export var TextDocument; +(function (TextDocument) { + /** + * Creates a new ITextDocument literal from the given uri and content. + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param version The document's version. + * @param content The document's content. + */ + function create(uri, languageId, version, content) { + return new FullTextDocument(uri, languageId, version, content); + } + TextDocument.create = create; + /** + * Checks whether the given literal conforms to the {@link ITextDocument} interface. + */ + function is(value) { + const candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount) + && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false; + } + TextDocument.is = is; + function applyEdits(document, edits) { + let text = document.getText(); + const sortedEdits = mergeSort(edits, (a, b) => { + const diff = a.range.start.line - b.range.start.line; + if (diff === 0) { + return a.range.start.character - b.range.start.character; + } + return diff; + }); + let lastModifiedOffset = text.length; + for (let i = sortedEdits.length - 1; i >= 0; i--) { + const e = sortedEdits[i]; + const startOffset = document.offsetAt(e.range.start); + const endOffset = document.offsetAt(e.range.end); + if (endOffset <= lastModifiedOffset) { + text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length); + } + else { + throw new Error('Overlapping edit'); + } + lastModifiedOffset = startOffset; + } + return text; + } + TextDocument.applyEdits = applyEdits; + function mergeSort(data, compare) { + if (data.length <= 1) { + // sorted + return data; + } + const p = (data.length / 2) | 0; + const left = data.slice(0, p); + const right = data.slice(p); + mergeSort(left, compare); + mergeSort(right, compare); + let leftIdx = 0; + let rightIdx = 0; + let i = 0; + while (leftIdx < left.length && rightIdx < right.length) { + const ret = compare(left[leftIdx], right[rightIdx]); + if (ret <= 0) { + // smaller_equal -> take left to preserve order + data[i++] = left[leftIdx++]; + } + else { + // greater -> take right + data[i++] = right[rightIdx++]; + } + } + while (leftIdx < left.length) { + data[i++] = left[leftIdx++]; + } + while (rightIdx < right.length) { + data[i++] = right[rightIdx++]; + } + return data; + } +})(TextDocument || (TextDocument = {})); +/** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +class FullTextDocument { + constructor(uri, languageId, version, content) { + this._uri = uri; + this._languageId = languageId; + this._version = version; + this._content = content; + this._lineOffsets = undefined; + } + get uri() { + return this._uri; + } + get languageId() { + return this._languageId; + } + get version() { + return this._version; + } + getText(range) { + if (range) { + const start = this.offsetAt(range.start); + const end = this.offsetAt(range.end); + return this._content.substring(start, end); + } + return this._content; + } + update(event, version) { + this._content = event.text; + this._version = version; + this._lineOffsets = undefined; + } + getLineOffsets() { + if (this._lineOffsets === undefined) { + const lineOffsets = []; + const text = this._content; + let isLineStart = true; + for (let i = 0; i < text.length; i++) { + if (isLineStart) { + lineOffsets.push(i); + isLineStart = false; + } + const ch = text.charAt(i); + isLineStart = (ch === '\r' || ch === '\n'); + if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') { + i++; + } + } + if (isLineStart && text.length > 0) { + lineOffsets.push(text.length); + } + this._lineOffsets = lineOffsets; + } + return this._lineOffsets; + } + positionAt(offset) { + offset = Math.max(Math.min(offset, this._content.length), 0); + const lineOffsets = this.getLineOffsets(); + let low = 0, high = lineOffsets.length; + if (high === 0) { + return Position.create(0, offset); + } + while (low < high) { + const mid = Math.floor((low + high) / 2); + if (lineOffsets[mid] > offset) { + high = mid; + } + else { + low = mid + 1; + } + } + // low is the least x for which the line offset is larger than the current offset + // or array.length if no line offset is larger than the current offset + const line = low - 1; + return Position.create(line, offset - lineOffsets[line]); + } + offsetAt(position) { + const lineOffsets = this.getLineOffsets(); + if (position.line >= lineOffsets.length) { + return this._content.length; + } + else if (position.line < 0) { + return 0; + } + const lineOffset = lineOffsets[position.line]; + const nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length; + return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset); + } + get lineCount() { + return this.getLineOffsets().length; + } +} +var Is; +(function (Is) { + const toString = Object.prototype.toString; + function defined(value) { + return typeof value !== 'undefined'; + } + Is.defined = defined; + function undefined(value) { + return typeof value === 'undefined'; + } + Is.undefined = undefined; + function boolean(value) { + return value === true || value === false; + } + Is.boolean = boolean; + function string(value) { + return toString.call(value) === '[object String]'; + } + Is.string = string; + function number(value) { + return toString.call(value) === '[object Number]'; + } + Is.number = number; + function numberRange(value, min, max) { + return toString.call(value) === '[object Number]' && min <= value && value <= max; + } + Is.numberRange = numberRange; + function integer(value) { + return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647; + } + Is.integer = integer; + function uinteger(value) { + return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647; + } + Is.uinteger = uinteger; + function func(value) { + return toString.call(value) === '[object Function]'; + } + Is.func = func; + function objectLiteral(value) { + // Strictly speaking class instances pass this check as well. Since the LSP + // doesn't use classes we ignore this for now. If we do we need to add something + // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null` + return value !== null && typeof value === 'object'; + } + Is.objectLiteral = objectLiteral; + function typedArray(value, check) { + return Array.isArray(value) && value.every(check); + } + Is.typedArray = typedArray; +})(Is || (Is = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/esm/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/esm/package.json" index 01f70c7a5a6ecf4072861dcbf6afc91eccfd1060..3dbc1ca591c0557e35b6004aeba250e6a70b56e3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/esm/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/esm/package.json" @@ -1,3 +1,3 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3ca9d4afd21425087cf31893b8f9f63c81b0b8408db5e343ca76e5f8aa26ab9a -size 23 +{ + "type": "module" +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/umd/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/umd/main.d.ts" index abeff85eb1518fad9d9571c4721bcb96e5f1fe76..45182bf26d3eb5ebf622ba6451f59986e47e1a57 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/umd/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/umd/main.d.ts" @@ -1,3 +1,3358 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5eb79440b2a125665064595312683eb13ca236987f6bd60408c3681d983d7a7b -size 106599 +/** + * A tagging type for string properties that are actually document URIs. + */ +export type DocumentUri = string; +export declare namespace DocumentUri { + function is(value: any): value is DocumentUri; +} +/** + * A tagging type for string properties that are actually URIs + * + * @since 3.16.0 + */ +export type URI = string; +export declare namespace URI { + function is(value: any): value is URI; +} +/** + * Defines an integer in the range of -2^31 to 2^31 - 1. + */ +export type integer = number; +export declare namespace integer { + const MIN_VALUE = -2147483648; + const MAX_VALUE = 2147483647; + function is(value: any): value is integer; +} +/** + * Defines an unsigned integer in the range of 0 to 2^31 - 1. + */ +export type uinteger = number; +export declare namespace uinteger { + const MIN_VALUE = 0; + const MAX_VALUE = 2147483647; + function is(value: any): value is uinteger; +} +/** + * Defines a decimal number. Since decimal numbers are very + * rare in the language server specification we denote the + * exact range with every decimal using the mathematics + * interval notations (e.g. [0, 1] denotes all decimals d with + * 0 <= d <= 1. + */ +export type decimal = number; +/** + * The LSP any type. + * + * In the current implementation we map LSPAny to any. This is due to the fact + * that the TypeScript compilers can't infer string access signatures for + * interface correctly (it can though for types). See the following issue for + * details: https://github.com/microsoft/TypeScript/issues/15300. + * + * When the issue is addressed LSPAny can be defined as follows: + * + * ```ts + * export type LSPAny = LSPObject | LSPArray | string | integer | uinteger | decimal | boolean | null | undefined; + * export type LSPObject = { [key: string]: LSPAny }; + * export type LSPArray = LSPAny[]; + * ``` + * + * Please note that strictly speaking a property with the value `undefined` + * can't be converted into JSON preserving the property name. However for + * convenience it is allowed and assumed that all these properties are + * optional as well. + * + * @since 3.17.0 + */ +export type LSPAny = any; +export type LSPObject = object; +export type LSPArray = any[]; +/** + * Position in a text document expressed as zero-based line and character + * offset. Prior to 3.17 the offsets were always based on a UTF-16 string + * representation. So a string of the form `a𐐀b` the character offset of the + * character `a` is 0, the character offset of `𐐀` is 1 and the character + * offset of b is 3 since `𐐀` is represented using two code units in UTF-16. + * Since 3.17 clients and servers can agree on a different string encoding + * representation (e.g. UTF-8). The client announces it's supported encoding + * via the client capability [`general.positionEncodings`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#clientCapabilities). + * The value is an array of position encodings the client supports, with + * decreasing preference (e.g. the encoding at index `0` is the most preferred + * one). To stay backwards compatible the only mandatory encoding is UTF-16 + * represented via the string `utf-16`. The server can pick one of the + * encodings offered by the client and signals that encoding back to the + * client via the initialize result's property + * [`capabilities.positionEncoding`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#serverCapabilities). If the string value + * `utf-16` is missing from the client's capability `general.positionEncodings` + * servers can safely assume that the client supports UTF-16. If the server + * omits the position encoding in its initialize result the encoding defaults + * to the string value `utf-16`. Implementation considerations: since the + * conversion from one encoding into another requires the content of the + * file / line the conversion is best done where the file is read which is + * usually on the server side. + * + * Positions are line end character agnostic. So you can not specify a position + * that denotes `\r|\n` or `\n|` where `|` represents the character offset. + * + * @since 3.17.0 - support for negotiated position encoding. + */ +export interface Position { + /** + * Line position in a document (zero-based). + * + * If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document. + * If a line number is negative, it defaults to 0. + */ + line: uinteger; + /** + * Character offset on a line in a document (zero-based). + * + * The meaning of this offset is determined by the negotiated + * `PositionEncodingKind`. + * + * If the character value is greater than the line length it defaults back to the + * line length. + */ + character: uinteger; +} +/** + * The Position namespace provides helper functions to work with + * {@link Position} literals. + */ +export declare namespace Position { + /** + * Creates a new Position literal from the given line and character. + * @param line The position's line. + * @param character The position's character. + */ + function create(line: uinteger, character: uinteger): Position; + /** + * Checks whether the given literal conforms to the {@link Position} interface. + */ + function is(value: any): value is Position; +} +/** + * A range in a text document expressed as (zero-based) start and end positions. + * + * If you want to specify a range that contains a line including the line ending + * character(s) then use an end position denoting the start of the next line. + * For example: + * ```ts + * { + * start: { line: 5, character: 23 } + * end : { line 6, character : 0 } + * } + * ``` + */ +export interface Range { + /** + * The range's start position. + */ + start: Position; + /** + * The range's end position. + */ + end: Position; +} +/** + * The Range namespace provides helper functions to work with + * {@link Range} literals. + */ +export declare namespace Range { + /** + * Create a new Range literal. + * @param start The range's start position. + * @param end The range's end position. + */ + function create(start: Position, end: Position): Range; + /** + * Create a new Range literal. + * @param startLine The start line number. + * @param startCharacter The start character. + * @param endLine The end line number. + * @param endCharacter The end character. + */ + function create(startLine: uinteger, startCharacter: uinteger, endLine: uinteger, endCharacter: uinteger): Range; + /** + * Checks whether the given literal conforms to the {@link Range} interface. + */ + function is(value: any): value is Range; +} +/** + * Represents a location inside a resource, such as a line + * inside a text file. + */ +export interface Location { + uri: DocumentUri; + range: Range; +} +/** + * The Location namespace provides helper functions to work with + * {@link Location} literals. + */ +export declare namespace Location { + /** + * Creates a Location literal. + * @param uri The location's uri. + * @param range The location's range. + */ + function create(uri: DocumentUri, range: Range): Location; + /** + * Checks whether the given literal conforms to the {@link Location} interface. + */ + function is(value: any): value is Location; +} +/** + * Represents the connection of two locations. Provides additional metadata over normal {@link Location locations}, + * including an origin range. + */ +export interface LocationLink { + /** + * Span of the origin of this link. + * + * Used as the underlined span for mouse interaction. Defaults to the word range at + * the definition position. + */ + originSelectionRange?: Range; + /** + * The target resource identifier of this link. + */ + targetUri: DocumentUri; + /** + * The full target range of this link. If the target for example is a symbol then target range is the + * range enclosing this symbol not including leading/trailing whitespace but everything else + * like comments. This information is typically used to highlight the range in the editor. + */ + targetRange: Range; + /** + * The range that should be selected and revealed when this link is being followed, e.g the name of a function. + * Must be contained by the `targetRange`. See also `DocumentSymbol#range` + */ + targetSelectionRange: Range; +} +/** + * The LocationLink namespace provides helper functions to work with + * {@link LocationLink} literals. + */ +export declare namespace LocationLink { + /** + * Creates a LocationLink literal. + * @param targetUri The definition's uri. + * @param targetRange The full range of the definition. + * @param targetSelectionRange The span of the symbol definition at the target. + * @param originSelectionRange The span of the symbol being defined in the originating source file. + */ + function create(targetUri: DocumentUri, targetRange: Range, targetSelectionRange: Range, originSelectionRange?: Range): LocationLink; + /** + * Checks whether the given literal conforms to the {@link LocationLink} interface. + */ + function is(value: any): value is LocationLink; +} +/** + * Represents a color in RGBA space. + */ +export interface Color { + /** + * The red component of this color in the range [0-1]. + */ + readonly red: decimal; + /** + * The green component of this color in the range [0-1]. + */ + readonly green: decimal; + /** + * The blue component of this color in the range [0-1]. + */ + readonly blue: decimal; + /** + * The alpha component of this color in the range [0-1]. + */ + readonly alpha: decimal; +} +/** + * The Color namespace provides helper functions to work with + * {@link Color} literals. + */ +export declare namespace Color { + /** + * Creates a new Color literal. + */ + function create(red: decimal, green: decimal, blue: decimal, alpha: decimal): Color; + /** + * Checks whether the given literal conforms to the {@link Color} interface. + */ + function is(value: any): value is Color; +} +/** + * Represents a color range from a document. + */ +export interface ColorInformation { + /** + * The range in the document where this color appears. + */ + range: Range; + /** + * The actual color value for this color range. + */ + color: Color; +} +/** + * The ColorInformation namespace provides helper functions to work with + * {@link ColorInformation} literals. + */ +export declare namespace ColorInformation { + /** + * Creates a new ColorInformation literal. + */ + function create(range: Range, color: Color): ColorInformation; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value: any): value is ColorInformation; +} +export interface ColorPresentation { + /** + * The label of this color presentation. It will be shown on the color + * picker header. By default this is also the text that is inserted when selecting + * this color presentation. + */ + label: string; + /** + * An {@link TextEdit edit} which is applied to a document when selecting + * this presentation for the color. When `falsy` the {@link ColorPresentation.label label} + * is used. + */ + textEdit?: TextEdit; + /** + * An optional array of additional {@link TextEdit text edits} that are applied when + * selecting this color presentation. Edits must not overlap with the main {@link ColorPresentation.textEdit edit} nor with themselves. + */ + additionalTextEdits?: TextEdit[]; +} +/** + * The Color namespace provides helper functions to work with + * {@link ColorPresentation} literals. + */ +export declare namespace ColorPresentation { + /** + * Creates a new ColorInformation literal. + */ + function create(label: string, textEdit?: TextEdit, additionalTextEdits?: TextEdit[]): ColorPresentation; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value: any): value is ColorPresentation; +} +/** + * A set of predefined range kinds. + */ +export declare namespace FoldingRangeKind { + /** + * Folding range for a comment + */ + const Comment = "comment"; + /** + * Folding range for an import or include + */ + const Imports = "imports"; + /** + * Folding range for a region (e.g. `#region`) + */ + const Region = "region"; +} +/** + * A predefined folding range kind. + * + * The type is a string since the value set is extensible + */ +export type FoldingRangeKind = string; +/** + * Represents a folding range. To be valid, start and end line must be bigger than zero and smaller + * than the number of lines in the document. Clients are free to ignore invalid ranges. + */ +export interface FoldingRange { + /** + * The zero-based start line of the range to fold. The folded area starts after the line's last character. + * To be valid, the end must be zero or larger and smaller than the number of lines in the document. + */ + startLine: uinteger; + /** + * The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line. + */ + startCharacter?: uinteger; + /** + * The zero-based end line of the range to fold. The folded area ends with the line's last character. + * To be valid, the end must be zero or larger and smaller than the number of lines in the document. + */ + endLine: uinteger; + /** + * The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line. + */ + endCharacter?: uinteger; + /** + * Describes the kind of the folding range such as 'comment' or 'region'. The kind + * is used to categorize folding ranges and used by commands like 'Fold all comments'. + * See {@link FoldingRangeKind} for an enumeration of standardized kinds. + */ + kind?: FoldingRangeKind; + /** + * The text that the client should show when the specified range is + * collapsed. If not defined or not supported by the client, a default + * will be chosen by the client. + * + * @since 3.17.0 + */ + collapsedText?: string; +} +/** + * The folding range namespace provides helper functions to work with + * {@link FoldingRange} literals. + */ +export declare namespace FoldingRange { + /** + * Creates a new FoldingRange literal. + */ + function create(startLine: uinteger, endLine: uinteger, startCharacter?: uinteger, endCharacter?: uinteger, kind?: FoldingRangeKind, collapsedText?: string): FoldingRange; + /** + * Checks whether the given literal conforms to the {@link FoldingRange} interface. + */ + function is(value: any): value is FoldingRange; +} +/** + * Represents a related message and source code location for a diagnostic. This should be + * used to point to code locations that cause or related to a diagnostics, e.g when duplicating + * a symbol in a scope. + */ +export interface DiagnosticRelatedInformation { + /** + * The location of this related diagnostic information. + */ + location: Location; + /** + * The message of this related diagnostic information. + */ + message: string; +} +/** + * The DiagnosticRelatedInformation namespace provides helper functions to work with + * {@link DiagnosticRelatedInformation} literals. + */ +export declare namespace DiagnosticRelatedInformation { + /** + * Creates a new DiagnosticRelatedInformation literal. + */ + function create(location: Location, message: string): DiagnosticRelatedInformation; + /** + * Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface. + */ + function is(value: any): value is DiagnosticRelatedInformation; +} +/** + * The diagnostic's severity. + */ +export declare namespace DiagnosticSeverity { + /** + * Reports an error. + */ + const Error: 1; + /** + * Reports a warning. + */ + const Warning: 2; + /** + * Reports an information. + */ + const Information: 3; + /** + * Reports a hint. + */ + const Hint: 4; +} +export type DiagnosticSeverity = 1 | 2 | 3 | 4; +/** + * The diagnostic tags. + * + * @since 3.15.0 + */ +export declare namespace DiagnosticTag { + /** + * Unused or unnecessary code. + * + * Clients are allowed to render diagnostics with this tag faded out instead of having + * an error squiggle. + */ + const Unnecessary: 1; + /** + * Deprecated or obsolete code. + * + * Clients are allowed to rendered diagnostics with this tag strike through. + */ + const Deprecated: 2; +} +export type DiagnosticTag = 1 | 2; +/** + * Structure to capture a description for an error code. + * + * @since 3.16.0 + */ +export interface CodeDescription { + /** + * An URI to open with more information about the diagnostic error. + */ + href: URI; +} +/** + * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes. + * + * @since 3.16.0 + */ +export declare namespace CodeDescription { + function is(value: any): value is CodeDescription; +} +/** + * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects + * are only valid in the scope of a resource. + */ +export interface Diagnostic { + /** + * The range at which the message applies + */ + range: Range; + /** + * The diagnostic's severity. Can be omitted. If omitted it is up to the + * client to interpret diagnostics as error, warning, info or hint. + */ + severity?: DiagnosticSeverity; + /** + * The diagnostic's code, which usually appear in the user interface. + */ + code?: integer | string; + /** + * An optional property to describe the error code. + * Requires the code field (above) to be present/not null. + * + * @since 3.16.0 + */ + codeDescription?: CodeDescription; + /** + * A human-readable string describing the source of this + * diagnostic, e.g. 'typescript' or 'super lint'. It usually + * appears in the user interface. + */ + source?: string; + /** + * The diagnostic's message. It usually appears in the user interface + */ + message: string; + /** + * Additional metadata about the diagnostic. + * + * @since 3.15.0 + */ + tags?: DiagnosticTag[]; + /** + * An array of related diagnostic information, e.g. when symbol-names within + * a scope collide all definitions can be marked via this property. + */ + relatedInformation?: DiagnosticRelatedInformation[]; + /** + * A data entry field that is preserved between a `textDocument/publishDiagnostics` + * notification and `textDocument/codeAction` request. + * + * @since 3.16.0 + */ + data?: LSPAny; +} +/** + * The Diagnostic namespace provides helper functions to work with + * {@link Diagnostic} literals. + */ +export declare namespace Diagnostic { + /** + * Creates a new Diagnostic literal. + */ + function create(range: Range, message: string, severity?: DiagnosticSeverity, code?: integer | string, source?: string, relatedInformation?: DiagnosticRelatedInformation[]): Diagnostic; + /** + * Checks whether the given literal conforms to the {@link Diagnostic} interface. + */ + function is(value: any): value is Diagnostic; +} +/** + * Represents a reference to a command. Provides a title which + * will be used to represent a command in the UI and, optionally, + * an array of arguments which will be passed to the command handler + * function when invoked. + */ +export interface Command { + /** + * Title of the command, like `save`. + */ + title: string; + /** + * An optional tooltip. + * + * @since 3.18.0 + * @proposed + */ + tooltip?: string; + /** + * The identifier of the actual command handler. + */ + command: string; + /** + * Arguments that the command handler should be + * invoked with. + */ + arguments?: LSPAny[]; +} +/** + * The Command namespace provides helper functions to work with + * {@link Command} literals. + */ +export declare namespace Command { + /** + * Creates a new Command literal. + */ + function create(title: string, command: string, ...args: any[]): Command; + /** + * Checks whether the given literal conforms to the {@link Command} interface. + */ + function is(value: any): value is Command; +} +/** + * A text edit applicable to a text document. + */ +export interface TextEdit { + /** + * The range of the text document to be manipulated. To insert + * text into a document create a range where start === end. + */ + range: Range; + /** + * The string to be inserted. For delete operations use an + * empty string. + */ + newText: string; +} +/** + * The TextEdit namespace provides helper function to create replace, + * insert and delete edits more easily. + */ +export declare namespace TextEdit { + /** + * Creates a replace text edit. + * @param range The range of text to be replaced. + * @param newText The new text. + */ + function replace(range: Range, newText: string): TextEdit; + /** + * Creates an insert text edit. + * @param position The position to insert the text at. + * @param newText The text to be inserted. + */ + function insert(position: Position, newText: string): TextEdit; + /** + * Creates a delete text edit. + * @param range The range of text to be deleted. + */ + function del(range: Range): TextEdit; + function is(value: any): value is TextEdit; +} +/** + * Additional information that describes document changes. + * + * @since 3.16.0 + */ +export interface ChangeAnnotation { + /** + * A human-readable string describing the actual change. The string + * is rendered prominent in the user interface. + */ + label: string; + /** + * A flag which indicates that user confirmation is needed + * before applying the change. + */ + needsConfirmation?: boolean; + /** + * A human-readable string which is rendered less prominent in + * the user interface. + */ + description?: string; +} +export declare namespace ChangeAnnotation { + function create(label: string, needsConfirmation?: boolean, description?: string): ChangeAnnotation; + function is(value: any): value is ChangeAnnotation; +} +export declare namespace ChangeAnnotationIdentifier { + function is(value: any): value is ChangeAnnotationIdentifier; +} +/** + * An identifier to refer to a change annotation stored with a workspace edit. + */ +export type ChangeAnnotationIdentifier = string; +/** + * A special text edit with an additional change annotation. + * + * @since 3.16.0. + */ +export interface AnnotatedTextEdit extends TextEdit { + /** + * The actual identifier of the change annotation + */ + annotationId: ChangeAnnotationIdentifier; +} +export declare namespace AnnotatedTextEdit { + /** + * Creates an annotated replace text edit. + * + * @param range The range of text to be replaced. + * @param newText The new text. + * @param annotation The annotation. + */ + function replace(range: Range, newText: string, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + /** + * Creates an annotated insert text edit. + * + * @param position The position to insert the text at. + * @param newText The text to be inserted. + * @param annotation The annotation. + */ + function insert(position: Position, newText: string, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + /** + * Creates an annotated delete text edit. + * + * @param range The range of text to be deleted. + * @param annotation The annotation. + */ + function del(range: Range, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + function is(value: any): value is AnnotatedTextEdit; +} +/** + * Describes textual changes on a text document. A TextDocumentEdit describes all changes + * on a document version Si and after they are applied move the document to version Si+1. + * So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any + * kind of ordering. However the edits must be non overlapping. + */ +export interface TextDocumentEdit { + /** + * The text document to change. + */ + textDocument: OptionalVersionedTextDocumentIdentifier; + /** + * The edits to be applied. + * + * @since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a + * client capability. + * + * @since 3.18.0 - support for SnippetTextEdit. This is guarded using a + * client capability. + */ + edits: (TextEdit | AnnotatedTextEdit | SnippetTextEdit)[]; +} +/** + * The TextDocumentEdit namespace provides helper function to create + * an edit that manipulates a text document. + */ +export declare namespace TextDocumentEdit { + /** + * Creates a new `TextDocumentEdit` + */ + function create(textDocument: OptionalVersionedTextDocumentIdentifier, edits: (TextEdit | AnnotatedTextEdit | SnippetTextEdit)[]): TextDocumentEdit; + function is(value: any): value is TextDocumentEdit; +} +/** + * A generic resource operation. + */ +interface ResourceOperation { + /** + * The resource operation kind. + */ + kind: string; + /** + * An optional annotation identifier describing the operation. + * + * @since 3.16.0 + */ + annotationId?: ChangeAnnotationIdentifier; +} +/** + * Options to create a file. + */ +export interface CreateFileOptions { + /** + * Overwrite existing file. Overwrite wins over `ignoreIfExists` + */ + overwrite?: boolean; + /** + * Ignore if exists. + */ + ignoreIfExists?: boolean; +} +/** + * Create file operation. + */ +export interface CreateFile extends ResourceOperation { + /** + * A create + */ + kind: 'create'; + /** + * The resource to create. + */ + uri: DocumentUri; + /** + * Additional options + */ + options?: CreateFileOptions; +} +export declare namespace CreateFile { + function create(uri: DocumentUri, options?: CreateFileOptions, annotation?: ChangeAnnotationIdentifier): CreateFile; + function is(value: any): value is CreateFile; +} +/** + * Rename file options + */ +export interface RenameFileOptions { + /** + * Overwrite target if existing. Overwrite wins over `ignoreIfExists` + */ + overwrite?: boolean; + /** + * Ignores if target exists. + */ + ignoreIfExists?: boolean; +} +/** + * Rename file operation + */ +export interface RenameFile extends ResourceOperation { + /** + * A rename + */ + kind: 'rename'; + /** + * The old (existing) location. + */ + oldUri: DocumentUri; + /** + * The new location. + */ + newUri: DocumentUri; + /** + * Rename options. + */ + options?: RenameFileOptions; +} +export declare namespace RenameFile { + function create(oldUri: DocumentUri, newUri: DocumentUri, options?: RenameFileOptions, annotation?: ChangeAnnotationIdentifier): RenameFile; + function is(value: any): value is RenameFile; +} +/** + * Delete file options + */ +export interface DeleteFileOptions { + /** + * Delete the content recursively if a folder is denoted. + */ + recursive?: boolean; + /** + * Ignore the operation if the file doesn't exist. + */ + ignoreIfNotExists?: boolean; +} +/** + * Delete file operation + */ +export interface DeleteFile extends ResourceOperation { + /** + * A delete + */ + kind: 'delete'; + /** + * The file to delete. + */ + uri: DocumentUri; + /** + * Delete options. + */ + options?: DeleteFileOptions; +} +export declare namespace DeleteFile { + function create(uri: DocumentUri, options?: DeleteFileOptions, annotation?: ChangeAnnotationIdentifier): DeleteFile; + function is(value: any): value is DeleteFile; +} +/** + * A workspace edit represents changes to many resources managed in the workspace. The edit + * should either provide `changes` or `documentChanges`. If documentChanges are present + * they are preferred over `changes` if the client can handle versioned document edits. + * + * Since version 3.13.0 a workspace edit can contain resource operations as well. If resource + * operations are present clients need to execute the operations in the order in which they + * are provided. So a workspace edit for example can consist of the following two changes: + * (1) a create file a.txt and (2) a text document edit which insert text into file a.txt. + * + * An invalid sequence (e.g. (1) delete file a.txt and (2) insert text into file a.txt) will + * cause failure of the operation. How the client recovers from the failure is described by + * the client capability: `workspace.workspaceEdit.failureHandling` + */ +export interface WorkspaceEdit { + /** + * Holds changes to existing resources. + */ + changes?: { + [uri: DocumentUri]: TextEdit[]; + }; + /** + * Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes + * are either an array of `TextDocumentEdit`s to express changes to n different text documents + * where each text document edit addresses a specific version of a text document. Or it can contain + * above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations. + * + * Whether a client supports versioned document edits is expressed via + * `workspace.workspaceEdit.documentChanges` client capability. + * + * If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then + * only plain `TextEdit`s using the `changes` property are supported. + */ + documentChanges?: (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[]; + /** + * A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and + * delete file / folder operations. + * + * Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`. + * + * @since 3.16.0 + */ + changeAnnotations?: { + [id: ChangeAnnotationIdentifier]: ChangeAnnotation; + }; +} +export declare namespace WorkspaceEdit { + function is(value: any): value is WorkspaceEdit; +} +/** + * Additional data about a workspace edit. + * + * @since 3.18.0 + * @proposed + */ +export interface WorkspaceEditMetadata { + /** + * Signal to the editor that this edit is a refactoring. + */ + isRefactoring?: boolean; +} +/** + * A change to capture text edits for existing resources. + */ +export interface TextEditChange { + /** + * Gets all text edits for this change. + * + * @return An array of text edits. + * + * @since 3.16.0 - support for annotated text edits. This is usually + * guarded using a client capability. + * + * @since 3.18.0 - support for snippet text edits. This is usually + * guarded using a client capability. + */ + all(): (TextEdit | AnnotatedTextEdit | SnippetTextEdit)[]; + /** + * Clears the edits for this change. + */ + clear(): void; + /** + * Adds a text edit. + * + * @param edit the text edit to add. + * + * @since 3.16.0 - support for annotated text edits. This is usually + * guarded using a client capability. + * + * @since 3.18.0 - support for snippet text edits. This is usually + * guarded using a client capability. + */ + add(edit: TextEdit | AnnotatedTextEdit | SnippetTextEdit): void; + /** + * Insert the given text at the given position. + * + * @param position A position. + * @param newText A string. + * @param annotation An optional annotation. + */ + insert(position: Position, newText: string): void; + insert(position: Position, newText: string, annotation: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; + /** + * Replace the given range with given text for the given resource. + * + * @param range A range. + * @param newText A string. + * @param annotation An optional annotation. + */ + replace(range: Range, newText: string): void; + replace(range: Range, newText: string, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; + /** + * Delete the text at the given range. + * + * @param range A range. + * @param annotation An optional annotation. + */ + delete(range: Range): void; + delete(range: Range, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; +} +/** + * An interactive text edit. + * + * @since 3.18.0 + * @proposed + */ +export interface SnippetTextEdit { + /** + * The range of the text document to be manipulated. + */ + range: Range; + /** + * The snippet to be inserted. + */ + snippet: StringValue; + /** + * The actual identifier of the snippet edit. + */ + annotationId?: ChangeAnnotationIdentifier; +} +export declare namespace SnippetTextEdit { + function is(value: any): value is SnippetTextEdit; +} +/** + * A workspace change helps constructing changes to a workspace. + */ +export declare class WorkspaceChange { + private _workspaceEdit; + private _textEditChanges; + private _changeAnnotations; + constructor(workspaceEdit?: WorkspaceEdit); + /** + * Returns the underlying {@link WorkspaceEdit} literal + * use to be returned from a workspace edit operation like rename. + */ + get edit(): WorkspaceEdit; + /** + * Returns the {@link TextEditChange} to manage text edits + * for resources. + */ + getTextEditChange(textDocument: OptionalVersionedTextDocumentIdentifier): TextEditChange; + getTextEditChange(uri: DocumentUri): TextEditChange; + private initDocumentChanges; + private initChanges; + createFile(uri: DocumentUri, options?: CreateFileOptions): void; + createFile(uri: DocumentUri, annotation: ChangeAnnotation | ChangeAnnotationIdentifier, options?: CreateFileOptions): ChangeAnnotationIdentifier; + renameFile(oldUri: DocumentUri, newUri: DocumentUri, options?: RenameFileOptions): void; + renameFile(oldUri: DocumentUri, newUri: DocumentUri, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier, options?: RenameFileOptions): ChangeAnnotationIdentifier; + deleteFile(uri: DocumentUri, options?: DeleteFileOptions): void; + deleteFile(uri: DocumentUri, annotation: ChangeAnnotation | ChangeAnnotationIdentifier, options?: DeleteFileOptions): ChangeAnnotationIdentifier; +} +/** + * A literal to identify a text document in the client. + */ +export interface TextDocumentIdentifier { + /** + * The text document's uri. + */ + uri: DocumentUri; +} +/** + * The TextDocumentIdentifier namespace provides helper functions to work with + * {@link TextDocumentIdentifier} literals. + */ +export declare namespace TextDocumentIdentifier { + /** + * Creates a new TextDocumentIdentifier literal. + * @param uri The document's uri. + */ + function create(uri: DocumentUri): TextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface. + */ + function is(value: any): value is TextDocumentIdentifier; +} +/** + * A text document identifier to denote a specific version of a text document. + */ +export interface VersionedTextDocumentIdentifier extends TextDocumentIdentifier { + /** + * The version number of this document. + */ + version: integer; +} +/** + * The VersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link VersionedTextDocumentIdentifier} literals. + */ +export declare namespace VersionedTextDocumentIdentifier { + /** + * Creates a new VersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri: DocumentUri, version: integer): VersionedTextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface. + */ + function is(value: any): value is VersionedTextDocumentIdentifier; +} +/** + * A text document identifier to optionally denote a specific version of a text document. + */ +export interface OptionalVersionedTextDocumentIdentifier extends TextDocumentIdentifier { + /** + * The version number of this document. If a versioned text document identifier + * is sent from the server to the client and the file is not open in the editor + * (the server has not received an open notification before) the server can send + * `null` to indicate that the version is unknown and the content on disk is the + * truth (as specified with document content ownership). + */ + version: integer | null; +} +/** + * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link OptionalVersionedTextDocumentIdentifier} literals. + */ +export declare namespace OptionalVersionedTextDocumentIdentifier { + /** + * Creates a new OptionalVersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri: DocumentUri, version: integer | null): OptionalVersionedTextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface. + */ + function is(value: any): value is OptionalVersionedTextDocumentIdentifier; +} +/** + * An item to transfer a text document from the client to the + * server. + */ +export interface TextDocumentItem { + /** + * The text document's uri. + */ + uri: DocumentUri; + /** + * The text document's language identifier. + */ + languageId: LanguageKind; + /** + * The version number of this document (it will increase after each + * change, including undo/redo). + */ + version: integer; + /** + * The content of the opened text document. + */ + text: string; +} +/** + * Predefined Language kinds + * @since 3.18.0 + * @proposed + */ +export declare namespace LanguageKind { + const ABAP: "abap"; + const WindowsBat: "bat"; + const BibTeX: "bibtex"; + const Clojure: "clojure"; + const Coffeescript: "coffeescript"; + const C: "c"; + const CPP: "cpp"; + const CSharp: "csharp"; + const CSS: "css"; + /** + * @since 3.18.0 + * @proposed + */ + const D: "d"; + /** + * @since 3.18.0 + * @proposed + */ + const Delphi: "pascal"; + const Diff: "diff"; + const Dart: "dart"; + const Dockerfile: "dockerfile"; + const Elixir: "elixir"; + const Erlang: "erlang"; + const FSharp: "fsharp"; + const GitCommit: "git-commit"; + const GitRebase: "rebase"; + const Go: "go"; + const Groovy: "groovy"; + const Handlebars: "handlebars"; + const Haskell: "haskell"; + const HTML: "html"; + const Ini: "ini"; + const Java: "java"; + const JavaScript: "javascript"; + const JavaScriptReact: "javascriptreact"; + const JSON: "json"; + const LaTeX: "latex"; + const Less: "less"; + const Lua: "lua"; + const Makefile: "makefile"; + const Markdown: "markdown"; + const ObjectiveC: "objective-c"; + const ObjectiveCPP: "objective-cpp"; + /** + * @since 3.18.0 + * @proposed + */ + const Pascal: "pascal"; + const Perl: "perl"; + const Perl6: "perl6"; + const PHP: "php"; + const Powershell: "powershell"; + const Pug: "jade"; + const Python: "python"; + const R: "r"; + const Razor: "razor"; + const Ruby: "ruby"; + const Rust: "rust"; + const SCSS: "scss"; + const SASS: "sass"; + const Scala: "scala"; + const ShaderLab: "shaderlab"; + const ShellScript: "shellscript"; + const SQL: "sql"; + const Swift: "swift"; + const TypeScript: "typescript"; + const TypeScriptReact: "typescriptreact"; + const TeX: "tex"; + const VisualBasic: "vb"; + const XML: "xml"; + const XSL: "xsl"; + const YAML: "yaml"; +} +export type LanguageKind = string; +/** + * The TextDocumentItem namespace provides helper functions to work with + * {@link TextDocumentItem} literals. + */ +export declare namespace TextDocumentItem { + /** + * Creates a new TextDocumentItem literal. + * @param uri The document's uri. + * @param languageId The document's language identifier. + * @param version The document's version number. + * @param text The document's text. + */ + function create(uri: DocumentUri, languageId: LanguageKind, version: integer, text: string): TextDocumentItem; + /** + * Checks whether the given literal conforms to the {@link TextDocumentItem} interface. + */ + function is(value: any): value is TextDocumentItem; +} +/** + * Describes the content type that a client supports in various + * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. + * + * Please note that `MarkupKinds` must not start with a `$`. This kinds + * are reserved for internal usage. + */ +export declare namespace MarkupKind { + /** + * Plain text is supported as a content format + */ + const PlainText: 'plaintext'; + /** + * Markdown is supported as a content format + */ + const Markdown: 'markdown'; + /** + * Checks whether the given value is a value of the {@link MarkupKind} type. + */ + function is(value: any): value is MarkupKind; +} +export type MarkupKind = 'plaintext' | 'markdown'; +/** + * A `MarkupContent` literal represents a string value which content is interpreted base on its + * kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds. + * + * If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues. + * See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting + * + * Here is an example how such a string can be constructed using JavaScript / TypeScript: + * ```ts + * let markdown: MarkdownContent = { + * kind: MarkupKind.Markdown, + * value: [ + * '# Header', + * 'Some text', + * '```typescript', + * 'someCode();', + * '```' + * ].join('\n') + * }; + * ``` + * + * *Please Note* that clients might sanitize the return markdown. A client could decide to + * remove HTML from the markdown to avoid script execution. + */ +export interface MarkupContent { + /** + * The type of the Markup + */ + kind: MarkupKind; + /** + * The content itself + */ + value: string; +} +export declare namespace MarkupContent { + /** + * Checks whether the given value conforms to the {@link MarkupContent} interface. + */ + function is(value: any): value is MarkupContent; +} +/** + * The kind of a completion entry. + */ +export declare namespace CompletionItemKind { + const Text: 1; + const Method: 2; + const Function: 3; + const Constructor: 4; + const Field: 5; + const Variable: 6; + const Class: 7; + const Interface: 8; + const Module: 9; + const Property: 10; + const Unit: 11; + const Value: 12; + const Enum: 13; + const Keyword: 14; + const Snippet: 15; + const Color: 16; + const File: 17; + const Reference: 18; + const Folder: 19; + const EnumMember: 20; + const Constant: 21; + const Struct: 22; + const Event: 23; + const Operator: 24; + const TypeParameter: 25; +} +export type CompletionItemKind = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25; +/** + * Defines whether the insert text in a completion item should be interpreted as + * plain text or a snippet. + */ +export declare namespace InsertTextFormat { + /** + * The primary text to be inserted is treated as a plain string. + */ + const PlainText: 1; + /** + * The primary text to be inserted is treated as a snippet. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Placeholders with equal identifiers are linked, + * that is typing in one will update others too. + * + * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax + */ + const Snippet: 2; +} +export type InsertTextFormat = 1 | 2; +/** + * Completion item tags are extra annotations that tweak the rendering of a completion + * item. + * + * @since 3.15.0 + */ +export declare namespace CompletionItemTag { + /** + * Render a completion as obsolete, usually using a strike-out. + */ + const Deprecated = 1; +} +export type CompletionItemTag = 1; +/** + * A special text edit to provide an insert and a replace operation. + * + * @since 3.16.0 + */ +export interface InsertReplaceEdit { + /** + * The string to be inserted. + */ + newText: string; + /** + * The range if the insert is requested + */ + insert: Range; + /** + * The range if the replace is requested. + */ + replace: Range; +} +/** + * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits. + * + * @since 3.16.0 + */ +export declare namespace InsertReplaceEdit { + /** + * Creates a new insert / replace edit + */ + function create(newText: string, insert: Range, replace: Range): InsertReplaceEdit; + /** + * Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface. + */ + function is(value: TextEdit | InsertReplaceEdit): value is InsertReplaceEdit; +} +/** + * How whitespace and indentation is handled during completion + * item insertion. + * + * @since 3.16.0 + */ +export declare namespace InsertTextMode { + /** + * The insertion or replace strings is taken as it is. If the + * value is multi line the lines below the cursor will be + * inserted using the indentation defined in the string value. + * The client will not apply any kind of adjustments to the + * string. + */ + const asIs: 1; + /** + * The editor adjusts leading whitespace of new lines so that + * they match the indentation up to the cursor of the line for + * which the item is accepted. + * + * Consider a line like this: <2tabs><3tabs>foo. Accepting a + * multi line completion item is indented using 2 tabs and all + * following lines inserted will be indented using 2 tabs as well. + */ + const adjustIndentation: 2; +} +export type InsertTextMode = 1 | 2; +/** + * Additional details for a completion item label. + * + * @since 3.17.0 + */ +export interface CompletionItemLabelDetails { + /** + * An optional string which is rendered less prominently directly after {@link CompletionItem.label label}, + * without any spacing. Should be used for function signatures and type annotations. + */ + detail?: string; + /** + * An optional string which is rendered less prominently after {@link CompletionItem.detail}. Should be used + * for fully qualified names and file paths. + */ + description?: string; +} +export declare namespace CompletionItemLabelDetails { + function is(value: any): value is CompletionItemLabelDetails; +} +/** + * A completion item represents a text snippet that is + * proposed to complete text that is being typed. + */ +export interface CompletionItem { + /** + * The label of this completion item. + * + * The label property is also by default the text that + * is inserted when selecting this completion. + * + * If label details are provided the label itself should + * be an unqualified name of the completion item. + */ + label: string; + /** + * Additional details for the label + * + * @since 3.17.0 + */ + labelDetails?: CompletionItemLabelDetails; + /** + * The kind of this completion item. Based of the kind + * an icon is chosen by the editor. + */ + kind?: CompletionItemKind; + /** + * Tags for this completion item. + * + * @since 3.15.0 + */ + tags?: CompletionItemTag[]; + /** + * A human-readable string with additional information + * about this item, like type or symbol information. + */ + detail?: string; + /** + * A human-readable string that represents a doc-comment. + */ + documentation?: string | MarkupContent; + /** + * Indicates if this item is deprecated. + * @deprecated Use `tags` instead. + */ + deprecated?: boolean; + /** + * Select this item when showing. + * + * *Note* that only one completion item can be selected and that the + * tool / client decides which item that is. The rule is that the *first* + * item of those that match best is selected. + */ + preselect?: boolean; + /** + * A string that should be used when comparing this item + * with other items. When `falsy` the {@link CompletionItem.label label} + * is used. + */ + sortText?: string; + /** + * A string that should be used when filtering a set of + * completion items. When `falsy` the {@link CompletionItem.label label} + * is used. + */ + filterText?: string; + /** + * A string that should be inserted into a document when selecting + * this completion. When `falsy` the {@link CompletionItem.label label} + * is used. + * + * The `insertText` is subject to interpretation by the client side. + * Some tools might not take the string literally. For example + * VS Code when code complete is requested in this example + * `con` and a completion item with an `insertText` of + * `console` is provided it will only insert `sole`. Therefore it is + * recommended to use `textEdit` instead since it avoids additional client + * side interpretation. + */ + insertText?: string; + /** + * The format of the insert text. The format applies to both the + * `insertText` property and the `newText` property of a provided + * `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`. + * + * Please note that the insertTextFormat doesn't apply to + * `additionalTextEdits`. + */ + insertTextFormat?: InsertTextFormat; + /** + * How whitespace and indentation is handled during completion + * item insertion. If not provided the clients default value depends on + * the `textDocument.completion.insertTextMode` client capability. + * + * @since 3.16.0 + */ + insertTextMode?: InsertTextMode; + /** + * An {@link TextEdit edit} which is applied to a document when selecting + * this completion. When an edit is provided the value of + * {@link CompletionItem.insertText insertText} is ignored. + * + * Most editors support two different operations when accepting a completion + * item. One is to insert a completion text and the other is to replace an + * existing text with a completion text. Since this can usually not be + * predetermined by a server it can report both ranges. Clients need to + * signal support for `InsertReplaceEdits` via the + * `textDocument.completion.insertReplaceSupport` client capability + * property. + * + * *Note 1:* The text edit's range as well as both ranges from an insert + * replace edit must be a [single line] and they must contain the position + * at which completion has been requested. + * *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range + * must be a prefix of the edit's replace range, that means it must be + * contained and starting at the same position. + * + * @since 3.16.0 additional type `InsertReplaceEdit` + */ + textEdit?: TextEdit | InsertReplaceEdit; + /** + * The edit text used if the completion item is part of a CompletionList and + * CompletionList defines an item default for the text edit range. + * + * Clients will only honor this property if they opt into completion list + * item defaults using the capability `completionList.itemDefaults`. + * + * If not provided and a list's default range is provided the label + * property is used as a text. + * + * @since 3.17.0 + */ + textEditText?: string; + /** + * An optional array of additional {@link TextEdit text edits} that are applied when + * selecting this completion. Edits must not overlap (including the same insert position) + * with the main {@link CompletionItem.textEdit edit} nor with themselves. + * + * Additional text edits should be used to change text unrelated to the current cursor position + * (for example adding an import statement at the top of the file if the completion item will + * insert an unqualified type). + */ + additionalTextEdits?: TextEdit[]; + /** + * An optional set of characters that when pressed while this completion is active will accept it first and + * then type that character. *Note* that all commit characters should have `length=1` and that superfluous + * characters will be ignored. + */ + commitCharacters?: string[]; + /** + * An optional {@link Command command} that is executed *after* inserting this completion. *Note* that + * additional modifications to the current document should be described with the + * {@link CompletionItem.additionalTextEdits additionalTextEdits}-property. + */ + command?: Command; + /** + * A data entry field that is preserved on a completion item between a + * {@link CompletionRequest} and a {@link CompletionResolveRequest}. + */ + data?: LSPAny; +} +/** + * The CompletionItem namespace provides functions to deal with + * completion items. + */ +export declare namespace CompletionItem { + /** + * Create a completion item and seed it with a label. + * @param label The completion item's label + */ + function create(label: string): CompletionItem; +} +/** + * Edit range variant that includes ranges for insert and replace operations. + * + * @since 3.18.0 + */ +export interface EditRangeWithInsertReplace { + insert: Range; + replace: Range; +} +/** + * In many cases the items of an actual completion result share the same + * value for properties like `commitCharacters` or the range of a text + * edit. A completion list can therefore define item defaults which will + * be used if a completion item itself doesn't specify the value. + * + * If a completion list specifies a default value and a completion item + * also specifies a corresponding value the one from the item is used. + * + * Servers are only allowed to return default values if the client + * signals support for this via the `completionList.itemDefaults` + * capability. + * + * @since 3.17.0 + */ +export interface CompletionItemDefaults { + /** + * A default commit character set. + * + * @since 3.17.0 + */ + commitCharacters?: string[]; + /** + * A default edit range. + * + * @since 3.17.0 + */ + editRange?: Range | EditRangeWithInsertReplace; + /** + * A default insert text format. + * + * @since 3.17.0 + */ + insertTextFormat?: InsertTextFormat; + /** + * A default insert text mode. + * + * @since 3.17.0 + */ + insertTextMode?: InsertTextMode; + /** + * A default data value. + * + * @since 3.17.0 + */ + data?: LSPAny; +} +/** + * Represents a collection of {@link CompletionItem completion items} to be presented + * in the editor. + */ +export interface CompletionList { + /** + * This list it not complete. Further typing results in recomputing this list. + * + * Recomputed lists have all their items replaced (not appended) in the + * incomplete completion sessions. + */ + isIncomplete: boolean; + /** + * In many cases the items of an actual completion result share the same + * value for properties like `commitCharacters` or the range of a text + * edit. A completion list can therefore define item defaults which will + * be used if a completion item itself doesn't specify the value. + * + * If a completion list specifies a default value and a completion item + * also specifies a corresponding value the one from the item is used. + * + * Servers are only allowed to return default values if the client + * signals support for this via the `completionList.itemDefaults` + * capability. + * + * @since 3.17.0 + */ + itemDefaults?: CompletionItemDefaults; + /** + * The completion items. + */ + items: CompletionItem[]; +} +/** + * The CompletionList namespace provides functions to deal with + * completion lists. + */ +export declare namespace CompletionList { + /** + * Creates a new completion list. + * + * @param items The completion items. + * @param isIncomplete The list is not complete. + */ + function create(items?: CompletionItem[], isIncomplete?: boolean): CompletionList; +} +/** + * @since 3.18.0 + * @deprecated use MarkupContent instead. + */ +export interface MarkedStringWithLanguage { + language: string; + value: string; +} +/** + * MarkedString can be used to render human readable text. It is either a markdown string + * or a code-block that provides a language and a code snippet. The language identifier + * is semantically equal to the optional language identifier in fenced code blocks in GitHub + * issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting + * + * The pair of a language and a value is an equivalent to markdown: + * ```${language} + * ${value} + * ``` + * + * Note that markdown strings will be sanitized - that means html will be escaped. + * @deprecated use MarkupContent instead. + */ +export type MarkedString = string | MarkedStringWithLanguage; +export declare namespace MarkedString { + /** + * Creates a marked string from plain text. + * + * @param plainText The plain text. + */ + function fromPlainText(plainText: string): string; + /** + * Checks whether the given value conforms to the {@link MarkedString} type. + */ + function is(value: any): value is MarkedString; +} +/** + * The result of a hover request. + */ +export interface Hover { + /** + * The hover's content + */ + contents: MarkupContent | MarkedString | MarkedString[]; + /** + * An optional range inside the text document that is used to + * visualize the hover, e.g. by changing the background color. + */ + range?: Range; +} +export declare namespace Hover { + /** + * Checks whether the given value conforms to the {@link Hover} interface. + */ + function is(value: any): value is Hover; +} +/** + * Represents a parameter of a callable-signature. A parameter can + * have a label and a doc-comment. + */ +export interface ParameterInformation { + /** + * The label of this parameter information. + * + * Either a string or an inclusive start and exclusive end offsets within its containing + * signature label. (see SignatureInformation.label). The offsets are based on a UTF-16 + * string representation as `Position` and `Range` does. + * + * To avoid ambiguities a server should use the [start, end] offset value instead of using + * a substring. Whether a client support this is controlled via `labelOffsetSupport` client + * capability. + * + * *Note*: a label of type string should be a substring of its containing signature label. + * Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`. + */ + label: string | [uinteger, uinteger]; + /** + * The human-readable doc-comment of this parameter. Will be shown + * in the UI but can be omitted. + */ + documentation?: string | MarkupContent; +} +/** + * The ParameterInformation namespace provides helper functions to work with + * {@link ParameterInformation} literals. + */ +export declare namespace ParameterInformation { + /** + * Creates a new parameter information literal. + * + * @param label A label string. + * @param documentation A doc string. + */ + function create(label: string | [uinteger, uinteger], documentation?: string): ParameterInformation; +} +/** + * Represents the signature of something callable. A signature + * can have a label, like a function-name, a doc-comment, and + * a set of parameters. + */ +export interface SignatureInformation { + /** + * The label of this signature. Will be shown in + * the UI. + */ + label: string; + /** + * The human-readable doc-comment of this signature. Will be shown + * in the UI but can be omitted. + */ + documentation?: string | MarkupContent; + /** + * The parameters of this signature. + */ + parameters?: ParameterInformation[]; + /** + * The index of the active parameter. + * + * If `null`, no parameter of the signature is active (for example a named + * argument that does not match any declared parameters). This is only valid + * if the client specifies the client capability + * `textDocument.signatureHelp.noActiveParameterSupport === true` + * + * If provided (or `null`), this is used in place of + * `SignatureHelp.activeParameter`. + * + * @since 3.16.0 + */ + activeParameter?: uinteger | null; +} +/** + * The SignatureInformation namespace provides helper functions to work with + * {@link SignatureInformation} literals. + */ +export declare namespace SignatureInformation { + function create(label: string, documentation?: string, ...parameters: ParameterInformation[]): SignatureInformation; +} +/** + * Signature help represents the signature of something + * callable. There can be multiple signature but only one + * active and only one active parameter. + */ +export interface SignatureHelp { + /** + * One or more signatures. + */ + signatures: SignatureInformation[]; + /** + * The active signature. If omitted or the value lies outside the + * range of `signatures` the value defaults to zero or is ignored if + * the `SignatureHelp` has no signatures. + * + * Whenever possible implementors should make an active decision about + * the active signature and shouldn't rely on a default value. + * + * In future version of the protocol this property might become + * mandatory to better express this. + */ + activeSignature?: uinteger; + /** + * The active parameter of the active signature. + * + * If `null`, no parameter of the signature is active (for example a named + * argument that does not match any declared parameters). This is only valid + * if the client specifies the client capability + * `textDocument.signatureHelp.noActiveParameterSupport === true` + * + * If omitted or the value lies outside the range of + * `signatures[activeSignature].parameters` defaults to 0 if the active + * signature has parameters. + * + * If the active signature has no parameters it is ignored. + * + * In future version of the protocol this property might become + * mandatory (but still nullable) to better express the active parameter if + * the active signature does have any. + */ + activeParameter?: uinteger | null; +} +/** + * The definition of a symbol represented as one or many {@link Location locations}. + * For most programming languages there is only one location at which a symbol is + * defined. + * + * Servers should prefer returning `DefinitionLink` over `Definition` if supported + * by the client. + */ +export type Definition = Location | Location[]; +/** + * Information about where a symbol is defined. + * + * Provides additional metadata over normal {@link Location location} definitions, including the range of + * the defining symbol + */ +export type DefinitionLink = LocationLink; +/** + * The declaration of a symbol representation as one or many {@link Location locations}. + */ +export type Declaration = Location | Location[]; +/** + * Information about where a symbol is declared. + * + * Provides additional metadata over normal {@link Location location} declarations, including the range of + * the declaring symbol. + * + * Servers should prefer returning `DeclarationLink` over `Declaration` if supported + * by the client. + */ +export type DeclarationLink = LocationLink; +/** + * Value-object that contains additional information when + * requesting references. + */ +export interface ReferenceContext { + /** + * Include the declaration of the current symbol. + */ + includeDeclaration: boolean; +} +/** + * A document highlight kind. + */ +export declare namespace DocumentHighlightKind { + /** + * A textual occurrence. + */ + const Text: 1; + /** + * Read-access of a symbol, like reading a variable. + */ + const Read: 2; + /** + * Write-access of a symbol, like writing to a variable. + */ + const Write: 3; +} +export type DocumentHighlightKind = 1 | 2 | 3; +/** + * A document highlight is a range inside a text document which deserves + * special attention. Usually a document highlight is visualized by changing + * the background color of its range. + */ +export interface DocumentHighlight { + /** + * The range this highlight applies to. + */ + range: Range; + /** + * The highlight kind, default is {@link DocumentHighlightKind.Text text}. + */ + kind?: DocumentHighlightKind; +} +/** + * DocumentHighlight namespace to provide helper functions to work with + * {@link DocumentHighlight} literals. + */ +export declare namespace DocumentHighlight { + /** + * Create a DocumentHighlight object. + * @param range The range the highlight applies to. + * @param kind The highlight kind + */ + function create(range: Range, kind?: DocumentHighlightKind): DocumentHighlight; +} +/** + * A symbol kind. + */ +export declare namespace SymbolKind { + const File: 1; + const Module: 2; + const Namespace: 3; + const Package: 4; + const Class: 5; + const Method: 6; + const Property: 7; + const Field: 8; + const Constructor: 9; + const Enum: 10; + const Interface: 11; + const Function: 12; + const Variable: 13; + const Constant: 14; + const String: 15; + const Number: 16; + const Boolean: 17; + const Array: 18; + const Object: 19; + const Key: 20; + const Null: 21; + const EnumMember: 22; + const Struct: 23; + const Event: 24; + const Operator: 25; + const TypeParameter: 26; +} +export type SymbolKind = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26; +/** + * Symbol tags are extra annotations that tweak the rendering of a symbol. + * + * @since 3.16 + */ +export declare namespace SymbolTag { + /** + * Render a symbol as obsolete, usually using a strike-out. + */ + const Deprecated: 1; +} +export type SymbolTag = 1; +/** + * A base for all symbol information. + */ +export interface BaseSymbolInformation { + /** + * The name of this symbol. + */ + name: string; + /** + * The kind of this symbol. + */ + kind: SymbolKind; + /** + * Tags for this symbol. + * + * @since 3.16.0 + */ + tags?: SymbolTag[]; + /** + * The name of the symbol containing this symbol. This information is for + * user interface purposes (e.g. to render a qualifier in the user interface + * if necessary). It can't be used to re-infer a hierarchy for the document + * symbols. + */ + containerName?: string; +} +/** + * Represents information about programming constructs like variables, classes, + * interfaces etc. + */ +export interface SymbolInformation extends BaseSymbolInformation { + /** + * Indicates if this symbol is deprecated. + * + * @deprecated Use tags instead + */ + deprecated?: boolean; + /** + * The location of this symbol. The location's range is used by a tool + * to reveal the location in the editor. If the symbol is selected in the + * tool the range's start information is used to position the cursor. So + * the range usually spans more than the actual symbol's name and does + * normally include things like visibility modifiers. + * + * The range doesn't have to denote a node range in the sense of an abstract + * syntax tree. It can therefore not be used to re-construct a hierarchy of + * the symbols. + */ + location: Location; +} +export declare namespace SymbolInformation { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the location of the symbol. + * @param uri The resource of the location of symbol. + * @param containerName The name of the symbol containing the symbol. + */ + function create(name: string, kind: SymbolKind, range: Range, uri: DocumentUri, containerName?: string): SymbolInformation; +} +/** + * Location with only uri and does not include range. + * + * @since 3.18.0 + */ +export interface LocationUriOnly { + uri: DocumentUri; +} +/** + * A special workspace symbol that supports locations without a range. + * + * See also SymbolInformation. + * + * @since 3.17.0 + */ +export interface WorkspaceSymbol extends BaseSymbolInformation { + /** + * The location of the symbol. Whether a server is allowed to + * return a location without a range depends on the client + * capability `workspace.symbol.resolveSupport`. + * + * See SymbolInformation#location for more details. + */ + location: Location | LocationUriOnly; + /** + * A data entry field that is preserved on a workspace symbol between a + * workspace symbol request and a workspace symbol resolve request. + */ + data?: LSPAny; +} +export declare namespace WorkspaceSymbol { + /** + * Create a new workspace symbol. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param uri The resource of the location of the symbol. + * @param range An options range of the location. + * @returns A WorkspaceSymbol. + */ + function create(name: string, kind: SymbolKind, uri: DocumentUri, range?: Range): WorkspaceSymbol; +} +/** + * Represents programming constructs like variables, classes, interfaces etc. + * that appear in a document. Document symbols can be hierarchical and they + * have two ranges: one that encloses its definition and one that points to + * its most interesting range, e.g. the range of an identifier. + */ +export interface DocumentSymbol { + /** + * The name of this symbol. Will be displayed in the user interface and therefore must not be + * an empty string or a string only consisting of white spaces. + */ + name: string; + /** + * More detail for this symbol, e.g the signature of a function. + */ + detail?: string; + /** + * The kind of this symbol. + */ + kind: SymbolKind; + /** + * Tags for this document symbol. + * + * @since 3.16.0 + */ + tags?: SymbolTag[]; + /** + * Indicates if this symbol is deprecated. + * + * @deprecated Use tags instead + */ + deprecated?: boolean; + /** + * The range enclosing this symbol not including leading/trailing whitespace but everything else + * like comments. This information is typically used to determine if the clients cursor is + * inside the symbol to reveal in the symbol in the UI. + */ + range: Range; + /** + * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. + * Must be contained by the `range`. + */ + selectionRange: Range; + /** + * Children of this symbol, e.g. properties of a class. + */ + children?: DocumentSymbol[]; +} +export declare namespace DocumentSymbol { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param detail The detail of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the symbol. + * @param selectionRange The selectionRange of the symbol. + * @param children Children of the symbol. + */ + function create(name: string, detail: string | undefined, kind: SymbolKind, range: Range, selectionRange: Range, children?: DocumentSymbol[]): DocumentSymbol; + /** + * Checks whether the given literal conforms to the {@link DocumentSymbol} interface. + */ + function is(value: any): value is DocumentSymbol; +} +/** + * The kind of a code action. + * + * Kinds are a hierarchical list of identifiers separated by `.`, e.g. `"refactor.extract.function"`. + * + * The set of kinds is open and client needs to announce the kinds it supports to the server during + * initialization. + */ +export type CodeActionKind = string; +/** + * A set of predefined code action kinds + */ +export declare namespace CodeActionKind { + /** + * Empty kind. + */ + const Empty: ''; + /** + * Base kind for quickfix actions: 'quickfix' + */ + const QuickFix: 'quickfix'; + /** + * Base kind for refactoring actions: 'refactor' + */ + const Refactor: 'refactor'; + /** + * Base kind for refactoring extraction actions: 'refactor.extract' + * + * Example extract actions: + * + * - Extract method + * - Extract function + * - Extract variable + * - Extract interface from class + * - ... + */ + const RefactorExtract: 'refactor.extract'; + /** + * Base kind for refactoring inline actions: 'refactor.inline' + * + * Example inline actions: + * + * - Inline function + * - Inline variable + * - Inline constant + * - ... + */ + const RefactorInline: 'refactor.inline'; + /** + * Base kind for refactoring move actions: `refactor.move` + * + * Example move actions: + * + * - Move a function to a new file + * - Move a property between classes + * - Move method to base class + * - ... + * + * @since 3.18.0 + * @proposed + */ + const RefactorMove: 'refactor.move'; + /** + * Base kind for refactoring rewrite actions: 'refactor.rewrite' + * + * Example rewrite actions: + * + * - Convert JavaScript function to class + * - Add or remove parameter + * - Encapsulate field + * - Make method static + * - Move method to base class + * - ... + */ + const RefactorRewrite: 'refactor.rewrite'; + /** + * Base kind for source actions: `source` + * + * Source code actions apply to the entire file. + */ + const Source: 'source'; + /** + * Base kind for an organize imports source action: `source.organizeImports` + */ + const SourceOrganizeImports: 'source.organizeImports'; + /** + * Base kind for auto-fix source actions: `source.fixAll`. + * + * Fix all actions automatically fix errors that have a clear fix that do not require user input. + * They should not suppress errors or perform unsafe fixes such as generating new types or classes. + * + * @since 3.15.0 + */ + const SourceFixAll: 'source.fixAll'; + /** + * Base kind for all code actions applying to the entire notebook's scope. CodeActionKinds using + * this should always begin with `notebook.` + * + * @since 3.18.0 + */ + const Notebook: 'notebook'; +} +/** + * The reason why code actions were requested. + * + * @since 3.17.0 + */ +export declare namespace CodeActionTriggerKind { + /** + * Code actions were explicitly requested by the user or by an extension. + */ + const Invoked: 1; + /** + * Code actions were requested automatically. + * + * This typically happens when current selection in a file changes, but can + * also be triggered when file content changes. + */ + const Automatic: 2; +} +export type CodeActionTriggerKind = 1 | 2; +/** + * Contains additional diagnostic information about the context in which + * a {@link CodeActionProvider.provideCodeActions code action} is run. + */ +export interface CodeActionContext { + /** + * An array of diagnostics known on the client side overlapping the range provided to the + * `textDocument/codeAction` request. They are provided so that the server knows which + * errors are currently presented to the user for the given range. There is no guarantee + * that these accurately reflect the error state of the resource. The primary parameter + * to compute code actions is the provided range. + */ + diagnostics: Diagnostic[]; + /** + * Requested kind of actions to return. + * + * Actions not of this kind are filtered out by the client before being shown. So servers + * can omit computing them. + */ + only?: CodeActionKind[]; + /** + * The reason why code actions were requested. + * + * @since 3.17.0 + */ + triggerKind?: CodeActionTriggerKind; +} +/** + * The CodeActionContext namespace provides helper functions to work with + * {@link CodeActionContext} literals. + */ +export declare namespace CodeActionContext { + /** + * Creates a new CodeActionContext literal. + */ + function create(diagnostics: Diagnostic[], only?: CodeActionKind[], triggerKind?: CodeActionTriggerKind): CodeActionContext; + /** + * Checks whether the given literal conforms to the {@link CodeActionContext} interface. + */ + function is(value: any): value is CodeActionContext; +} +/** + * Captures why the code action is currently disabled. + * + * @since 3.18.0 + */ +export interface CodeActionDisabled { + /** + * Human readable description of why the code action is currently disabled. + * + * This is displayed in the code actions UI. + */ + reason: string; +} +/** + * A code action represents a change that can be performed in code, e.g. to fix a problem or + * to refactor code. + * + * A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed. + */ +export interface CodeAction { + /** + * A short, human-readable, title for this code action. + */ + title: string; + /** + * The kind of the code action. + * + * Used to filter code actions. + */ + kind?: CodeActionKind; + /** + * The diagnostics that this code action resolves. + */ + diagnostics?: Diagnostic[]; + /** + * Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted + * by keybindings. + * + * A quick fix should be marked preferred if it properly addresses the underlying error. + * A refactoring should be marked preferred if it is the most reasonable choice of actions to take. + * + * @since 3.15.0 + */ + isPreferred?: boolean; + /** + * Marks that the code action cannot currently be applied. + * + * Clients should follow the following guidelines regarding disabled code actions: + * + * - Disabled code actions are not shown in automatic [lightbulbs](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) + * code action menus. + * + * - Disabled actions are shown as faded out in the code action menu when the user requests a more specific type + * of code action, such as refactorings. + * + * - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions) + * that auto applies a code action and only disabled code actions are returned, the client should show the user an + * error message with `reason` in the editor. + * + * @since 3.16.0 + */ + disabled?: CodeActionDisabled; + /** + * The workspace edit this code action performs. + */ + edit?: WorkspaceEdit; + /** + * A command this code action executes. If a code action + * provides an edit and a command, first the edit is + * executed and then the command. + */ + command?: Command; + /** + * A data entry field that is preserved on a code action between + * a `textDocument/codeAction` and a `codeAction/resolve` request. + * + * @since 3.16.0 + */ + data?: LSPAny; +} +export declare namespace CodeAction { + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param kind The kind of the code action. + */ + function create(title: string, kind?: CodeActionKind): CodeAction; + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param command The command to execute. + * @param kind The kind of the code action. + */ + function create(title: string, command: Command, kind?: CodeActionKind): CodeAction; + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param edit The edit to perform. + * @param kind The kind of the code action. + */ + function create(title: string, edit: WorkspaceEdit, kind?: CodeActionKind): CodeAction; + function is(value: any): value is CodeAction; +} +/** + * A code lens represents a {@link Command command} that should be shown along with + * source text, like the number of references, a way to run tests, etc. + * + * A code lens is _unresolved_ when no command is associated to it. For performance + * reasons the creation of a code lens and resolving should be done in two stages. + */ +export interface CodeLens { + /** + * The range in which this code lens is valid. Should only span a single line. + */ + range: Range; + /** + * The command this code lens represents. + */ + command?: Command; + /** + * A data entry field that is preserved on a code lens item between + * a {@link CodeLensRequest} and a {@link CodeLensResolveRequest} + */ + data?: LSPAny; +} +/** + * The CodeLens namespace provides helper functions to work with + * {@link CodeLens} literals. + */ +export declare namespace CodeLens { + /** + * Creates a new CodeLens literal. + */ + function create(range: Range, data?: LSPAny): CodeLens; + /** + * Checks whether the given literal conforms to the {@link CodeLens} interface. + */ + function is(value: any): value is CodeLens; +} +/** + * Value-object describing what options formatting should use. + */ +export interface FormattingOptions { + /** + * Size of a tab in spaces. + */ + tabSize: uinteger; + /** + * Prefer spaces over tabs. + */ + insertSpaces: boolean; + /** + * Trim trailing whitespace on a line. + * + * @since 3.15.0 + */ + trimTrailingWhitespace?: boolean; + /** + * Insert a newline character at the end of the file if one does not exist. + * + * @since 3.15.0 + */ + insertFinalNewline?: boolean; + /** + * Trim all newlines after the final newline at the end of the file. + * + * @since 3.15.0 + */ + trimFinalNewlines?: boolean; + /** + * Signature for further properties. + */ + [key: string]: boolean | integer | string | undefined; +} +/** + * The FormattingOptions namespace provides helper functions to work with + * {@link FormattingOptions} literals. + */ +export declare namespace FormattingOptions { + /** + * Creates a new FormattingOptions literal. + */ + function create(tabSize: uinteger, insertSpaces: boolean): FormattingOptions; + /** + * Checks whether the given literal conforms to the {@link FormattingOptions} interface. + */ + function is(value: any): value is FormattingOptions; +} +/** + * A document link is a range in a text document that links to an internal or external resource, like another + * text document or a web site. + */ +export interface DocumentLink { + /** + * The range this link applies to. + */ + range: Range; + /** + * The uri this link points to. If missing a resolve request is sent later. + */ + target?: URI; + /** + * The tooltip text when you hover over this link. + * + * If a tooltip is provided, is will be displayed in a string that includes instructions on how to + * trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS, + * user settings, and localization. + * + * @since 3.15.0 + */ + tooltip?: string; + /** + * A data entry field that is preserved on a document link between a + * DocumentLinkRequest and a DocumentLinkResolveRequest. + */ + data?: LSPAny; +} +/** + * The DocumentLink namespace provides helper functions to work with + * {@link DocumentLink} literals. + */ +export declare namespace DocumentLink { + /** + * Creates a new DocumentLink literal. + */ + function create(range: Range, target?: string, data?: LSPAny): DocumentLink; + /** + * Checks whether the given literal conforms to the {@link DocumentLink} interface. + */ + function is(value: any): value is DocumentLink; +} +/** + * A selection range represents a part of a selection hierarchy. A selection range + * may have a parent selection range that contains it. + */ +export interface SelectionRange { + /** + * The {@link Range range} of this selection range. + */ + range: Range; + /** + * The parent selection range containing this range. Therefore `parent.range` must contain `this.range`. + */ + parent?: SelectionRange; +} +/** + * The SelectionRange namespace provides helper function to work with + * SelectionRange literals. + */ +export declare namespace SelectionRange { + /** + * Creates a new SelectionRange + * @param range the range. + * @param parent an optional parent. + */ + function create(range: Range, parent?: SelectionRange): SelectionRange; + function is(value: any): value is SelectionRange; +} +/** + * Represents programming constructs like functions or constructors in the context + * of call hierarchy. + * + * @since 3.16.0 + */ +export interface CallHierarchyItem { + /** + * The name of this item. + */ + name: string; + /** + * The kind of this item. + */ + kind: SymbolKind; + /** + * Tags for this item. + */ + tags?: SymbolTag[]; + /** + * More detail for this item, e.g. the signature of a function. + */ + detail?: string; + /** + * The resource identifier of this item. + */ + uri: DocumentUri; + /** + * The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code. + */ + range: Range; + /** + * The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function. + * Must be contained by the {@link CallHierarchyItem.range `range`}. + */ + selectionRange: Range; + /** + * A data entry field that is preserved between a call hierarchy prepare and + * incoming calls or outgoing calls requests. + */ + data?: LSPAny; +} +/** + * Represents an incoming call, e.g. a caller of a method or constructor. + * + * @since 3.16.0 + */ +export interface CallHierarchyIncomingCall { + /** + * The item that makes the call. + */ + from: CallHierarchyItem; + /** + * The ranges at which the calls appear. This is relative to the caller + * denoted by {@link CallHierarchyIncomingCall.from `this.from`}. + */ + fromRanges: Range[]; +} +/** + * Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc. + * + * @since 3.16.0 + */ +export interface CallHierarchyOutgoingCall { + /** + * The item that is called. + */ + to: CallHierarchyItem; + /** + * The range at which this item is called. This is the range relative to the caller, e.g the item + * passed to {@link CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls `provideCallHierarchyOutgoingCalls`} + * and not {@link CallHierarchyOutgoingCall.to `this.to`}. + */ + fromRanges: Range[]; +} +/** + * A set of predefined token types. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ +export declare enum SemanticTokenTypes { + namespace = "namespace", + /** + * Represents a generic type. Acts as a fallback for types which can't be mapped to + * a specific type like class or enum. + */ + type = "type", + class = "class", + enum = "enum", + interface = "interface", + struct = "struct", + typeParameter = "typeParameter", + parameter = "parameter", + variable = "variable", + property = "property", + enumMember = "enumMember", + event = "event", + function = "function", + method = "method", + macro = "macro", + keyword = "keyword", + modifier = "modifier", + comment = "comment", + string = "string", + number = "number", + regexp = "regexp", + operator = "operator", + /** + * @since 3.17.0 + */ + decorator = "decorator", + /** + * @since 3.18.0 + */ + label = "label" +} +/** + * A set of predefined token modifiers. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ +export declare enum SemanticTokenModifiers { + declaration = "declaration", + definition = "definition", + readonly = "readonly", + static = "static", + deprecated = "deprecated", + abstract = "abstract", + async = "async", + modification = "modification", + documentation = "documentation", + defaultLibrary = "defaultLibrary" +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensLegend { + /** + * The token types a server uses. + */ + tokenTypes: string[]; + /** + * The token modifiers a server uses. + */ + tokenModifiers: string[]; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokens { + /** + * An optional result id. If provided and clients support delta updating + * the client will include the result id in the next semantic token request. + * A server can then instead of computing all semantic tokens again simply + * send a delta. + */ + resultId?: string; + /** + * The actual tokens. + */ + data: uinteger[]; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokens { + function is(value: any): value is SemanticTokens; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensEdit { + /** + * The start offset of the edit. + */ + start: uinteger; + /** + * The count of elements to remove. + */ + deleteCount: uinteger; + /** + * The elements to insert. + */ + data?: uinteger[]; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensDelta { + readonly resultId?: string; + /** + * The semantic token edits to transform a previous result into a new result. + */ + edits: SemanticTokensEdit[]; +} +/** + * @since 3.17.0 + */ +export type TypeHierarchyItem = { + /** + * The name of this item. + */ + name: string; + /** + * The kind of this item. + */ + kind: SymbolKind; + /** + * Tags for this item. + */ + tags?: SymbolTag[]; + /** + * More detail for this item, e.g. the signature of a function. + */ + detail?: string; + /** + * The resource identifier of this item. + */ + uri: DocumentUri; + /** + * The range enclosing this symbol not including leading/trailing whitespace + * but everything else, e.g. comments and code. + */ + range: Range; + /** + * The range that should be selected and revealed when this symbol is being + * picked, e.g. the name of a function. Must be contained by the + * {@link TypeHierarchyItem.range `range`}. + */ + selectionRange: Range; + /** + * A data entry field that is preserved between a type hierarchy prepare and + * supertypes or subtypes requests. It could also be used to identify the + * type hierarchy in the server, helping improve the performance on + * resolving supertypes and subtypes. + */ + data?: LSPAny; +}; +/** + * Provide inline value as text. + * + * @since 3.17.0 + */ +export type InlineValueText = { + /** + * The document range for which the inline value applies. + */ + range: Range; + /** + * The text of the inline value. + */ + text: string; +}; +/** + * The InlineValueText namespace provides functions to deal with InlineValueTexts. + * + * @since 3.17.0 + */ +export declare namespace InlineValueText { + /** + * Creates a new InlineValueText literal. + */ + function create(range: Range, text: string): InlineValueText; + function is(value: InlineValue | undefined | null): value is InlineValueText; +} +/** + * Provide inline value through a variable lookup. + * If only a range is specified, the variable name will be extracted from the underlying document. + * An optional variable name can be used to override the extracted name. + * + * @since 3.17.0 + */ +export type InlineValueVariableLookup = { + /** + * The document range for which the inline value applies. + * The range is used to extract the variable name from the underlying document. + */ + range: Range; + /** + * If specified the name of the variable to look up. + */ + variableName?: string; + /** + * How to perform the lookup. + */ + caseSensitiveLookup: boolean; +}; +/** + * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups. + * + * @since 3.17.0 + */ +export declare namespace InlineValueVariableLookup { + /** + * Creates a new InlineValueText literal. + */ + function create(range: Range, variableName: string | undefined, caseSensitiveLookup: boolean): InlineValueVariableLookup; + function is(value: InlineValue | undefined | null): value is InlineValueVariableLookup; +} +/** + * Provide an inline value through an expression evaluation. + * If only a range is specified, the expression will be extracted from the underlying document. + * An optional expression can be used to override the extracted expression. + * + * @since 3.17.0 + */ +export type InlineValueEvaluatableExpression = { + /** + * The document range for which the inline value applies. + * The range is used to extract the evaluatable expression from the underlying document. + */ + range: Range; + /** + * If specified the expression overrides the extracted expression. + */ + expression?: string; +}; +/** + * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression. + * + * @since 3.17.0 + */ +export declare namespace InlineValueEvaluatableExpression { + /** + * Creates a new InlineValueEvaluatableExpression literal. + */ + function create(range: Range, expression: string | undefined): InlineValueEvaluatableExpression; + function is(value: InlineValue | undefined | null): value is InlineValueEvaluatableExpression; +} +/** + * Inline value information can be provided by different means: + * - directly as a text value (class InlineValueText). + * - as a name to use for a variable lookup (class InlineValueVariableLookup) + * - as an evaluatable expression (class InlineValueEvaluatableExpression) + * The InlineValue types combines all inline value types into one type. + * + * @since 3.17.0 + */ +export type InlineValue = InlineValueText | InlineValueVariableLookup | InlineValueEvaluatableExpression; +/** + * @since 3.17.0 + */ +export type InlineValueContext = { + /** + * The stack frame (as a DAP Id) where the execution has stopped. + */ + frameId: integer; + /** + * The document range where execution has stopped. + * Typically the end position of the range denotes the line where the inline values are shown. + */ + stoppedLocation: Range; +}; +/** + * The InlineValueContext namespace provides helper functions to work with + * {@link InlineValueContext} literals. + * + * @since 3.17.0 + */ +export declare namespace InlineValueContext { + /** + * Creates a new InlineValueContext literal. + */ + function create(frameId: integer, stoppedLocation: Range): InlineValueContext; + /** + * Checks whether the given literal conforms to the {@link InlineValueContext} interface. + */ + function is(value: any): value is InlineValueContext; +} +/** + * Inlay hint kinds. + * + * @since 3.17.0 + */ +export declare namespace InlayHintKind { + /** + * An inlay hint that for a type annotation. + */ + const Type = 1; + /** + * An inlay hint that is for a parameter. + */ + const Parameter = 2; + function is(value: number): value is InlayHintKind; +} +export type InlayHintKind = 1 | 2; +/** + * An inlay hint label part allows for interactive and composite labels + * of inlay hints. + * + * @since 3.17.0 + */ +export type InlayHintLabelPart = { + /** + * The value of this label part. + */ + value: string; + /** + * The tooltip text when you hover over this label part. Depending on + * the client capability `inlayHint.resolveSupport` clients might resolve + * this property late using the resolve request. + */ + tooltip?: string | MarkupContent; + /** + * An optional source code location that represents this + * label part. + * + * The editor will use this location for the hover and for code navigation + * features: This part will become a clickable link that resolves to the + * definition of the symbol at the given location (not necessarily the + * location itself), it shows the hover that shows at the given location, + * and it shows a context menu with further code navigation commands. + * + * Depending on the client capability `inlayHint.resolveSupport` clients + * might resolve this property late using the resolve request. + */ + location?: Location; + /** + * An optional command for this label part. + * + * Depending on the client capability `inlayHint.resolveSupport` clients + * might resolve this property late using the resolve request. + */ + command?: Command; +}; +export declare namespace InlayHintLabelPart { + function create(value: string): InlayHintLabelPart; + function is(value: any): value is InlayHintLabelPart; +} +/** + * Inlay hint information. + * + * @since 3.17.0 + */ +export type InlayHint = { + /** + * The position of this hint. + * + * If multiple hints have the same position, they will be shown in the order + * they appear in the response. + */ + position: Position; + /** + * The label of this hint. A human readable string or an array of + * InlayHintLabelPart label parts. + * + * *Note* that neither the string nor the label part can be empty. + */ + label: string | InlayHintLabelPart[]; + /** + * The kind of this hint. Can be omitted in which case the client + * should fall back to a reasonable default. + */ + kind?: InlayHintKind; + /** + * Optional text edits that are performed when accepting this inlay hint. + * + * *Note* that edits are expected to change the document so that the inlay + * hint (or its nearest variant) is now part of the document and the inlay + * hint itself is now obsolete. + */ + textEdits?: TextEdit[]; + /** + * The tooltip text when you hover over this item. + */ + tooltip?: string | MarkupContent; + /** + * Render padding before the hint. + * + * Note: Padding should use the editor's background color, not the + * background color of the hint itself. That means padding can be used + * to visually align/separate an inlay hint. + */ + paddingLeft?: boolean; + /** + * Render padding after the hint. + * + * Note: Padding should use the editor's background color, not the + * background color of the hint itself. That means padding can be used + * to visually align/separate an inlay hint. + */ + paddingRight?: boolean; + /** + * A data entry field that is preserved on an inlay hint between + * a `textDocument/inlayHint` and a `inlayHint/resolve` request. + */ + data?: LSPAny; +}; +export declare namespace InlayHint { + function create(position: Position, label: string | InlayHintLabelPart[], kind?: InlayHintKind): InlayHint; + function is(value: any): value is InlayHint; +} +/** + * A string value used as a snippet is a template which allows to insert text + * and to control the editor cursor when insertion happens. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Variables are defined with `$name` and + * `${name:default value}`. + * + * @since 3.18.0 + * @proposed + */ +export interface StringValue { + /** + * The kind of string value. + */ + kind: 'snippet'; + /** + * The snippet string. + */ + value: string; +} +export declare namespace StringValue { + function createSnippet(value: string): StringValue; + function isSnippet(value: any): value is StringValue; +} +/** + * An inline completion item represents a text snippet that is proposed inline to complete text that is being typed. + * + * @since 3.18.0 + * @proposed + */ +export interface InlineCompletionItem { + /** + * The text to replace the range with. Must be set. + */ + insertText: string | StringValue; + /** + * A text that is used to decide if this inline completion should be shown. When `falsy` the {@link InlineCompletionItem.insertText} is used. + */ + filterText?: string; + /** + * The range to replace. Must begin and end on the same line. + */ + range?: Range; + /** + * An optional {@link Command} that is executed *after* inserting this completion. + */ + command?: Command; +} +export declare namespace InlineCompletionItem { + function create(insertText: string | StringValue, filterText?: string, range?: Range, command?: Command): InlineCompletionItem; +} +/** + * Represents a collection of {@link InlineCompletionItem inline completion items} to be presented in the editor. + * + * @since 3.18.0 + * @proposed + */ +export interface InlineCompletionList { + /** + * The inline completion items + */ + items: InlineCompletionItem[]; +} +export declare namespace InlineCompletionList { + function create(items: InlineCompletionItem[]): InlineCompletionList; +} +/** + * Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered. + * + * @since 3.18.0 + * @proposed + */ +export declare namespace InlineCompletionTriggerKind { + /** + * Completion was triggered explicitly by a user gesture. + */ + const Invoked: 1; + /** + * Completion was triggered automatically while editing. + */ + const Automatic: 2; +} +export type InlineCompletionTriggerKind = 1 | 2; +/** + * Describes the currently selected completion item. + * + * @since 3.18.0 + * @proposed + */ +export interface SelectedCompletionInfo { + /** + * The range that will be replaced if this completion item is accepted. + */ + range: Range; + /** + * The text the range will be replaced with if this completion is accepted. + */ + text: string; +} +export declare namespace SelectedCompletionInfo { + function create(range: Range, text: string): SelectedCompletionInfo; +} +/** + * Provides information about the context in which an inline completion was requested. + * + * @since 3.18.0 + * @proposed + */ +export interface InlineCompletionContext { + /** + * Describes how the inline completion was triggered. + */ + triggerKind: InlineCompletionTriggerKind; + /** + * Provides information about the currently selected item in the autocomplete widget if it is visible. + */ + selectedCompletionInfo?: SelectedCompletionInfo; +} +export declare namespace InlineCompletionContext { + function create(triggerKind: InlineCompletionTriggerKind, selectedCompletionInfo?: SelectedCompletionInfo): InlineCompletionContext; +} +/** + * A workspace folder inside a client. + */ +export interface WorkspaceFolder { + /** + * The associated URI for this workspace folder. + */ + uri: URI; + /** + * The name of the workspace folder. Used to refer to this + * workspace folder in the user interface. + */ + name: string; +} +export declare namespace WorkspaceFolder { + function is(value: any): value is WorkspaceFolder; +} +export declare const EOL: string[]; +/** + * A simple text document. Not to be implemented. The document keeps the content + * as string. + * + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +export interface TextDocument { + /** + * The associated URI for this document. Most documents have the __file__-scheme, indicating that they + * represent files on disk. However, some documents may have other schemes indicating that they are not + * available on disk. + * + * @readonly + */ + readonly uri: DocumentUri; + /** + * The identifier of the language associated with this document. + * + * @readonly + */ + readonly languageId: LanguageKind; + /** + * The version number of this document (it will increase after each + * change, including undo/redo). + * + * @readonly + */ + readonly version: integer; + /** + * Get the text of this document. A substring can be retrieved by + * providing a range. + * + * @param range (optional) An range within the document to return. + * If no range is passed, the full content is returned. + * Invalid range positions are adjusted as described in {@link Position.line Position.line} + * and {@link Position.character Position.character}. + * If the start range position is greater than the end range position, + * then the effect of getText is as if the two positions were swapped. + + * @return The text of this document or a substring of the text if a + * range is provided. + */ + getText(range?: Range): string; + /** + * Converts a zero-based offset to a position. + * + * @param offset A zero-based offset. + * @return A valid {@link Position position}. + */ + positionAt(offset: uinteger): Position; + /** + * Converts the position to a zero-based offset. + * Invalid positions are adjusted as described in {@link Position.line Position.line} + * and {@link Position.character Position.character}. + * + * @param position A position. + * @return A valid zero-based offset. + */ + offsetAt(position: Position): uinteger; + /** + * The number of lines in this document. + * + * @readonly + */ + readonly lineCount: uinteger; +} +/** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +export declare namespace TextDocument { + /** + * Creates a new ITextDocument literal from the given uri and content. + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param version The document's version. + * @param content The document's content. + */ + function create(uri: DocumentUri, languageId: LanguageKind, version: integer, content: string): TextDocument; + /** + * Checks whether the given literal conforms to the {@link ITextDocument} interface. + */ + function is(value: any): value is TextDocument; + function applyEdits(document: TextDocument, edits: TextEdit[]): string; +} +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/umd/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/umd/main.js" index 019b59511b18caf3968054d90a7c8a576e06564b..2ee2734fc95fcba87e0be5dfd708f32b471d3dfc 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/umd/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/lib/umd/main.js" @@ -1,3 +1,2397 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:12e90dc9cd237c9cc80de1361f7e9d6cba02815498d05561455d5c48fe6d3477 -size 98481 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + /* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ + 'use strict'; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.TextDocument = exports.EOL = exports.WorkspaceFolder = exports.InlineCompletionContext = exports.SelectedCompletionInfo = exports.InlineCompletionTriggerKind = exports.InlineCompletionList = exports.InlineCompletionItem = exports.StringValue = exports.InlayHint = exports.InlayHintLabelPart = exports.InlayHintKind = exports.InlineValueContext = exports.InlineValueEvaluatableExpression = exports.InlineValueVariableLookup = exports.InlineValueText = exports.SemanticTokens = exports.SemanticTokenModifiers = exports.SemanticTokenTypes = exports.SelectionRange = exports.DocumentLink = exports.FormattingOptions = exports.CodeLens = exports.CodeAction = exports.CodeActionContext = exports.CodeActionTriggerKind = exports.CodeActionKind = exports.DocumentSymbol = exports.WorkspaceSymbol = exports.SymbolInformation = exports.SymbolTag = exports.SymbolKind = exports.DocumentHighlight = exports.DocumentHighlightKind = exports.SignatureInformation = exports.ParameterInformation = exports.Hover = exports.MarkedString = exports.CompletionList = exports.CompletionItem = exports.CompletionItemLabelDetails = exports.InsertTextMode = exports.InsertReplaceEdit = exports.CompletionItemTag = exports.InsertTextFormat = exports.CompletionItemKind = exports.MarkupContent = exports.MarkupKind = exports.TextDocumentItem = exports.LanguageKind = exports.OptionalVersionedTextDocumentIdentifier = exports.VersionedTextDocumentIdentifier = exports.TextDocumentIdentifier = exports.WorkspaceChange = exports.SnippetTextEdit = exports.WorkspaceEdit = exports.DeleteFile = exports.RenameFile = exports.CreateFile = exports.TextDocumentEdit = exports.AnnotatedTextEdit = exports.ChangeAnnotationIdentifier = exports.ChangeAnnotation = exports.TextEdit = exports.Command = exports.Diagnostic = exports.CodeDescription = exports.DiagnosticTag = exports.DiagnosticSeverity = exports.DiagnosticRelatedInformation = exports.FoldingRange = exports.FoldingRangeKind = exports.ColorPresentation = exports.ColorInformation = exports.Color = exports.LocationLink = exports.Location = exports.Range = exports.Position = exports.uinteger = exports.integer = exports.URI = exports.DocumentUri = void 0; + var DocumentUri; + (function (DocumentUri) { + function is(value) { + return typeof value === 'string'; + } + DocumentUri.is = is; + })(DocumentUri || (exports.DocumentUri = DocumentUri = {})); + var URI; + (function (URI) { + function is(value) { + return typeof value === 'string'; + } + URI.is = is; + })(URI || (exports.URI = URI = {})); + var integer; + (function (integer) { + integer.MIN_VALUE = -2147483648; + integer.MAX_VALUE = 2147483647; + function is(value) { + return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE; + } + integer.is = is; + })(integer || (exports.integer = integer = {})); + var uinteger; + (function (uinteger) { + uinteger.MIN_VALUE = 0; + uinteger.MAX_VALUE = 2147483647; + function is(value) { + return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE; + } + uinteger.is = is; + })(uinteger || (exports.uinteger = uinteger = {})); + /** + * The Position namespace provides helper functions to work with + * {@link Position} literals. + */ + var Position; + (function (Position) { + /** + * Creates a new Position literal from the given line and character. + * @param line The position's line. + * @param character The position's character. + */ + function create(line, character) { + if (line === Number.MAX_VALUE) { + line = uinteger.MAX_VALUE; + } + if (character === Number.MAX_VALUE) { + character = uinteger.MAX_VALUE; + } + return { line: line, character: character }; + } + Position.create = create; + /** + * Checks whether the given literal conforms to the {@link Position} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character); + } + Position.is = is; + })(Position || (exports.Position = Position = {})); + /** + * The Range namespace provides helper functions to work with + * {@link Range} literals. + */ + var Range; + (function (Range) { + function create(one, two, three, four) { + if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) { + return { start: Position.create(one, two), end: Position.create(three, four) }; + } + else if (Position.is(one) && Position.is(two)) { + return { start: one, end: two }; + } + else { + throw new Error("Range#create called with invalid arguments[".concat(one, ", ").concat(two, ", ").concat(three, ", ").concat(four, "]")); + } + } + Range.create = create; + /** + * Checks whether the given literal conforms to the {@link Range} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end); + } + Range.is = is; + })(Range || (exports.Range = Range = {})); + /** + * The Location namespace provides helper functions to work with + * {@link Location} literals. + */ + var Location; + (function (Location) { + /** + * Creates a Location literal. + * @param uri The location's uri. + * @param range The location's range. + */ + function create(uri, range) { + return { uri: uri, range: range }; + } + Location.create = create; + /** + * Checks whether the given literal conforms to the {@link Location} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri)); + } + Location.is = is; + })(Location || (exports.Location = Location = {})); + /** + * The LocationLink namespace provides helper functions to work with + * {@link LocationLink} literals. + */ + var LocationLink; + (function (LocationLink) { + /** + * Creates a LocationLink literal. + * @param targetUri The definition's uri. + * @param targetRange The full range of the definition. + * @param targetSelectionRange The span of the symbol definition at the target. + * @param originSelectionRange The span of the symbol being defined in the originating source file. + */ + function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) { + return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange }; + } + LocationLink.create = create; + /** + * Checks whether the given literal conforms to the {@link LocationLink} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri) + && Range.is(candidate.targetSelectionRange) + && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange)); + } + LocationLink.is = is; + })(LocationLink || (exports.LocationLink = LocationLink = {})); + /** + * The Color namespace provides helper functions to work with + * {@link Color} literals. + */ + var Color; + (function (Color) { + /** + * Creates a new Color literal. + */ + function create(red, green, blue, alpha) { + return { + red: red, + green: green, + blue: blue, + alpha: alpha, + }; + } + Color.create = create; + /** + * Checks whether the given literal conforms to the {@link Color} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1) + && Is.numberRange(candidate.green, 0, 1) + && Is.numberRange(candidate.blue, 0, 1) + && Is.numberRange(candidate.alpha, 0, 1); + } + Color.is = is; + })(Color || (exports.Color = Color = {})); + /** + * The ColorInformation namespace provides helper functions to work with + * {@link ColorInformation} literals. + */ + var ColorInformation; + (function (ColorInformation) { + /** + * Creates a new ColorInformation literal. + */ + function create(range, color) { + return { + range: range, + color: color, + }; + } + ColorInformation.create = create; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color); + } + ColorInformation.is = is; + })(ColorInformation || (exports.ColorInformation = ColorInformation = {})); + /** + * The Color namespace provides helper functions to work with + * {@link ColorPresentation} literals. + */ + var ColorPresentation; + (function (ColorPresentation) { + /** + * Creates a new ColorInformation literal. + */ + function create(label, textEdit, additionalTextEdits) { + return { + label: label, + textEdit: textEdit, + additionalTextEdits: additionalTextEdits, + }; + } + ColorPresentation.create = create; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.label) + && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate)) + && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is)); + } + ColorPresentation.is = is; + })(ColorPresentation || (exports.ColorPresentation = ColorPresentation = {})); + /** + * A set of predefined range kinds. + */ + var FoldingRangeKind; + (function (FoldingRangeKind) { + /** + * Folding range for a comment + */ + FoldingRangeKind.Comment = 'comment'; + /** + * Folding range for an import or include + */ + FoldingRangeKind.Imports = 'imports'; + /** + * Folding range for a region (e.g. `#region`) + */ + FoldingRangeKind.Region = 'region'; + })(FoldingRangeKind || (exports.FoldingRangeKind = FoldingRangeKind = {})); + /** + * The folding range namespace provides helper functions to work with + * {@link FoldingRange} literals. + */ + var FoldingRange; + (function (FoldingRange) { + /** + * Creates a new FoldingRange literal. + */ + function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) { + var result = { + startLine: startLine, + endLine: endLine + }; + if (Is.defined(startCharacter)) { + result.startCharacter = startCharacter; + } + if (Is.defined(endCharacter)) { + result.endCharacter = endCharacter; + } + if (Is.defined(kind)) { + result.kind = kind; + } + if (Is.defined(collapsedText)) { + result.collapsedText = collapsedText; + } + return result; + } + FoldingRange.create = create; + /** + * Checks whether the given literal conforms to the {@link FoldingRange} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine) + && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter)) + && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter)) + && (Is.undefined(candidate.kind) || Is.string(candidate.kind)); + } + FoldingRange.is = is; + })(FoldingRange || (exports.FoldingRange = FoldingRange = {})); + /** + * The DiagnosticRelatedInformation namespace provides helper functions to work with + * {@link DiagnosticRelatedInformation} literals. + */ + var DiagnosticRelatedInformation; + (function (DiagnosticRelatedInformation) { + /** + * Creates a new DiagnosticRelatedInformation literal. + */ + function create(location, message) { + return { + location: location, + message: message + }; + } + DiagnosticRelatedInformation.create = create; + /** + * Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message); + } + DiagnosticRelatedInformation.is = is; + })(DiagnosticRelatedInformation || (exports.DiagnosticRelatedInformation = DiagnosticRelatedInformation = {})); + /** + * The diagnostic's severity. + */ + var DiagnosticSeverity; + (function (DiagnosticSeverity) { + /** + * Reports an error. + */ + DiagnosticSeverity.Error = 1; + /** + * Reports a warning. + */ + DiagnosticSeverity.Warning = 2; + /** + * Reports an information. + */ + DiagnosticSeverity.Information = 3; + /** + * Reports a hint. + */ + DiagnosticSeverity.Hint = 4; + })(DiagnosticSeverity || (exports.DiagnosticSeverity = DiagnosticSeverity = {})); + /** + * The diagnostic tags. + * + * @since 3.15.0 + */ + var DiagnosticTag; + (function (DiagnosticTag) { + /** + * Unused or unnecessary code. + * + * Clients are allowed to render diagnostics with this tag faded out instead of having + * an error squiggle. + */ + DiagnosticTag.Unnecessary = 1; + /** + * Deprecated or obsolete code. + * + * Clients are allowed to rendered diagnostics with this tag strike through. + */ + DiagnosticTag.Deprecated = 2; + })(DiagnosticTag || (exports.DiagnosticTag = DiagnosticTag = {})); + /** + * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes. + * + * @since 3.16.0 + */ + var CodeDescription; + (function (CodeDescription) { + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.href); + } + CodeDescription.is = is; + })(CodeDescription || (exports.CodeDescription = CodeDescription = {})); + /** + * The Diagnostic namespace provides helper functions to work with + * {@link Diagnostic} literals. + */ + var Diagnostic; + (function (Diagnostic) { + /** + * Creates a new Diagnostic literal. + */ + function create(range, message, severity, code, source, relatedInformation) { + var result = { range: range, message: message }; + if (Is.defined(severity)) { + result.severity = severity; + } + if (Is.defined(code)) { + result.code = code; + } + if (Is.defined(source)) { + result.source = source; + } + if (Is.defined(relatedInformation)) { + result.relatedInformation = relatedInformation; + } + return result; + } + Diagnostic.create = create; + /** + * Checks whether the given literal conforms to the {@link Diagnostic} interface. + */ + function is(value) { + var _a; + var candidate = value; + return Is.defined(candidate) + && Range.is(candidate.range) + && Is.string(candidate.message) + && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) + && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) + && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href))) + && (Is.string(candidate.source) || Is.undefined(candidate.source)) + && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is)); + } + Diagnostic.is = is; + })(Diagnostic || (exports.Diagnostic = Diagnostic = {})); + /** + * The Command namespace provides helper functions to work with + * {@link Command} literals. + */ + var Command; + (function (Command) { + /** + * Creates a new Command literal. + */ + function create(title, command) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var result = { title: title, command: command }; + if (Is.defined(args) && args.length > 0) { + result.arguments = args; + } + return result; + } + Command.create = create; + /** + * Checks whether the given literal conforms to the {@link Command} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.title) && (candidate.tooltip === undefined || Is.string(candidate.tooltip)) && Is.string(candidate.command); + } + Command.is = is; + })(Command || (exports.Command = Command = {})); + /** + * The TextEdit namespace provides helper function to create replace, + * insert and delete edits more easily. + */ + var TextEdit; + (function (TextEdit) { + /** + * Creates a replace text edit. + * @param range The range of text to be replaced. + * @param newText The new text. + */ + function replace(range, newText) { + return { range: range, newText: newText }; + } + TextEdit.replace = replace; + /** + * Creates an insert text edit. + * @param position The position to insert the text at. + * @param newText The text to be inserted. + */ + function insert(position, newText) { + return { range: { start: position, end: position }, newText: newText }; + } + TextEdit.insert = insert; + /** + * Creates a delete text edit. + * @param range The range of text to be deleted. + */ + function del(range) { + return { range: range, newText: '' }; + } + TextEdit.del = del; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) + && Is.string(candidate.newText) + && Range.is(candidate.range); + } + TextEdit.is = is; + })(TextEdit || (exports.TextEdit = TextEdit = {})); + var ChangeAnnotation; + (function (ChangeAnnotation) { + function create(label, needsConfirmation, description) { + var result = { label: label }; + if (needsConfirmation !== undefined) { + result.needsConfirmation = needsConfirmation; + } + if (description !== undefined) { + result.description = description; + } + return result; + } + ChangeAnnotation.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.label) && + (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) && + (Is.string(candidate.description) || candidate.description === undefined); + } + ChangeAnnotation.is = is; + })(ChangeAnnotation || (exports.ChangeAnnotation = ChangeAnnotation = {})); + var ChangeAnnotationIdentifier; + (function (ChangeAnnotationIdentifier) { + function is(value) { + var candidate = value; + return Is.string(candidate); + } + ChangeAnnotationIdentifier.is = is; + })(ChangeAnnotationIdentifier || (exports.ChangeAnnotationIdentifier = ChangeAnnotationIdentifier = {})); + var AnnotatedTextEdit; + (function (AnnotatedTextEdit) { + /** + * Creates an annotated replace text edit. + * + * @param range The range of text to be replaced. + * @param newText The new text. + * @param annotation The annotation. + */ + function replace(range, newText, annotation) { + return { range: range, newText: newText, annotationId: annotation }; + } + AnnotatedTextEdit.replace = replace; + /** + * Creates an annotated insert text edit. + * + * @param position The position to insert the text at. + * @param newText The text to be inserted. + * @param annotation The annotation. + */ + function insert(position, newText, annotation) { + return { range: { start: position, end: position }, newText: newText, annotationId: annotation }; + } + AnnotatedTextEdit.insert = insert; + /** + * Creates an annotated delete text edit. + * + * @param range The range of text to be deleted. + * @param annotation The annotation. + */ + function del(range, annotation) { + return { range: range, newText: '', annotationId: annotation }; + } + AnnotatedTextEdit.del = del; + function is(value) { + var candidate = value; + return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + AnnotatedTextEdit.is = is; + })(AnnotatedTextEdit || (exports.AnnotatedTextEdit = AnnotatedTextEdit = {})); + /** + * The TextDocumentEdit namespace provides helper function to create + * an edit that manipulates a text document. + */ + var TextDocumentEdit; + (function (TextDocumentEdit) { + /** + * Creates a new `TextDocumentEdit` + */ + function create(textDocument, edits) { + return { textDocument: textDocument, edits: edits }; + } + TextDocumentEdit.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) + && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument) + && Array.isArray(candidate.edits); + } + TextDocumentEdit.is = is; + })(TextDocumentEdit || (exports.TextDocumentEdit = TextDocumentEdit = {})); + var CreateFile; + (function (CreateFile) { + function create(uri, options, annotation) { + var result = { + kind: 'create', + uri: uri + }; + if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + CreateFile.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined || + ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + CreateFile.is = is; + })(CreateFile || (exports.CreateFile = CreateFile = {})); + var RenameFile; + (function (RenameFile) { + function create(oldUri, newUri, options, annotation) { + var result = { + kind: 'rename', + oldUri: oldUri, + newUri: newUri + }; + if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + RenameFile.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined || + ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + RenameFile.is = is; + })(RenameFile || (exports.RenameFile = RenameFile = {})); + var DeleteFile; + (function (DeleteFile) { + function create(uri, options, annotation) { + var result = { + kind: 'delete', + uri: uri + }; + if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + DeleteFile.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined || + ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + DeleteFile.is = is; + })(DeleteFile || (exports.DeleteFile = DeleteFile = {})); + var WorkspaceEdit; + (function (WorkspaceEdit) { + function is(value) { + var candidate = value; + return candidate && + (candidate.changes !== undefined || candidate.documentChanges !== undefined) && + (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) { + if (Is.string(change.kind)) { + return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change); + } + else { + return TextDocumentEdit.is(change); + } + })); + } + WorkspaceEdit.is = is; + })(WorkspaceEdit || (exports.WorkspaceEdit = WorkspaceEdit = {})); + var TextEditChangeImpl = /** @class */ (function () { + function TextEditChangeImpl(edits, changeAnnotations) { + this.edits = edits; + this.changeAnnotations = changeAnnotations; + } + TextEditChangeImpl.prototype.insert = function (position, newText, annotation) { + var edit; + var id; + if (annotation === undefined) { + edit = TextEdit.insert(position, newText); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.insert(position, newText, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.insert(position, newText, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + }; + TextEditChangeImpl.prototype.replace = function (range, newText, annotation) { + var edit; + var id; + if (annotation === undefined) { + edit = TextEdit.replace(range, newText); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.replace(range, newText, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.replace(range, newText, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + }; + TextEditChangeImpl.prototype.delete = function (range, annotation) { + var edit; + var id; + if (annotation === undefined) { + edit = TextEdit.del(range); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.del(range, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.del(range, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + }; + TextEditChangeImpl.prototype.add = function (edit) { + this.edits.push(edit); + }; + TextEditChangeImpl.prototype.all = function () { + return this.edits; + }; + TextEditChangeImpl.prototype.clear = function () { + this.edits.splice(0, this.edits.length); + }; + TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) { + if (value === undefined) { + throw new Error("Text edit change is not configured to manage change annotations."); + } + }; + return TextEditChangeImpl; + }()); + var SnippetTextEdit; + (function (SnippetTextEdit) { + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) + && Range.is(candidate.range) + && StringValue.isSnippet(candidate.snippet) + && (candidate.annotationId === undefined || + (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId))); + } + SnippetTextEdit.is = is; + })(SnippetTextEdit || (exports.SnippetTextEdit = SnippetTextEdit = {})); + /** + * A helper class + */ + var ChangeAnnotations = /** @class */ (function () { + function ChangeAnnotations(annotations) { + this._annotations = annotations === undefined ? Object.create(null) : annotations; + this._counter = 0; + this._size = 0; + } + ChangeAnnotations.prototype.all = function () { + return this._annotations; + }; + Object.defineProperty(ChangeAnnotations.prototype, "size", { + get: function () { + return this._size; + }, + enumerable: false, + configurable: true + }); + ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) { + var id; + if (ChangeAnnotationIdentifier.is(idOrAnnotation)) { + id = idOrAnnotation; + } + else { + id = this.nextId(); + annotation = idOrAnnotation; + } + if (this._annotations[id] !== undefined) { + throw new Error("Id ".concat(id, " is already in use.")); + } + if (annotation === undefined) { + throw new Error("No annotation provided for id ".concat(id)); + } + this._annotations[id] = annotation; + this._size++; + return id; + }; + ChangeAnnotations.prototype.nextId = function () { + this._counter++; + return this._counter.toString(); + }; + return ChangeAnnotations; + }()); + /** + * A workspace change helps constructing changes to a workspace. + */ + var WorkspaceChange = /** @class */ (function () { + function WorkspaceChange(workspaceEdit) { + var _this = this; + this._textEditChanges = Object.create(null); + if (workspaceEdit !== undefined) { + this._workspaceEdit = workspaceEdit; + if (workspaceEdit.documentChanges) { + this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations); + workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + workspaceEdit.documentChanges.forEach(function (change) { + if (TextDocumentEdit.is(change)) { + var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations); + _this._textEditChanges[change.textDocument.uri] = textEditChange; + } + }); + } + else if (workspaceEdit.changes) { + Object.keys(workspaceEdit.changes).forEach(function (key) { + var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]); + _this._textEditChanges[key] = textEditChange; + }); + } + } + else { + this._workspaceEdit = {}; + } + } + Object.defineProperty(WorkspaceChange.prototype, "edit", { + /** + * Returns the underlying {@link WorkspaceEdit} literal + * use to be returned from a workspace edit operation like rename. + */ + get: function () { + this.initDocumentChanges(); + if (this._changeAnnotations !== undefined) { + if (this._changeAnnotations.size === 0) { + this._workspaceEdit.changeAnnotations = undefined; + } + else { + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + } + return this._workspaceEdit; + }, + enumerable: false, + configurable: true + }); + WorkspaceChange.prototype.getTextEditChange = function (key) { + if (OptionalVersionedTextDocumentIdentifier.is(key)) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var textDocument = { uri: key.uri, version: key.version }; + var result = this._textEditChanges[textDocument.uri]; + if (!result) { + var edits = []; + var textDocumentEdit = { + textDocument: textDocument, + edits: edits + }; + this._workspaceEdit.documentChanges.push(textDocumentEdit); + result = new TextEditChangeImpl(edits, this._changeAnnotations); + this._textEditChanges[textDocument.uri] = result; + } + return result; + } + else { + this.initChanges(); + if (this._workspaceEdit.changes === undefined) { + throw new Error('Workspace edit is not configured for normal text edit changes.'); + } + var result = this._textEditChanges[key]; + if (!result) { + var edits = []; + this._workspaceEdit.changes[key] = edits; + result = new TextEditChangeImpl(edits); + this._textEditChanges[key] = result; + } + return result; + } + }; + WorkspaceChange.prototype.initDocumentChanges = function () { + if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) { + this._changeAnnotations = new ChangeAnnotations(); + this._workspaceEdit.documentChanges = []; + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + }; + WorkspaceChange.prototype.initChanges = function () { + if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) { + this._workspaceEdit.changes = Object.create(null); + } + }; + WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + var operation; + var id; + if (annotation === undefined) { + operation = CreateFile.create(uri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = CreateFile.create(uri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + }; + WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + var operation; + var id; + if (annotation === undefined) { + operation = RenameFile.create(oldUri, newUri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = RenameFile.create(oldUri, newUri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + }; + WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + var operation; + var id; + if (annotation === undefined) { + operation = DeleteFile.create(uri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = DeleteFile.create(uri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + }; + return WorkspaceChange; + }()); + exports.WorkspaceChange = WorkspaceChange; + /** + * The TextDocumentIdentifier namespace provides helper functions to work with + * {@link TextDocumentIdentifier} literals. + */ + var TextDocumentIdentifier; + (function (TextDocumentIdentifier) { + /** + * Creates a new TextDocumentIdentifier literal. + * @param uri The document's uri. + */ + function create(uri) { + return { uri: uri }; + } + TextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri); + } + TextDocumentIdentifier.is = is; + })(TextDocumentIdentifier || (exports.TextDocumentIdentifier = TextDocumentIdentifier = {})); + /** + * The VersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link VersionedTextDocumentIdentifier} literals. + */ + var VersionedTextDocumentIdentifier; + (function (VersionedTextDocumentIdentifier) { + /** + * Creates a new VersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri, version) { + return { uri: uri, version: version }; + } + VersionedTextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version); + } + VersionedTextDocumentIdentifier.is = is; + })(VersionedTextDocumentIdentifier || (exports.VersionedTextDocumentIdentifier = VersionedTextDocumentIdentifier = {})); + /** + * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link OptionalVersionedTextDocumentIdentifier} literals. + */ + var OptionalVersionedTextDocumentIdentifier; + (function (OptionalVersionedTextDocumentIdentifier) { + /** + * Creates a new OptionalVersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri, version) { + return { uri: uri, version: version }; + } + OptionalVersionedTextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version)); + } + OptionalVersionedTextDocumentIdentifier.is = is; + })(OptionalVersionedTextDocumentIdentifier || (exports.OptionalVersionedTextDocumentIdentifier = OptionalVersionedTextDocumentIdentifier = {})); + /** + * Predefined Language kinds + * @since 3.18.0 + * @proposed + */ + var LanguageKind; + (function (LanguageKind) { + LanguageKind.ABAP = 'abap'; + LanguageKind.WindowsBat = 'bat'; + LanguageKind.BibTeX = 'bibtex'; + LanguageKind.Clojure = 'clojure'; + LanguageKind.Coffeescript = 'coffeescript'; + LanguageKind.C = 'c'; + LanguageKind.CPP = 'cpp'; + LanguageKind.CSharp = 'csharp'; + LanguageKind.CSS = 'css'; + /** + * @since 3.18.0 + * @proposed + */ + LanguageKind.D = 'd'; + /** + * @since 3.18.0 + * @proposed + */ + LanguageKind.Delphi = 'pascal'; + LanguageKind.Diff = 'diff'; + LanguageKind.Dart = 'dart'; + LanguageKind.Dockerfile = 'dockerfile'; + LanguageKind.Elixir = 'elixir'; + LanguageKind.Erlang = 'erlang'; + LanguageKind.FSharp = 'fsharp'; + LanguageKind.GitCommit = 'git-commit'; + LanguageKind.GitRebase = 'rebase'; + LanguageKind.Go = 'go'; + LanguageKind.Groovy = 'groovy'; + LanguageKind.Handlebars = 'handlebars'; + LanguageKind.Haskell = 'haskell'; + LanguageKind.HTML = 'html'; + LanguageKind.Ini = 'ini'; + LanguageKind.Java = 'java'; + LanguageKind.JavaScript = 'javascript'; + LanguageKind.JavaScriptReact = 'javascriptreact'; + LanguageKind.JSON = 'json'; + LanguageKind.LaTeX = 'latex'; + LanguageKind.Less = 'less'; + LanguageKind.Lua = 'lua'; + LanguageKind.Makefile = 'makefile'; + LanguageKind.Markdown = 'markdown'; + LanguageKind.ObjectiveC = 'objective-c'; + LanguageKind.ObjectiveCPP = 'objective-cpp'; + /** + * @since 3.18.0 + * @proposed + */ + LanguageKind.Pascal = 'pascal'; + LanguageKind.Perl = 'perl'; + LanguageKind.Perl6 = 'perl6'; + LanguageKind.PHP = 'php'; + LanguageKind.Powershell = 'powershell'; + LanguageKind.Pug = 'jade'; + LanguageKind.Python = 'python'; + LanguageKind.R = 'r'; + LanguageKind.Razor = 'razor'; + LanguageKind.Ruby = 'ruby'; + LanguageKind.Rust = 'rust'; + LanguageKind.SCSS = 'scss'; + LanguageKind.SASS = 'sass'; + LanguageKind.Scala = 'scala'; + LanguageKind.ShaderLab = 'shaderlab'; + LanguageKind.ShellScript = 'shellscript'; + LanguageKind.SQL = 'sql'; + LanguageKind.Swift = 'swift'; + LanguageKind.TypeScript = 'typescript'; + LanguageKind.TypeScriptReact = 'typescriptreact'; + LanguageKind.TeX = 'tex'; + LanguageKind.VisualBasic = 'vb'; + LanguageKind.XML = 'xml'; + LanguageKind.XSL = 'xsl'; + LanguageKind.YAML = 'yaml'; + })(LanguageKind || (exports.LanguageKind = LanguageKind = {})); + /** + * The TextDocumentItem namespace provides helper functions to work with + * {@link TextDocumentItem} literals. + */ + var TextDocumentItem; + (function (TextDocumentItem) { + /** + * Creates a new TextDocumentItem literal. + * @param uri The document's uri. + * @param languageId The document's language identifier. + * @param version The document's version number. + * @param text The document's text. + */ + function create(uri, languageId, version, text) { + return { uri: uri, languageId: languageId, version: version, text: text }; + } + TextDocumentItem.create = create; + /** + * Checks whether the given literal conforms to the {@link TextDocumentItem} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text); + } + TextDocumentItem.is = is; + })(TextDocumentItem || (exports.TextDocumentItem = TextDocumentItem = {})); + /** + * Describes the content type that a client supports in various + * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. + * + * Please note that `MarkupKinds` must not start with a `$`. This kinds + * are reserved for internal usage. + */ + var MarkupKind; + (function (MarkupKind) { + /** + * Plain text is supported as a content format + */ + MarkupKind.PlainText = 'plaintext'; + /** + * Markdown is supported as a content format + */ + MarkupKind.Markdown = 'markdown'; + /** + * Checks whether the given value is a value of the {@link MarkupKind} type. + */ + function is(value) { + var candidate = value; + return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown; + } + MarkupKind.is = is; + })(MarkupKind || (exports.MarkupKind = MarkupKind = {})); + var MarkupContent; + (function (MarkupContent) { + /** + * Checks whether the given value conforms to the {@link MarkupContent} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value); + } + MarkupContent.is = is; + })(MarkupContent || (exports.MarkupContent = MarkupContent = {})); + /** + * The kind of a completion entry. + */ + var CompletionItemKind; + (function (CompletionItemKind) { + CompletionItemKind.Text = 1; + CompletionItemKind.Method = 2; + CompletionItemKind.Function = 3; + CompletionItemKind.Constructor = 4; + CompletionItemKind.Field = 5; + CompletionItemKind.Variable = 6; + CompletionItemKind.Class = 7; + CompletionItemKind.Interface = 8; + CompletionItemKind.Module = 9; + CompletionItemKind.Property = 10; + CompletionItemKind.Unit = 11; + CompletionItemKind.Value = 12; + CompletionItemKind.Enum = 13; + CompletionItemKind.Keyword = 14; + CompletionItemKind.Snippet = 15; + CompletionItemKind.Color = 16; + CompletionItemKind.File = 17; + CompletionItemKind.Reference = 18; + CompletionItemKind.Folder = 19; + CompletionItemKind.EnumMember = 20; + CompletionItemKind.Constant = 21; + CompletionItemKind.Struct = 22; + CompletionItemKind.Event = 23; + CompletionItemKind.Operator = 24; + CompletionItemKind.TypeParameter = 25; + })(CompletionItemKind || (exports.CompletionItemKind = CompletionItemKind = {})); + /** + * Defines whether the insert text in a completion item should be interpreted as + * plain text or a snippet. + */ + var InsertTextFormat; + (function (InsertTextFormat) { + /** + * The primary text to be inserted is treated as a plain string. + */ + InsertTextFormat.PlainText = 1; + /** + * The primary text to be inserted is treated as a snippet. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Placeholders with equal identifiers are linked, + * that is typing in one will update others too. + * + * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax + */ + InsertTextFormat.Snippet = 2; + })(InsertTextFormat || (exports.InsertTextFormat = InsertTextFormat = {})); + /** + * Completion item tags are extra annotations that tweak the rendering of a completion + * item. + * + * @since 3.15.0 + */ + var CompletionItemTag; + (function (CompletionItemTag) { + /** + * Render a completion as obsolete, usually using a strike-out. + */ + CompletionItemTag.Deprecated = 1; + })(CompletionItemTag || (exports.CompletionItemTag = CompletionItemTag = {})); + /** + * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits. + * + * @since 3.16.0 + */ + var InsertReplaceEdit; + (function (InsertReplaceEdit) { + /** + * Creates a new insert / replace edit + */ + function create(newText, insert, replace) { + return { newText: newText, insert: insert, replace: replace }; + } + InsertReplaceEdit.create = create; + /** + * Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface. + */ + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace); + } + InsertReplaceEdit.is = is; + })(InsertReplaceEdit || (exports.InsertReplaceEdit = InsertReplaceEdit = {})); + /** + * How whitespace and indentation is handled during completion + * item insertion. + * + * @since 3.16.0 + */ + var InsertTextMode; + (function (InsertTextMode) { + /** + * The insertion or replace strings is taken as it is. If the + * value is multi line the lines below the cursor will be + * inserted using the indentation defined in the string value. + * The client will not apply any kind of adjustments to the + * string. + */ + InsertTextMode.asIs = 1; + /** + * The editor adjusts leading whitespace of new lines so that + * they match the indentation up to the cursor of the line for + * which the item is accepted. + * + * Consider a line like this: <2tabs><3tabs>foo. Accepting a + * multi line completion item is indented using 2 tabs and all + * following lines inserted will be indented using 2 tabs as well. + */ + InsertTextMode.adjustIndentation = 2; + })(InsertTextMode || (exports.InsertTextMode = InsertTextMode = {})); + var CompletionItemLabelDetails; + (function (CompletionItemLabelDetails) { + function is(value) { + var candidate = value; + return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) && + (Is.string(candidate.description) || candidate.description === undefined); + } + CompletionItemLabelDetails.is = is; + })(CompletionItemLabelDetails || (exports.CompletionItemLabelDetails = CompletionItemLabelDetails = {})); + /** + * The CompletionItem namespace provides functions to deal with + * completion items. + */ + var CompletionItem; + (function (CompletionItem) { + /** + * Create a completion item and seed it with a label. + * @param label The completion item's label + */ + function create(label) { + return { label: label }; + } + CompletionItem.create = create; + })(CompletionItem || (exports.CompletionItem = CompletionItem = {})); + /** + * The CompletionList namespace provides functions to deal with + * completion lists. + */ + var CompletionList; + (function (CompletionList) { + /** + * Creates a new completion list. + * + * @param items The completion items. + * @param isIncomplete The list is not complete. + */ + function create(items, isIncomplete) { + return { items: items ? items : [], isIncomplete: !!isIncomplete }; + } + CompletionList.create = create; + })(CompletionList || (exports.CompletionList = CompletionList = {})); + var MarkedString; + (function (MarkedString) { + /** + * Creates a marked string from plain text. + * + * @param plainText The plain text. + */ + function fromPlainText(plainText) { + return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash + } + MarkedString.fromPlainText = fromPlainText; + /** + * Checks whether the given value conforms to the {@link MarkedString} type. + */ + function is(value) { + var candidate = value; + return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value)); + } + MarkedString.is = is; + })(MarkedString || (exports.MarkedString = MarkedString = {})); + var Hover; + (function (Hover) { + /** + * Checks whether the given value conforms to the {@link Hover} interface. + */ + function is(value) { + var candidate = value; + return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) || + MarkedString.is(candidate.contents) || + Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range)); + } + Hover.is = is; + })(Hover || (exports.Hover = Hover = {})); + /** + * The ParameterInformation namespace provides helper functions to work with + * {@link ParameterInformation} literals. + */ + var ParameterInformation; + (function (ParameterInformation) { + /** + * Creates a new parameter information literal. + * + * @param label A label string. + * @param documentation A doc string. + */ + function create(label, documentation) { + return documentation ? { label: label, documentation: documentation } : { label: label }; + } + ParameterInformation.create = create; + })(ParameterInformation || (exports.ParameterInformation = ParameterInformation = {})); + /** + * The SignatureInformation namespace provides helper functions to work with + * {@link SignatureInformation} literals. + */ + var SignatureInformation; + (function (SignatureInformation) { + function create(label, documentation) { + var parameters = []; + for (var _i = 2; _i < arguments.length; _i++) { + parameters[_i - 2] = arguments[_i]; + } + var result = { label: label }; + if (Is.defined(documentation)) { + result.documentation = documentation; + } + if (Is.defined(parameters)) { + result.parameters = parameters; + } + else { + result.parameters = []; + } + return result; + } + SignatureInformation.create = create; + })(SignatureInformation || (exports.SignatureInformation = SignatureInformation = {})); + /** + * A document highlight kind. + */ + var DocumentHighlightKind; + (function (DocumentHighlightKind) { + /** + * A textual occurrence. + */ + DocumentHighlightKind.Text = 1; + /** + * Read-access of a symbol, like reading a variable. + */ + DocumentHighlightKind.Read = 2; + /** + * Write-access of a symbol, like writing to a variable. + */ + DocumentHighlightKind.Write = 3; + })(DocumentHighlightKind || (exports.DocumentHighlightKind = DocumentHighlightKind = {})); + /** + * DocumentHighlight namespace to provide helper functions to work with + * {@link DocumentHighlight} literals. + */ + var DocumentHighlight; + (function (DocumentHighlight) { + /** + * Create a DocumentHighlight object. + * @param range The range the highlight applies to. + * @param kind The highlight kind + */ + function create(range, kind) { + var result = { range: range }; + if (Is.number(kind)) { + result.kind = kind; + } + return result; + } + DocumentHighlight.create = create; + })(DocumentHighlight || (exports.DocumentHighlight = DocumentHighlight = {})); + /** + * A symbol kind. + */ + var SymbolKind; + (function (SymbolKind) { + SymbolKind.File = 1; + SymbolKind.Module = 2; + SymbolKind.Namespace = 3; + SymbolKind.Package = 4; + SymbolKind.Class = 5; + SymbolKind.Method = 6; + SymbolKind.Property = 7; + SymbolKind.Field = 8; + SymbolKind.Constructor = 9; + SymbolKind.Enum = 10; + SymbolKind.Interface = 11; + SymbolKind.Function = 12; + SymbolKind.Variable = 13; + SymbolKind.Constant = 14; + SymbolKind.String = 15; + SymbolKind.Number = 16; + SymbolKind.Boolean = 17; + SymbolKind.Array = 18; + SymbolKind.Object = 19; + SymbolKind.Key = 20; + SymbolKind.Null = 21; + SymbolKind.EnumMember = 22; + SymbolKind.Struct = 23; + SymbolKind.Event = 24; + SymbolKind.Operator = 25; + SymbolKind.TypeParameter = 26; + })(SymbolKind || (exports.SymbolKind = SymbolKind = {})); + /** + * Symbol tags are extra annotations that tweak the rendering of a symbol. + * + * @since 3.16 + */ + var SymbolTag; + (function (SymbolTag) { + /** + * Render a symbol as obsolete, usually using a strike-out. + */ + SymbolTag.Deprecated = 1; + })(SymbolTag || (exports.SymbolTag = SymbolTag = {})); + var SymbolInformation; + (function (SymbolInformation) { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the location of the symbol. + * @param uri The resource of the location of symbol. + * @param containerName The name of the symbol containing the symbol. + */ + function create(name, kind, range, uri, containerName) { + var result = { + name: name, + kind: kind, + location: { uri: uri, range: range } + }; + if (containerName) { + result.containerName = containerName; + } + return result; + } + SymbolInformation.create = create; + })(SymbolInformation || (exports.SymbolInformation = SymbolInformation = {})); + var WorkspaceSymbol; + (function (WorkspaceSymbol) { + /** + * Create a new workspace symbol. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param uri The resource of the location of the symbol. + * @param range An options range of the location. + * @returns A WorkspaceSymbol. + */ + function create(name, kind, uri, range) { + return range !== undefined + ? { name: name, kind: kind, location: { uri: uri, range: range } } + : { name: name, kind: kind, location: { uri: uri } }; + } + WorkspaceSymbol.create = create; + })(WorkspaceSymbol || (exports.WorkspaceSymbol = WorkspaceSymbol = {})); + var DocumentSymbol; + (function (DocumentSymbol) { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param detail The detail of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the symbol. + * @param selectionRange The selectionRange of the symbol. + * @param children Children of the symbol. + */ + function create(name, detail, kind, range, selectionRange, children) { + var result = { + name: name, + detail: detail, + kind: kind, + range: range, + selectionRange: selectionRange + }; + if (children !== undefined) { + result.children = children; + } + return result; + } + DocumentSymbol.create = create; + /** + * Checks whether the given literal conforms to the {@link DocumentSymbol} interface. + */ + function is(value) { + var candidate = value; + return candidate && + Is.string(candidate.name) && Is.number(candidate.kind) && + Range.is(candidate.range) && Range.is(candidate.selectionRange) && + (candidate.detail === undefined || Is.string(candidate.detail)) && + (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) && + (candidate.children === undefined || Array.isArray(candidate.children)) && + (candidate.tags === undefined || Array.isArray(candidate.tags)); + } + DocumentSymbol.is = is; + })(DocumentSymbol || (exports.DocumentSymbol = DocumentSymbol = {})); + /** + * A set of predefined code action kinds + */ + var CodeActionKind; + (function (CodeActionKind) { + /** + * Empty kind. + */ + CodeActionKind.Empty = ''; + /** + * Base kind for quickfix actions: 'quickfix' + */ + CodeActionKind.QuickFix = 'quickfix'; + /** + * Base kind for refactoring actions: 'refactor' + */ + CodeActionKind.Refactor = 'refactor'; + /** + * Base kind for refactoring extraction actions: 'refactor.extract' + * + * Example extract actions: + * + * - Extract method + * - Extract function + * - Extract variable + * - Extract interface from class + * - ... + */ + CodeActionKind.RefactorExtract = 'refactor.extract'; + /** + * Base kind for refactoring inline actions: 'refactor.inline' + * + * Example inline actions: + * + * - Inline function + * - Inline variable + * - Inline constant + * - ... + */ + CodeActionKind.RefactorInline = 'refactor.inline'; + /** + * Base kind for refactoring move actions: `refactor.move` + * + * Example move actions: + * + * - Move a function to a new file + * - Move a property between classes + * - Move method to base class + * - ... + * + * @since 3.18.0 + * @proposed + */ + CodeActionKind.RefactorMove = 'refactor.move'; + /** + * Base kind for refactoring rewrite actions: 'refactor.rewrite' + * + * Example rewrite actions: + * + * - Convert JavaScript function to class + * - Add or remove parameter + * - Encapsulate field + * - Make method static + * - Move method to base class + * - ... + */ + CodeActionKind.RefactorRewrite = 'refactor.rewrite'; + /** + * Base kind for source actions: `source` + * + * Source code actions apply to the entire file. + */ + CodeActionKind.Source = 'source'; + /** + * Base kind for an organize imports source action: `source.organizeImports` + */ + CodeActionKind.SourceOrganizeImports = 'source.organizeImports'; + /** + * Base kind for auto-fix source actions: `source.fixAll`. + * + * Fix all actions automatically fix errors that have a clear fix that do not require user input. + * They should not suppress errors or perform unsafe fixes such as generating new types or classes. + * + * @since 3.15.0 + */ + CodeActionKind.SourceFixAll = 'source.fixAll'; + /** + * Base kind for all code actions applying to the entire notebook's scope. CodeActionKinds using + * this should always begin with `notebook.` + * + * @since 3.18.0 + */ + CodeActionKind.Notebook = 'notebook'; + })(CodeActionKind || (exports.CodeActionKind = CodeActionKind = {})); + /** + * The reason why code actions were requested. + * + * @since 3.17.0 + */ + var CodeActionTriggerKind; + (function (CodeActionTriggerKind) { + /** + * Code actions were explicitly requested by the user or by an extension. + */ + CodeActionTriggerKind.Invoked = 1; + /** + * Code actions were requested automatically. + * + * This typically happens when current selection in a file changes, but can + * also be triggered when file content changes. + */ + CodeActionTriggerKind.Automatic = 2; + })(CodeActionTriggerKind || (exports.CodeActionTriggerKind = CodeActionTriggerKind = {})); + /** + * The CodeActionContext namespace provides helper functions to work with + * {@link CodeActionContext} literals. + */ + var CodeActionContext; + (function (CodeActionContext) { + /** + * Creates a new CodeActionContext literal. + */ + function create(diagnostics, only, triggerKind) { + var result = { diagnostics: diagnostics }; + if (only !== undefined && only !== null) { + result.only = only; + } + if (triggerKind !== undefined && triggerKind !== null) { + result.triggerKind = triggerKind; + } + return result; + } + CodeActionContext.create = create; + /** + * Checks whether the given literal conforms to the {@link CodeActionContext} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) + && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string)) + && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic); + } + CodeActionContext.is = is; + })(CodeActionContext || (exports.CodeActionContext = CodeActionContext = {})); + var CodeAction; + (function (CodeAction) { + function create(title, kindOrCommandOrEdit, kind) { + var result = { title: title }; + var checkKind = true; + if (typeof kindOrCommandOrEdit === 'string') { + checkKind = false; + result.kind = kindOrCommandOrEdit; + } + else if (Command.is(kindOrCommandOrEdit)) { + result.command = kindOrCommandOrEdit; + } + else { + result.edit = kindOrCommandOrEdit; + } + if (checkKind && kind !== undefined) { + result.kind = kind; + } + return result; + } + CodeAction.create = create; + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.title) && + (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) && + (candidate.kind === undefined || Is.string(candidate.kind)) && + (candidate.edit !== undefined || candidate.command !== undefined) && + (candidate.command === undefined || Command.is(candidate.command)) && + (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) && + (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit)); + } + CodeAction.is = is; + })(CodeAction || (exports.CodeAction = CodeAction = {})); + /** + * The CodeLens namespace provides helper functions to work with + * {@link CodeLens} literals. + */ + var CodeLens; + (function (CodeLens) { + /** + * Creates a new CodeLens literal. + */ + function create(range, data) { + var result = { range: range }; + if (Is.defined(data)) { + result.data = data; + } + return result; + } + CodeLens.create = create; + /** + * Checks whether the given literal conforms to the {@link CodeLens} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command)); + } + CodeLens.is = is; + })(CodeLens || (exports.CodeLens = CodeLens = {})); + /** + * The FormattingOptions namespace provides helper functions to work with + * {@link FormattingOptions} literals. + */ + var FormattingOptions; + (function (FormattingOptions) { + /** + * Creates a new FormattingOptions literal. + */ + function create(tabSize, insertSpaces) { + return { tabSize: tabSize, insertSpaces: insertSpaces }; + } + FormattingOptions.create = create; + /** + * Checks whether the given literal conforms to the {@link FormattingOptions} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces); + } + FormattingOptions.is = is; + })(FormattingOptions || (exports.FormattingOptions = FormattingOptions = {})); + /** + * The DocumentLink namespace provides helper functions to work with + * {@link DocumentLink} literals. + */ + var DocumentLink; + (function (DocumentLink) { + /** + * Creates a new DocumentLink literal. + */ + function create(range, target, data) { + return { range: range, target: target, data: data }; + } + DocumentLink.create = create; + /** + * Checks whether the given literal conforms to the {@link DocumentLink} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target)); + } + DocumentLink.is = is; + })(DocumentLink || (exports.DocumentLink = DocumentLink = {})); + /** + * The SelectionRange namespace provides helper function to work with + * SelectionRange literals. + */ + var SelectionRange; + (function (SelectionRange) { + /** + * Creates a new SelectionRange + * @param range the range. + * @param parent an optional parent. + */ + function create(range, parent) { + return { range: range, parent: parent }; + } + SelectionRange.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent)); + } + SelectionRange.is = is; + })(SelectionRange || (exports.SelectionRange = SelectionRange = {})); + /** + * A set of predefined token types. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ + var SemanticTokenTypes; + (function (SemanticTokenTypes) { + SemanticTokenTypes["namespace"] = "namespace"; + /** + * Represents a generic type. Acts as a fallback for types which can't be mapped to + * a specific type like class or enum. + */ + SemanticTokenTypes["type"] = "type"; + SemanticTokenTypes["class"] = "class"; + SemanticTokenTypes["enum"] = "enum"; + SemanticTokenTypes["interface"] = "interface"; + SemanticTokenTypes["struct"] = "struct"; + SemanticTokenTypes["typeParameter"] = "typeParameter"; + SemanticTokenTypes["parameter"] = "parameter"; + SemanticTokenTypes["variable"] = "variable"; + SemanticTokenTypes["property"] = "property"; + SemanticTokenTypes["enumMember"] = "enumMember"; + SemanticTokenTypes["event"] = "event"; + SemanticTokenTypes["function"] = "function"; + SemanticTokenTypes["method"] = "method"; + SemanticTokenTypes["macro"] = "macro"; + SemanticTokenTypes["keyword"] = "keyword"; + SemanticTokenTypes["modifier"] = "modifier"; + SemanticTokenTypes["comment"] = "comment"; + SemanticTokenTypes["string"] = "string"; + SemanticTokenTypes["number"] = "number"; + SemanticTokenTypes["regexp"] = "regexp"; + SemanticTokenTypes["operator"] = "operator"; + /** + * @since 3.17.0 + */ + SemanticTokenTypes["decorator"] = "decorator"; + /** + * @since 3.18.0 + */ + SemanticTokenTypes["label"] = "label"; + })(SemanticTokenTypes || (exports.SemanticTokenTypes = SemanticTokenTypes = {})); + /** + * A set of predefined token modifiers. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ + var SemanticTokenModifiers; + (function (SemanticTokenModifiers) { + SemanticTokenModifiers["declaration"] = "declaration"; + SemanticTokenModifiers["definition"] = "definition"; + SemanticTokenModifiers["readonly"] = "readonly"; + SemanticTokenModifiers["static"] = "static"; + SemanticTokenModifiers["deprecated"] = "deprecated"; + SemanticTokenModifiers["abstract"] = "abstract"; + SemanticTokenModifiers["async"] = "async"; + SemanticTokenModifiers["modification"] = "modification"; + SemanticTokenModifiers["documentation"] = "documentation"; + SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary"; + })(SemanticTokenModifiers || (exports.SemanticTokenModifiers = SemanticTokenModifiers = {})); + /** + * @since 3.16.0 + */ + var SemanticTokens; + (function (SemanticTokens) { + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') && + Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number'); + } + SemanticTokens.is = is; + })(SemanticTokens || (exports.SemanticTokens = SemanticTokens = {})); + /** + * The InlineValueText namespace provides functions to deal with InlineValueTexts. + * + * @since 3.17.0 + */ + var InlineValueText; + (function (InlineValueText) { + /** + * Creates a new InlineValueText literal. + */ + function create(range, text) { + return { range: range, text: text }; + } + InlineValueText.create = create; + function is(value) { + var candidate = value; + return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text); + } + InlineValueText.is = is; + })(InlineValueText || (exports.InlineValueText = InlineValueText = {})); + /** + * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups. + * + * @since 3.17.0 + */ + var InlineValueVariableLookup; + (function (InlineValueVariableLookup) { + /** + * Creates a new InlineValueText literal. + */ + function create(range, variableName, caseSensitiveLookup) { + return { range: range, variableName: variableName, caseSensitiveLookup: caseSensitiveLookup }; + } + InlineValueVariableLookup.create = create; + function is(value) { + var candidate = value; + return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup) + && (Is.string(candidate.variableName) || candidate.variableName === undefined); + } + InlineValueVariableLookup.is = is; + })(InlineValueVariableLookup || (exports.InlineValueVariableLookup = InlineValueVariableLookup = {})); + /** + * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression. + * + * @since 3.17.0 + */ + var InlineValueEvaluatableExpression; + (function (InlineValueEvaluatableExpression) { + /** + * Creates a new InlineValueEvaluatableExpression literal. + */ + function create(range, expression) { + return { range: range, expression: expression }; + } + InlineValueEvaluatableExpression.create = create; + function is(value) { + var candidate = value; + return candidate !== undefined && candidate !== null && Range.is(candidate.range) + && (Is.string(candidate.expression) || candidate.expression === undefined); + } + InlineValueEvaluatableExpression.is = is; + })(InlineValueEvaluatableExpression || (exports.InlineValueEvaluatableExpression = InlineValueEvaluatableExpression = {})); + /** + * The InlineValueContext namespace provides helper functions to work with + * {@link InlineValueContext} literals. + * + * @since 3.17.0 + */ + var InlineValueContext; + (function (InlineValueContext) { + /** + * Creates a new InlineValueContext literal. + */ + function create(frameId, stoppedLocation) { + return { frameId: frameId, stoppedLocation: stoppedLocation }; + } + InlineValueContext.create = create; + /** + * Checks whether the given literal conforms to the {@link InlineValueContext} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(value.stoppedLocation); + } + InlineValueContext.is = is; + })(InlineValueContext || (exports.InlineValueContext = InlineValueContext = {})); + /** + * Inlay hint kinds. + * + * @since 3.17.0 + */ + var InlayHintKind; + (function (InlayHintKind) { + /** + * An inlay hint that for a type annotation. + */ + InlayHintKind.Type = 1; + /** + * An inlay hint that is for a parameter. + */ + InlayHintKind.Parameter = 2; + function is(value) { + return value === 1 || value === 2; + } + InlayHintKind.is = is; + })(InlayHintKind || (exports.InlayHintKind = InlayHintKind = {})); + var InlayHintLabelPart; + (function (InlayHintLabelPart) { + function create(value) { + return { value: value }; + } + InlayHintLabelPart.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) + && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) + && (candidate.location === undefined || Location.is(candidate.location)) + && (candidate.command === undefined || Command.is(candidate.command)); + } + InlayHintLabelPart.is = is; + })(InlayHintLabelPart || (exports.InlayHintLabelPart = InlayHintLabelPart = {})); + var InlayHint; + (function (InlayHint) { + function create(position, label, kind) { + var result = { position: position, label: label }; + if (kind !== undefined) { + result.kind = kind; + } + return result; + } + InlayHint.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Position.is(candidate.position) + && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is)) + && (candidate.kind === undefined || InlayHintKind.is(candidate.kind)) + && (candidate.textEdits === undefined) || Is.typedArray(candidate.textEdits, TextEdit.is) + && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) + && (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft)) + && (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight)); + } + InlayHint.is = is; + })(InlayHint || (exports.InlayHint = InlayHint = {})); + var StringValue; + (function (StringValue) { + function createSnippet(value) { + return { kind: 'snippet', value: value }; + } + StringValue.createSnippet = createSnippet; + function isSnippet(value) { + var candidate = value; + return Is.objectLiteral(candidate) + && candidate.kind === 'snippet' + && Is.string(candidate.value); + } + StringValue.isSnippet = isSnippet; + })(StringValue || (exports.StringValue = StringValue = {})); + var InlineCompletionItem; + (function (InlineCompletionItem) { + function create(insertText, filterText, range, command) { + return { insertText: insertText, filterText: filterText, range: range, command: command }; + } + InlineCompletionItem.create = create; + })(InlineCompletionItem || (exports.InlineCompletionItem = InlineCompletionItem = {})); + var InlineCompletionList; + (function (InlineCompletionList) { + function create(items) { + return { items: items }; + } + InlineCompletionList.create = create; + })(InlineCompletionList || (exports.InlineCompletionList = InlineCompletionList = {})); + /** + * Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered. + * + * @since 3.18.0 + * @proposed + */ + var InlineCompletionTriggerKind; + (function (InlineCompletionTriggerKind) { + /** + * Completion was triggered explicitly by a user gesture. + */ + InlineCompletionTriggerKind.Invoked = 1; + /** + * Completion was triggered automatically while editing. + */ + InlineCompletionTriggerKind.Automatic = 2; + })(InlineCompletionTriggerKind || (exports.InlineCompletionTriggerKind = InlineCompletionTriggerKind = {})); + var SelectedCompletionInfo; + (function (SelectedCompletionInfo) { + function create(range, text) { + return { range: range, text: text }; + } + SelectedCompletionInfo.create = create; + })(SelectedCompletionInfo || (exports.SelectedCompletionInfo = SelectedCompletionInfo = {})); + var InlineCompletionContext; + (function (InlineCompletionContext) { + function create(triggerKind, selectedCompletionInfo) { + return { triggerKind: triggerKind, selectedCompletionInfo: selectedCompletionInfo }; + } + InlineCompletionContext.create = create; + })(InlineCompletionContext || (exports.InlineCompletionContext = InlineCompletionContext = {})); + var WorkspaceFolder; + (function (WorkspaceFolder) { + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name); + } + WorkspaceFolder.is = is; + })(WorkspaceFolder || (exports.WorkspaceFolder = WorkspaceFolder = {})); + exports.EOL = ['\n', '\r\n', '\r']; + /** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ + var TextDocument; + (function (TextDocument) { + /** + * Creates a new ITextDocument literal from the given uri and content. + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param version The document's version. + * @param content The document's content. + */ + function create(uri, languageId, version, content) { + return new FullTextDocument(uri, languageId, version, content); + } + TextDocument.create = create; + /** + * Checks whether the given literal conforms to the {@link ITextDocument} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount) + && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false; + } + TextDocument.is = is; + function applyEdits(document, edits) { + var text = document.getText(); + var sortedEdits = mergeSort(edits, function (a, b) { + var diff = a.range.start.line - b.range.start.line; + if (diff === 0) { + return a.range.start.character - b.range.start.character; + } + return diff; + }); + var lastModifiedOffset = text.length; + for (var i = sortedEdits.length - 1; i >= 0; i--) { + var e = sortedEdits[i]; + var startOffset = document.offsetAt(e.range.start); + var endOffset = document.offsetAt(e.range.end); + if (endOffset <= lastModifiedOffset) { + text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length); + } + else { + throw new Error('Overlapping edit'); + } + lastModifiedOffset = startOffset; + } + return text; + } + TextDocument.applyEdits = applyEdits; + function mergeSort(data, compare) { + if (data.length <= 1) { + // sorted + return data; + } + var p = (data.length / 2) | 0; + var left = data.slice(0, p); + var right = data.slice(p); + mergeSort(left, compare); + mergeSort(right, compare); + var leftIdx = 0; + var rightIdx = 0; + var i = 0; + while (leftIdx < left.length && rightIdx < right.length) { + var ret = compare(left[leftIdx], right[rightIdx]); + if (ret <= 0) { + // smaller_equal -> take left to preserve order + data[i++] = left[leftIdx++]; + } + else { + // greater -> take right + data[i++] = right[rightIdx++]; + } + } + while (leftIdx < left.length) { + data[i++] = left[leftIdx++]; + } + while (rightIdx < right.length) { + data[i++] = right[rightIdx++]; + } + return data; + } + })(TextDocument || (exports.TextDocument = TextDocument = {})); + /** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ + var FullTextDocument = /** @class */ (function () { + function FullTextDocument(uri, languageId, version, content) { + this._uri = uri; + this._languageId = languageId; + this._version = version; + this._content = content; + this._lineOffsets = undefined; + } + Object.defineProperty(FullTextDocument.prototype, "uri", { + get: function () { + return this._uri; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(FullTextDocument.prototype, "languageId", { + get: function () { + return this._languageId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(FullTextDocument.prototype, "version", { + get: function () { + return this._version; + }, + enumerable: false, + configurable: true + }); + FullTextDocument.prototype.getText = function (range) { + if (range) { + var start = this.offsetAt(range.start); + var end = this.offsetAt(range.end); + return this._content.substring(start, end); + } + return this._content; + }; + FullTextDocument.prototype.update = function (event, version) { + this._content = event.text; + this._version = version; + this._lineOffsets = undefined; + }; + FullTextDocument.prototype.getLineOffsets = function () { + if (this._lineOffsets === undefined) { + var lineOffsets = []; + var text = this._content; + var isLineStart = true; + for (var i = 0; i < text.length; i++) { + if (isLineStart) { + lineOffsets.push(i); + isLineStart = false; + } + var ch = text.charAt(i); + isLineStart = (ch === '\r' || ch === '\n'); + if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') { + i++; + } + } + if (isLineStart && text.length > 0) { + lineOffsets.push(text.length); + } + this._lineOffsets = lineOffsets; + } + return this._lineOffsets; + }; + FullTextDocument.prototype.positionAt = function (offset) { + offset = Math.max(Math.min(offset, this._content.length), 0); + var lineOffsets = this.getLineOffsets(); + var low = 0, high = lineOffsets.length; + if (high === 0) { + return Position.create(0, offset); + } + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (lineOffsets[mid] > offset) { + high = mid; + } + else { + low = mid + 1; + } + } + // low is the least x for which the line offset is larger than the current offset + // or array.length if no line offset is larger than the current offset + var line = low - 1; + return Position.create(line, offset - lineOffsets[line]); + }; + FullTextDocument.prototype.offsetAt = function (position) { + var lineOffsets = this.getLineOffsets(); + if (position.line >= lineOffsets.length) { + return this._content.length; + } + else if (position.line < 0) { + return 0; + } + var lineOffset = lineOffsets[position.line]; + var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length; + return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset); + }; + Object.defineProperty(FullTextDocument.prototype, "lineCount", { + get: function () { + return this.getLineOffsets().length; + }, + enumerable: false, + configurable: true + }); + return FullTextDocument; + }()); + var Is; + (function (Is) { + var toString = Object.prototype.toString; + function defined(value) { + return typeof value !== 'undefined'; + } + Is.defined = defined; + function undefined(value) { + return typeof value === 'undefined'; + } + Is.undefined = undefined; + function boolean(value) { + return value === true || value === false; + } + Is.boolean = boolean; + function string(value) { + return toString.call(value) === '[object String]'; + } + Is.string = string; + function number(value) { + return toString.call(value) === '[object Number]'; + } + Is.number = number; + function numberRange(value, min, max) { + return toString.call(value) === '[object Number]' && min <= value && value <= max; + } + Is.numberRange = numberRange; + function integer(value) { + return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647; + } + Is.integer = integer; + function uinteger(value) { + return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647; + } + Is.uinteger = uinteger; + function func(value) { + return toString.call(value) === '[object Function]'; + } + Is.func = func; + function objectLiteral(value) { + // Strictly speaking class instances pass this check as well. Since the LSP + // doesn't use classes we ignore this for now. If we do we need to add something + // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null` + return value !== null && typeof value === 'object'; + } + Is.objectLiteral = objectLiteral; + function typedArray(value, check) { + return Array.isArray(value) && value.every(check); + } + Is.typedArray = typedArray; + })(Is || (Is = {})); +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/package.json" index 890073e1ea87ae19ef7439731b8d2eb391d26c2e..007d11b72aa264194e4cb5328c71ee91536cc1ed 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/package.json" @@ -1,3 +1,39 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ea158ef4482bce42f89443f4a1bd7ad8c7074228c2f349b8a6e0f6a619cd7eb8 -size 1511 +{ + "name": "vscode-languageserver-types", + "description": "Types used by the Language server for node", + "version": "3.17.6-next.4", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-languageserver-node.git", + "directory": "types" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "main": "./lib/umd/main.js", + "typings": "./lib/umd/main", + "exports": { + ".": { + "browser": "./lib/esm/main.js", + "module": "./lib/esm/main.js", + "import": "./lib/esm/main.js", + "default": "./lib/umd/main.js" + } + }, + "scripts": { + "prepublishOnly": "echo \"⛔ Can only publish from a secure pipeline ⛔\" && node ../build/npm/fail", + "prepack": "npm run all:publish", + "compile": "node ../build/bin/tsc -b ./tsconfig.json", + "clean": "node ../node_modules/rimraf/dist/esm/bin.mjs lib", + "watch": "node ../build/bin/tsc -b ./tsconfig.watch.json -w", + "lint": "node ../node_modules/eslint/bin/eslint.js --ext ts src", + "test": "node ../node_modules/mocha/bin/_mocha", + "all": "npm run clean && npm run compile && npm run lint && npm run test", + "compile:esm": "node ../build/bin/tsc -b ./tsconfig.esm.publish.json && node ../build/bin/fix-esm", + "compile:umd": "node ../build/bin/tsc -b ./tsconfig.umd.publish.json", + "all:publish": "git clean -xfd . && npm install && npm run compile:esm && npm run compile:umd && npm run lint && npm run test", + "preversion": "npm test" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/thirdpartynotices.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/thirdpartynotices.txt" index 2d95e953bff42d0943832bbb3cbac2bfdfd91a1e..0592beef14f651f468c39777ce98ebc523ec4a43 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/thirdpartynotices.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver-types/thirdpartynotices.txt" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a89123562fe364dc8e969e85614eb6c1f8452afe131d6e42bd1314bb2d092b04 -size 623 +NOTICES AND INFORMATION +Do Not Translate or Localize + +This software incorporates material from third parties. +Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com, +or you may send a check or money order for US $5.00, including the product name, +the open source component name, platform, and version number, to: + +Source Code Compliance Team +Microsoft Corporation +One Microsoft Way +Redmond, WA 98052 +USA + +Notwithstanding any other terms, you may reverse engineer this software to the extent +required to debug changes to any libraries licensed under the GNU Lesser General Public License. \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/License.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/License.txt" index 71c73d0cbbb244fd8977b1334dae3ac9800e0c19..a07e3ae825f86b6d1f966659954bffc0768bef66 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/License.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/License.txt" @@ -1,3 +1,11 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec9ee83580841e8eb687aca9867f221503809ba6426c7f876ede17d91b9fcfd0 -size 1095 +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/README.md" index 704e3d3a17994a205c768a4b01f574045837f706..2d517718b49dab460a88b068aae66d5fd869ee17 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/README.md" @@ -1,3 +1,17 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1321e9c5b5ddd9408a29804e1fa0712875804ef65edf97403a77fc63bd3d4529 -size 1071 +# VSCode Language Server + +[![NPM Version](https://img.shields.io/npm/v/vscode-languageserver.svg)](https://npmjs.org/package/vscode-languageserver) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-languageserver.svg)](https://npmjs.org/package/vscode-languageserver) +[![Build Status](https://dev.azure.com/ms/vscode-languageserver-node/_apis/build/status/microsoft.vscode-languageserver-node?branchName=main)](https://dev.azure.com/ms/vscode-languageserver-node/_build/latest?definitionId=439&branchName=main) + +Npm module to implement a VSCode language server using [Node.js](https://nodejs.org/) as a runtime. + +Click [here](https://code.visualstudio.com/docs/extensions/example-language-server) for a detailed document on how to use this npm module +to implement language servers for [VSCode](https://code.visualstudio.com/). + +## History + +For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md) + +## License +[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt) \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/bin/installServerIntoExtension" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/bin/installServerIntoExtension" index 78a1a2dfdfa54dbbe753ada1e8dee5ad4d18035a..b62c469040d8066406b1ac4aeefb1cfa2eccab9a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/bin/installServerIntoExtension" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/bin/installServerIntoExtension" @@ -1,3 +1,73 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:59abbccf36d1c453c935fb15d594c017d6de7fc2367565fb80710b8dfbb22ad1 -size 2754 +#!/usr/bin/env node +/* eslint-disable no-console */ + +var path = require('path'); +var fs = require('fs'); +var cp = require('child_process'); + +var extensionDirectory = process.argv[2]; +if (!extensionDirectory) { + console.error('No extension directory provided.'); + process.exit(1); +} +extensionDirectory = path.resolve(extensionDirectory); +if (!fs.existsSync(extensionDirectory)) { + console.error('Extension directory ' + extensionDirectory + ' doesn\'t exist on disk.'); + process.exit(1); +} + +var packageFile = process.argv[3]; +if (!packageFile) { + console.error('No package.json file provided.'); + process.exit(1); +} +packageFile = path.resolve(packageFile); +if (!fs.existsSync(packageFile)) { + console.error('Package file ' + packageFile + ' doesn\'t exist on disk.'); + process.exit(1); +} +var tsconfigFile = process.argv[4]; +if (!tsconfigFile) { + console.error('No tsconfig.json file provided'); + process.exit(1); +} +tsconfigFile = path.resolve(tsconfigFile); +if (!fs.existsSync(tsconfigFile)) { + console.error('tsconfig file ' + tsconfigFile + ' doesn\'t exist on disk.'); + process.exit(1); +} + +var extensionServerDirectory = path.join(extensionDirectory, 'server'); + +var json = require(tsconfigFile); +var compilerOptions = json.compilerOptions; +if (compilerOptions) { + var outDir = compilerOptions.outDir; + if (!outDir || path.join(path.dirname(tsconfigFile), outDir) !== extensionServerDirectory) { + console.error('outDir in ' + process.argv[4] + ' must point to ' + extensionServerDirectory + ' but it points to ' + path.join(path.dirname(tsconfigFile), outDir)); + console.error('Please change outDir in ' + process.argv[4] + ' to ' + path.relative(path.dirname(tsconfigFile), extensionServerDirectory).replace(/\\/g, '/')); + process.exit(1); + } +} + +if (!fs.existsSync(extensionServerDirectory)) { + fs.mkdirSync(extensionServerDirectory); +} + +var dest = path.join(extensionServerDirectory, 'package.json'); +console.log('Copying package.json to extension\'s server location...'); +fs.writeFileSync(dest, fs.readFileSync(packageFile)); + +var shrinkwrapFile = process.argv[5]; +if (fs.existsSync(shrinkwrapFile)) { + const shrinkWrapDest = path.join(extensionServerDirectory, 'npm-shrinkwrap.json'); + shrinkwrapFile = path.resolve(shrinkwrapFile); + console.log('Copying npm-shrinkwrap.json to extension\'s server location...'); + fs.writeFileSync(shrinkWrapDest, fs.readFileSync(shrinkwrapFile)); + +} + +console.log('The script is deprecated. See https://github.com/microsoft/vscode-extension-samples/tree/master/lsp-sample for an example on how to setup an extension / server project.'); +console.log(''); +console.log('Updating server npm modules into extension\'s server location...'); +cp.execSync('npm update --production --prefix ' + extensionServerDirectory); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/browser.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/browser.d.ts" index 0898e728f1aa9ab8ecda68d04096c898e91dbe6a..e628f1b5caf549c4b58cead28e5ca6a1d682acf8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/browser.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/browser.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99170b7257d895bb2594d7db9c255a4b0029a1363fe5e89849fda830b5c997ce -size 385 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/browser/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/browser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/browser.js" index da29a4f6ec2636f4c79c022c589b7adc67c91530..f5caebf0011feb56821400f3e85f752c80778192 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/browser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/browser.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9406802db032558d3cd8bde9f68d20c067f3a7eca251ad7d0e4473da8d457ada -size 411 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/browser/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/browser/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/browser/main.d.ts" index 0c283e4bcb3492be0c81825f87837cd3f0a92428..0ee3a2bc2effcd9f347028ad914b7a6b8d1adddd 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/browser/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/browser/main.d.ts" @@ -1,3 +1,20 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:14246cd016d146072475fb648c4e7ca7101bea205972d5ca4412f6e978eff871 -size 1371 +import { MessageReader, MessageWriter, ConnectionStrategy, ConnectionOptions, Connection, Features, _Connection, _ } from '../common/api'; +export * from 'vscode-languageserver-protocol/browser'; +export * from '../common/api'; +/** + * Creates a new connection. + * + * @param factories: The factories for proposed features. + * @param reader The message reader to read messages from. + * @param writer The message writer to write message to. + * @param options An optional connection strategy or connection options to control additional settings + */ +export declare function createConnection(factories: Features, reader: MessageReader, writer: MessageWriter, options?: ConnectionStrategy | ConnectionOptions): _Connection; +/** + * Creates a new connection. + * + * @param reader The message reader to read messages from. + * @param writer The message writer to write message to. + * @param options An optional connection strategy or connection options to control additional settings + */ +export declare function createConnection(reader: MessageReader, writer: MessageWriter, options?: ConnectionStrategy | ConnectionOptions): Connection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/browser/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/browser/main.js" index b2a39f98bb6dc193b3e69c472d9470d52d6ce59a..cd5816f69040eeff52241b6e95df732524d0545b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/browser/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/browser/main.js" @@ -1,3 +1,62 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:01ff7eaebe9f7d709b0929ac707bd1f9122b6872f98104b2cdabfc5190e1e6cc -size 2305 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createConnection = void 0; +const api_1 = require("../common/api"); +__exportStar(require("vscode-languageserver-protocol/browser"), exports); +__exportStar(require("../common/api"), exports); +let _shutdownReceived = false; +const watchDog = { + initialize: (_params) => { + }, + get shutdownReceived() { + return _shutdownReceived; + }, + set shutdownReceived(value) { + _shutdownReceived = value; + }, + exit: (_code) => { + } +}; +function createConnection(arg1, arg2, arg3, arg4) { + let factories; + let reader; + let writer; + let options; + if (arg1 !== void 0 && arg1.__brand === 'features') { + factories = arg1; + arg1 = arg2; + arg2 = arg3; + arg3 = arg4; + } + if (api_1.ConnectionStrategy.is(arg1) || api_1.ConnectionOptions.is(arg1)) { + options = arg1; + } + else { + reader = arg1; + writer = arg2; + options = arg3; + } + const connectionFactory = (logger) => { + return (0, api_1.createProtocolConnection)(reader, writer, logger, options); + }; + return (0, api_1.createConnection)(connectionFactory, watchDog, factories); +} +exports.createConnection = createConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/api.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/api.d.ts" index e5aabdc3a91744443bc2b1821ecf17496f81f054..73c9176e78daccdcafdcfa5f9bcd6e2861e045f8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/api.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/api.d.ts" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:483ff04f1796aef40323f47ca3f03bf53492a2878508c8d7be98cdb4fae151f3 -size 1007 +import { _, Features, _Connection } from './server'; +import { SemanticTokensBuilder } from './semanticTokens'; +import type { WorkDoneProgressReporter, WorkDoneProgressServerReporter, ResultProgressReporter } from './progress'; +import * as ic from './inlineCompletion.proposed'; +export * from 'vscode-languageserver-protocol/'; +export { WorkDoneProgressReporter, WorkDoneProgressServerReporter, ResultProgressReporter }; +export { SemanticTokensBuilder }; +import { TextDocuments, TextDocumentsConfiguration, TextDocumentChangeEvent, TextDocumentWillSaveEvent } from './textDocuments'; +export { TextDocuments, TextDocumentsConfiguration, TextDocumentChangeEvent, TextDocumentWillSaveEvent }; +import { NotebookDocuments } from './notebook'; +export { NotebookDocuments }; +export * from './server'; +export declare namespace ProposedFeatures { + const all: Features<_, _, _, _, _, _, ic.InlineCompletionFeatureShape, _>; + type Connection = _Connection<_, _, _, _, _, _, ic.InlineCompletionFeatureShape, _>; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/api.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/api.js" index 11ac7144cbf95f7c03066e695a4a679e4e67d2cb..bc5396cd6bc49ce5d8b4accf910f1c73decdcb9f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/api.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/api.js" @@ -1,3 +1,37 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d0191faa8669bd7cd44c670db64058bb509951977f1a2ab3b810b536c02c263 -size 2189 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProposedFeatures = exports.NotebookDocuments = exports.TextDocuments = exports.SemanticTokensBuilder = void 0; +const semanticTokens_1 = require("./semanticTokens"); +Object.defineProperty(exports, "SemanticTokensBuilder", { enumerable: true, get: function () { return semanticTokens_1.SemanticTokensBuilder; } }); +const ic = require("./inlineCompletion.proposed"); +__exportStar(require("vscode-languageserver-protocol/"), exports); +const textDocuments_1 = require("./textDocuments"); +Object.defineProperty(exports, "TextDocuments", { enumerable: true, get: function () { return textDocuments_1.TextDocuments; } }); +const notebook_1 = require("./notebook"); +Object.defineProperty(exports, "NotebookDocuments", { enumerable: true, get: function () { return notebook_1.NotebookDocuments; } }); +__exportStar(require("./server"), exports); +var ProposedFeatures; +(function (ProposedFeatures) { + ProposedFeatures.all = { + __brand: 'features', + languages: ic.InlineCompletionFeature + }; +})(ProposedFeatures || (exports.ProposedFeatures = ProposedFeatures = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/callHierarchy.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/callHierarchy.d.ts" index 692955ab54cd26282497bfa4825c50883bd07bd5..1c9e7170fe0fcbf01fecd92f06f32e930f72f22d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/callHierarchy.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/callHierarchy.d.ts" @@ -1,3 +1,15 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:46a9b0122b230cb2fab65999ba92f98a16fd8f1c25efaed47141cbf5056f6928 -size 991 +import { CallHierarchyItem, CallHierarchyPrepareParams, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCall, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCall, Disposable } from 'vscode-languageserver-protocol'; +import type { Feature, _Languages, ServerRequestHandler } from './server'; +/** + * Shape of the call hierarchy feature + * + * @since 3.16.0 + */ +export interface CallHierarchy { + callHierarchy: { + onPrepare(handler: ServerRequestHandler): Disposable; + onIncomingCalls(handler: ServerRequestHandler): Disposable; + onOutgoingCalls(handler: ServerRequestHandler): Disposable; + }; +} +export declare const CallHierarchyFeature: Feature<_Languages, CallHierarchy>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/callHierarchy.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/callHierarchy.js" index f543785b4cc820f9fb96fa07b06b3c2f8d5f2c8e..3aa1692ce331c9d797f146cf1ae546393b99c6b9 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/callHierarchy.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/callHierarchy.js" @@ -1,3 +1,34 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:21fa60a734543ee72893f8ce24adeabfcf81994c984b576d3fd236cb7f3eb746 -size 1930 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CallHierarchyFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const CallHierarchyFeature = (Base) => { + return class extends Base { + get callHierarchy() { + return { + onPrepare: (handler) => { + return this.connection.onRequest(vscode_languageserver_protocol_1.CallHierarchyPrepareRequest.type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), undefined); + }); + }, + onIncomingCalls: (handler) => { + const type = vscode_languageserver_protocol_1.CallHierarchyIncomingCallsRequest.type; + return this.connection.onRequest(type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params)); + }); + }, + onOutgoingCalls: (handler) => { + const type = vscode_languageserver_protocol_1.CallHierarchyOutgoingCallsRequest.type; + return this.connection.onRequest(type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params)); + }); + } + }; + } + }; +}; +exports.CallHierarchyFeature = CallHierarchyFeature; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/configuration.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/configuration.d.ts" index 26c036b3ac38f9574d7e886875ba256ea11374da..5a7f74288a51a7983192f99bf973cb136bcd944a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/configuration.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/configuration.d.ts" @@ -1,3 +1,9 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7662d6994d28c9ebbe61b88cc35c3d705804351eedbf363df30ea9fe8c4961dc -size 465 +import { ConfigurationItem } from 'vscode-languageserver-protocol'; +import type { Feature, _RemoteWorkspace } from './server'; +export interface Configuration { + getConfiguration(): Promise; + getConfiguration(section: string): Promise; + getConfiguration(item: ConfigurationItem): Promise; + getConfiguration(items: ConfigurationItem[]): Promise; +} +export declare const ConfigurationFeature: Feature<_RemoteWorkspace, Configuration>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/configuration.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/configuration.js" index bdcabe4e6e3d2cb091cd46038fddf5f87c31d812..5d206266ca58c4c1097983879c968bb37a7154c9 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/configuration.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/configuration.js" @@ -1,3 +1,38 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:baaa8ec9be02b7e4e59462a3b66b940313671fb1943788e22b43b75d2fdcc4b5 -size 1578 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ConfigurationFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const Is = require("./utils/is"); +const ConfigurationFeature = (Base) => { + return class extends Base { + getConfiguration(arg) { + if (!arg) { + return this._getConfiguration({}); + } + else if (Is.string(arg)) { + return this._getConfiguration({ section: arg }); + } + else { + return this._getConfiguration(arg); + } + } + _getConfiguration(arg) { + const params = { + items: Array.isArray(arg) ? arg : [arg] + }; + return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => { + if (Array.isArray(result)) { + return Array.isArray(arg) ? result : result[0]; + } + else { + return Array.isArray(arg) ? [] : null; + } + }); + } + }; +}; +exports.ConfigurationFeature = ConfigurationFeature; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/diagnostic.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/diagnostic.d.ts" index b9ea972b1aa755cc1951a8881b97faf80d9d934f..60a61c2246b62f465b05c8cf26ca7244ea1807a7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/diagnostic.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/diagnostic.d.ts" @@ -1,3 +1,29 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:09060028b8dda33db2e5c3df091a5db2408f2a00570176d44fc16289cb8dd5ac -size 1447 +import { Disposable, DocumentDiagnosticParams, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DiagnosticServerCancellationData, WorkspaceDiagnosticParams, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult } from 'vscode-languageserver-protocol'; +import type { Feature, _Languages, ServerRequestHandler } from './server'; +/** + * Shape of the linked editing feature + * + * @since 3.16.0 + */ +export interface DiagnosticFeatureShape { + diagnostics: { + /** + * Asks the client to refresh all diagnostics provided by this server by + * pull for the corresponding documents again. + */ + refresh(): Promise; + /** + * Installs a handler for the document diagnostic request. + * + * @param handler The corresponding handler. + */ + on(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the workspace diagnostic request. + * + * @param handler The corresponding handler. + */ + onWorkspace(handler: ServerRequestHandler): Disposable; + }; +} +export declare const DiagnosticFeature: Feature<_Languages, DiagnosticFeatureShape>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/diagnostic.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/diagnostic.js" index ffa8018692d5d07cde0097e91554ad0c76fd1046..e22f3507e583e28882d69c25e6d0ef4b6c9d9685 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/diagnostic.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/diagnostic.js" @@ -1,3 +1,30 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a10b2afe86d851cd5b1ed27cee9b89c968d0d4190745d9c6b8a9f200de7ee373 -size 1784 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DiagnosticFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const DiagnosticFeature = (Base) => { + return class extends Base { + get diagnostics() { + return { + refresh: () => { + return this.connection.sendRequest(vscode_languageserver_protocol_1.DiagnosticRefreshRequest.type); + }, + on: (handler) => { + return this.connection.onRequest(vscode_languageserver_protocol_1.DocumentDiagnosticRequest.type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(vscode_languageserver_protocol_1.DocumentDiagnosticRequest.partialResult, params)); + }); + }, + onWorkspace: (handler) => { + return this.connection.onRequest(vscode_languageserver_protocol_1.WorkspaceDiagnosticRequest.type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(vscode_languageserver_protocol_1.WorkspaceDiagnosticRequest.partialResult, params)); + }); + } + }; + } + }; +}; +exports.DiagnosticFeature = DiagnosticFeature; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/fileOperations.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/fileOperations.d.ts" index cc623229bd60fc7599b8cf5d6e7eccfe6c1929ad..917f7a3e5f3278bfb60a8909256b1825f5895310 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/fileOperations.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/fileOperations.d.ts" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3990ae796cc23fb9829eae206eff1eddded9465504467a4433f2509e18ef1aed -size 1017 +import { RequestHandler, NotificationHandler, WorkspaceEdit, CreateFilesParams, RenameFilesParams, DeleteFilesParams, Disposable } from 'vscode-languageserver-protocol'; +import type { Feature, _RemoteWorkspace } from './server'; +/** + * Shape of the file operations feature + * + * @since 3.16.0 + */ +export interface FileOperationsFeatureShape { + onDidCreateFiles(handler: NotificationHandler): Disposable; + onDidRenameFiles(handler: NotificationHandler): Disposable; + onDidDeleteFiles(handler: NotificationHandler): Disposable; + onWillCreateFiles(handler: RequestHandler): Disposable; + onWillRenameFiles(handler: RequestHandler): Disposable; + onWillDeleteFiles(handler: RequestHandler): Disposable; +} +export declare const FileOperationsFeature: Feature<_RemoteWorkspace, FileOperationsFeatureShape>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/fileOperations.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/fileOperations.js" index f02f0365eece04d3367b556ebb27b68af83e1993..1c2a078fb85343ca159035491a118fffc117e8e0 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/fileOperations.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/fileOperations.js" @@ -1,3 +1,43 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:35cf5eef80dcf8e83a8d1ec3111535b49922f7dc6b8746ecba799c13425fe992 -size 2106 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FileOperationsFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const FileOperationsFeature = (Base) => { + return class extends Base { + onDidCreateFiles(handler) { + return this.connection.onNotification(vscode_languageserver_protocol_1.DidCreateFilesNotification.type, (params) => { + return handler(params); + }); + } + onDidRenameFiles(handler) { + return this.connection.onNotification(vscode_languageserver_protocol_1.DidRenameFilesNotification.type, (params) => { + return handler(params); + }); + } + onDidDeleteFiles(handler) { + return this.connection.onNotification(vscode_languageserver_protocol_1.DidDeleteFilesNotification.type, (params) => { + return handler(params); + }); + } + onWillCreateFiles(handler) { + return this.connection.onRequest(vscode_languageserver_protocol_1.WillCreateFilesRequest.type, (params, cancel) => { + return handler(params, cancel); + }); + } + onWillRenameFiles(handler) { + return this.connection.onRequest(vscode_languageserver_protocol_1.WillRenameFilesRequest.type, (params, cancel) => { + return handler(params, cancel); + }); + } + onWillDeleteFiles(handler) { + return this.connection.onRequest(vscode_languageserver_protocol_1.WillDeleteFilesRequest.type, (params, cancel) => { + return handler(params, cancel); + }); + } + }; +}; +exports.FileOperationsFeature = FileOperationsFeature; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/foldingRange.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/foldingRange.d.ts" index 659eb47d3e109c515b48246386d016a4a0b4891e..2d6a1a72e134e8877253b7bacc3ac879534f03be 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/foldingRange.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/foldingRange.d.ts" @@ -1,3 +1,23 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aa7747ab234b18813944ecdd61683a696025cd4f6970d7749d370080d4f9b349 -size 831 +import { FoldingRange, Disposable, FoldingRangeParams } from 'vscode-languageserver-protocol'; +import type { Feature, _Languages, ServerRequestHandler } from './server'; +/** + * Shape of the folding range feature + */ +export interface FoldingRangeFeatureShape { + foldingRange: { + /** + * Ask the client to refresh all folding ranges + * + * @since 3.18.0. + * @proposed + */ + refresh(): Promise; + /** + * Installs a handler for the folding range request. + * + * @param handler The corresponding handler. + */ + on(handler: ServerRequestHandler): Disposable; + }; +} +export declare const FoldingRangeFeature: Feature<_Languages, FoldingRangeFeatureShape>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/foldingRange.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/foldingRange.js" index dd5540e0f2aa9acb13e0e01518519a70087d4e81..54456e0b38ef970f0251b2f263bd48eba2f0bcb9 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/foldingRange.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/foldingRange.js" @@ -1,3 +1,26 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aebc8d7b7195087f56a7f3a07f0458732d57d0bfc3cc4045c77c080afa3efdc5 -size 1322 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FoldingRangeFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const FoldingRangeFeature = (Base) => { + return class extends Base { + get foldingRange() { + return { + refresh: () => { + return this.connection.sendRequest(vscode_languageserver_protocol_1.FoldingRangeRefreshRequest.type); + }, + on: (handler) => { + const type = vscode_languageserver_protocol_1.FoldingRangeRequest.type; + return this.connection.onRequest(type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params)); + }); + } + }; + } + }; +}; +exports.FoldingRangeFeature = FoldingRangeFeature; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlayHint.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlayHint.d.ts" index 1aecd8adee54f07529f90ed51f696dcca498ff25..f9b603550f022ead4cdfac66eb5e8d4b285dbf7f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlayHint.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlayHint.d.ts" @@ -1,3 +1,28 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8274bfd5de49f9f072be2f39c34e390101a8b69844e55eda36c7df23ba6d03e2 -size 1012 +import { InlayHint, InlayHintParams, Disposable, RequestHandler } from 'vscode-languageserver-protocol'; +import type { Feature, _Languages, ServerRequestHandler } from './server'; +/** + * Shape of the inlay hints feature + * + * @since 3.17.0 + */ +export interface InlayHintFeatureShape { + inlayHint: { + /** + * Ask the client to refresh all inlay hints. + */ + refresh(): Promise; + /** + * Installs a handler for the inlay hints request. + * + * @param handler The corresponding handler. + */ + on(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the inlay hint resolve request. + * + * @param handler The corresponding handler. + */ + resolve(handler: RequestHandler): Disposable; + }; +} +export declare const InlayHintFeature: Feature<_Languages, InlayHintFeatureShape>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlayHint.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlayHint.js" index 7f97738d7d32c72a1b67e473afdb91656a31e215..968561dd98549a81ade969d8d5304b2bf1f885c1 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlayHint.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlayHint.js" @@ -1,3 +1,30 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9762c1bfc957ac810a6f84f229ae06abbd1c506b5fc3da51ea66bda90e8afd5e -size 1491 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InlayHintFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const InlayHintFeature = (Base) => { + return class extends Base { + get inlayHint() { + return { + refresh: () => { + return this.connection.sendRequest(vscode_languageserver_protocol_1.InlayHintRefreshRequest.type); + }, + on: (handler) => { + return this.connection.onRequest(vscode_languageserver_protocol_1.InlayHintRequest.type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params)); + }); + }, + resolve: (handler) => { + return this.connection.onRequest(vscode_languageserver_protocol_1.InlayHintResolveRequest.type, (params, cancel) => { + return handler(params, cancel); + }); + } + }; + } + }; +}; +exports.InlayHintFeature = InlayHintFeature; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlineCompletion.proposed.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlineCompletion.proposed.d.ts" index dd364797cb6b6f30ea25281fe31cf280e236b1bd..3c6b01ee18e518623eafb85718b47b8a65547de0 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlineCompletion.proposed.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlineCompletion.proposed.d.ts" @@ -1,3 +1,18 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:173838811f6dcba587706efd87358f804261549bc02c455d31818328c1af97ad -size 782 +import { InlineCompletionItem, Disposable, InlineCompletionParams, InlineCompletionList } from 'vscode-languageserver-protocol'; +import type { Feature, _Languages, ServerRequestHandler } from './server'; +/** + * Shape of the inline completions feature + * + * @since 3.18.0 + */ +export interface InlineCompletionFeatureShape { + inlineCompletion: { + /** + * Installs a handler for the inline completions request. + * + * @param handler The corresponding handler. + */ + on(handler: ServerRequestHandler): Disposable; + }; +} +export declare const InlineCompletionFeature: Feature<_Languages, InlineCompletionFeatureShape>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlineCompletion.proposed.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlineCompletion.proposed.js" index 7ffb5dcc1eb8405fdd8a68e4619873309e555519..207d4e2016cf26ed268a6ae928b86012358de1c6 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlineCompletion.proposed.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlineCompletion.proposed.js" @@ -1,3 +1,22 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ced5e9ec238bba54d61fe2283c33e0a53ecb27ccdfb6134cc67b4925743758c2 -size 1085 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InlineCompletionFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const InlineCompletionFeature = (Base) => { + return class extends Base { + get inlineCompletion() { + return { + on: (handler) => { + return this.connection.onRequest(vscode_languageserver_protocol_1.InlineCompletionRequest.type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params)); + }); + } + }; + } + }; +}; +exports.InlineCompletionFeature = InlineCompletionFeature; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlineValue.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlineValue.d.ts" index 8574c82584a5eaffeb6ab08de04c9742f0dcdd2b..3f6e1f301b8c331952d332cb2df613acdc1cd8fe 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlineValue.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlineValue.d.ts" @@ -1,3 +1,22 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8a9bd1cf8c1f75435f83595b43737c135e7f73bde39ba4c9339dc6a31e8bb069 -size 784 +import { InlineValue, Disposable, InlineValueParams } from 'vscode-languageserver-protocol'; +import type { Feature, _Languages, ServerRequestHandler } from './server'; +/** + * Shape of the inline values feature + * + * @since 3.17.0 + */ +export interface InlineValueFeatureShape { + inlineValue: { + /** + * Ask the client to refresh all inline values. + */ + refresh(): Promise; + /** + * Installs a handler for the inline values request. + * + * @param handler The corresponding handler. + */ + on(handler: ServerRequestHandler): Disposable; + }; +} +export declare const InlineValueFeature: Feature<_Languages, InlineValueFeatureShape>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlineValue.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlineValue.js" index 72aba44a9a301c8053f23708427e52a132063a88..7c276f3b6c73a1684fb503374125043d036996c6 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlineValue.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/inlineValue.js" @@ -1,3 +1,25 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:525265ff5b522f7b14ae9cb4a66f399c9e781f784b7b598ec4fe816b13935f86 -size 1228 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InlineValueFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const InlineValueFeature = (Base) => { + return class extends Base { + get inlineValue() { + return { + refresh: () => { + return this.connection.sendRequest(vscode_languageserver_protocol_1.InlineValueRefreshRequest.type); + }, + on: (handler) => { + return this.connection.onRequest(vscode_languageserver_protocol_1.InlineValueRequest.type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params)); + }); + } + }; + } + }; +}; +exports.InlineValueFeature = InlineValueFeature; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/linkedEditingRange.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/linkedEditingRange.d.ts" index 7ad691c8ebded742898ab758728a234be34bc46a..90d273a121de77535de643a1c8f219f254f37755 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/linkedEditingRange.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/linkedEditingRange.d.ts" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b557ea3605e52406e35eeea468cb96f25b1ca906f2055f376597f0b02492d94c -size 688 +import { LinkedEditingRangeParams, LinkedEditingRanges, Disposable } from 'vscode-languageserver-protocol'; +import type { Feature, _Languages, ServerRequestHandler } from './server'; +/** + * Shape of the linked editing feature + * + * @since 3.16.0 + */ +export interface LinkedEditingRangeFeatureShape { + /** + * Installs a handler for the linked editing range request. + * + * @param handler The corresponding handler. + */ + onLinkedEditingRange(handler: ServerRequestHandler): Disposable; +} +export declare const LinkedEditingRangeFeature: Feature<_Languages, LinkedEditingRangeFeatureShape>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/linkedEditingRange.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/linkedEditingRange.js" index 4506b3a3baf5d06f819e2801ee33a02d876b3d5a..dc256640773b3d57686ed71221358801c223c41c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/linkedEditingRange.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/linkedEditingRange.js" @@ -1,3 +1,18 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2c01c9c935f813bf8d10bee90cf9848123ad4b2c051849e72ff2fad4cfdc46f1 -size 1000 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LinkedEditingRangeFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const LinkedEditingRangeFeature = (Base) => { + return class extends Base { + onLinkedEditingRange(handler) { + return this.connection.onRequest(vscode_languageserver_protocol_1.LinkedEditingRangeRequest.type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), undefined); + }); + } + }; +}; +exports.LinkedEditingRangeFeature = LinkedEditingRangeFeature; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/moniker.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/moniker.d.ts" index 29907bc7da06d43cd0affd9a0899bef6ad5da93d..c6d395c0e5f6489567ff471021a21b905ca71ef1 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/moniker.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/moniker.d.ts" @@ -1,3 +1,13 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a980ce9470dc95ac355d7efb729f9cfb0564505eba96da4bbde504299efb833a -size 467 +import { MonikerParams, Moniker, Disposable } from 'vscode-languageserver-protocol'; +import type { Feature, _Languages, ServerRequestHandler } from './server'; +/** + * Shape of the moniker feature + * + * @since 3.16.0 + */ +export interface MonikerFeatureShape { + moniker: { + on(handler: ServerRequestHandler): Disposable; + }; +} +export declare const MonikerFeature: Feature<_Languages, MonikerFeatureShape>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/moniker.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/moniker.js" index 315a7da22874930e6f340a1795a9b19836f76a31..a37e39dd836bfb0e311aab0649eed0e11de5d3c7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/moniker.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/moniker.js" @@ -1,3 +1,23 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:57ac20c520def32e8dc1c60908977d35201364c328938534ff85b90ddb2c8c8f -size 1119 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MonikerFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const MonikerFeature = (Base) => { + return class extends Base { + get moniker() { + return { + on: (handler) => { + const type = vscode_languageserver_protocol_1.MonikerRequest.type; + return this.connection.onRequest(type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params)); + }); + }, + }; + } + }; +}; +exports.MonikerFeature = MonikerFeature; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/notebook.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/notebook.d.ts" index f1325402819a837eb1462fefbb0d7372bc3e3643..69285d4ea47220bb3c9cd5406fe11890a24e7416 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/notebook.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/notebook.d.ts" @@ -1,3 +1,99 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5c74e3eee30bb7899eebe784e3c05cb29f1bed3efb2a3b4599b66173fda4aa30 -size 3890 +import { NotificationHandler1, Event, DocumentUri, URI, Disposable, DidOpenNotebookDocumentParams, DidChangeNotebookDocumentParams, DidSaveNotebookDocumentParams, DidCloseNotebookDocumentParams, NotebookDocument, NotebookCell, LSPObject } from 'vscode-languageserver-protocol'; +import type { Feature, _Notebooks, Connection } from './server'; +import { TextDocuments, TextDocumentsConfiguration } from './textDocuments'; +/** + * Shape of the notebooks feature + * + * @since 3.17.0 + */ +export interface NotebookSyncFeatureShape { + synchronization: { + onDidOpenNotebookDocument(handler: NotificationHandler1): Disposable; + onDidChangeNotebookDocument(handler: NotificationHandler1): Disposable; + onDidSaveNotebookDocument(handler: NotificationHandler1): Disposable; + onDidCloseNotebookDocument(handler: NotificationHandler1): Disposable; + }; +} +export declare const NotebookSyncFeature: Feature<_Notebooks, NotebookSyncFeatureShape>; +export type NotebookDocumentChangeEvent = { + /** + * The notebook document that changed. + */ + notebookDocument: NotebookDocument; + /** + * The meta data change if any. + * + * Note: old and new should always be an object literal (e.g. LSPObject) + */ + metadata?: { + old: LSPObject | undefined; + new: LSPObject | undefined; + }; + /** + * The cell changes if any. + */ + cells?: { + /** + * The cells that got added. + */ + added: NotebookCell[]; + /** + * The cells that got removed. + */ + removed: NotebookCell[]; + /** + * The cells that changed. + */ + changed: { + /** + * The cell data has changed, excluding its + * text content which is reported via + * `textContentChanged`. + */ + data: { + old: NotebookCell; + new: NotebookCell; + }[]; + /** + * The text content of a cell has changed. + * The actual text is available via the `Notebooks` + * text document manager. + */ + textContent: NotebookCell[]; + }; + }; +}; +export declare class NotebookDocuments { + private readonly notebookDocuments; + private readonly notebookCellMap; + private readonly _onDidOpen; + private readonly _onDidSave; + private readonly _onDidChange; + private readonly _onDidClose; + private _cellTextDocuments; + constructor(configurationOrTextDocuments: TextDocumentsConfiguration | TextDocuments); + get cellTextDocuments(): TextDocuments; + getCellTextDocument(cell: NotebookCell): T | undefined; + getNotebookDocument(uri: URI): NotebookDocument | undefined; + getNotebookCell(uri: DocumentUri): NotebookCell | undefined; + findNotebookDocumentForCell(cell: DocumentUri | NotebookCell): NotebookDocument | undefined; + get onDidOpen(): Event; + get onDidSave(): Event; + get onDidChange(): Event; + get onDidClose(): Event; + /** + * Listens for `low level` notification on the given connection to + * update the notebook documents managed by this instance. + * + * Please note that the connection only provides handlers not an event model. Therefore + * listening on a connection will overwrite the following handlers on a connection: + * `onDidOpenNotebookDocument`, `onDidChangeNotebookDocument`, `onDidSaveNotebookDocument`, + * and `onDidCloseNotebookDocument`. + * + * @param connection The connection to listen on. + */ + listen(connection: Connection): Disposable; + private updateCellMap; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/notebook.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/notebook.js" index b33b8ec9e14b7078d473babfe6900bdf755a4696..5d958c8258c5fa2fd6cf7c5b035a264b118dd478 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/notebook.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/notebook.js" @@ -1,3 +1,252 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:323d075a1ffd64a1d52fda0d2450523d633337c7486b49db84b75220fceed981 -size 11966 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NotebookDocuments = exports.NotebookSyncFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const textDocuments_1 = require("./textDocuments"); +const NotebookSyncFeature = (Base) => { + return class extends Base { + get synchronization() { + return { + onDidOpenNotebookDocument: (handler) => { + return this.connection.onNotification(vscode_languageserver_protocol_1.DidOpenNotebookDocumentNotification.type, (params) => { + return handler(params); + }); + }, + onDidChangeNotebookDocument: (handler) => { + return this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeNotebookDocumentNotification.type, (params) => { + return handler(params); + }); + }, + onDidSaveNotebookDocument: (handler) => { + return this.connection.onNotification(vscode_languageserver_protocol_1.DidSaveNotebookDocumentNotification.type, (params) => { + return handler(params); + }); + }, + onDidCloseNotebookDocument: (handler) => { + return this.connection.onNotification(vscode_languageserver_protocol_1.DidCloseNotebookDocumentNotification.type, (params) => { + return handler(params); + }); + } + }; + } + }; +}; +exports.NotebookSyncFeature = NotebookSyncFeature; +class CellTextDocumentConnection { + onDidOpenTextDocument(handler) { + this.openHandler = handler; + return vscode_languageserver_protocol_1.Disposable.create(() => { this.openHandler = undefined; }); + } + openTextDocument(params) { + return this.openHandler && this.openHandler(params); + } + onDidChangeTextDocument(handler) { + this.changeHandler = handler; + return vscode_languageserver_protocol_1.Disposable.create(() => { this.changeHandler = handler; }); + } + changeTextDocument(params) { + return this.changeHandler && this.changeHandler(params); + } + onDidCloseTextDocument(handler) { + this.closeHandler = handler; + return vscode_languageserver_protocol_1.Disposable.create(() => { this.closeHandler = undefined; }); + } + closeTextDocument(params) { + return this.closeHandler && this.closeHandler(params); + } + onWillSaveTextDocument() { + return CellTextDocumentConnection.NULL_DISPOSE; + } + onWillSaveTextDocumentWaitUntil() { + return CellTextDocumentConnection.NULL_DISPOSE; + } + onDidSaveTextDocument() { + return CellTextDocumentConnection.NULL_DISPOSE; + } +} +CellTextDocumentConnection.NULL_DISPOSE = Object.freeze({ dispose: () => { } }); +class NotebookDocuments { + constructor(configurationOrTextDocuments) { + if (configurationOrTextDocuments instanceof textDocuments_1.TextDocuments) { + this._cellTextDocuments = configurationOrTextDocuments; + } + else { + this._cellTextDocuments = new textDocuments_1.TextDocuments(configurationOrTextDocuments); + } + this.notebookDocuments = new Map(); + this.notebookCellMap = new Map(); + this._onDidOpen = new vscode_languageserver_protocol_1.Emitter(); + this._onDidChange = new vscode_languageserver_protocol_1.Emitter(); + this._onDidSave = new vscode_languageserver_protocol_1.Emitter(); + this._onDidClose = new vscode_languageserver_protocol_1.Emitter(); + } + get cellTextDocuments() { + return this._cellTextDocuments; + } + getCellTextDocument(cell) { + return this._cellTextDocuments.get(cell.document); + } + getNotebookDocument(uri) { + return this.notebookDocuments.get(uri); + } + getNotebookCell(uri) { + const value = this.notebookCellMap.get(uri); + return value && value[0]; + } + findNotebookDocumentForCell(cell) { + const key = typeof cell === 'string' ? cell : cell.document; + const value = this.notebookCellMap.get(key); + return value && value[1]; + } + get onDidOpen() { + return this._onDidOpen.event; + } + get onDidSave() { + return this._onDidSave.event; + } + get onDidChange() { + return this._onDidChange.event; + } + get onDidClose() { + return this._onDidClose.event; + } + /** + * Listens for `low level` notification on the given connection to + * update the notebook documents managed by this instance. + * + * Please note that the connection only provides handlers not an event model. Therefore + * listening on a connection will overwrite the following handlers on a connection: + * `onDidOpenNotebookDocument`, `onDidChangeNotebookDocument`, `onDidSaveNotebookDocument`, + * and `onDidCloseNotebookDocument`. + * + * @param connection The connection to listen on. + */ + listen(connection) { + const cellTextDocumentConnection = new CellTextDocumentConnection(); + const disposables = []; + disposables.push(this.cellTextDocuments.listen(cellTextDocumentConnection)); + disposables.push(connection.notebooks.synchronization.onDidOpenNotebookDocument(async (params) => { + this.notebookDocuments.set(params.notebookDocument.uri, params.notebookDocument); + for (const cellTextDocument of params.cellTextDocuments) { + await cellTextDocumentConnection.openTextDocument({ textDocument: cellTextDocument }); + } + this.updateCellMap(params.notebookDocument); + this._onDidOpen.fire(params.notebookDocument); + })); + disposables.push(connection.notebooks.synchronization.onDidChangeNotebookDocument(async (params) => { + const notebookDocument = this.notebookDocuments.get(params.notebookDocument.uri); + if (notebookDocument === undefined) { + return; + } + notebookDocument.version = params.notebookDocument.version; + const oldMetadata = notebookDocument.metadata; + let metadataChanged = false; + const change = params.change; + if (change.metadata !== undefined) { + metadataChanged = true; + notebookDocument.metadata = change.metadata; + } + const opened = []; + const closed = []; + const data = []; + const text = []; + if (change.cells !== undefined) { + const changedCells = change.cells; + if (changedCells.structure !== undefined) { + const array = changedCells.structure.array; + notebookDocument.cells.splice(array.start, array.deleteCount, ...(array.cells !== undefined ? array.cells : [])); + // Additional open cell text documents. + if (changedCells.structure.didOpen !== undefined) { + for (const open of changedCells.structure.didOpen) { + await cellTextDocumentConnection.openTextDocument({ textDocument: open }); + opened.push(open.uri); + } + } + // Additional closed cell test documents. + if (changedCells.structure.didClose) { + for (const close of changedCells.structure.didClose) { + await cellTextDocumentConnection.closeTextDocument({ textDocument: close }); + closed.push(close.uri); + } + } + } + if (changedCells.data !== undefined) { + const cellUpdates = new Map(changedCells.data.map(cell => [cell.document, cell])); + for (let i = 0; i <= notebookDocument.cells.length; i++) { + const change = cellUpdates.get(notebookDocument.cells[i].document); + if (change !== undefined) { + const old = notebookDocument.cells.splice(i, 1, change); + data.push({ old: old[0], new: change }); + cellUpdates.delete(change.document); + if (cellUpdates.size === 0) { + break; + } + } + } + } + if (changedCells.textContent !== undefined) { + for (const cellTextDocument of changedCells.textContent) { + await cellTextDocumentConnection.changeTextDocument({ textDocument: cellTextDocument.document, contentChanges: cellTextDocument.changes }); + text.push(cellTextDocument.document.uri); + } + } + } + // Update internal data structure. + this.updateCellMap(notebookDocument); + const changeEvent = { notebookDocument }; + if (metadataChanged) { + changeEvent.metadata = { old: oldMetadata, new: notebookDocument.metadata }; + } + const added = []; + for (const open of opened) { + added.push(this.getNotebookCell(open)); + } + const removed = []; + for (const close of closed) { + removed.push(this.getNotebookCell(close)); + } + const textContent = []; + for (const change of text) { + textContent.push(this.getNotebookCell(change)); + } + if (added.length > 0 || removed.length > 0 || data.length > 0 || textContent.length > 0) { + changeEvent.cells = { added, removed, changed: { data, textContent } }; + } + if (changeEvent.metadata !== undefined || changeEvent.cells !== undefined) { + this._onDidChange.fire(changeEvent); + } + })); + disposables.push(connection.notebooks.synchronization.onDidSaveNotebookDocument((params) => { + const notebookDocument = this.notebookDocuments.get(params.notebookDocument.uri); + if (notebookDocument === undefined) { + return; + } + this._onDidSave.fire(notebookDocument); + })); + disposables.push(connection.notebooks.synchronization.onDidCloseNotebookDocument(async (params) => { + const notebookDocument = this.notebookDocuments.get(params.notebookDocument.uri); + if (notebookDocument === undefined) { + return; + } + this._onDidClose.fire(notebookDocument); + for (const cellTextDocument of params.cellTextDocuments) { + await cellTextDocumentConnection.closeTextDocument({ textDocument: cellTextDocument }); + } + this.notebookDocuments.delete(params.notebookDocument.uri); + for (const cell of notebookDocument.cells) { + this.notebookCellMap.delete(cell.document); + } + })); + return vscode_languageserver_protocol_1.Disposable.create(() => { disposables.forEach(disposable => disposable.dispose()); }); + } + updateCellMap(notebookDocument) { + for (const cell of notebookDocument.cells) { + this.notebookCellMap.set(cell.document, [cell, notebookDocument]); + } + } +} +exports.NotebookDocuments = NotebookDocuments; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/progress.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/progress.d.ts" index b094e5d3f5794c985efd42a18714b2a968778c20..b74a64e8d15914f2df530f7eae86d207e1f318f8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/progress.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/progress.d.ts" @@ -1,3 +1,25 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f1f23acd4a8193453749f69d4432f5f122d6d572b793a8b630dd12fe80b0c3d3 -size 1358 +import { CancellationToken, ProgressToken, ProgressType, WorkDoneProgressParams, PartialResultParams } from 'vscode-languageserver-protocol'; +import type { Feature, _RemoteWindow } from './server'; +export interface ProgressContext { + sendProgress

(type: ProgressType

, token: ProgressToken, value: P): void; +} +export interface WorkDoneProgressReporter { + begin(title: string, percentage?: number, message?: string, cancellable?: boolean): void; + report(percentage: number): void; + report(message: string): void; + report(percentage: number, message: string): void; + done(): void; +} +export interface WorkDoneProgressServerReporter extends WorkDoneProgressReporter { + readonly token: CancellationToken; +} +export interface WindowProgress { + attachWorkDoneProgress(token: ProgressToken | undefined): WorkDoneProgressReporter; + createWorkDoneProgress(): Promise; +} +export declare function attachWorkDone(connection: ProgressContext, params: WorkDoneProgressParams | undefined): WorkDoneProgressReporter; +export declare const ProgressFeature: Feature<_RemoteWindow, WindowProgress>; +export interface ResultProgressReporter { + report(data: R): void; +} +export declare function attachPartialResult(connection: ProgressContext, params: PartialResultParams): ResultProgressReporter | undefined; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/progress.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/progress.js" index 0f108a6c058150251101d019fe5633c332e4c01c..73d48fd2c88d9ad798e943768077f5e5e54a24b7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/progress.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/progress.js" @@ -1,3 +1,165 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aeab093d4c46f71d79d5b11e841e4644c6d3b70f076fbf756c1515071c3fc2da -size 6006 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.attachPartialResult = exports.ProgressFeature = exports.attachWorkDone = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const uuid_1 = require("./utils/uuid"); +class WorkDoneProgressReporterImpl { + constructor(_connection, _token) { + this._connection = _connection; + this._token = _token; + WorkDoneProgressReporterImpl.Instances.set(this._token, this); + } + begin(title, percentage, message, cancellable) { + const param = { + kind: 'begin', + title, + message, + cancellable + }; + if (typeof percentage === 'number') { + // Round to the nearest integer, because the percentage + // is a uinteger according to the specification + param.percentage = Math.round(percentage); + } + this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param); + } + report(arg0, arg1) { + const param = { + kind: 'report' + }; + if (typeof arg0 === 'number') { + // Round to the nearest integer, because the percentage + // is a uinteger according to the specification + param.percentage = Math.round(arg0); + if (arg1 !== undefined) { + param.message = arg1; + } + } + else { + param.message = arg0; + } + this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param); + } + done() { + WorkDoneProgressReporterImpl.Instances.delete(this._token); + this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, { kind: 'end' }); + } +} +WorkDoneProgressReporterImpl.Instances = new Map(); +class WorkDoneProgressServerReporterImpl extends WorkDoneProgressReporterImpl { + constructor(connection, token) { + super(connection, token); + this._source = new vscode_languageserver_protocol_1.CancellationTokenSource(); + } + get token() { + return this._source.token; + } + done() { + this._source.dispose(); + super.done(); + } + cancel() { + this._source.cancel(); + } +} +class NullProgressReporter { + constructor() { + } + begin() { + } + report() { + } + done() { + } +} +class NullProgressServerReporter extends NullProgressReporter { + constructor() { + super(); + this._source = new vscode_languageserver_protocol_1.CancellationTokenSource(); + } + get token() { + return this._source.token; + } + done() { + this._source.dispose(); + } + cancel() { + this._source.cancel(); + } +} +function attachWorkDone(connection, params) { + if (params === undefined || params.workDoneToken === undefined) { + return new NullProgressReporter(); + } + const token = params.workDoneToken; + delete params.workDoneToken; + return new WorkDoneProgressReporterImpl(connection, token); +} +exports.attachWorkDone = attachWorkDone; +const ProgressFeature = (Base) => { + return class extends Base { + constructor() { + super(); + this._progressSupported = false; + } + initialize(capabilities) { + super.initialize(capabilities); + if (capabilities?.window?.workDoneProgress === true) { + this._progressSupported = true; + this.connection.onNotification(vscode_languageserver_protocol_1.WorkDoneProgressCancelNotification.type, (params) => { + const progress = WorkDoneProgressReporterImpl.Instances.get(params.token); + if (progress instanceof WorkDoneProgressServerReporterImpl || progress instanceof NullProgressServerReporter) { + progress.cancel(); + } + }); + } + } + attachWorkDoneProgress(token) { + if (token === undefined) { + return new NullProgressReporter(); + } + else { + return new WorkDoneProgressReporterImpl(this.connection, token); + } + } + createWorkDoneProgress() { + if (this._progressSupported) { + const token = (0, uuid_1.generateUuid)(); + return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkDoneProgressCreateRequest.type, { token }).then(() => { + const result = new WorkDoneProgressServerReporterImpl(this.connection, token); + return result; + }); + } + else { + return Promise.resolve(new NullProgressServerReporter()); + } + } + }; +}; +exports.ProgressFeature = ProgressFeature; +var ResultProgress; +(function (ResultProgress) { + ResultProgress.type = new vscode_languageserver_protocol_1.ProgressType(); +})(ResultProgress || (ResultProgress = {})); +class ResultProgressReporterImpl { + constructor(_connection, _token) { + this._connection = _connection; + this._token = _token; + } + report(data) { + this._connection.sendProgress(ResultProgress.type, this._token, data); + } +} +function attachPartialResult(connection, params) { + if (params === undefined || params.partialResultToken === undefined) { + return undefined; + } + const token = params.partialResultToken; + delete params.partialResultToken; + return new ResultProgressReporterImpl(connection, token); +} +exports.attachPartialResult = attachPartialResult; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/semanticTokens.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/semanticTokens.d.ts" index 115d738d3094f83dd491c11ef1d8009e97c79a23..25f6461f2bd539c05ccd0e43c9102d15eb42a13e 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/semanticTokens.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/semanticTokens.d.ts" @@ -1,3 +1,43 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a8622a8493a7efde6183bc044113e47da494ab01154b0c7f38a3ad4e927b623f -size 1968 +import { SemanticTokens, SemanticTokensPartialResult, SemanticTokensDelta, SemanticTokensDeltaPartialResult, SemanticTokensParams, SemanticTokensDeltaParams, SemanticTokensRangeParams, SemanticTokensEdit, Disposable } from 'vscode-languageserver-protocol'; +import type { Feature, _Languages, ServerRequestHandler } from './server'; +/** + * Shape of the semantic token feature + * + * @since 3.16.0 + */ +export interface SemanticTokensFeatureShape { + semanticTokens: { + refresh(): Promise; + on(handler: ServerRequestHandler): Disposable; + onDelta(handler: ServerRequestHandler): Disposable; + onRange(handler: ServerRequestHandler): Disposable; + }; +} +export declare const SemanticTokensFeature: Feature<_Languages, SemanticTokensFeatureShape>; +export declare class SemanticTokensDiff { + private readonly originalSequence; + private readonly modifiedSequence; + constructor(originalSequence: number[], modifiedSequence: number[]); + computeDiff(): SemanticTokensEdit[]; +} +export declare class SemanticTokensBuilder { + private _id; + private _prevLine; + private _prevChar; + private _dataIsSortedAndDeltaEncoded; + private _data; + private _dataNonDelta; + private _dataLen; + private _prevData; + constructor(); + private initialize; + push(line: number, char: number, length: number, tokenType: number, tokenModifiers: number): void; + get id(): string; + private static _deltaDecode; + private static _sortAndDeltaEncode; + private getFinalDataDelta; + previousResult(id: string): void; + build(): SemanticTokens; + canBuildEdits(): boolean; + buildEdits(): SemanticTokens | SemanticTokensDelta; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/semanticTokens.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/semanticTokens.js" index ab5d5579fc8b925f1e3c0e567c396e3ab0d633e9..be5564feca345bd780a876c327dbc5721859304d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/semanticTokens.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/semanticTokens.js" @@ -1,3 +1,241 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ed282fd0f381234f7065a60c45c24f87c5d718cf5dec819a8e193f43f5effd10 -size 9641 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SemanticTokensBuilder = exports.SemanticTokensDiff = exports.SemanticTokensFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const SemanticTokensFeature = (Base) => { + return class extends Base { + get semanticTokens() { + return { + refresh: () => { + return this.connection.sendRequest(vscode_languageserver_protocol_1.SemanticTokensRefreshRequest.type); + }, + on: (handler) => { + const type = vscode_languageserver_protocol_1.SemanticTokensRequest.type; + return this.connection.onRequest(type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params)); + }); + }, + onDelta: (handler) => { + const type = vscode_languageserver_protocol_1.SemanticTokensDeltaRequest.type; + return this.connection.onRequest(type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params)); + }); + }, + onRange: (handler) => { + const type = vscode_languageserver_protocol_1.SemanticTokensRangeRequest.type; + return this.connection.onRequest(type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params)); + }); + } + }; + } + }; +}; +exports.SemanticTokensFeature = SemanticTokensFeature; +class SemanticTokensDiff { + constructor(originalSequence, modifiedSequence) { + this.originalSequence = originalSequence; + this.modifiedSequence = modifiedSequence; + } + computeDiff() { + const originalLength = this.originalSequence.length; + const modifiedLength = this.modifiedSequence.length; + let startIndex = 0; + while (startIndex < modifiedLength && startIndex < originalLength && this.originalSequence[startIndex] === this.modifiedSequence[startIndex]) { + startIndex++; + } + if (startIndex < modifiedLength && startIndex < originalLength) { + let originalEndIndex = originalLength - 1; + let modifiedEndIndex = modifiedLength - 1; + while (originalEndIndex >= startIndex && modifiedEndIndex >= startIndex && this.originalSequence[originalEndIndex] === this.modifiedSequence[modifiedEndIndex]) { + originalEndIndex--; + modifiedEndIndex--; + } + // if one moved behind the start index move them forward again + if (originalEndIndex < startIndex || modifiedEndIndex < startIndex) { + originalEndIndex++; + modifiedEndIndex++; + } + const deleteCount = originalEndIndex - startIndex + 1; + const newData = this.modifiedSequence.slice(startIndex, modifiedEndIndex + 1); + // If we moved behind the start index we could have missed a simple delete. + if (newData.length === 1 && newData[0] === this.originalSequence[originalEndIndex]) { + return [ + { start: startIndex, deleteCount: deleteCount - 1 } + ]; + } + else { + return [ + { start: startIndex, deleteCount, data: newData } + ]; + } + } + else if (startIndex < modifiedLength) { + return [ + { start: startIndex, deleteCount: 0, data: this.modifiedSequence.slice(startIndex) } + ]; + } + else if (startIndex < originalLength) { + return [ + { start: startIndex, deleteCount: originalLength - startIndex } + ]; + } + else { + // The two arrays are the same. + return []; + } + } +} +exports.SemanticTokensDiff = SemanticTokensDiff; +class SemanticTokensBuilder { + constructor() { + this._prevData = undefined; + this.initialize(); + } + initialize() { + this._id = Date.now(); + this._prevLine = 0; + this._prevChar = 0; + this._data = []; + this._dataNonDelta = []; + this._dataLen = 0; + this._dataIsSortedAndDeltaEncoded = true; + } + push(line, char, length, tokenType, tokenModifiers) { + if (this._dataIsSortedAndDeltaEncoded && (line < this._prevLine || (line === this._prevLine && char < this._prevChar))) { + // push calls were ordered and are no longer ordered + this._dataIsSortedAndDeltaEncoded = false; + this._dataNonDelta = SemanticTokensBuilder._deltaDecode(this._data); + } + let pushLine = line; + let pushChar = char; + if (this._dataIsSortedAndDeltaEncoded && this._dataLen > 0) { + pushLine -= this._prevLine; + if (pushLine === 0) { + pushChar -= this._prevChar; + } + } + const dataSource = this._dataIsSortedAndDeltaEncoded ? this._data : this._dataNonDelta; + dataSource[this._dataLen++] = pushLine; + dataSource[this._dataLen++] = pushChar; + dataSource[this._dataLen++] = length; + dataSource[this._dataLen++] = tokenType; + dataSource[this._dataLen++] = tokenModifiers; + this._prevLine = line; + this._prevChar = char; + } + get id() { + return this._id.toString(); + } + static _deltaDecode(data) { + // Remove delta encoding from data + const tokenCount = (data.length / 5) | 0; + let prevLine = 0; + let prevChar = 0; + const result = []; + for (let i = 0; i < tokenCount; i++) { + const dstOffset = 5 * i; + let line = data[dstOffset]; + let char = data[dstOffset + 1]; + if (line === 0) { + // on the same line as previous token + line = prevLine; + char += prevChar; + } + else { + // on a different line than previous token + line += prevLine; + } + const length = data[dstOffset + 2]; + const tokenType = data[dstOffset + 3]; + const tokenModifiers = data[dstOffset + 4]; + result[dstOffset + 0] = line; + result[dstOffset + 1] = char; + result[dstOffset + 2] = length; + result[dstOffset + 3] = tokenType; + result[dstOffset + 4] = tokenModifiers; + prevLine = line; + prevChar = char; + } + return result; + } + static _sortAndDeltaEncode(data) { + const pos = []; + const tokenCount = (data.length / 5) | 0; + for (let i = 0; i < tokenCount; i++) { + pos[i] = i; + } + pos.sort((a, b) => { + const aLine = data[5 * a]; + const bLine = data[5 * b]; + if (aLine === bLine) { + const aChar = data[5 * a + 1]; + const bChar = data[5 * b + 1]; + return aChar - bChar; + } + return aLine - bLine; + }); + const result = []; + let prevLine = 0; + let prevChar = 0; + for (let i = 0; i < tokenCount; i++) { + const srcOffset = 5 * pos[i]; + const line = data[srcOffset + 0]; + const char = data[srcOffset + 1]; + const length = data[srcOffset + 2]; + const tokenType = data[srcOffset + 3]; + const tokenModifiers = data[srcOffset + 4]; + const pushLine = line - prevLine; + const pushChar = (pushLine === 0 ? char - prevChar : char); + const dstOffset = 5 * i; + result[dstOffset + 0] = pushLine; + result[dstOffset + 1] = pushChar; + result[dstOffset + 2] = length; + result[dstOffset + 3] = tokenType; + result[dstOffset + 4] = tokenModifiers; + prevLine = line; + prevChar = char; + } + return result; + } + getFinalDataDelta() { + if (this._dataIsSortedAndDeltaEncoded) { + return this._data; + } + else { + return SemanticTokensBuilder._sortAndDeltaEncode(this._dataNonDelta); + } + } + previousResult(id) { + if (this.id === id) { + this._prevData = this.getFinalDataDelta(); + } + this.initialize(); + } + build() { + this._prevData = undefined; + return { + resultId: this.id, + data: this.getFinalDataDelta() + }; + } + canBuildEdits() { + return this._prevData !== undefined; + } + buildEdits() { + if (this._prevData !== undefined) { + return { + resultId: this.id, + edits: (new SemanticTokensDiff(this._prevData, this.getFinalDataDelta())).computeDiff() + }; + } + else { + return this.build(); + } + } +} +exports.SemanticTokensBuilder = SemanticTokensBuilder; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/server.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/server.d.ts" index 760fbc51ddbab72ed0c41c3c9f142a2695549cb2..b924b50bc7576cc69c53540239cdc1210ed58cb1 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/server.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/server.d.ts" @@ -1,3 +1,804 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:72a33e518e5b98cd9c9dc8ee294f7507bf2a8938f491b0cf49c8ae582b966b3a -size 37158 +import { CancellationToken, ProtocolRequestType0, RequestHandler0, ProtocolRequestType, RequestHandler, GenericRequestHandler, StarRequestHandler, HandlerResult, ProtocolNotificationType0, NotificationHandler0, ProtocolNotificationType, NotificationHandler, GenericNotificationHandler, StarNotificationHandler, ProgressType, Disposable, InitializeParams, InitializeResult, InitializeError, InitializedParams, DidChangeConfigurationParams, DidChangeWatchedFilesParams, DidOpenTextDocumentParams, DidChangeTextDocumentParams, DidCloseTextDocumentParams, WillSaveTextDocumentParams, TextEdit, DidSaveTextDocumentParams, PublishDiagnosticsParams, HoverParams, Hover, CompletionParams, CompletionItem, CompletionList, SignatureHelpParams, SignatureHelp, DeclarationParams, Declaration, DeclarationLink, Location, DefinitionParams, Definition, DefinitionLink, TypeDefinitionParams, ImplementationParams, ReferenceParams, DocumentHighlightParams, DocumentHighlight, DocumentSymbolParams, SymbolInformation, DocumentSymbol, WorkspaceSymbolParams, CodeActionParams, Command, CodeAction, CodeLensParams, CodeLens, DocumentFormattingParams, DocumentRangeFormattingParams, DocumentOnTypeFormattingParams, RenameParams, WorkspaceEdit, PrepareRenameParams, Range, DocumentLinkParams, DocumentLink, DocumentColorParams, ColorInformation, ColorPresentationParams, ColorPresentation, FoldingRangeParams, FoldingRange, SelectionRangeParams, SelectionRange, ExecuteCommandParams, MessageActionItem, ClientCapabilities, ServerCapabilities, Logger, ProtocolConnection, MessageSignature, ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse, WorkDoneProgressParams, PartialResultParams, RegistrationType, RequestType0, RequestType, NotificationType0, NotificationType, WorkspaceSymbol } from 'vscode-languageserver-protocol'; +import { WorkDoneProgressReporter, ResultProgressReporter, WindowProgress } from './progress'; +import { Configuration } from './configuration'; +import { WorkspaceFolders } from './workspaceFolder'; +import { CallHierarchy } from './callHierarchy'; +import { SemanticTokensFeatureShape } from './semanticTokens'; +import { ShowDocumentFeatureShape } from './showDocument'; +import { FileOperationsFeatureShape } from './fileOperations'; +import { LinkedEditingRangeFeatureShape } from './linkedEditingRange'; +import { TypeHierarchyFeatureShape } from './typeHierarchy'; +import { InlineValueFeatureShape } from './inlineValue'; +import { FoldingRangeFeatureShape } from './foldingRange'; +import { InlayHintFeatureShape } from './inlayHint'; +import { DiagnosticFeatureShape } from './diagnostic'; +import { NotebookSyncFeatureShape } from './notebook'; +import { MonikerFeatureShape } from './moniker'; +/** + * Helps tracking error message. Equal occurrences of the same + * message are only stored once. This class is for example + * useful if text documents are validated in a loop and equal + * error message should be folded into one. + */ +export declare class ErrorMessageTracker { + private _messages; + constructor(); + /** + * Add a message to the tracker. + * + * @param message The message to add. + */ + add(message: string): void; + /** + * Send all tracked messages to the connection's window. + * + * @param connection The connection established between client and server. + */ + sendErrors(connection: { + window: RemoteWindow; + }): void; +} +export interface FeatureBase { + /** + * Called to initialize the remote with the given + * client capabilities + * + * @param capabilities The client capabilities + */ + initialize(capabilities: ClientCapabilities): void; + /** + * Called to fill in the server capabilities this feature implements. + * + * @param capabilities The server capabilities to fill. + */ + fillServerCapabilities(capabilities: ServerCapabilities): void; +} +interface Remote extends FeatureBase { + /** + * Attach the remote to the given connection. + * + * @param connection The connection this remote is operating on. + */ + attach(connection: Connection): void; + /** + * The connection this remote is attached to. + */ + connection: Connection; +} +/** + * The RemoteConsole interface contains all functions to interact with + * the tools / clients console or log system. Internally it used `window/logMessage` + * notifications. + */ +export interface RemoteConsole extends FeatureBase { + /** + * The connection this remote is attached to. + */ + connection: Connection; + /** + * Show an error message. + * + * @param message The message to show. + */ + error(message: string): void; + /** + * Show a warning message. + * + * @param message The message to show. + */ + warn(message: string): void; + /** + * Show an information message. + * + * @param message The message to show. + */ + info(message: string): void; + /** + * Log a message. + * + * @param message The message to log. + */ + log(message: string): void; + /** + * Log a debug message. + * + * @param message The message to log. + * + * @since 3.18.0 + */ + debug(message: string): void; +} +/** + * The RemoteWindow interface contains all functions to interact with + * the visual window of VS Code. + */ +export interface _RemoteWindow extends FeatureBase { + /** + * The connection this remote is attached to. + */ + connection: Connection; + /** + * Shows an error message in the client's user interface. Depending on the client this might + * be a modal dialog with a confirmation button or a notification in a notification center + * + * @param message The message to show. + * @param actions Possible additional actions presented in the user interface. The selected action + * will be the value of the resolved promise + */ + showErrorMessage(message: string): void; + showErrorMessage(message: string, ...actions: T[]): Promise; + /** + * Shows a warning message in the client's user interface. Depending on the client this might + * be a modal dialog with a confirmation button or a notification in a notification center + * + * @param message The message to show. + * @param actions Possible additional actions presented in the user interface. The selected action + * will be the value of the resolved promise + */ + showWarningMessage(message: string): void; + showWarningMessage(message: string, ...actions: T[]): Promise; + /** + * Shows an information message in the client's user interface. Depending on the client this might + * be a modal dialog with a confirmation button or a notification in a notification center + * + * @param message The message to show. + * @param actions Possible additional actions presented in the user interface. The selected action + * will be the value of the resolved promise + */ + showInformationMessage(message: string): void; + showInformationMessage(message: string, ...actions: T[]): Promise; +} +export type RemoteWindow = _RemoteWindow & WindowProgress & ShowDocumentFeatureShape; +/** + * A bulk registration manages n single registration to be able to register + * for n notifications or requests using one register request. + */ +export interface BulkRegistration { + /** + * Adds a single registration. + * @param type the notification type to register for. + * @param registerParams special registration parameters. + */ + add(type: ProtocolNotificationType0, registerParams: RO): void; + add(type: ProtocolNotificationType, registerParams: RO): void; + /** + * Adds a single registration. + * @param type the request type to register for. + * @param registerParams special registration parameters. + */ + add(type: ProtocolRequestType0, registerParams: RO): void; + add(type: ProtocolRequestType, registerParams: RO): void; + /** + * Adds a single registration. + * @param type the notification type to register for. + * @param registerParams special registration parameters. + */ + add(type: RegistrationType, registerParams: RO): void; +} +export declare namespace BulkRegistration { + /** + * Creates a new bulk registration. + * @return an empty bulk registration. + */ + function create(): BulkRegistration; +} +/** + * A `BulkUnregistration` manages n unregistrations. + */ +export interface BulkUnregistration extends Disposable { + /** + * Disposes a single registration. It will be removed from the + * `BulkUnregistration`. + */ + disposeSingle(arg: string | MessageSignature): boolean; +} +export declare namespace BulkUnregistration { + function create(): BulkUnregistration; +} +/** + * Interface to register and unregister `listeners` on the client / tools side. + */ +export interface RemoteClient extends FeatureBase { + /** + * The connection this remote is attached to. + */ + connection: Connection; + /** + * Registers a listener for the given request. + * + * @param type the request type to register for. + * @param registerParams special registration parameters. + * @return a `Disposable` to unregister the listener again. + */ + register(type: ProtocolNotificationType, registerParams?: RO): Promise; + register(type: ProtocolNotificationType0, registerParams?: RO): Promise; + /** + * Registers a listener for the given request. + * + * @param unregisteration the unregistration to add a corresponding unregister action to. + * @param type the request type to register for. + * @param registerParams special registration parameters. + * @return the updated unregistration. + */ + register(unregisteration: BulkUnregistration, type: ProtocolNotificationType, registerParams?: RO): Promise; + register(unregisteration: BulkUnregistration, type: ProtocolNotificationType0, registerParams?: RO): Promise; + /** + * Registers a listener for the given request. + * + * @param type the request type to register for. + * @param registerParams special registration parameters. + * @return a `Disposable` to unregister the listener again. + */ + register(type: ProtocolRequestType, registerParams?: RO): Promise; + register(type: ProtocolRequestType0, registerParams?: RO): Promise; + /** + * Registers a listener for the given request. + * + * @param unregisteration the unregistration to add a corresponding unregister action to. + * @param type the request type to register for. + * @param registerParams special registration parameters. + * @return the updated unregistration. + */ + register(unregisteration: BulkUnregistration, type: ProtocolRequestType, registerParams?: RO): Promise; + register(unregisteration: BulkUnregistration, type: ProtocolRequestType0, registerParams?: RO): Promise; + /** + * Registers a listener for the given registration type. + * + * @param type the registration type. + * @param registerParams special registration parameters. + * @return a `Disposable` to unregister the listener again. + */ + register(type: RegistrationType, registerParams?: RO): Promise; + /** + * Registers a listener for the given registration type. + * + * @param unregisteration the unregistration to add a corresponding unregister action to. + * @param type the registration type. + * @param registerParams special registration parameters. + * @return the updated unregistration. + */ + register(unregisteration: BulkUnregistration, type: RegistrationType, registerParams?: RO): Promise; + /** + * Registers a set of listeners. + * @param registrations the bulk registration + * @return a `Disposable` to unregister the listeners again. + */ + register(registrations: BulkRegistration): Promise; +} +/** + * Represents the workspace managed by the client. + */ +export interface _RemoteWorkspace extends FeatureBase { + /** + * The connection this remote is attached to. + */ + connection: Connection; + /** + * Applies a `WorkspaceEdit` to the workspace + * @param param the workspace edit params. + * @return a thenable that resolves to the `ApplyWorkspaceEditResponse`. + */ + applyEdit(paramOrEdit: ApplyWorkspaceEditParams | WorkspaceEdit): Promise; +} +export type RemoteWorkspace = _RemoteWorkspace & Configuration & WorkspaceFolders & FileOperationsFeatureShape; +/** + * Interface to log telemetry events. The events are actually send to the client + * and the client needs to feed the event into a proper telemetry system. + */ +export interface Telemetry extends FeatureBase { + /** + * The connection this remote is attached to. + */ + connection: Connection; + /** + * Log the given data to telemetry. + * + * @param data The data to log. Must be a JSON serializable object. + */ + logEvent(data: any): void; +} +/** + * Interface to log traces to the client. The events are sent to the client and the + * client needs to log the trace events. + */ +export interface RemoteTracer extends FeatureBase { + /** + * The connection this remote is attached to. + */ + connection: Connection; + /** + * Log the given data to the trace Log + */ + log(message: string, verbose?: string): void; +} +export interface _Languages extends FeatureBase { + connection: Connection; + attachWorkDoneProgress(params: WorkDoneProgressParams): WorkDoneProgressReporter; + attachPartialResultProgress(type: ProgressType, params: PartialResultParams): ResultProgressReporter | undefined; +} +export declare class _LanguagesImpl implements Remote, _Languages { + private _connection; + constructor(); + attach(connection: Connection): void; + get connection(): Connection; + initialize(_capabilities: ClientCapabilities): void; + fillServerCapabilities(_capabilities: ServerCapabilities): void; + attachWorkDoneProgress(params: WorkDoneProgressParams): WorkDoneProgressReporter; + attachPartialResultProgress(_type: ProgressType, params: PartialResultParams): ResultProgressReporter | undefined; +} +export type Languages = _Languages & CallHierarchy & SemanticTokensFeatureShape & LinkedEditingRangeFeatureShape & TypeHierarchyFeatureShape & InlineValueFeatureShape & InlayHintFeatureShape & DiagnosticFeatureShape & MonikerFeatureShape & FoldingRangeFeatureShape; +export interface _Notebooks extends FeatureBase { + connection: Connection; + attachWorkDoneProgress(params: WorkDoneProgressParams): WorkDoneProgressReporter; + attachPartialResultProgress(type: ProgressType, params: PartialResultParams): ResultProgressReporter | undefined; +} +export declare class _NotebooksImpl implements Remote, _Notebooks { + private _connection; + constructor(); + attach(connection: Connection): void; + get connection(): Connection; + initialize(_capabilities: ClientCapabilities): void; + fillServerCapabilities(_capabilities: ServerCapabilities): void; + attachWorkDoneProgress(params: WorkDoneProgressParams): WorkDoneProgressReporter; + attachPartialResultProgress(_type: ProgressType, params: PartialResultParams): ResultProgressReporter | undefined; +} +export type Notebooks = _Notebooks & NotebookSyncFeatureShape; +/** + * An empty interface for new proposed API. + */ +export interface _ { +} +export interface ServerRequestHandler { + (params: P, token: CancellationToken, workDoneProgress: WorkDoneProgressReporter, resultProgress?: ResultProgressReporter): HandlerResult; +} +/** + * Interface to describe the shape of the server connection. + */ +export interface _Connection { + /** + * Start listening on the input stream for messages to process. + */ + listen(): void; + /** + * Installs a request handler described by the given {@link RequestType}. + * + * @param type The {@link RequestType} describing the request. + * @param handler The handler to install + */ + onRequest(type: ProtocolRequestType0, handler: RequestHandler0): Disposable; + onRequest(type: ProtocolRequestType, handler: RequestHandler): Disposable; + onRequest(type: RequestType0, handler: RequestHandler0): Disposable; + onRequest(type: RequestType, handler: RequestHandler): Disposable; + /** + * Installs a request handler for the given method. + * + * @param method The method to register a request handler for. + * @param handler The handler to install. + */ + onRequest(method: string, handler: GenericRequestHandler): Disposable; + /** + * Installs a request handler that is invoked if no specific request handler can be found. + * + * @param handler a handler that handles all requests. + */ + onRequest(handler: StarRequestHandler): Disposable; + /** + * Send a request to the client. + * + * @param type The {@link RequestType} describing the request. + * @param params The request's parameters. + */ + sendRequest(type: ProtocolRequestType0, token?: CancellationToken): Promise; + sendRequest(type: ProtocolRequestType, params: P, token?: CancellationToken): Promise; + sendRequest(type: RequestType0, token?: CancellationToken): Promise; + sendRequest(type: RequestType, params: P, token?: CancellationToken): Promise; + /** + * Send a request to the client. + * + * @param method The method to invoke on the client. + * @param params The request's parameters. + */ + sendRequest(method: string, token?: CancellationToken): Promise; + sendRequest(method: string, params: any, token?: CancellationToken): Promise; + /** + * Installs a notification handler described by the given {@link NotificationType}. + * + * @param type The {@link NotificationType} describing the notification. + * @param handler The handler to install. + */ + onNotification(type: ProtocolNotificationType0, handler: NotificationHandler0): Disposable; + onNotification(type: ProtocolNotificationType, handler: NotificationHandler

): Disposable; + onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable; + onNotification

(type: NotificationType

, handler: NotificationHandler

): Disposable; + /** + * Installs a notification handler for the given method. + * + * @param method The method to register a request handler for. + * @param handler The handler to install. + */ + onNotification(method: string, handler: GenericNotificationHandler): Disposable; + /** + * Installs a notification handler that is invoked if no specific notification handler can be found. + * + * @param handler a handler that handles all notifications. + */ + onNotification(handler: StarNotificationHandler): Disposable; + /** + * Send a notification to the client. + * + * @param type The {@link NotificationType} describing the notification. + * @param params The notification's parameters. + */ + sendNotification(type: ProtocolNotificationType0): Promise; + sendNotification(type: ProtocolNotificationType, params: P): Promise; + sendNotification(type: NotificationType0): Promise; + sendNotification

(type: NotificationType

, params: P): Promise; + /** + * Send a notification to the client. + * + * @param method The method to invoke on the client. + * @param params The notification's parameters. + */ + sendNotification(method: string, params?: any): Promise; + /** + * Installs a progress handler for a given token. + * @param type the progress type + * @param token the token + * @param handler the handler + */ + onProgress

(type: ProgressType

, token: string | number, handler: NotificationHandler

): Disposable; + /** + * Sends progress. + * @param type the progress type + * @param token the token to use + * @param value the progress value + */ + sendProgress

(type: ProgressType

, token: string | number, value: P): Promise; + /** + * Installs a handler for the initialize request. + * + * @param handler The initialize handler. + */ + onInitialize(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the initialized notification. + * + * @param handler The initialized handler. + */ + onInitialized(handler: NotificationHandler): Disposable; + /** + * Installs a handler for the shutdown request. + * + * @param handler The initialize handler. + */ + onShutdown(handler: RequestHandler0): Disposable; + /** + * Installs a handler for the exit notification. + * + * @param handler The exit handler. + */ + onExit(handler: NotificationHandler0): Disposable; + /** + * A property to provide access to console specific features. + */ + console: RemoteConsole & PConsole; + /** + * A property to provide access to tracer specific features. + */ + tracer: RemoteTracer & PTracer; + /** + * A property to provide access to telemetry specific features. + */ + telemetry: Telemetry & PTelemetry; + /** + * A property to provide access to client specific features like registering + * for requests or notifications. + */ + client: RemoteClient & PClient; + /** + * A property to provide access to windows specific features. + */ + window: RemoteWindow & PWindow; + /** + * A property to provide access to workspace specific features. + */ + workspace: RemoteWorkspace & PWorkspace; + /** + * A property to provide access to language specific features. + */ + languages: Languages & PLanguages; + /** + * A property to provide access to notebook specific features. + */ + notebooks: Notebooks & PNotebooks; + /** + * Installs a handler for the `DidChangeConfiguration` notification. + * + * @param handler The corresponding handler. + */ + onDidChangeConfiguration(handler: NotificationHandler): Disposable; + /** + * Installs a handler for the `DidChangeWatchedFiles` notification. + * + * @param handler The corresponding handler. + */ + onDidChangeWatchedFiles(handler: NotificationHandler): Disposable; + /** + * Installs a handler for the `DidOpenTextDocument` notification. + * + * @param handler The corresponding handler. + */ + onDidOpenTextDocument(handler: NotificationHandler): Disposable; + /** + * Installs a handler for the `DidChangeTextDocument` notification. + * + * @param handler The corresponding handler. + */ + onDidChangeTextDocument(handler: NotificationHandler): Disposable; + /** + * Installs a handler for the `DidCloseTextDocument` notification. + * + * @param handler The corresponding handler. + */ + onDidCloseTextDocument(handler: NotificationHandler): Disposable; + /** + * Installs a handler for the `WillSaveTextDocument` notification. + * + * Note that this notification is opt-in. The client will not send it unless + * your server has the `textDocumentSync.willSave` capability or you've + * dynamically registered for the `textDocument/willSave` method. + * + * @param handler The corresponding handler. + */ + onWillSaveTextDocument(handler: NotificationHandler): Disposable; + /** + * Installs a handler for the `WillSaveTextDocumentWaitUntil` request. + * + * Note that this request is opt-in. The client will not send it unless + * your server has the `textDocumentSync.willSaveWaitUntil` capability, + * or you've dynamically registered for the `textDocument/willSaveWaitUntil` + * method. + * + * @param handler The corresponding handler. + */ + onWillSaveTextDocumentWaitUntil(handler: RequestHandler): Disposable; + /** + * Installs a handler for the `DidSaveTextDocument` notification. + * + * @param handler The corresponding handler. + */ + onDidSaveTextDocument(handler: NotificationHandler): Disposable; + /** + * Sends diagnostics computed for a given document to VSCode to render them in the + * user interface. + * + * @param params The diagnostic parameters. + */ + sendDiagnostics(params: PublishDiagnosticsParams): Promise; + /** + * Installs a handler for the `Hover` request. + * + * @param handler The corresponding handler. + */ + onHover(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the `Completion` request. + * + * @param handler The corresponding handler. + */ + onCompletion(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the `CompletionResolve` request. + * + * @param handler The corresponding handler. + */ + onCompletionResolve(handler: RequestHandler): Disposable; + /** + * Installs a handler for the `SignatureHelp` request. + * + * @param handler The corresponding handler. + */ + onSignatureHelp(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the `Declaration` request. + * + * @param handler The corresponding handler. + */ + onDeclaration(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the `Definition` request. + * + * @param handler The corresponding handler. + */ + onDefinition(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the `Type Definition` request. + * + * @param handler The corresponding handler. + */ + onTypeDefinition(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the `Implementation` request. + * + * @param handler The corresponding handler. + */ + onImplementation(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the `References` request. + * + * @param handler The corresponding handler. + */ + onReferences(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the `DocumentHighlight` request. + * + * @param handler The corresponding handler. + */ + onDocumentHighlight(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the `DocumentSymbol` request. + * + * @param handler The corresponding handler. + */ + onDocumentSymbol(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the `WorkspaceSymbol` request. + * + * @param handler The corresponding handler. + */ + onWorkspaceSymbol(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the `WorkspaceSymbol` request. + * + * @param handler The corresponding handler. + */ + onWorkspaceSymbolResolve(handler: RequestHandler): Disposable; + /** + * Installs a handler for the `CodeAction` request. + * + * @param handler The corresponding handler. + */ + onCodeAction(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the `CodeAction` resolve request. + * + * @param handler The corresponding handler. + */ + onCodeActionResolve(handler: RequestHandler): Disposable; + /** + * Compute a list of {@link CodeLens lenses}. This call should return as fast as possible and if + * computing the commands is expensive implementers should only return code lens objects with the + * range set and handle the resolve request. + * + * @param handler The corresponding handler. + */ + onCodeLens(handler: ServerRequestHandler): Disposable; + /** + * This function will be called for each visible code lens, usually when scrolling and after + * the onCodeLens has been called. + * + * @param handler The corresponding handler. + */ + onCodeLensResolve(handler: RequestHandler): Disposable; + /** + * Installs a handler for the document formatting request. + * + * @param handler The corresponding handler. + */ + onDocumentFormatting(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the document range formatting request. + * + * @param handler The corresponding handler. + */ + onDocumentRangeFormatting(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the document on type formatting request. + * + * @param handler The corresponding handler. + */ + onDocumentOnTypeFormatting(handler: RequestHandler): Disposable; + /** + * Installs a handler for the rename request. + * + * @param handler The corresponding handler. + */ + onRenameRequest(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the prepare rename request. + * + * @param handler The corresponding handler. + */ + onPrepareRename(handler: RequestHandler): Disposable; + /** + * Installs a handler for the document links request. + * + * @param handler The corresponding handler. + */ + onDocumentLinks(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the document links resolve request. + * + * @param handler The corresponding handler. + */ + onDocumentLinkResolve(handler: RequestHandler): Disposable; + /** + * Installs a handler for the document color request. + * + * @param handler The corresponding handler. + */ + onDocumentColor(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the document color request. + * + * @param handler The corresponding handler. + */ + onColorPresentation(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the folding ranges request. + * + * @param handler The corresponding handler. + */ + onFoldingRanges(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the selection ranges request. + * + * @param handler The corresponding handler. + */ + onSelectionRanges(handler: ServerRequestHandler): Disposable; + /** + * Installs a handler for the execute command request. + * + * @param handler The corresponding handler. + */ + onExecuteCommand(handler: ServerRequestHandler): Disposable; + /** + * Disposes the connection + */ + dispose(): void; +} +export interface Connection extends _Connection { +} +export interface Feature { + (Base: new () => B): new () => B & P; +} +export type ConsoleFeature

= Feature; +export declare function combineConsoleFeatures(one: ConsoleFeature, two: ConsoleFeature): ConsoleFeature; +export type TelemetryFeature

= Feature; +export declare function combineTelemetryFeatures(one: TelemetryFeature, two: TelemetryFeature): TelemetryFeature; +export type TracerFeature

= Feature; +export declare function combineTracerFeatures(one: TracerFeature, two: TracerFeature): TracerFeature; +export type ClientFeature

= Feature; +export declare function combineClientFeatures(one: ClientFeature, two: ClientFeature): ClientFeature; +export type WindowFeature

= Feature<_RemoteWindow, P>; +export declare function combineWindowFeatures(one: WindowFeature, two: WindowFeature): WindowFeature; +export type WorkspaceFeature

= Feature<_RemoteWorkspace, P>; +export declare function combineWorkspaceFeatures(one: WorkspaceFeature, two: WorkspaceFeature): WorkspaceFeature; +export type LanguagesFeature

= Feature<_Languages, P>; +export declare function combineLanguagesFeatures(one: LanguagesFeature, two: LanguagesFeature): LanguagesFeature; +export type NotebooksFeature

= Feature<_Notebooks, P>; +export declare function combineNotebooksFeatures(one: NotebooksFeature, two: NotebooksFeature): NotebooksFeature; +export interface Features { + __brand: 'features'; + console?: ConsoleFeature; + tracer?: TracerFeature; + telemetry?: TelemetryFeature; + client?: ClientFeature; + window?: WindowFeature; + workspace?: WorkspaceFeature; + languages?: LanguagesFeature; + notebooks?: NotebooksFeature; +} +export declare function combineFeatures(one: Features, two: Features): Features; +export interface WatchDog { + shutdownReceived: boolean; + initialize(params: InitializeParams): void; + exit(code: number): void; +} +export declare function createConnection(connectionFactory: (logger: Logger) => ProtocolConnection, watchDog: WatchDog, factories?: Features): _Connection; +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/server.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/server.js" index c4d2cfa9b8889cdfd65cc7182d50348a55c77181..d68f161c70ed364393956d6e7df10459a47b8764 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/server.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/server.js" @@ -1,3 +1,749 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cf0f71e34344ed93c15952ce7ff78febfda44df80ebc23b00fc32625baf99afc -size 35151 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createConnection = exports.combineFeatures = exports.combineNotebooksFeatures = exports.combineLanguagesFeatures = exports.combineWorkspaceFeatures = exports.combineWindowFeatures = exports.combineClientFeatures = exports.combineTracerFeatures = exports.combineTelemetryFeatures = exports.combineConsoleFeatures = exports._NotebooksImpl = exports._LanguagesImpl = exports.BulkUnregistration = exports.BulkRegistration = exports.ErrorMessageTracker = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const Is = require("./utils/is"); +const UUID = require("./utils/uuid"); +const progress_1 = require("./progress"); +const configuration_1 = require("./configuration"); +const workspaceFolder_1 = require("./workspaceFolder"); +const callHierarchy_1 = require("./callHierarchy"); +const semanticTokens_1 = require("./semanticTokens"); +const showDocument_1 = require("./showDocument"); +const fileOperations_1 = require("./fileOperations"); +const linkedEditingRange_1 = require("./linkedEditingRange"); +const typeHierarchy_1 = require("./typeHierarchy"); +const inlineValue_1 = require("./inlineValue"); +const foldingRange_1 = require("./foldingRange"); +// import { InlineCompletionFeatureShape, InlineCompletionFeature } from './inlineCompletion.proposed'; +const inlayHint_1 = require("./inlayHint"); +const diagnostic_1 = require("./diagnostic"); +const notebook_1 = require("./notebook"); +const moniker_1 = require("./moniker"); +function null2Undefined(value) { + if (value === null) { + return undefined; + } + return value; +} +/** + * Helps tracking error message. Equal occurrences of the same + * message are only stored once. This class is for example + * useful if text documents are validated in a loop and equal + * error message should be folded into one. + */ +class ErrorMessageTracker { + constructor() { + this._messages = Object.create(null); + } + /** + * Add a message to the tracker. + * + * @param message The message to add. + */ + add(message) { + let count = this._messages[message]; + if (!count) { + count = 0; + } + count++; + this._messages[message] = count; + } + /** + * Send all tracked messages to the connection's window. + * + * @param connection The connection established between client and server. + */ + sendErrors(connection) { + Object.keys(this._messages).forEach(message => { + connection.window.showErrorMessage(message); + }); + } +} +exports.ErrorMessageTracker = ErrorMessageTracker; +class RemoteConsoleImpl { + constructor() { + } + rawAttach(connection) { + this._rawConnection = connection; + } + attach(connection) { + this._connection = connection; + } + get connection() { + if (!this._connection) { + throw new Error('Remote is not attached to a connection yet.'); + } + return this._connection; + } + fillServerCapabilities(_capabilities) { + } + initialize(_capabilities) { + } + error(message) { + this.send(vscode_languageserver_protocol_1.MessageType.Error, message); + } + warn(message) { + this.send(vscode_languageserver_protocol_1.MessageType.Warning, message); + } + info(message) { + this.send(vscode_languageserver_protocol_1.MessageType.Info, message); + } + log(message) { + this.send(vscode_languageserver_protocol_1.MessageType.Log, message); + } + debug(message) { + this.send(vscode_languageserver_protocol_1.MessageType.Debug, message); + } + send(type, message) { + if (this._rawConnection) { + this._rawConnection.sendNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, { type, message }).catch(() => { + (0, vscode_languageserver_protocol_1.RAL)().console.error(`Sending log message failed`); + }); + } + } +} +class _RemoteWindowImpl { + constructor() { + } + attach(connection) { + this._connection = connection; + } + get connection() { + if (!this._connection) { + throw new Error('Remote is not attached to a connection yet.'); + } + return this._connection; + } + initialize(_capabilities) { + } + fillServerCapabilities(_capabilities) { + } + showErrorMessage(message, ...actions) { + const params = { type: vscode_languageserver_protocol_1.MessageType.Error, message, actions }; + return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined); + } + showWarningMessage(message, ...actions) { + const params = { type: vscode_languageserver_protocol_1.MessageType.Warning, message, actions }; + return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined); + } + showInformationMessage(message, ...actions) { + const params = { type: vscode_languageserver_protocol_1.MessageType.Info, message, actions }; + return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined); + } +} +const RemoteWindowImpl = (0, showDocument_1.ShowDocumentFeature)((0, progress_1.ProgressFeature)(_RemoteWindowImpl)); +var BulkRegistration; +(function (BulkRegistration) { + /** + * Creates a new bulk registration. + * @return an empty bulk registration. + */ + function create() { + return new BulkRegistrationImpl(); + } + BulkRegistration.create = create; +})(BulkRegistration || (exports.BulkRegistration = BulkRegistration = {})); +class BulkRegistrationImpl { + constructor() { + this._registrations = []; + this._registered = new Set(); + } + add(type, registerOptions) { + const method = Is.string(type) ? type : type.method; + if (this._registered.has(method)) { + throw new Error(`${method} is already added to this registration`); + } + const id = UUID.generateUuid(); + this._registrations.push({ + id: id, + method: method, + registerOptions: registerOptions || {} + }); + this._registered.add(method); + } + asRegistrationParams() { + return { + registrations: this._registrations + }; + } +} +var BulkUnregistration; +(function (BulkUnregistration) { + function create() { + return new BulkUnregistrationImpl(undefined, []); + } + BulkUnregistration.create = create; +})(BulkUnregistration || (exports.BulkUnregistration = BulkUnregistration = {})); +class BulkUnregistrationImpl { + constructor(_connection, unregistrations) { + this._connection = _connection; + this._unregistrations = new Map(); + unregistrations.forEach(unregistration => { + this._unregistrations.set(unregistration.method, unregistration); + }); + } + get isAttached() { + return !!this._connection; + } + attach(connection) { + this._connection = connection; + } + add(unregistration) { + this._unregistrations.set(unregistration.method, unregistration); + } + dispose() { + const unregistrations = []; + for (const unregistration of this._unregistrations.values()) { + unregistrations.push(unregistration); + } + const params = { + unregisterations: unregistrations + }; + this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).catch(() => { + this._connection.console.info(`Bulk unregistration failed.`); + }); + } + disposeSingle(arg) { + const method = Is.string(arg) ? arg : arg.method; + const unregistration = this._unregistrations.get(method); + if (!unregistration) { + return false; + } + const params = { + unregisterations: [unregistration] + }; + this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(() => { + this._unregistrations.delete(method); + }, (_error) => { + this._connection.console.info(`Un-registering request handler for ${unregistration.id} failed.`); + }); + return true; + } +} +class RemoteClientImpl { + attach(connection) { + this._connection = connection; + } + get connection() { + if (!this._connection) { + throw new Error('Remote is not attached to a connection yet.'); + } + return this._connection; + } + initialize(_capabilities) { + } + fillServerCapabilities(_capabilities) { + } + register(typeOrRegistrations, registerOptionsOrType, registerOptions) { + if (typeOrRegistrations instanceof BulkRegistrationImpl) { + return this.registerMany(typeOrRegistrations); + } + else if (typeOrRegistrations instanceof BulkUnregistrationImpl) { + return this.registerSingle1(typeOrRegistrations, registerOptionsOrType, registerOptions); + } + else { + return this.registerSingle2(typeOrRegistrations, registerOptionsOrType); + } + } + registerSingle1(unregistration, type, registerOptions) { + const method = Is.string(type) ? type : type.method; + const id = UUID.generateUuid(); + const params = { + registrations: [{ id, method, registerOptions: registerOptions || {} }] + }; + if (!unregistration.isAttached) { + unregistration.attach(this.connection); + } + return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => { + unregistration.add({ id: id, method: method }); + return unregistration; + }, (_error) => { + this.connection.console.info(`Registering request handler for ${method} failed.`); + return Promise.reject(_error); + }); + } + registerSingle2(type, registerOptions) { + const method = Is.string(type) ? type : type.method; + const id = UUID.generateUuid(); + const params = { + registrations: [{ id, method, registerOptions: registerOptions || {} }] + }; + return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => { + return vscode_languageserver_protocol_1.Disposable.create(() => { + this.unregisterSingle(id, method).catch(() => { this.connection.console.info(`Un-registering capability with id ${id} failed.`); }); + }); + }, (_error) => { + this.connection.console.info(`Registering request handler for ${method} failed.`); + return Promise.reject(_error); + }); + } + unregisterSingle(id, method) { + const params = { + unregisterations: [{ id, method }] + }; + return this.connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).catch(() => { + this.connection.console.info(`Un-registering request handler for ${id} failed.`); + }); + } + registerMany(registrations) { + const params = registrations.asRegistrationParams(); + return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then(() => { + return new BulkUnregistrationImpl(this._connection, params.registrations.map(registration => { return { id: registration.id, method: registration.method }; })); + }, (_error) => { + this.connection.console.info(`Bulk registration failed.`); + return Promise.reject(_error); + }); + } +} +class _RemoteWorkspaceImpl { + constructor() { + } + attach(connection) { + this._connection = connection; + } + get connection() { + if (!this._connection) { + throw new Error('Remote is not attached to a connection yet.'); + } + return this._connection; + } + initialize(_capabilities) { + } + fillServerCapabilities(_capabilities) { + } + applyEdit(paramOrEdit) { + function isApplyWorkspaceEditParams(value) { + return value && !!value.edit; + } + const params = isApplyWorkspaceEditParams(paramOrEdit) ? paramOrEdit : { edit: paramOrEdit }; + return this.connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params); + } +} +const RemoteWorkspaceImpl = (0, fileOperations_1.FileOperationsFeature)((0, workspaceFolder_1.WorkspaceFoldersFeature)((0, configuration_1.ConfigurationFeature)(_RemoteWorkspaceImpl))); +class TracerImpl { + constructor() { + this._trace = vscode_languageserver_protocol_1.Trace.Off; + } + attach(connection) { + this._connection = connection; + } + get connection() { + if (!this._connection) { + throw new Error('Remote is not attached to a connection yet.'); + } + return this._connection; + } + initialize(_capabilities) { + } + fillServerCapabilities(_capabilities) { + } + set trace(value) { + this._trace = value; + } + log(message, verbose) { + if (this._trace === vscode_languageserver_protocol_1.Trace.Off) { + return; + } + this.connection.sendNotification(vscode_languageserver_protocol_1.LogTraceNotification.type, { + message: message, + verbose: this._trace === vscode_languageserver_protocol_1.Trace.Verbose ? verbose : undefined + }).catch(() => { + // Very hard to decide what to do. We tried to send a log + // message which failed so we can't simply send another :-(. + }); + } +} +class TelemetryImpl { + constructor() { + } + attach(connection) { + this._connection = connection; + } + get connection() { + if (!this._connection) { + throw new Error('Remote is not attached to a connection yet.'); + } + return this._connection; + } + initialize(_capabilities) { + } + fillServerCapabilities(_capabilities) { + } + logEvent(data) { + this.connection.sendNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, data).catch(() => { + this.connection.console.log(`Sending TelemetryEventNotification failed`); + }); + } +} +class _LanguagesImpl { + constructor() { + } + attach(connection) { + this._connection = connection; + } + get connection() { + if (!this._connection) { + throw new Error('Remote is not attached to a connection yet.'); + } + return this._connection; + } + initialize(_capabilities) { + } + fillServerCapabilities(_capabilities) { + } + attachWorkDoneProgress(params) { + return (0, progress_1.attachWorkDone)(this.connection, params); + } + attachPartialResultProgress(_type, params) { + return (0, progress_1.attachPartialResult)(this.connection, params); + } +} +exports._LanguagesImpl = _LanguagesImpl; +const LanguagesImpl = (0, foldingRange_1.FoldingRangeFeature)((0, moniker_1.MonikerFeature)((0, diagnostic_1.DiagnosticFeature)((0, inlayHint_1.InlayHintFeature)((0, inlineValue_1.InlineValueFeature)((0, typeHierarchy_1.TypeHierarchyFeature)((0, linkedEditingRange_1.LinkedEditingRangeFeature)((0, semanticTokens_1.SemanticTokensFeature)((0, callHierarchy_1.CallHierarchyFeature)(_LanguagesImpl))))))))); +class _NotebooksImpl { + constructor() { + } + attach(connection) { + this._connection = connection; + } + get connection() { + if (!this._connection) { + throw new Error('Remote is not attached to a connection yet.'); + } + return this._connection; + } + initialize(_capabilities) { + } + fillServerCapabilities(_capabilities) { + } + attachWorkDoneProgress(params) { + return (0, progress_1.attachWorkDone)(this.connection, params); + } + attachPartialResultProgress(_type, params) { + return (0, progress_1.attachPartialResult)(this.connection, params); + } +} +exports._NotebooksImpl = _NotebooksImpl; +const NotebooksImpl = (0, notebook_1.NotebookSyncFeature)(_NotebooksImpl); +function combineConsoleFeatures(one, two) { + return function (Base) { + return two(one(Base)); + }; +} +exports.combineConsoleFeatures = combineConsoleFeatures; +function combineTelemetryFeatures(one, two) { + return function (Base) { + return two(one(Base)); + }; +} +exports.combineTelemetryFeatures = combineTelemetryFeatures; +function combineTracerFeatures(one, two) { + return function (Base) { + return two(one(Base)); + }; +} +exports.combineTracerFeatures = combineTracerFeatures; +function combineClientFeatures(one, two) { + return function (Base) { + return two(one(Base)); + }; +} +exports.combineClientFeatures = combineClientFeatures; +function combineWindowFeatures(one, two) { + return function (Base) { + return two(one(Base)); + }; +} +exports.combineWindowFeatures = combineWindowFeatures; +function combineWorkspaceFeatures(one, two) { + return function (Base) { + return two(one(Base)); + }; +} +exports.combineWorkspaceFeatures = combineWorkspaceFeatures; +function combineLanguagesFeatures(one, two) { + return function (Base) { + return two(one(Base)); + }; +} +exports.combineLanguagesFeatures = combineLanguagesFeatures; +function combineNotebooksFeatures(one, two) { + return function (Base) { + return two(one(Base)); + }; +} +exports.combineNotebooksFeatures = combineNotebooksFeatures; +function combineFeatures(one, two) { + function combine(one, two, func) { + if (one && two) { + return func(one, two); + } + else if (one) { + return one; + } + else { + return two; + } + } + const result = { + __brand: 'features', + console: combine(one.console, two.console, combineConsoleFeatures), + tracer: combine(one.tracer, two.tracer, combineTracerFeatures), + telemetry: combine(one.telemetry, two.telemetry, combineTelemetryFeatures), + client: combine(one.client, two.client, combineClientFeatures), + window: combine(one.window, two.window, combineWindowFeatures), + workspace: combine(one.workspace, two.workspace, combineWorkspaceFeatures), + languages: combine(one.languages, two.languages, combineLanguagesFeatures), + notebooks: combine(one.notebooks, two.notebooks, combineNotebooksFeatures) + }; + return result; +} +exports.combineFeatures = combineFeatures; +function createConnection(connectionFactory, watchDog, factories) { + const logger = (factories && factories.console ? new (factories.console(RemoteConsoleImpl))() : new RemoteConsoleImpl()); + const connection = connectionFactory(logger); + logger.rawAttach(connection); + const tracer = (factories && factories.tracer ? new (factories.tracer(TracerImpl))() : new TracerImpl()); + const telemetry = (factories && factories.telemetry ? new (factories.telemetry(TelemetryImpl))() : new TelemetryImpl()); + const client = (factories && factories.client ? new (factories.client(RemoteClientImpl))() : new RemoteClientImpl()); + const remoteWindow = (factories && factories.window ? new (factories.window(RemoteWindowImpl))() : new RemoteWindowImpl()); + const workspace = (factories && factories.workspace ? new (factories.workspace(RemoteWorkspaceImpl))() : new RemoteWorkspaceImpl()); + const languages = (factories && factories.languages ? new (factories.languages(LanguagesImpl))() : new LanguagesImpl()); + const notebooks = (factories && factories.notebooks ? new (factories.notebooks(NotebooksImpl))() : new NotebooksImpl()); + const allRemotes = [logger, tracer, telemetry, client, remoteWindow, workspace, languages, notebooks]; + function asPromise(value) { + if (value instanceof Promise) { + return value; + } + else if (Is.thenable(value)) { + return new Promise((resolve, reject) => { + value.then((resolved) => resolve(resolved), (error) => reject(error)); + }); + } + else { + return Promise.resolve(value); + } + } + let shutdownHandler = undefined; + let initializeHandler = undefined; + let exitHandler = undefined; + const protocolConnection = { + listen: () => connection.listen(), + sendRequest: (type, ...params) => connection.sendRequest(Is.string(type) ? type : type.method, ...params), + onRequest: (type, handler) => connection.onRequest(type, handler), + sendNotification: (type, param) => { + const method = Is.string(type) ? type : type.method; + return connection.sendNotification(method, param); + }, + onNotification: (type, handler) => connection.onNotification(type, handler), + onProgress: connection.onProgress, + sendProgress: connection.sendProgress, + onInitialize: (handler) => { + initializeHandler = handler; + return { + dispose: () => { + initializeHandler = undefined; + } + }; + }, + onInitialized: (handler) => connection.onNotification(vscode_languageserver_protocol_1.InitializedNotification.type, handler), + onShutdown: (handler) => { + shutdownHandler = handler; + return { + dispose: () => { + shutdownHandler = undefined; + } + }; + }, + onExit: (handler) => { + exitHandler = handler; + return { + dispose: () => { + exitHandler = undefined; + } + }; + }, + get console() { return logger; }, + get telemetry() { return telemetry; }, + get tracer() { return tracer; }, + get client() { return client; }, + get window() { return remoteWindow; }, + get workspace() { return workspace; }, + get languages() { return languages; }, + get notebooks() { return notebooks; }, + onDidChangeConfiguration: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, handler), + onDidChangeWatchedFiles: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, handler), + __textDocumentSync: undefined, + onDidOpenTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, handler), + onDidChangeTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, handler), + onDidCloseTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, handler), + onWillSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, handler), + onWillSaveTextDocumentWaitUntil: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, handler), + onDidSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, handler), + sendDiagnostics: (params) => connection.sendNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, params), + onHover: (handler) => connection.onRequest(vscode_languageserver_protocol_1.HoverRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined); + }), + onCompletion: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); + }), + onCompletionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, handler), + onSignatureHelp: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined); + }), + onDeclaration: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); + }), + onDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); + }), + onTypeDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); + }), + onImplementation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); + }), + onReferences: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); + }), + onDocumentHighlight: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); + }), + onDocumentSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); + }), + onWorkspaceSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); + }), + onWorkspaceSymbolResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolResolveRequest.type, handler), + onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); + }), + onCodeActionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionResolveRequest.type, (params, cancel) => { + return handler(params, cancel); + }), + onCodeLens: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); + }), + onCodeLensResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, (params, cancel) => { + return handler(params, cancel); + }), + onDocumentFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined); + }), + onDocumentRangeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined); + }), + onDocumentOnTypeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, (params, cancel) => { + return handler(params, cancel); + }), + onRenameRequest: (handler) => connection.onRequest(vscode_languageserver_protocol_1.RenameRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined); + }), + onPrepareRename: (handler) => connection.onRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, (params, cancel) => { + return handler(params, cancel); + }), + onDocumentLinks: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); + }), + onDocumentLinkResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, (params, cancel) => { + return handler(params, cancel); + }), + onDocumentColor: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); + }), + onColorPresentation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); + }), + onFoldingRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); + }), + onSelectionRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SelectionRangeRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); + }), + onExecuteCommand: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, (params, cancel) => { + return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined); + }), + dispose: () => connection.dispose() + }; + for (const remote of allRemotes) { + remote.attach(protocolConnection); + } + connection.onRequest(vscode_languageserver_protocol_1.InitializeRequest.type, (params) => { + watchDog.initialize(params); + if (Is.string(params.trace)) { + tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.trace); + } + for (const remote of allRemotes) { + remote.initialize(params.capabilities); + } + if (initializeHandler) { + const result = initializeHandler(params, new vscode_languageserver_protocol_1.CancellationTokenSource().token, (0, progress_1.attachWorkDone)(connection, params), undefined); + return asPromise(result).then((value) => { + if (value instanceof vscode_languageserver_protocol_1.ResponseError) { + return value; + } + let result = value; + if (!result) { + result = { capabilities: {} }; + } + let capabilities = result.capabilities; + if (!capabilities) { + capabilities = {}; + result.capabilities = capabilities; + } + if (capabilities.textDocumentSync === undefined || capabilities.textDocumentSync === null) { + capabilities.textDocumentSync = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None; + } + else if (!Is.number(capabilities.textDocumentSync) && !Is.number(capabilities.textDocumentSync.change)) { + capabilities.textDocumentSync.change = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None; + } + for (const remote of allRemotes) { + remote.fillServerCapabilities(capabilities); + } + return result; + }); + } + else { + const result = { capabilities: { textDocumentSync: vscode_languageserver_protocol_1.TextDocumentSyncKind.None } }; + for (const remote of allRemotes) { + remote.fillServerCapabilities(result.capabilities); + } + return result; + } + }); + connection.onRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, () => { + watchDog.shutdownReceived = true; + if (shutdownHandler) { + return shutdownHandler(new vscode_languageserver_protocol_1.CancellationTokenSource().token); + } + else { + return undefined; + } + }); + connection.onNotification(vscode_languageserver_protocol_1.ExitNotification.type, () => { + try { + if (exitHandler) { + return exitHandler(); + } + } + finally { + if (watchDog.shutdownReceived) { + watchDog.exit(0); + } + else { + watchDog.exit(1); + } + } + }); + connection.onNotification(vscode_languageserver_protocol_1.SetTraceNotification.type, (params) => { + tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.value); + }); + return protocolConnection; +} +exports.createConnection = createConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/showDocument.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/showDocument.d.ts" index 6fb6dfa1dc61bdc10cd0092cbd7a63a913c08247..dd4174b845512bf4ed53a99c4af911130a8f902b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/showDocument.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/showDocument.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:351bbf43d585484825ee6c4b4805aac137ffc8e8a3b9812af99945a202db7c02 -size 358 +import { ShowDocumentParams, ShowDocumentResult } from 'vscode-languageserver-protocol'; +import type { Feature, _RemoteWindow } from './server'; +export interface ShowDocumentFeatureShape { + showDocument(params: ShowDocumentParams): Promise; +} +export declare const ShowDocumentFeature: Feature<_RemoteWindow, ShowDocumentFeatureShape>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/showDocument.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/showDocument.js" index 177f1fcf1ae793133e0015dd0a9e05ed20280923..eb81ed477877d91a47a711e7e0dc5e00bfaa9ffc 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/showDocument.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/showDocument.js" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d580228a9b94b273940638f59c6cdbd28c2a8ec29d282b57abd3427d850c627e -size 838 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ShowDocumentFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const ShowDocumentFeature = (Base) => { + return class extends Base { + showDocument(params) { + return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowDocumentRequest.type, params); + } + }; +}; +exports.ShowDocumentFeature = ShowDocumentFeature; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/textDocuments.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/textDocuments.d.ts" index cf219ba64b06f09bf745a74d913076e0d318e53f..efefd84aabaac4b03cb58e7dbb32be755608f6d1 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/textDocuments.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/textDocuments.d.ts" @@ -1,3 +1,133 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5cd572356d74adaf9661e407f7f73e9d9edfb53534ef75dfb13225d0d80f59a2 -size 5130 +import { NotificationHandler, DidOpenTextDocumentParams, DidChangeTextDocumentParams, DidCloseTextDocumentParams, WillSaveTextDocumentParams, RequestHandler, TextEdit, DidSaveTextDocumentParams, DocumentUri, TextDocumentContentChangeEvent, TextDocumentSaveReason, Event, TextDocumentSyncKind, Disposable, LanguageKind } from 'vscode-languageserver-protocol'; +/** + * We should use a mapped type to create this from Connection. + */ +export interface TextDocumentConnection { + onDidOpenTextDocument(handler: NotificationHandler): Disposable; + onDidChangeTextDocument(handler: NotificationHandler): Disposable; + onDidCloseTextDocument(handler: NotificationHandler): Disposable; + onWillSaveTextDocument(handler: NotificationHandler): Disposable; + onWillSaveTextDocumentWaitUntil(handler: RequestHandler): Disposable; + onDidSaveTextDocument(handler: NotificationHandler): Disposable; +} +export interface ConnectionState { + __textDocumentSync: TextDocumentSyncKind | undefined; +} +export interface TextDocumentsConfiguration { + create(uri: DocumentUri, languageId: LanguageKind, version: number, content: string): T; + update(document: T, changes: TextDocumentContentChangeEvent[], version: number): T; +} +/** + * Event to signal changes to a text document. + */ +export interface TextDocumentChangeEvent { + /** + * The document that has changed. + */ + document: T; +} +/** + * Event to signal that a document will be saved. + */ +export interface TextDocumentWillSaveEvent { + /** + * The document that will be saved + */ + document: T; + /** + * The reason why save was triggered. + */ + reason: TextDocumentSaveReason; +} +/** + * A manager for simple text documents. The manager requires at a minimum that + * the server registered for the following text document sync events in the + * initialize handler or via dynamic registration: + * + * - open and close events. + * - change events. + * + * Registering for save and will save events is optional. + */ +export declare class TextDocuments { + private readonly _configuration; + private readonly _syncedDocuments; + private readonly _onDidChangeContent; + private readonly _onDidOpen; + private readonly _onDidClose; + private readonly _onDidSave; + private readonly _onWillSave; + private _willSaveWaitUntil; + /** + * Create a new text document manager. + */ + constructor(configuration: TextDocumentsConfiguration); + /** + * An event that fires when a text document managed by this manager + * has been opened. + */ + get onDidOpen(): Event>; + /** + * An event that fires when a text document managed by this manager + * has been opened or the content changes. + */ + get onDidChangeContent(): Event>; + /** + * An event that fires when a text document managed by this manager + * will be saved. + */ + get onWillSave(): Event>; + /** + * Sets a handler that will be called if a participant wants to provide + * edits during a text document save. + */ + onWillSaveWaitUntil(handler: RequestHandler, TextEdit[], void>): void; + /** + * An event that fires when a text document managed by this manager + * has been saved. + */ + get onDidSave(): Event>; + /** + * An event that fires when a text document managed by this manager + * has been closed. + */ + get onDidClose(): Event>; + /** + * Returns the document for the given URI. Returns undefined if + * the document is not managed by this instance. + * + * @param uri The text document's URI to retrieve. + * @return the text document or `undefined`. + */ + get(uri: string): T | undefined; + /** + * Returns all text documents managed by this instance. + * + * @return all text documents. + */ + all(): T[]; + /** + * Returns the URIs of all text documents managed by this instance. + * + * @return the URI's of all text documents. + */ + keys(): string[]; + /** + * Listens for `low level` notification on the given connection to + * update the text documents managed by this instance. + * + * Please note that the connection only provides handlers not an event model. Therefore + * listening on a connection will overwrite the following handlers on a connection: + * `onDidOpenTextDocument`, `onDidChangeTextDocument`, `onDidCloseTextDocument`, + * `onWillSaveTextDocument`, `onWillSaveTextDocumentWaitUntil` and `onDidSaveTextDocument`. + * + * Use the corresponding events on the TextDocuments instance instead. + * + * @param connection The connection to listen on. + */ + listen(connection: TextDocumentConnection): Disposable; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/textDocuments.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/textDocuments.js" index 129ff0a2f802ad2c9cf3465c4ecf6698c43c3a1c..d8719809365ae28672f31e766028ddddc3db1c54 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/textDocuments.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/textDocuments.js" @@ -1,3 +1,172 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0c4dfda8ad343b9ab293fe549c893552f28cbe5911d1ed64f9f09cee537c6d62 -size 7140 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TextDocuments = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +/** + * A manager for simple text documents. The manager requires at a minimum that + * the server registered for the following text document sync events in the + * initialize handler or via dynamic registration: + * + * - open and close events. + * - change events. + * + * Registering for save and will save events is optional. + */ +class TextDocuments { + /** + * Create a new text document manager. + */ + constructor(configuration) { + this._configuration = configuration; + this._syncedDocuments = new Map(); + this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter(); + this._onDidOpen = new vscode_languageserver_protocol_1.Emitter(); + this._onDidClose = new vscode_languageserver_protocol_1.Emitter(); + this._onDidSave = new vscode_languageserver_protocol_1.Emitter(); + this._onWillSave = new vscode_languageserver_protocol_1.Emitter(); + } + /** + * An event that fires when a text document managed by this manager + * has been opened. + */ + get onDidOpen() { + return this._onDidOpen.event; + } + /** + * An event that fires when a text document managed by this manager + * has been opened or the content changes. + */ + get onDidChangeContent() { + return this._onDidChangeContent.event; + } + /** + * An event that fires when a text document managed by this manager + * will be saved. + */ + get onWillSave() { + return this._onWillSave.event; + } + /** + * Sets a handler that will be called if a participant wants to provide + * edits during a text document save. + */ + onWillSaveWaitUntil(handler) { + this._willSaveWaitUntil = handler; + } + /** + * An event that fires when a text document managed by this manager + * has been saved. + */ + get onDidSave() { + return this._onDidSave.event; + } + /** + * An event that fires when a text document managed by this manager + * has been closed. + */ + get onDidClose() { + return this._onDidClose.event; + } + /** + * Returns the document for the given URI. Returns undefined if + * the document is not managed by this instance. + * + * @param uri The text document's URI to retrieve. + * @return the text document or `undefined`. + */ + get(uri) { + return this._syncedDocuments.get(uri); + } + /** + * Returns all text documents managed by this instance. + * + * @return all text documents. + */ + all() { + return Array.from(this._syncedDocuments.values()); + } + /** + * Returns the URIs of all text documents managed by this instance. + * + * @return the URI's of all text documents. + */ + keys() { + return Array.from(this._syncedDocuments.keys()); + } + /** + * Listens for `low level` notification on the given connection to + * update the text documents managed by this instance. + * + * Please note that the connection only provides handlers not an event model. Therefore + * listening on a connection will overwrite the following handlers on a connection: + * `onDidOpenTextDocument`, `onDidChangeTextDocument`, `onDidCloseTextDocument`, + * `onWillSaveTextDocument`, `onWillSaveTextDocumentWaitUntil` and `onDidSaveTextDocument`. + * + * Use the corresponding events on the TextDocuments instance instead. + * + * @param connection The connection to listen on. + */ + listen(connection) { + connection.__textDocumentSync = vscode_languageserver_protocol_1.TextDocumentSyncKind.Incremental; + const disposables = []; + disposables.push(connection.onDidOpenTextDocument((event) => { + const td = event.textDocument; + const document = this._configuration.create(td.uri, td.languageId, td.version, td.text); + this._syncedDocuments.set(td.uri, document); + const toFire = Object.freeze({ document }); + this._onDidOpen.fire(toFire); + this._onDidChangeContent.fire(toFire); + })); + disposables.push(connection.onDidChangeTextDocument((event) => { + const td = event.textDocument; + const changes = event.contentChanges; + if (changes.length === 0) { + return; + } + const { version } = td; + if (version === null || version === undefined) { + throw new Error(`Received document change event for ${td.uri} without valid version identifier`); + } + let syncedDocument = this._syncedDocuments.get(td.uri); + if (syncedDocument !== undefined) { + syncedDocument = this._configuration.update(syncedDocument, changes, version); + this._syncedDocuments.set(td.uri, syncedDocument); + this._onDidChangeContent.fire(Object.freeze({ document: syncedDocument })); + } + })); + disposables.push(connection.onDidCloseTextDocument((event) => { + const syncedDocument = this._syncedDocuments.get(event.textDocument.uri); + if (syncedDocument !== undefined) { + this._syncedDocuments.delete(event.textDocument.uri); + this._onDidClose.fire(Object.freeze({ document: syncedDocument })); + } + })); + disposables.push(connection.onWillSaveTextDocument((event) => { + const syncedDocument = this._syncedDocuments.get(event.textDocument.uri); + if (syncedDocument !== undefined) { + this._onWillSave.fire(Object.freeze({ document: syncedDocument, reason: event.reason })); + } + })); + disposables.push(connection.onWillSaveTextDocumentWaitUntil((event, token) => { + const syncedDocument = this._syncedDocuments.get(event.textDocument.uri); + if (syncedDocument !== undefined && this._willSaveWaitUntil) { + return this._willSaveWaitUntil(Object.freeze({ document: syncedDocument, reason: event.reason }), token); + } + else { + return []; + } + })); + disposables.push(connection.onDidSaveTextDocument((event) => { + const syncedDocument = this._syncedDocuments.get(event.textDocument.uri); + if (syncedDocument !== undefined) { + this._onDidSave.fire(Object.freeze({ document: syncedDocument })); + } + })); + return vscode_languageserver_protocol_1.Disposable.create(() => { disposables.forEach(disposable => disposable.dispose()); }); + } +} +exports.TextDocuments = TextDocuments; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/typeHierarchy.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/typeHierarchy.d.ts" index 44cd75464ad4489cd88f61b5b3fbe3c70419ca2b..ee80815a9d3a55ef74938a89f9eb6eb12a2411b2 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/typeHierarchy.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/typeHierarchy.d.ts" @@ -1,3 +1,15 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f384bb303dbc114af6460e7cb30b766cc92eed33fccb331126b08bb63f15a034 -size 905 +import { TypeHierarchyItem, Disposable, TypeHierarchyPrepareParams, TypeHierarchySupertypesParams, TypeHierarchySubtypesParams } from 'vscode-languageserver-protocol'; +import type { Feature, _Languages, ServerRequestHandler } from './server'; +/** + * Shape of the type hierarchy feature + * + * @since 3.17.0 + */ +export interface TypeHierarchyFeatureShape { + typeHierarchy: { + onPrepare(handler: ServerRequestHandler): Disposable; + onSupertypes(handler: ServerRequestHandler): Disposable; + onSubtypes(handler: ServerRequestHandler): Disposable; + }; +} +export declare const TypeHierarchyFeature: Feature<_Languages, TypeHierarchyFeatureShape>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/typeHierarchy.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/typeHierarchy.js" index f0a7452a5ec16c6bea62d7d288c3e7f3b0c22fbb..4a0920ef6c1839700e24410c4dd4ffa488650e48 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/typeHierarchy.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/typeHierarchy.js" @@ -1,3 +1,34 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e59c632ea23ba065653f04398c1c22401aa8c2c63462de2c3ee61b75ab5af5e0 -size 1914 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypeHierarchyFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const TypeHierarchyFeature = (Base) => { + return class extends Base { + get typeHierarchy() { + return { + onPrepare: (handler) => { + return this.connection.onRequest(vscode_languageserver_protocol_1.TypeHierarchyPrepareRequest.type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), undefined); + }); + }, + onSupertypes: (handler) => { + const type = vscode_languageserver_protocol_1.TypeHierarchySupertypesRequest.type; + return this.connection.onRequest(type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params)); + }); + }, + onSubtypes: (handler) => { + const type = vscode_languageserver_protocol_1.TypeHierarchySubtypesRequest.type; + return this.connection.onRequest(type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params)); + }); + } + }; + } + }; +}; +exports.TypeHierarchyFeature = TypeHierarchyFeature; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/utils/is.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/utils/is.d.ts" index df97e0de094f9bd62072a18545c8cd2d20e340aa..8c3812f9e3d06419b433160dd614b3d848304347 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/utils/is.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/utils/is.d.ts" @@ -1,3 +1,9 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:98b8e50ce364a3d2f1049c2cc5e585f121442e1888062173b6b6f6d6b4c0bb2e -size 601 +export declare function boolean(value: any): value is boolean; +export declare function string(value: any): value is string; +export declare function number(value: any): value is number; +export declare function error(value: any): value is Error; +export declare function func(value: any): value is Function; +export declare function array(value: any): value is T[]; +export declare function stringArray(value: any): value is string[]; +export declare function typedArray(value: any, check: (value: any) => boolean): value is T[]; +export declare function thenable(value: any): value is Thenable; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/utils/is.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/utils/is.js" index 278b43b04ae3afa88aedc100f613c2a5021feefe..9f60ba0c46f90fb2da1c7694abbf34fc482a5b72 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/utils/is.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/utils/is.js" @@ -1,3 +1,43 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b5c4b926fc226f2bbd290cee27c577d0a303315ccdb7b8f7a5891b30fe64c6cc -size 1534 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.thenable = exports.typedArray = exports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0; +function boolean(value) { + return value === true || value === false; +} +exports.boolean = boolean; +function string(value) { + return typeof value === 'string' || value instanceof String; +} +exports.string = string; +function number(value) { + return typeof value === 'number' || value instanceof Number; +} +exports.number = number; +function error(value) { + return value instanceof Error; +} +exports.error = error; +function func(value) { + return typeof value === 'function'; +} +exports.func = func; +function array(value) { + return Array.isArray(value); +} +exports.array = array; +function stringArray(value) { + return array(value) && value.every(elem => string(elem)); +} +exports.stringArray = stringArray; +function typedArray(value, check) { + return Array.isArray(value) && value.every(check); +} +exports.typedArray = typedArray; +function thenable(value) { + return value && func(value.then); +} +exports.thenable = thenable; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/utils/uuid.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/utils/uuid.d.ts" index eaa01ef92a02289134b11acd7ebf22f623612042..bebf78337ba0c812f749b5dd757bfe44a98c8143 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/utils/uuid.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/utils/uuid.d.ts" @@ -1,3 +1,22 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e02ab9eaa8f6d1a9f2fa819ba98efa5c4f7ff83cb7c1ac235583d4d765056721 -size 639 +/** + * Represents a UUID as defined by rfc4122. + */ +export interface UUID { + /** + * @returns the canonical representation in sets of hexadecimal numbers separated by dashes. + */ + asHex(): string; + equals(other: UUID): boolean; +} +/** + * An empty UUID that contains only zeros. + */ +export declare const empty: UUID; +export declare function v4(): UUID; +export declare function isUUID(value: string): boolean; +/** + * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. + * @param value A uuid string. + */ +export declare function parse(value: string): UUID; +export declare function generateUuid(): string; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/utils/uuid.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/utils/uuid.js" index 4cfdce4a7d5e8b7e7c3d7a0b07e153283e861111..d68b326ed4f70df649cada1e7b90240e3a9dacec 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/utils/uuid.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/utils/uuid.js" @@ -1,3 +1,97 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d50507c8134297a003eb390a6de884c8b557738110f0dcf04ad95393b79efd4 -size 3006 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.generateUuid = exports.parse = exports.isUUID = exports.v4 = exports.empty = void 0; +class ValueUUID { + constructor(_value) { + this._value = _value; + // empty + } + asHex() { + return this._value; + } + equals(other) { + return this.asHex() === other.asHex(); + } +} +class V4UUID extends ValueUUID { + static _oneOf(array) { + return array[Math.floor(array.length * Math.random())]; + } + static _randomHex() { + return V4UUID._oneOf(V4UUID._chars); + } + constructor() { + super([ + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + '-', + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + '-', + '4', + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + '-', + V4UUID._oneOf(V4UUID._timeHighBits), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + '-', + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + ].join('')); + } +} +V4UUID._chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f']; +V4UUID._timeHighBits = ['8', '9', 'a', 'b']; +/** + * An empty UUID that contains only zeros. + */ +exports.empty = new ValueUUID('00000000-0000-0000-0000-000000000000'); +function v4() { + return new V4UUID(); +} +exports.v4 = v4; +const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; +function isUUID(value) { + return _UUIDPattern.test(value); +} +exports.isUUID = isUUID; +/** + * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. + * @param value A uuid string. + */ +function parse(value) { + if (!isUUID(value)) { + throw new Error('invalid uuid'); + } + return new ValueUUID(value); +} +exports.parse = parse; +function generateUuid() { + return v4().asHex(); +} +exports.generateUuid = generateUuid; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/workspaceFolder.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/workspaceFolder.d.ts" index 543bc24eb4d569ee7c5ce5cd61e9ffc29cc7427f..e1d5ddbd2ba2526fe03d30b319f1f85ea2bdd6ce 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/workspaceFolder.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/workspaceFolder.d.ts" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1fb68106bddae35448e5279095461a4b54c4bbb42787cd629f70924b17e9a11e -size 421 +import { Event, WorkspaceFolder, WorkspaceFoldersChangeEvent } from 'vscode-languageserver-protocol'; +import type { Feature, _RemoteWorkspace } from './server'; +export interface WorkspaceFolders { + getWorkspaceFolders(): Promise; + onDidChangeWorkspaceFolders: Event; +} +export declare const WorkspaceFoldersFeature: Feature<_RemoteWorkspace, WorkspaceFolders>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/workspaceFolder.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/workspaceFolder.js" index 6f3c43d14eda286dff507aa5d7fb5336687d2870..a28c021bfd6687b0211b91c6cea377b2c5b59581 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/workspaceFolder.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/common/workspaceFolder.js" @@ -1,3 +1,44 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9de2bd4e22662792aefacb328bbe03c0ba12bafbd8cfd201909edbfd081ffb9e -size 2409 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WorkspaceFoldersFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const WorkspaceFoldersFeature = (Base) => { + return class extends Base { + constructor() { + super(); + this._notificationIsAutoRegistered = false; + } + initialize(capabilities) { + super.initialize(capabilities); + const workspaceCapabilities = capabilities.workspace; + if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) { + this._onDidChangeWorkspaceFolders = new vscode_languageserver_protocol_1.Emitter(); + this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type, (params) => { + this._onDidChangeWorkspaceFolders.fire(params.event); + }); + } + } + fillServerCapabilities(capabilities) { + super.fillServerCapabilities(capabilities); + const changeNotifications = capabilities.workspace?.workspaceFolders?.changeNotifications; + this._notificationIsAutoRegistered = changeNotifications === true || typeof changeNotifications === 'string'; + } + getWorkspaceFolders() { + return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkspaceFoldersRequest.type); + } + get onDidChangeWorkspaceFolders() { + if (!this._onDidChangeWorkspaceFolders) { + throw new Error('Client doesn\'t support sending workspace folder change events.'); + } + if (!this._notificationIsAutoRegistered && !this._unregistration) { + this._unregistration = this.connection.client.register(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type); + } + return this._onDidChangeWorkspaceFolders.event; + } + }; +}; +exports.WorkspaceFoldersFeature = WorkspaceFoldersFeature; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/files.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/files.d.ts" index 99dcc713fe1440dd3d77a02207cd8f6a708b77ec..4feae3c6ea0625900e47c40b1dc8f00053bb507d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/files.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/files.d.ts" @@ -1,3 +1,19 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a58402dc75738c188a741ccca86ccf898b0af98d305ad075c428171f193a6cd5 -size 1184 +/** + * @deprecated Use the `vscode-uri` npm module which provides a more + * complete implementation of handling VS Code URIs. + */ +export declare function uriToFilePath(uri: string): string | undefined; +export declare function resolve(moduleName: string, nodePath: string | undefined, cwd: string | undefined, tracer: (message: string, verbose?: string) => void): Promise; +/** + * Resolve the global npm package path. + * @deprecated Since this depends on the used package manager and their version the best is that servers + * implement this themselves since they know best what kind of package managers to support. + * @param tracer the tracer to use + */ +export declare function resolveGlobalNodePath(tracer?: (message: string) => void): string | undefined; +export declare function resolveGlobalYarnPath(tracer?: (message: string) => void): string | undefined; +export declare namespace FileSystem { + function isCaseSensitive(): boolean; + function isParent(parent: string, child: string): boolean; +} +export declare function resolveModulePath(workspaceRoot: string, moduleName: string, nodePath: string, tracer: (message: string, verbose?: string) => void): Promise; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/files.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/files.js" index adb3a8aee5b48e75bdbfab28f16b0b2ccadfeae2..9227ed0a632be25baa85445189ce918c4fc014f7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/files.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/files.js" @@ -1,3 +1,262 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b6bdc421ba39ef461beffcdaf1a69b85e9cec65566df99a26ed7895859b1fe2f -size 9129 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.resolveModulePath = exports.FileSystem = exports.resolveGlobalYarnPath = exports.resolveGlobalNodePath = exports.resolve = exports.uriToFilePath = void 0; +const url = require("url"); +const path = require("path"); +const fs = require("fs"); +const child_process_1 = require("child_process"); +/** + * @deprecated Use the `vscode-uri` npm module which provides a more + * complete implementation of handling VS Code URIs. + */ +function uriToFilePath(uri) { + const parsed = url.parse(uri); + if (parsed.protocol !== 'file:' || !parsed.path) { + return undefined; + } + const segments = parsed.path.split('/'); + for (let i = 0, len = segments.length; i < len; i++) { + segments[i] = decodeURIComponent(segments[i]); + } + if (process.platform === 'win32' && segments.length > 1) { + const first = segments[0]; + const second = segments[1]; + // Do we have a drive letter and we started with a / which is the + // case if the first segement is empty (see split above) + if (first.length === 0 && second.length > 1 && second[1] === ':') { + // Remove first slash + segments.shift(); + } + } + return path.normalize(segments.join('/')); +} +exports.uriToFilePath = uriToFilePath; +function isWindows() { + return process.platform === 'win32'; +} +function resolve(moduleName, nodePath, cwd, tracer) { + const nodePathKey = 'NODE_PATH'; + const app = [ + 'var p = process;', + 'p.on(\'message\',function(m){', + 'if(m.c===\'e\'){', + 'p.exit(0);', + '}', + 'else if(m.c===\'rs\'){', + 'try{', + 'var r=require.resolve(m.a);', + 'p.send({c:\'r\',s:true,r:r});', + '}', + 'catch(err){', + 'p.send({c:\'r\',s:false});', + '}', + '}', + '});' + ].join(''); + return new Promise((resolve, reject) => { + const env = process.env; + const newEnv = Object.create(null); + Object.keys(env).forEach(key => newEnv[key] = env[key]); + if (nodePath && fs.existsSync(nodePath) /* see issue 545 */) { + if (newEnv[nodePathKey]) { + newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey]; + } + else { + newEnv[nodePathKey] = nodePath; + } + if (tracer) { + tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`); + } + } + newEnv['ELECTRON_RUN_AS_NODE'] = '1'; + try { + const cp = (0, child_process_1.fork)('', [], { + cwd: cwd, + env: newEnv, + execArgv: ['-e', app] + }); + if (cp.pid === void 0) { + reject(new Error(`Starting process to resolve node module ${moduleName} failed`)); + return; + } + cp.on('error', (error) => { + reject(error); + }); + cp.on('message', (message) => { + if (message.c === 'r') { + cp.send({ c: 'e' }); + if (message.s) { + resolve(message.r); + } + else { + reject(new Error(`Failed to resolve module: ${moduleName}`)); + } + } + }); + const message = { + c: 'rs', + a: moduleName + }; + cp.send(message); + } + catch (error) { + reject(error); + } + }); +} +exports.resolve = resolve; +/** + * Resolve the global npm package path. + * @deprecated Since this depends on the used package manager and their version the best is that servers + * implement this themselves since they know best what kind of package managers to support. + * @param tracer the tracer to use + */ +function resolveGlobalNodePath(tracer) { + let npmCommand = 'npm'; + const env = Object.create(null); + Object.keys(process.env).forEach(key => env[key] = process.env[key]); + env['NO_UPDATE_NOTIFIER'] = 'true'; + const options = { + encoding: 'utf8', + env + }; + if (isWindows()) { + npmCommand = 'npm.cmd'; + options.shell = true; + } + const handler = () => { }; + try { + process.on('SIGPIPE', handler); + const stdout = (0, child_process_1.spawnSync)(npmCommand, ['config', 'get', 'prefix'], options).stdout; + if (!stdout) { + if (tracer) { + tracer(`'npm config get prefix' didn't return a value.`); + } + return undefined; + } + const prefix = stdout.trim(); + if (tracer) { + tracer(`'npm config get prefix' value is: ${prefix}`); + } + if (prefix.length > 0) { + if (isWindows()) { + return path.join(prefix, 'node_modules'); + } + else { + return path.join(prefix, 'lib', 'node_modules'); + } + } + return undefined; + } + catch (err) { + return undefined; + } + finally { + process.removeListener('SIGPIPE', handler); + } +} +exports.resolveGlobalNodePath = resolveGlobalNodePath; +/* + * Resolve the global yarn pakage path. + * @deprecated Since this depends on the used package manager and their version the best is that servers + * implement this themselves since they know best what kind of package managers to support. + * @param tracer the tracer to use + */ +function resolveGlobalYarnPath(tracer) { + let yarnCommand = 'yarn'; + const options = { + encoding: 'utf8' + }; + if (isWindows()) { + yarnCommand = 'yarn.cmd'; + options.shell = true; + } + const handler = () => { }; + try { + process.on('SIGPIPE', handler); + const results = (0, child_process_1.spawnSync)(yarnCommand, ['global', 'dir', '--json'], options); + const stdout = results.stdout; + if (!stdout) { + if (tracer) { + tracer(`'yarn global dir' didn't return a value.`); + if (results.stderr) { + tracer(results.stderr); + } + } + return undefined; + } + const lines = stdout.trim().split(/\r?\n/); + for (const line of lines) { + try { + const yarn = JSON.parse(line); + if (yarn.type === 'log') { + return path.join(yarn.data, 'node_modules'); + } + } + catch (e) { + // Do nothing. Ignore the line + } + } + return undefined; + } + catch (err) { + return undefined; + } + finally { + process.removeListener('SIGPIPE', handler); + } +} +exports.resolveGlobalYarnPath = resolveGlobalYarnPath; +var FileSystem; +(function (FileSystem) { + let _isCaseSensitive = undefined; + function isCaseSensitive() { + if (_isCaseSensitive !== void 0) { + return _isCaseSensitive; + } + if (process.platform === 'win32') { + _isCaseSensitive = false; + } + else { + // convert current file name to upper case / lower case and check if file exists + // (guards against cases when name is already all uppercase or lowercase) + _isCaseSensitive = !fs.existsSync(__filename.toUpperCase()) || !fs.existsSync(__filename.toLowerCase()); + } + return _isCaseSensitive; + } + FileSystem.isCaseSensitive = isCaseSensitive; + function isParent(parent, child) { + if (isCaseSensitive()) { + return path.normalize(child).indexOf(path.normalize(parent)) === 0; + } + else { + return path.normalize(child).toLowerCase().indexOf(path.normalize(parent).toLowerCase()) === 0; + } + } + FileSystem.isParent = isParent; +})(FileSystem || (exports.FileSystem = FileSystem = {})); +function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) { + if (nodePath) { + if (!path.isAbsolute(nodePath)) { + nodePath = path.join(workspaceRoot, nodePath); + } + return resolve(moduleName, nodePath, nodePath, tracer).then((value) => { + if (FileSystem.isParent(nodePath, value)) { + return value; + } + else { + return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`)); + } + }).then(undefined, (_error) => { + return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer); + }); + } + else { + return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer); + } +} +exports.resolveModulePath = resolveModulePath; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/main.d.ts" index 12df644387f484a215aed20c3f98b5ca753ac20b..7c32ef1fb25bfe16c9a40ce097ff9dcb68edb5b9 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/main.d.ts" @@ -1,3 +1,61 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:47bcea249a86c8fb9817cdec08dde3f9df439754efe4b04f2209e41f935c6b44 -size 4154 +/// +/// +import { Connection, _, _Connection, Features } from '../common/server'; +import * as fm from './files'; +import { ConnectionStrategy, ConnectionOptions, MessageReader, MessageWriter } from 'vscode-languageserver-protocol/node'; +export * from 'vscode-languageserver-protocol/node'; +export * from '../common/api'; +export declare namespace Files { + const uriToFilePath: typeof fm.uriToFilePath; + const resolveGlobalNodePath: typeof fm.resolveGlobalNodePath; + const resolveGlobalYarnPath: typeof fm.resolveGlobalYarnPath; + const resolve: typeof fm.resolve; + const resolveModulePath: typeof fm.resolveModulePath; +} +/** + * Creates a new connection based on the processes command line arguments: + * + * @param options An optional connection strategy or connection options to control additional settings + */ +export declare function createConnection(options?: ConnectionStrategy | ConnectionOptions): Connection; +/** + * Creates a new connection using a the given streams. + * + * @param inputStream The stream to read messages from. + * @param outputStream The stream to write messages to. + * @param options An optional connection strategy or connection options to control additional settings + * @return A {@link Connection connection} + */ +export declare function createConnection(inputStream: NodeJS.ReadableStream, outputStream: NodeJS.WritableStream, options?: ConnectionStrategy | ConnectionOptions): Connection; +/** + * Creates a new connection. + * + * @param reader The message reader to read messages from. + * @param writer The message writer to write message to. + * @param options An optional connection strategy or connection options to control additional settings + */ +export declare function createConnection(reader: MessageReader, writer: MessageWriter, options?: ConnectionStrategy | ConnectionOptions): Connection; +/** + * Creates a new connection based on the processes command line arguments. The new connection surfaces proposed API + * + * @param factories: the factories to use to implement the proposed API + * @param options An optional connection strategy or connection options to control additional settings + */ +export declare function createConnection(factories: Features, options?: ConnectionStrategy | ConnectionOptions): _Connection; +/** + * Creates a new connection using a the given streams. + * + * @param inputStream The stream to read messages from. + * @param outputStream The stream to write messages to. + * @param options An optional connection strategy or connection options to control additional settings + * @return A {@link Connection connection} + */ +export declare function createConnection(factories: Features, inputStream: NodeJS.ReadableStream, outputStream: NodeJS.WritableStream, options?: ConnectionStrategy | ConnectionOptions): _Connection; +/** + * Creates a new connection. + * + * @param reader The message reader to read messages from. + * @param writer The message writer to write message to. + * @param options An optional connection strategy or connection options to control additional settings + */ +export declare function createConnection(factories: Features, reader: MessageReader, writer: MessageWriter, options?: ConnectionStrategy | ConnectionOptions): _Connection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/main.js" index 720b64a0655ef5e800402fda7713d78080fbb46f..9051adfb29533e3a8d527040abd6265e894789dd 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/main.js" @@ -1,3 +1,274 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:716d23c3012fab9e026492c80aeabcf840c09d577b6c5f1b25bb70fdfdcd937b -size 9498 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +/// +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createConnection = exports.Files = void 0; +const node_util_1 = require("node:util"); +const Is = require("../common/utils/is"); +const server_1 = require("../common/server"); +const fm = require("./files"); +const node_1 = require("vscode-languageserver-protocol/node"); +__exportStar(require("vscode-languageserver-protocol/node"), exports); +__exportStar(require("../common/api"), exports); +var Files; +(function (Files) { + Files.uriToFilePath = fm.uriToFilePath; + Files.resolveGlobalNodePath = fm.resolveGlobalNodePath; + Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath; + Files.resolve = fm.resolve; + Files.resolveModulePath = fm.resolveModulePath; +})(Files || (exports.Files = Files = {})); +let _protocolConnection; +function endProtocolConnection() { + if (_protocolConnection === undefined) { + return; + } + try { + _protocolConnection.end(); + } + catch (_err) { + // Ignore. The client process could have already + // did and we can't send an end into the connection. + } +} +let _shutdownReceived = false; +let exitTimer = undefined; +function setupExitTimer() { + const argName = '--clientProcessId'; + function runTimer(value) { + try { + const processId = parseInt(value); + if (!isNaN(processId)) { + exitTimer = setInterval(() => { + try { + process.kill(processId, 0); + } + catch (ex) { + // Parent process doesn't exist anymore. Exit the server. + endProtocolConnection(); + process.exit(_shutdownReceived ? 0 : 1); + } + }, 3000); + } + } + catch (e) { + // Ignore errors; + } + } + for (let i = 2; i < process.argv.length; i++) { + const arg = process.argv[i]; + if (arg === argName && i + 1 < process.argv.length) { + runTimer(process.argv[i + 1]); + return; + } + else { + const args = arg.split('='); + if (args[0] === argName) { + runTimer(args[1]); + } + } + } +} +setupExitTimer(); +const watchDog = { + initialize: (params) => { + const processId = params.processId; + if (Is.number(processId) && exitTimer === undefined) { + // We received a parent process id. Set up a timer to periodically check + // if the parent is still alive. + setInterval(() => { + try { + process.kill(processId, 0); + } + catch (ex) { + // Parent process doesn't exist anymore. Exit the server. + process.exit(_shutdownReceived ? 0 : 1); + } + }, 3000); + } + }, + get shutdownReceived() { + return _shutdownReceived; + }, + set shutdownReceived(value) { + _shutdownReceived = value; + }, + exit: (code) => { + endProtocolConnection(); + process.exit(code); + } +}; +function createConnection(arg1, arg2, arg3, arg4) { + let factories; + let input; + let output; + let options; + if (arg1 !== undefined && arg1.__brand === 'features') { + factories = arg1; + arg1 = arg2; + arg2 = arg3; + arg3 = arg4; + } + if (node_1.ConnectionStrategy.is(arg1) || node_1.ConnectionOptions.is(arg1)) { + options = arg1; + } + else { + input = arg1; + output = arg2; + options = arg3; + } + return _createConnection(input, output, options, factories); +} +exports.createConnection = createConnection; +function _createConnection(input, output, options, factories) { + let stdio = false; + if (!input && !output && process.argv.length > 2) { + let port = undefined; + let pipeName = undefined; + const argv = process.argv.slice(2); + for (let i = 0; i < argv.length; i++) { + const arg = argv[i]; + if (arg === '--node-ipc') { + input = new node_1.IPCMessageReader(process); + output = new node_1.IPCMessageWriter(process); + break; + } + else if (arg === '--stdio') { + stdio = true; + input = process.stdin; + output = process.stdout; + break; + } + else if (arg === '--socket') { + port = parseInt(argv[i + 1]); + break; + } + else if (arg === '--pipe') { + pipeName = argv[i + 1]; + break; + } + else { + const args = arg.split('='); + if (args[0] === '--socket') { + port = parseInt(args[1]); + break; + } + else if (args[0] === '--pipe') { + pipeName = args[1]; + break; + } + } + } + if (port) { + const transport = (0, node_1.createServerSocketTransport)(port); + input = transport[0]; + output = transport[1]; + } + else if (pipeName) { + const transport = (0, node_1.createServerPipeTransport)(pipeName); + input = transport[0]; + output = transport[1]; + } + } + const commandLineMessage = 'Use arguments of createConnection or set command line parameters: \'--node-ipc\', \'--stdio\' or \'--socket={number}\''; + if (!input) { + throw new Error('Connection input stream is not set. ' + commandLineMessage); + } + if (!output) { + throw new Error('Connection output stream is not set. ' + commandLineMessage); + } + // Backwards compatibility + if (Is.func(input.read) && Is.func(input.on)) { + const inputStream = input; + inputStream.on('end', () => { + endProtocolConnection(); + process.exit(_shutdownReceived ? 0 : 1); + }); + inputStream.on('close', () => { + endProtocolConnection(); + process.exit(_shutdownReceived ? 0 : 1); + }); + } + const connectionFactory = (logger) => { + const result = (0, node_1.createProtocolConnection)(input, output, logger, options); + if (stdio) { + patchConsole(logger); + } + return result; + }; + return (0, server_1.createConnection)(connectionFactory, watchDog, factories); +} +function patchConsole(logger) { + function serialize(args) { + return args.map(arg => typeof arg === 'string' ? arg : (0, node_util_1.inspect)(arg)).join(' '); + } + const counters = new Map(); + console.assert = function assert(assertion, ...args) { + if (assertion) { + return; + } + if (args.length === 0) { + logger.error('Assertion failed'); + } + else { + const [message, ...rest] = args; + logger.error(`Assertion failed: ${message} ${serialize(rest)}`); + } + }; + console.count = function count(label = 'default') { + const message = String(label); + let counter = counters.get(message) ?? 0; + counter += 1; + counters.set(message, counter); + logger.log(`${message}: ${message}`); + }; + console.countReset = function countReset(label) { + if (label === undefined) { + counters.clear(); + } + else { + counters.delete(String(label)); + } + }; + console.debug = function debug(...args) { + logger.log(serialize(args)); + }; + console.dir = function dir(arg, options) { + // @ts-expect-error https://github.com/DefinitelyTyped/DefinitelyTyped/pull/66626 + logger.log((0, node_util_1.inspect)(arg, options)); + }; + console.log = function log(...args) { + logger.log(serialize(args)); + }; + console.error = function error(...args) { + logger.error(serialize(args)); + }; + console.trace = function trace(...args) { + const stack = new Error().stack.replace(/(.+\n){2}/, ''); + let message = 'Trace'; + if (args.length !== 0) { + message += `: ${serialize(args)}`; + } + logger.log(`${message}\n${stack}`); + }; + console.warn = function warn(...args) { + logger.warn(serialize(args)); + }; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/resolve.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/resolve.d.ts" index dab3249542c96306fe5442903d63d6a8c71a5410..4e765ce1e744070590e90a1206bca903c4c23816 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/resolve.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/resolve.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:06e75afe2bf6d058aae427edecc421fac2cc26e754fba6279bb5f69818238bc4 -size 100 +interface Message { + command: string; + success?: boolean; + args?: any; + result?: any; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/resolve.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/resolve.js" index e28a148fbc504bf3e4a163e40db21342ac4dd71b..7c4db22932b970a89020fed23e15b9921b34459d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/resolve.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/lib/node/resolve.js" @@ -1,3 +1,19 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:501b126a148fb56d524138b37ad9487791757e34f4ef04cdd06ffdd8d8e2c874 -size 787 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +process.on('message', (message) => { + if (message.command === 'exit') { + process.exit(0); + } + else if (message.command === 'resolve') { + try { + const result = require.resolve(message.args); + process.send({ command: 'resolve', success: true, result: result }); + } + catch (err) { + process.send({ command: 'resolve', success: false }); + } + } +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/node.cmd" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/node.cmd" index d6820389cf905e2639588cfaf3d1dd49787060d0..791e6e36ca158adb27a1ca664413568656ce2781 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/node.cmd" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/node.cmd" @@ -1,3 +1,5 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fad7474018db5e3ef38b97374d82fb3b5c56a16aee423f482b6732800007f533 -size 213 +@echo off +REM This file is necessary to ensure that under Windows we don't +REM run the node.js file in the Windows Script Host when using +REM node in packakge.json scripts. See also PATHEXT setting +node.exe %* \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/node.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/node.d.ts" index d4501421d4bd489c9190700a07b50dd52678f01e..b4c4fcd723edbd7b4ea066a4059cf8393e46aa88 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/node.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/node.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c98df0145d99011af92c397fa787fc39d42cc04019614ab5581febe71fb32e1 -size 382 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/node/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/node.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/node.js" index 6ca9fea0ab31ba44f19549c8fa3b28a055f235c0..388e3197ebb862634cda424e9d707896b40627da 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/node.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/node.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20ed9d05087fa65ed99369c32ebaad6d2714c56d38b6b58e660ec428d1280054 -size 408 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/node/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/package.json" index 9ffab2556483f3c8f145b5e3afe6403a79fb6992..09ab7d92b4bbfe297e12e831a03733e00a28e502 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/package.json" @@ -1,3 +1,42 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a01ef4680936e50ba6cf0ddf2810fb554c7a3aaaede70a87c7fc1d259578ea82 -size 1511 +{ + "name": "vscode-languageserver", + "description": "Language server implementation for node", + "version": "10.0.0-next.5", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-languageserver-node.git", + "directory": "server" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "main": "./lib/node/main.js", + "browser": { + "./lib/node/main.js": "./lib/browser/main.js" + }, + "typings": "./lib/common/api.d.ts", + "bin": { + "installServerIntoExtension": "./bin/installServerIntoExtension" + }, + "devDependencies": { + "vscode-languageserver-textdocument": "1.0.11" + }, + "dependencies": { + "vscode-languageserver-protocol": "3.17.6-next.5" + }, + "scripts": { + "prepublishOnly": "echo \"⛔ Can only publish from a secure pipeline ⛔\" && node ../build/npm/fail", + "prepack": "npm run all:publish", + "compile": "node ../build/bin/tsc -b ./tsconfig.json", + "watch": "node ../build/bin/tsc -b ./tsconfig.watch.json -w", + "clean": "node ../node_modules/rimraf/dist/esm/bin.mjs lib", + "lint": "node ../node_modules/eslint/bin/eslint.js --ext ts src", + "test": "node ../node_modules/mocha/bin/_mocha", + "all": "npm run clean && npm run compile && npm run lint && npm test", + "compile:publish": "node ../build/bin/tsc -b ./tsconfig.publish.json", + "all:publish": "git clean -xfd . && npm install && npm run compile:publish && npm run lint && npm test", + "preversion": "npm test" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/thirdpartynotices.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/thirdpartynotices.txt" index 7b9daafb463c4db870f27be9564b5c9b2d3bb5d5..db9b0a59d56c5558af5a36c3419585e30ca6fd9b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/thirdpartynotices.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/thirdpartynotices.txt" @@ -1,3 +1,84 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b8be93a14e6d5df97ea340c69529615563aaf2dd7698ae38b3a2758264df9b87 -size 4701 +NOTICES AND INFORMATION +Do Not Translate or Localize + +This software incorporates material from third parties. +Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com, +or you may send a check or money order for US $5.00, including the product name, +the open source component name, platform, and version number, to: + +Source Code Compliance Team +Microsoft Corporation +One Microsoft Way +Redmond, WA 98052 +USA + +Notwithstanding any other terms, you may reverse engineer this software to the extent +required to debug changes to any libraries licensed under the GNU Lesser General Public License. + + +--------------------------------------------------------- + +vscode-jsonrpc - MIT +https://github.com/Microsoft/vscode-languageserver-node#readme + +Copyright (c) Microsoft Corporation. + +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------------------------------------------------- + +--------------------------------------------------------- + +vscode-languageserver-protocol - MIT +https://github.com/Microsoft/vscode-languageserver-node#readme + +Copyright (c) TypeFox and others. +Copyright (c) Microsoft Corporation. + +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------------------------------------------------- + +--------------------------------------------------------- + +vscode-languageserver-types - MIT +https://github.com/Microsoft/vscode-languageserver-node#readme + +Copyright (c) Microsoft Corporation. + +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--------------------------------------------------------- \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/typings/thenable.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/typings/thenable.d.ts" index 71628bfa09bffea0029445a98311b0929f940987..8c4d2eeacd7b7de01db59e651d7eb4990b2ac605 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/typings/thenable.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-languageserver/typings/thenable.d.ts" @@ -1,3 +1,5 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:65b9243c80068ec9696b1fbdd23c9acf80d51df02f97b2d7a0514312b0a9fe7d -size 398 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +interface Thenable extends PromiseLike { } \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/LICENSE.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/LICENSE.md" index 19f0a8b9ff8b9e53af92488d51e4c778a1468641..29db530db43fe178f97f0bb244e79fa3f7e27745 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/LICENSE.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/LICENSE.md" @@ -1,3 +1,9 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c669138cb1eb01fbb745e8e460b291e4f2869c14a40061390b6095d845ed4c82 -size 1070 +The MIT License (MIT) + +Copyright (c) Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/README.md" index 8f452e84a77f84082a071296355c2fdb6a3fff4d..ee7b725b5998290c3adcbed96edfc679c18827ff 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/README.md" @@ -1,3 +1,67 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:39ad66715504e292bd71b6b258d0bdba95be22e3a539a280ef2534be0525218e -size 2475 +## vscode-uri + +[![Build Status](https://travis-ci.org/Microsoft/vscode-uri.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-uri) + +This module contains the URI implementation that is used by VS Code and its extensions. +It has support for parsing a string into `scheme`, `authority`, `path`, `query`, and +`fragment` URI components as defined in: http://tools.ietf.org/html/rfc3986 + +``` + foo://example.com:8042/over/there?name=ferret#nose + \_/ \______________/\_________/ \_________/ \__/ + | | | | | +scheme authority path query fragment + | _____________________|__ + / \ / \ + urn:example:animal:ferret:nose +``` + +## Usage + +```js +import { URI } from 'vscode-uri' + +// parse an URI from string + +let uri = URI.parse('https://code.visualstudio.com/docs/extensions/overview#frag') + +assert.ok(uri.scheme === 'https'); +assert.ok(uri.authority === 'code.visualstudio.com'); +assert.ok(uri.path === '/docs/extensions/overview'); +assert.ok(uri.query === ''); +assert.ok(uri.fragment === 'frag'); +assert.ok(uri.toString() === 'https://code.visualstudio.com/docs/extensions/overview#frag') + + +// create an URI from a fs path + +let uri = URI.file('/users/me/c#-projects/'); + +assert.ok(uri.scheme === 'file'); +assert.ok(uri.authority === ''); +assert.ok(uri.path === '/users/me/c#-projects/'); +assert.ok(uri.query === ''); +assert.ok(uri.fragment === ''); +assert.ok(uri.toString() === 'file:///users/me/c%23-projects/') +``` + +## Usage: Util + +This module also exports a `Utils` package which is an extension, not part of `vscode.Uri`, and useful for path-math. There is: + +* `Utils.joinPath(URI, paths): URI` +* `Utils.resolvePath(URI, paths): URI` +* `Utils.dirname(URI): string` +* `Utils.basename(URI): string` +* `Utils.extname(URI): string` + +All util use posix path-math as defined by the node.js path module. + + +## Contributing + +The source of this module is taken straight from the [vscode](https://github.com/microsoft/vscode)-sources and because of that issues and pull request should be created in that repository. Thanks and Happy Coding! + +## Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/SECURITY.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/SECURITY.md" index dffdea487032c75c7f9b01273a461d4d628c8b37..e138ec5d6a77c5e6e09346a69cbdc90c85a3806f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/SECURITY.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/SECURITY.md" @@ -1,3 +1,41 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:430987b8c5f30c366ecd501bc344c8b29b6280e8a10174376a769f7443a187cd -size 2757 + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). + + diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/esm/index.mjs" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/esm/index.mjs" index 2406dd7f538d892f46b3a83c758c93515297bd68..f70030caded9701e55154df2d37b712e131a6198 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/esm/index.mjs" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/esm/index.mjs" @@ -1,3 +1,2 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:01ef41f61c1974c6b83dac85a6cc44332f6793a90f838c54f07660121de4bc9d -size 10742 +var LIB;(()=>{"use strict";var t={470:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",i=0,o=-1,s=0,h=0;h<=t.length;++h){if(h2){var a=n.lastIndexOf("/");if(a!==n.length-1){-1===a?(n="",i=0):i=(n=n.slice(0,a)).length-1-n.lastIndexOf("/"),o=h,s=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=h,s=0;continue}e&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+t.slice(o+1,h):n=t.slice(o+1,h),i=h-o-1;o=h,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var t,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(void 0===t&&(t=process.cwd()),s=t),e(s),0!==s.length&&(n=s+"/"+n,i=47===s.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return".";var n=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&i&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,r=0;r0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return"";if((t=n.resolve(t))===(r=n.resolve(r)))return"";for(var i=1;ic){if(47===r.charCodeAt(h+u))return r.slice(h+u+1);if(0===u)return r.slice(h+u)}else s>c&&(47===t.charCodeAt(i+u)?f=u:0===u&&(f=0));break}var l=t.charCodeAt(i+u);if(l!==r.charCodeAt(h+u))break;47===l&&(f=u)}var g="";for(u=i+f+1;u<=o;++u)u!==o&&47!==t.charCodeAt(u)||(0===g.length?g+="..":g+="/..");return g.length>0?g+r.slice(h+f):(h+=f,47===r.charCodeAt(h)&&++h,r.slice(h))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,i=-1,o=!0,s=t.length-1;s>=1;--s)if(47===(r=t.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,i=0,o=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var h=r.length-1,a=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1),h>=0&&(c===r.charCodeAt(h)?-1==--h&&(o=n):(h=-1,o=a))}return i===o?o=a:-1===o&&(o=t.length),t.slice(i,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!s){i=n+1;break}}else-1===o&&(s=!1,o=n+1);return-1===o?"":t.slice(i,o)},extname:function(t){e(t);for(var r=-1,n=0,i=-1,o=!0,s=0,h=t.length-1;h>=0;--h){var a=t.charCodeAt(h);if(47!==a)-1===i&&(o=!1,i=h+1),46===a?-1===r?r=h:1!==s&&(s=1):-1!==r&&(s=-1);else if(!o){n=h+1;break}}return-1===r||-1===i||0===s||1===s&&r===i-1&&r===n+1?"":t.slice(r,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,i=t.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var s=-1,h=0,a=-1,c=!0,f=t.length-1,u=0;f>=n;--f)if(47!==(i=t.charCodeAt(f)))-1===a&&(c=!1,a=f+1),46===i?-1===s?s=f:1!==u&&(u=1):-1!==s&&(u=-1);else if(!c){h=f+1;break}return-1===s||-1===a||0===u||1===u&&s===a-1&&s===h+1?-1!==a&&(r.base=r.name=0===h&&o?t.slice(1,a):t.slice(h,a)):(0===h&&o?(r.name=t.slice(1,s),r.base=t.slice(1,a)):(r.name=t.slice(h,s),r.base=t.slice(h,a)),r.ext=t.slice(s,a)),h>0?r.dir=t.slice(0,h-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{let t;if(r.r(n),r.d(n,{URI:()=>f,Utils:()=>P}),"object"==typeof process)t="win32"===process.platform;else if("object"==typeof navigator){let e=navigator.userAgent;t=e.indexOf("Windows")>=0}const e=/^\w[\w\d+.-]*$/,i=/^\//,o=/^\/\//;function s(t,r){if(!t.scheme&&r)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!e.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!i.test(t.path))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')}else if(o.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const h="",a="/",c=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{static isUri(t){return t instanceof f||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,n,i,o=!1){"object"==typeof t?(this.scheme=t.scheme||h,this.authority=t.authority||h,this.path=t.path||h,this.query=t.query||h,this.fragment=t.fragment||h):(this.scheme=function(t,e){return t||e?t:"file"}(t,o),this.authority=e||h,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==a&&(e=a+e):e=a}return e}(this.scheme,r||h),this.query=n||h,this.fragment=i||h,s(this,o))}get fsPath(){return m(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:n,query:i,fragment:o}=t;return void 0===e?e=this.scheme:null===e&&(e=h),void 0===r?r=this.authority:null===r&&(r=h),void 0===n?n=this.path:null===n&&(n=h),void 0===i?i=this.query:null===i&&(i=h),void 0===o?o=this.fragment:null===o&&(o=h),e===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&o===this.fragment?this:new l(e,r,n,i,o)}static parse(t,e=!1){const r=c.exec(t);return r?new l(r[2]||h,C(r[4]||h),C(r[5]||h),C(r[7]||h),C(r[9]||h),e):new l(h,h,h,h,h)}static file(e){let r=h;if(t&&(e=e.replace(/\\/g,a)),e[0]===a&&e[1]===a){const t=e.indexOf(a,2);-1===t?(r=e.substring(2),e=a):(r=e.substring(2,t),e=e.substring(t)||a)}return new l("file",r,e,h,h)}static from(t){const e=new l(t.scheme,t.authority,t.path,t.query,t.fragment);return s(e,!0),e}toString(t=!1){return y(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof f)return t;{const e=new l(t);return e._formatted=t.external,e._fsPath=t._sep===u?t.fsPath:null,e}}return t}}const u=t?1:void 0;class l extends f{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=m(this,!1)),this._fsPath}toString(t=!1){return t?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=u),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function d(t,e,r){let n,i=-1;for(let o=0;o=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||e&&47===s||r&&91===s||r&&93===s||r&&58===s)-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),void 0!==n&&(n+=t.charAt(o));else{void 0===n&&(n=t.substr(0,o));const e=g[s];void 0!==e?(-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),n+=e):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(t.substring(i))),void 0!==n?n:t}function p(t){let e;for(let r=0;r1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?r?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,t&&(n=n.replace(/\//g,"\\")),n}function y(t,e){const r=e?p:d;let n="",{scheme:i,authority:o,path:s,query:h,fragment:c}=t;if(i&&(n+=i,n+=":"),(o||"file"===i)&&(n+=a,n+=a),o){let t=o.indexOf("@");if(-1!==t){const e=o.substr(0,t);o=o.substr(t+1),t=e.lastIndexOf(":"),-1===t?n+=r(e,!1,!1):(n+=r(e.substr(0,t),!1,!1),n+=":",n+=r(e.substr(t+1),!1,!0)),n+="@"}o=o.toLowerCase(),t=o.lastIndexOf(":"),-1===t?n+=r(o,!1,!0):(n+=r(o.substr(0,t),!1,!0),n+=o.substr(t))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const t=s.charCodeAt(1);t>=65&&t<=90&&(s=`/${String.fromCharCode(t+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const t=s.charCodeAt(0);t>=65&&t<=90&&(s=`${String.fromCharCode(t+32)}:${s.substr(2)}`)}n+=r(s,!0,!1)}return h&&(n+="?",n+=r(h,!1,!1)),c&&(n+="#",n+=e?c:d(c,!1,!1)),n}function v(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+v(t.substr(3)):t}}const b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(t){return t.match(b)?t.replace(b,(t=>v(t))):t}var A=r(470);const w=A.posix||A,x="/";var P;!function(t){t.joinPath=function(t,...e){return t.with({path:w.join(t.path,...e)})},t.resolvePath=function(t,...e){let r=t.path,n=!1;r[0]!==x&&(r=x+r,n=!0);let i=w.resolve(r,...e);return n&&i[0]===x&&!t.authority&&(i=i.substring(1)),t.with({path:i})},t.dirname=function(t){if(0===t.path.length||t.path===x)return t;let e=w.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},t.basename=function(t){return w.basename(t.path)},t.extname=function(t){return w.extname(t.path)}}(P||(P={}))})(),LIB=n})();export const{URI,Utils}=LIB; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/esm/index.mjs.map" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/esm/index.mjs.map" index 65b6434886833a640bb4c7877edaff23b9aa50e9..319b792ac59eaed2932b04a932bec488e97da187 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/esm/index.mjs.map" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/esm/index.mjs.map" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6a69a0c1d29aa26f327950da834efb7e9a183141f77203e7f83e24f32ad62baf -size 62941 +{"version":3,"file":"index.mjs","mappings":"0CA0BA,SAASA,EAAWC,GAClB,GAAoB,iBAATA,EACT,MAAM,IAAIC,UAAU,mCAAqCC,KAAKC,UAAUH,GAE5E,CAGA,SAASI,EAAqBJ,EAAMK,GAMlC,IALA,IAIIC,EAJAC,EAAM,GACNC,EAAoB,EACpBC,GAAa,EACbC,EAAO,EAEFC,EAAI,EAAGA,GAAKX,EAAKY,SAAUD,EAAG,CACrC,GAAIA,EAAIX,EAAKY,OACXN,EAAON,EAAKa,WAAWF,OACpB,IAAa,KAATL,EACP,MAEAA,EAAO,EAAQ,CACjB,GAAa,KAATA,EAAmB,CACrB,GAAIG,IAAcE,EAAI,GAAc,IAATD,QAEpB,GAAID,IAAcE,EAAI,GAAc,IAATD,EAAY,CAC5C,GAAIH,EAAIK,OAAS,GAA2B,IAAtBJ,GAA8D,KAAnCD,EAAIM,WAAWN,EAAIK,OAAS,IAAsD,KAAnCL,EAAIM,WAAWN,EAAIK,OAAS,GAC1H,GAAIL,EAAIK,OAAS,EAAG,CAClB,IAAIE,EAAiBP,EAAIQ,YAAY,KACrC,GAAID,IAAmBP,EAAIK,OAAS,EAAG,EACb,IAApBE,GACFP,EAAM,GACNC,EAAoB,GAGpBA,GADAD,EAAMA,EAAIS,MAAM,EAAGF,IACKF,OAAS,EAAIL,EAAIQ,YAAY,KAEvDN,EAAYE,EACZD,EAAO,EACP,QACF,CACF,MAAO,GAAmB,IAAfH,EAAIK,QAA+B,IAAfL,EAAIK,OAAc,CAC/CL,EAAM,GACNC,EAAoB,EACpBC,EAAYE,EACZD,EAAO,EACP,QACF,CAEEL,IACEE,EAAIK,OAAS,EACfL,GAAO,MAEPA,EAAM,KACRC,EAAoB,EAExB,MACMD,EAAIK,OAAS,EACfL,GAAO,IAAMP,EAAKgB,MAAMP,EAAY,EAAGE,GAEvCJ,EAAMP,EAAKgB,MAAMP,EAAY,EAAGE,GAClCH,EAAoBG,EAAIF,EAAY,EAEtCA,EAAYE,EACZD,EAAO,CACT,MAAoB,KAATJ,IAA+B,IAAVI,IAC5BA,EAEFA,GAAQ,CAEZ,CACA,OAAOH,CACT,CAcA,IAAIU,EAAQ,CAEVC,QAAS,WAKP,IAJA,IAEIC,EAFAC,EAAe,GACfC,GAAmB,EAGdV,EAAIW,UAAUV,OAAS,EAAGD,IAAM,IAAMU,EAAkBV,IAAK,CACpE,IAAIX,EACAW,GAAK,EACPX,EAAOsB,UAAUX,SAELY,IAARJ,IACFA,EAAMK,QAAQL,OAChBnB,EAAOmB,GAGTpB,EAAWC,GAGS,IAAhBA,EAAKY,SAITQ,EAAepB,EAAO,IAAMoB,EAC5BC,EAA0C,KAAvBrB,EAAKa,WAAW,GACrC,CAQA,OAFAO,EAAehB,EAAqBgB,GAAeC,GAE/CA,EACED,EAAaR,OAAS,EACjB,IAAMQ,EAEN,IACAA,EAAaR,OAAS,EACxBQ,EAEA,GAEX,EAEAK,UAAW,SAAmBzB,GAG5B,GAFAD,EAAWC,GAES,IAAhBA,EAAKY,OAAc,MAAO,IAE9B,IAAIc,EAAoC,KAAvB1B,EAAKa,WAAW,GAC7Bc,EAAyD,KAArC3B,EAAKa,WAAWb,EAAKY,OAAS,GAQtD,OAHoB,KAFpBZ,EAAOI,EAAqBJ,GAAO0B,IAE1Bd,QAAiBc,IAAY1B,EAAO,KACzCA,EAAKY,OAAS,GAAKe,IAAmB3B,GAAQ,KAE9C0B,EAAmB,IAAM1B,EACtBA,CACT,EAEA0B,WAAY,SAAoB1B,GAE9B,OADAD,EAAWC,GACJA,EAAKY,OAAS,GAA4B,KAAvBZ,EAAKa,WAAW,EAC5C,EAEAe,KAAM,WACJ,GAAyB,IAArBN,UAAUV,OACZ,MAAO,IAET,IADA,IAAIiB,EACKlB,EAAI,EAAGA,EAAIW,UAAUV,SAAUD,EAAG,CACzC,IAAImB,EAAMR,UAAUX,GACpBZ,EAAW+B,GACPA,EAAIlB,OAAS,SACAW,IAAXM,EACFA,EAASC,EAETD,GAAU,IAAMC,EAEtB,CACA,YAAeP,IAAXM,EACK,IACFZ,EAAMQ,UAAUI,EACzB,EAEAE,SAAU,SAAkBC,EAAMC,GAIhC,GAHAlC,EAAWiC,GACXjC,EAAWkC,GAEPD,IAASC,EAAI,MAAO,GAKxB,IAHAD,EAAOf,EAAMC,QAAQc,OACrBC,EAAKhB,EAAMC,QAAQe,IAEF,MAAO,GAIxB,IADA,IAAIC,EAAY,EACTA,EAAYF,EAAKpB,QACa,KAA/BoB,EAAKnB,WAAWqB,KADYA,GASlC,IALA,IAAIC,EAAUH,EAAKpB,OACfwB,EAAUD,EAAUD,EAGpBG,EAAU,EACPA,EAAUJ,EAAGrB,QACa,KAA3BqB,EAAGpB,WAAWwB,KADUA,GAW9B,IAPA,IACIC,EADQL,EAAGrB,OACKyB,EAGhBzB,EAASwB,EAAUE,EAAQF,EAAUE,EACrCC,GAAiB,EACjB5B,EAAI,EACDA,GAAKC,IAAUD,EAAG,CACvB,GAAIA,IAAMC,EAAQ,CAChB,GAAI0B,EAAQ1B,EAAQ,CAClB,GAAmC,KAA/BqB,EAAGpB,WAAWwB,EAAU1B,GAG1B,OAAOsB,EAAGjB,MAAMqB,EAAU1B,EAAI,GACzB,GAAU,IAANA,EAGT,OAAOsB,EAAGjB,MAAMqB,EAAU1B,EAE9B,MAAWyB,EAAUxB,IACoB,KAAnCoB,EAAKnB,WAAWqB,EAAYvB,GAG9B4B,EAAgB5B,EACD,IAANA,IAGT4B,EAAgB,IAGpB,KACF,CACA,IAAIC,EAAWR,EAAKnB,WAAWqB,EAAYvB,GAE3C,GAAI6B,IADSP,EAAGpB,WAAWwB,EAAU1B,GAEnC,MACoB,KAAb6B,IACPD,EAAgB5B,EACpB,CAEA,IAAI8B,EAAM,GAGV,IAAK9B,EAAIuB,EAAYK,EAAgB,EAAG5B,GAAKwB,IAAWxB,EAClDA,IAAMwB,GAAkC,KAAvBH,EAAKnB,WAAWF,KAChB,IAAf8B,EAAI7B,OACN6B,GAAO,KAEPA,GAAO,OAMb,OAAIA,EAAI7B,OAAS,EACR6B,EAAMR,EAAGjB,MAAMqB,EAAUE,IAEhCF,GAAWE,EACoB,KAA3BN,EAAGpB,WAAWwB,MACdA,EACGJ,EAAGjB,MAAMqB,GAEpB,EAEAK,UAAW,SAAmB1C,GAC5B,OAAOA,CACT,EAEA2C,QAAS,SAAiB3C,GAExB,GADAD,EAAWC,GACS,IAAhBA,EAAKY,OAAc,MAAO,IAK9B,IAJA,IAAIN,EAAON,EAAKa,WAAW,GACvB+B,EAAmB,KAATtC,EACVuC,GAAO,EACPC,GAAe,EACVnC,EAAIX,EAAKY,OAAS,EAAGD,GAAK,IAAKA,EAEtC,GAAa,MADbL,EAAON,EAAKa,WAAWF,KAEnB,IAAKmC,EAAc,CACjBD,EAAMlC,EACN,KACF,OAGFmC,GAAe,EAInB,OAAa,IAATD,EAAmBD,EAAU,IAAM,IACnCA,GAAmB,IAARC,EAAkB,KAC1B7C,EAAKgB,MAAM,EAAG6B,EACvB,EAEAE,SAAU,SAAkB/C,EAAMgD,GAChC,QAAYzB,IAARyB,GAAoC,iBAARA,EAAkB,MAAM,IAAI/C,UAAU,mCACtEF,EAAWC,GAEX,IAGIW,EAHAsC,EAAQ,EACRJ,GAAO,EACPC,GAAe,EAGnB,QAAYvB,IAARyB,GAAqBA,EAAIpC,OAAS,GAAKoC,EAAIpC,QAAUZ,EAAKY,OAAQ,CACpE,GAAIoC,EAAIpC,SAAWZ,EAAKY,QAAUoC,IAAQhD,EAAM,MAAO,GACvD,IAAIkD,EAASF,EAAIpC,OAAS,EACtBuC,GAAoB,EACxB,IAAKxC,EAAIX,EAAKY,OAAS,EAAGD,GAAK,IAAKA,EAAG,CACrC,IAAIL,EAAON,EAAKa,WAAWF,GAC3B,GAAa,KAATL,GAGA,IAAKwC,EAAc,CACjBG,EAAQtC,EAAI,EACZ,KACF,OAEwB,IAAtBwC,IAGFL,GAAe,EACfK,EAAmBxC,EAAI,GAErBuC,GAAU,IAER5C,IAAS0C,EAAInC,WAAWqC,IACR,KAAZA,IAGJL,EAAMlC,IAKRuC,GAAU,EACVL,EAAMM,GAId,CAGA,OADIF,IAAUJ,EAAKA,EAAMM,GAAmC,IAATN,IAAYA,EAAM7C,EAAKY,QACnEZ,EAAKgB,MAAMiC,EAAOJ,EAC3B,CACE,IAAKlC,EAAIX,EAAKY,OAAS,EAAGD,GAAK,IAAKA,EAClC,GAA2B,KAAvBX,EAAKa,WAAWF,IAGhB,IAAKmC,EAAc,CACjBG,EAAQtC,EAAI,EACZ,KACF,OACkB,IAATkC,IAGXC,GAAe,EACfD,EAAMlC,EAAI,GAId,OAAa,IAATkC,EAAmB,GAChB7C,EAAKgB,MAAMiC,EAAOJ,EAE7B,EAEAO,QAAS,SAAiBpD,GACxBD,EAAWC,GAQX,IAPA,IAAIqD,GAAY,EACZC,EAAY,EACZT,GAAO,EACPC,GAAe,EAGfS,EAAc,EACT5C,EAAIX,EAAKY,OAAS,EAAGD,GAAK,IAAKA,EAAG,CACzC,IAAIL,EAAON,EAAKa,WAAWF,GAC3B,GAAa,KAATL,GASS,IAATuC,IAGFC,GAAe,EACfD,EAAMlC,EAAI,GAEC,KAATL,GAEkB,IAAd+C,EACFA,EAAW1C,EACY,IAAhB4C,IACPA,EAAc,IACK,IAAdF,IAGTE,GAAe,QArBb,IAAKT,EAAc,CACjBQ,EAAY3C,EAAI,EAChB,KACF,CAoBN,CAEA,OAAkB,IAAd0C,IAA4B,IAATR,GAEH,IAAhBU,GAEgB,IAAhBA,GAAqBF,IAAaR,EAAM,GAAKQ,IAAaC,EAAY,EACjE,GAEFtD,EAAKgB,MAAMqC,EAAUR,EAC9B,EAEAW,OAAQ,SAAgBC,GACtB,GAAmB,OAAfA,GAA6C,iBAAfA,EAChC,MAAM,IAAIxD,UAAU,0EAA4EwD,GAElG,OAvVJ,SAAiBC,EAAKD,GACpB,IAAIE,EAAMF,EAAWE,KAAOF,EAAWG,KACnCC,EAAOJ,EAAWI,OAASJ,EAAWK,MAAQ,KAAOL,EAAWT,KAAO,IAC3E,OAAKW,EAGDA,IAAQF,EAAWG,KACdD,EAAME,EAERF,EA8UU,IA9UEE,EALVA,CAMX,CA6UWE,CAAQ,EAAKN,EACtB,EAEAO,MAAO,SAAehE,GACpBD,EAAWC,GAEX,IAAIiE,EAAM,CAAEL,KAAM,GAAID,IAAK,GAAIE,KAAM,GAAIb,IAAK,GAAIc,KAAM,IACxD,GAAoB,IAAhB9D,EAAKY,OAAc,OAAOqD,EAC9B,IAEIhB,EAFA3C,EAAON,EAAKa,WAAW,GACvBa,EAAsB,KAATpB,EAEboB,GACFuC,EAAIL,KAAO,IACXX,EAAQ,GAERA,EAAQ,EAaV,IAXA,IAAII,GAAY,EACZC,EAAY,EACZT,GAAO,EACPC,GAAe,EACfnC,EAAIX,EAAKY,OAAS,EAIlB2C,EAAc,EAGX5C,GAAKsC,IAAStC,EAEnB,GAAa,MADbL,EAAON,EAAKa,WAAWF,KAUV,IAATkC,IAGFC,GAAe,EACfD,EAAMlC,EAAI,GAEC,KAATL,GAEkB,IAAd+C,EAAiBA,EAAW1C,EAA2B,IAAhB4C,IAAmBA,EAAc,IACrD,IAAdF,IAGXE,GAAe,QAlBb,IAAKT,EAAc,CACjBQ,EAAY3C,EAAI,EAChB,KACF,CAwCN,OArBkB,IAAd0C,IAA4B,IAATR,GAEP,IAAhBU,GAEgB,IAAhBA,GAAqBF,IAAaR,EAAM,GAAKQ,IAAaC,EAAY,GACvD,IAATT,IACiCoB,EAAIJ,KAAOI,EAAIH,KAAhC,IAAdR,GAAmB5B,EAAkC1B,EAAKgB,MAAM,EAAG6B,GAAgC7C,EAAKgB,MAAMsC,EAAWT,KAG7G,IAAdS,GAAmB5B,GACrBuC,EAAIH,KAAO9D,EAAKgB,MAAM,EAAGqC,GACzBY,EAAIJ,KAAO7D,EAAKgB,MAAM,EAAG6B,KAEzBoB,EAAIH,KAAO9D,EAAKgB,MAAMsC,EAAWD,GACjCY,EAAIJ,KAAO7D,EAAKgB,MAAMsC,EAAWT,IAEnCoB,EAAIjB,IAAMhD,EAAKgB,MAAMqC,EAAUR,IAG7BS,EAAY,EAAGW,EAAIN,IAAM3D,EAAKgB,MAAM,EAAGsC,EAAY,GAAY5B,IAAYuC,EAAIN,IAAM,KAElFM,CACT,EAEAP,IAAK,IACLQ,UAAW,IACXC,MAAO,KACPlD,MAAO,MAGTA,EAAMA,MAAQA,EAEdmD,EAAOC,QAAUpD,C,GC/gBbqD,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBjD,IAAjBkD,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAK,EAAoBF,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,CCrBAE,EAAoBI,EAAI,CAACN,EAASO,KACjC,IAAI,IAAIC,KAAOD,EACXL,EAAoBO,EAAEF,EAAYC,KAASN,EAAoBO,EAAET,EAASQ,IAC5EE,OAAOC,eAAeX,EAASQ,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDN,EAAoBO,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFb,EAAoBiB,EAAKnB,IACH,oBAAXoB,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAeX,EAASoB,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAeX,EAAS,aAAc,CAAEsB,OAAO,GAAO,E,eCQvD,IAAIC,EAEX,G,sCAAuB,iBAAZpE,QACVoE,EAAiC,UAArBpE,QAAQqE,cACd,GAAyB,iBAAdC,UAAwB,CACzC,IAAIC,EAAYD,UAAUC,UAC1BH,EAAYG,EAAUC,QAAQ,YAAc,C,CCV7C,MAAMC,EAAiB,iBACjBC,EAAoB,MACpBC,EAAoB,QAE1B,SAASC,EAAanC,EAAUoC,GAG/B,IAAKpC,EAAIqC,QAAUD,EAClB,MAAM,IAAIE,MAAM,2DAA2DtC,EAAIuC,sBAAsBvC,EAAIjE,kBAAkBiE,EAAIwC,sBAAsBxC,EAAIyC,cAK1J,GAAIzC,EAAIqC,SAAWL,EAAeU,KAAK1C,EAAIqC,QAC1C,MAAM,IAAIC,MAAM,mDAQjB,GAAItC,EAAIjE,KACP,GAAIiE,EAAIuC,WACP,IAAKN,EAAkBS,KAAK1C,EAAIjE,MAC/B,MAAM,IAAIuG,MAAM,iJAGjB,GAAIJ,EAAkBQ,KAAK1C,EAAIjE,MAC9B,MAAM,IAAIuG,MAAM,4HAIpB,CAkCA,MAAMK,EAAS,GACTC,EAAS,IACTC,EAAU,+DAkBT,MAAMC,EAEZ,YAAOC,CAAMC,GACZ,OAAIA,aAAiBF,KAGhBE,GAGoC,iBAArBA,EAAOT,WACU,iBAApBS,EAAOP,UACS,iBAAhBO,EAAOjH,MACU,iBAAjBiH,EAAOR,OACW,iBAAlBQ,EAAOX,QACW,iBAAlBW,EAAOC,QACS,mBAAhBD,EAAOE,MACa,mBAApBF,EAAOG,QACzB,CAMSd,OAMAE,UAKAxG,KAKAyG,MAKAC,SAeT,YAAsBW,EAAsCb,EAAoBxG,EAAeyG,EAAgBC,EAAmBL,GAAmB,GAExH,iBAAjBgB,GACVC,KAAKhB,OAASe,EAAaf,QAAUM,EACrCU,KAAKd,UAAYa,EAAab,WAAaI,EAC3CU,KAAKtH,KAAOqH,EAAarH,MAAQ4G,EACjCU,KAAKb,MAAQY,EAAaZ,OAASG,EACnCU,KAAKZ,SAAWW,EAAaX,UAAYE,IAKzCU,KAAKhB,OAvHR,SAAoBA,EAAgBD,GACnC,OAAKC,GAAWD,EAGTC,EAFC,MAGT,CAkHiBiB,CAAWF,EAAchB,GACvCiB,KAAKd,UAAYA,GAAaI,EAC9BU,KAAKtH,KAjHR,SAA8BsG,EAAgBtG,GAM7C,OAAQsG,GACP,IAAK,QACL,IAAK,OACL,IAAK,OACCtG,EAEMA,EAAK,KAAO6G,IACtB7G,EAAO6G,EAAS7G,GAFhBA,EAAO6G,EAMV,OAAO7G,CACR,CA+FewH,CAAqBF,KAAKhB,OAAQtG,GAAQ4G,GACtDU,KAAKb,MAAQA,GAASG,EACtBU,KAAKZ,SAAWA,GAAYE,EAE5BR,EAAakB,KAAMjB,GAErB,CA4BA,UAAIa,GAIH,OAAOO,EAAYH,MAAM,EAC1B,CAIA,KAAKI,GAEJ,IAAKA,EACJ,OAAOJ,KAGR,IAAI,OAAEhB,EAAM,UAAEE,EAAS,KAAExG,EAAI,MAAEyG,EAAK,SAAEC,GAAagB,EA2BnD,YA1BenG,IAAX+E,EACHA,EAASgB,KAAKhB,OACO,OAAXA,IACVA,EAASM,QAEQrF,IAAdiF,EACHA,EAAYc,KAAKd,UACO,OAAdA,IACVA,EAAYI,QAEArF,IAATvB,EACHA,EAAOsH,KAAKtH,KACO,OAATA,IACVA,EAAO4G,QAEMrF,IAAVkF,EACHA,EAAQa,KAAKb,MACO,OAAVA,IACVA,EAAQG,QAEQrF,IAAbmF,EACHA,EAAWY,KAAKZ,SACO,OAAbA,IACVA,EAAWE,GAGRN,IAAWgB,KAAKhB,QAChBE,IAAcc,KAAKd,WACnBxG,IAASsH,KAAKtH,MACdyG,IAAUa,KAAKb,OACfC,IAAaY,KAAKZ,SAEdY,KAGD,IAAIK,EAAIrB,EAAQE,EAAWxG,EAAMyG,EAAOC,EAChD,CAUA,YAAO1C,CAAM2B,EAAeU,GAAmB,GAC9C,MAAMuB,EAAQd,EAAQe,KAAKlC,GAC3B,OAAKiC,EAGE,IAAID,EACVC,EAAM,IAAMhB,EACZkB,EAAcF,EAAM,IAAMhB,GAC1BkB,EAAcF,EAAM,IAAMhB,GAC1BkB,EAAcF,EAAM,IAAMhB,GAC1BkB,EAAcF,EAAM,IAAMhB,GAC1BP,GARO,IAAIsB,EAAIf,EAAQA,EAAQA,EAAQA,EAAQA,EAUjD,CAuBA,WAAOmB,CAAK/H,GAEX,IAAIwG,EAAYI,EAWhB,GANIhB,IACH5F,EAAOA,EAAKgI,QAAQ,MAAOnB,IAKxB7G,EAAK,KAAO6G,GAAU7G,EAAK,KAAO6G,EAAQ,CAC7C,MAAMoB,EAAMjI,EAAKgG,QAAQa,EAAQ,IACpB,IAAToB,GACHzB,EAAYxG,EAAKkI,UAAU,GAC3BlI,EAAO6G,IAEPL,EAAYxG,EAAKkI,UAAU,EAAGD,GAC9BjI,EAAOA,EAAKkI,UAAUD,IAAQpB,E,CAIhC,OAAO,IAAIc,EAAI,OAAQnB,EAAWxG,EAAM4G,EAAQA,EACjD,CAEA,WAAO5E,CAAKmG,GACX,MAAMC,EAAS,IAAIT,EAClBQ,EAAW7B,OACX6B,EAAW3B,UACX2B,EAAWnI,KACXmI,EAAW1B,MACX0B,EAAWzB,UAGZ,OADAN,EAAagC,GAAQ,GACdA,CACR,CAeA,QAAAhB,CAASiB,GAAwB,GAChC,OAAOC,EAAahB,KAAMe,EAC3B,CAEA,MAAAE,GACC,OAAOjB,IACR,CAMA,aAAOkB,CAAOC,GACb,GAAKA,EAEE,IAAIA,aAAgB1B,EAC1B,OAAO0B,EACD,CACN,MAAML,EAAS,IAAIT,EAAIc,GAGvB,OAFAL,EAAOM,WAAwBD,EAAME,SACrCP,EAAOQ,QAAqBH,EAAMI,OAASC,EAA4BL,EAAMvB,OAAS,KAC/EkB,C,EAPP,OAAYK,CASd,EAkBD,MAAMK,EAAiBlD,EAAY,OAAIrE,EAGvC,MAAMoG,UAAYZ,EAEjB2B,WAA4B,KAC5BE,QAAyB,KAEzB,UAAa1B,GAIZ,OAHKI,KAAKsB,UACTtB,KAAKsB,QAAUnB,EAAYH,MAAM,IAE3BA,KAAKsB,OACb,CAES,QAAAxB,CAASiB,GAAwB,GACzC,OAAKA,EAOGC,EAAahB,MAAM,IANrBA,KAAKoB,aACTpB,KAAKoB,WAAaJ,EAAahB,MAAM,IAE/BA,KAAKoB,WAKd,CAES,MAAAH,GACR,MAAMhI,EAAgB,CACrBwI,KAAM,GA0BP,OAvBIzB,KAAKsB,UACRrI,EAAI2G,OAASI,KAAKsB,QAClBrI,EAAIsI,KAAOC,GAERxB,KAAKoB,aACRnI,EAAIoI,SAAWrB,KAAKoB,YAGjBpB,KAAKtH,OACRO,EAAIP,KAAOsH,KAAKtH,MAEbsH,KAAKhB,SACR/F,EAAI+F,OAASgB,KAAKhB,QAEfgB,KAAKd,YACRjG,EAAIiG,UAAYc,KAAKd,WAElBc,KAAKb,QACRlG,EAAIkG,MAAQa,KAAKb,OAEda,KAAKZ,WACRnG,EAAImG,SAAWY,KAAKZ,UAEdnG,CACR,EAID,MAAMyI,EAAwC,CAC7C,GAAkB,MAClB,GAAkB,MAClB,GAAyB,MACzB,GAAiB,MACjB,GAA8B,MAC9B,GAA+B,MAC/B,GAAmB,MAEnB,GAA4B,MAC5B,GAAuB,MACvB,GAAsB,MACtB,GAAwB,MACxB,GAAsB,MACtB,GAAuB,MACvB,GAAqB,MACrB,GAAiB,MACjB,GAAkB,MAClB,GAAsB,MACtB,GAAmB,MAEnB,GAAkB,OAGnB,SAASC,EAAuBC,EAAsBC,EAAiBC,GACtE,IAAI7I,EACA8I,GAAmB,EAEvB,IAAK,IAAIC,EAAM,EAAGA,EAAMJ,EAAatI,OAAQ0I,IAAO,CACnD,MAAMhJ,EAAO4I,EAAarI,WAAWyI,GAGrC,GACEhJ,GAAQ,IAAcA,GAAQ,KAC3BA,GAAQ,IAAcA,GAAQ,IAC9BA,GAAQ,IAAmBA,GAAQ,IAC3B,KAATA,GACS,KAATA,GACS,KAATA,GACS,MAATA,GACC6I,GAAmB,KAAT7I,GACV8I,GAAwB,KAAT9I,GACf8I,GAAwB,KAAT9I,GACf8I,GAAwB,KAAT9I,GAGM,IAArB+I,IACH9I,GAAOgJ,mBAAmBL,EAAahB,UAAUmB,EAAiBC,IAClED,GAAmB,QAGR9H,IAARhB,IACHA,GAAO2I,EAAaM,OAAOF,QAGtB,MAEM/H,IAARhB,IACHA,EAAM2I,EAAaO,OAAO,EAAGH,IAI9B,MAAMI,EAAUV,EAAY1I,QACZiB,IAAZmI,IAGsB,IAArBL,IACH9I,GAAOgJ,mBAAmBL,EAAahB,UAAUmB,EAAiBC,IAClED,GAAmB,GAIpB9I,GAAOmJ,IAEwB,IAArBL,IAEVA,EAAkBC,E,EASrB,OAJyB,IAArBD,IACH9I,GAAOgJ,mBAAmBL,EAAahB,UAAUmB,UAGnC9H,IAARhB,EAAoBA,EAAM2I,CAClC,CAEA,SAASS,EAA0B3J,GAClC,IAAIO,EACJ,IAAK,IAAI+I,EAAM,EAAGA,EAAMtJ,EAAKY,OAAQ0I,IAAO,CAC3C,MAAMhJ,EAAON,EAAKa,WAAWyI,GAChB,KAAThJ,GAAmC,KAATA,QACjBiB,IAARhB,IACHA,EAAMP,EAAKyJ,OAAO,EAAGH,IAEtB/I,GAAOyI,EAAY1I,SAEPiB,IAARhB,IACHA,GAAOP,EAAKsJ,G,CAIf,YAAe/H,IAARhB,EAAoBA,EAAMP,CAClC,CAKO,SAASyH,EAAYmC,EAAUC,GAErC,IAAIlE,EAsBJ,OAnBCA,EAFGiE,EAAIpD,WAAaoD,EAAI5J,KAAKY,OAAS,GAAoB,SAAfgJ,EAAItD,OAEvC,KAAKsD,EAAIpD,YAAYoD,EAAI5J,OAEN,KAA3B4J,EAAI5J,KAAKa,WAAW,KAChB+I,EAAI5J,KAAKa,WAAW,IAAM,IAAc+I,EAAI5J,KAAKa,WAAW,IAAM,IAAc+I,EAAI5J,KAAKa,WAAW,IAAM,IAAc+I,EAAI5J,KAAKa,WAAW,IAAM,MACxH,KAA3B+I,EAAI5J,KAAKa,WAAW,GAElBgJ,EAIID,EAAI5J,KAAKyJ,OAAO,GAFhBG,EAAI5J,KAAK,GAAG8J,cAAgBF,EAAI5J,KAAKyJ,OAAO,GAM7CG,EAAI5J,KAET4F,IACHD,EAAQA,EAAMqC,QAAQ,MAAO,OAEvBrC,CACR,CAKA,SAAS2C,EAAasB,EAAUvB,GAE/B,MAAM0B,EAAW1B,EAEdsB,EADAV,EAGH,IAAI1I,EAAM,IACN,OAAE+F,EAAM,UAAEE,EAAS,KAAExG,EAAI,MAAEyG,EAAK,SAAEC,GAAakD,EASnD,GARItD,IACH/F,GAAO+F,EACP/F,GAAO,MAEJiG,GAAwB,SAAXF,KAChB/F,GAAOsG,EACPtG,GAAOsG,GAEJL,EAAW,CACd,IAAIyB,EAAMzB,EAAUR,QAAQ,KAC5B,IAAa,IAATiC,EAAY,CAEf,MAAM+B,EAAWxD,EAAUiD,OAAO,EAAGxB,GACrCzB,EAAYA,EAAUiD,OAAOxB,EAAM,GACnCA,EAAM+B,EAASjJ,YAAY,MACd,IAATkH,EACH1H,GAAOwJ,EAAQC,GAAU,GAAO,IAGhCzJ,GAAOwJ,EAAQC,EAASP,OAAO,EAAGxB,IAAM,GAAO,GAC/C1H,GAAO,IACPA,GAAOwJ,EAAQC,EAASP,OAAOxB,EAAM,IAAI,GAAO,IAEjD1H,GAAO,G,CAERiG,EAAYA,EAAUsD,cACtB7B,EAAMzB,EAAUzF,YAAY,MACf,IAATkH,EACH1H,GAAOwJ,EAAQvD,GAAW,GAAO,IAGjCjG,GAAOwJ,EAAQvD,EAAUiD,OAAO,EAAGxB,IAAM,GAAO,GAChD1H,GAAOiG,EAAUiD,OAAOxB,G,CAG1B,GAAIjI,EAAM,CAET,GAAIA,EAAKY,QAAU,GAA4B,KAAvBZ,EAAKa,WAAW,IAAgD,KAAvBb,EAAKa,WAAW,GAAuB,CACvG,MAAMP,EAAON,EAAKa,WAAW,GACzBP,GAAQ,IAAcA,GAAQ,KACjCN,EAAO,IAAIiK,OAAOC,aAAa5J,EAAO,OAAON,EAAKyJ,OAAO,K,MAEpD,GAAIzJ,EAAKY,QAAU,GAA4B,KAAvBZ,EAAKa,WAAW,GAAuB,CACrE,MAAMP,EAAON,EAAKa,WAAW,GACzBP,GAAQ,IAAcA,GAAQ,KACjCN,EAAO,GAAGiK,OAAOC,aAAa5J,EAAO,OAAON,EAAKyJ,OAAO,K,CAI1DlJ,GAAOwJ,EAAQ/J,GAAM,GAAM,E,CAU5B,OARIyG,IACHlG,GAAO,IACPA,GAAOwJ,EAAQtD,GAAO,GAAO,IAE1BC,IACHnG,GAAO,IACPA,GAAQ8H,EAAgE3B,EAAjDuC,EAAuBvC,GAAU,GAAO,IAEzDnG,CACR,CAIA,SAAS4J,EAA2BC,GACnC,IACC,OAAOC,mBAAmBD,E,CACzB,MACD,OAAIA,EAAIxJ,OAAS,EACTwJ,EAAIX,OAAO,EAAG,GAAKU,EAA2BC,EAAIX,OAAO,IAEzDW,C,CAGV,CAEA,MAAME,EAAiB,8BAEvB,SAASxC,EAAcsC,GACtB,OAAKA,EAAIxC,MAAM0C,GAGRF,EAAIpC,QAAQsC,GAAiB1C,GAAUuC,EAA2BvC,KAFjEwC,CAGT,C,aCjqBA,MAAMG,EAAY,SAAkB,EAC9BC,EAAQ,IAEP,IAAUC,GAAjB,SAAiBA,GAeG,EAAAC,SAAhB,SAAyBd,KAAae,GAClC,OAAOf,EAAIzC,KAAK,CAAEnH,KAAMuK,EAAU3I,KAAKgI,EAAI5J,QAAS2K,IACxD,EAgBgB,EAAAC,YAAhB,SAA4BhB,KAAae,GACrC,IAAI3K,EAAO4J,EAAI5J,KACX6K,GAAa,EACb7K,EAAK,KAAOwK,IACZxK,EAAOwK,EAAQxK,EACf6K,GAAa,GAEjB,IAAIzJ,EAAemJ,EAAUrJ,QAAQlB,KAAS2K,GAI9C,OAHIE,GAAczJ,EAAa,KAAOoJ,IAAUZ,EAAIpD,YAChDpF,EAAeA,EAAa8G,UAAU,IAEnC0B,EAAIzC,KAAK,CAAEnH,KAAMoB,GAC5B,EAUgB,EAAAuB,QAAhB,SAAwBiH,GACpB,GAAwB,IAApBA,EAAI5J,KAAKY,QAAgBgJ,EAAI5J,OAASwK,EACtC,OAAOZ,EAEX,IAAI5J,EAAOuK,EAAU5H,QAAQiH,EAAI5J,MAIjC,OAHoB,IAAhBA,EAAKY,QAAuC,KAAvBZ,EAAKa,WAAW,KACrCb,EAAO,IAEJ4J,EAAIzC,KAAK,CAAEnH,QACtB,EAUgB,EAAA+C,SAAhB,SAAyB6G,GACrB,OAAOW,EAAUxH,SAAS6G,EAAI5J,KAClC,EAUgB,EAAAoD,QAAhB,SAAwBwG,GACpB,OAAOW,EAAUnH,QAAQwG,EAAI5J,KACjC,CACH,CAzFD,CAAiByK,IAAAA,EAAK,I","sources":["webpack://LIB/./node_modules/path-browserify/index.js","webpack://LIB/webpack/bootstrap","webpack://LIB/webpack/runtime/define property getters","webpack://LIB/webpack/runtime/hasOwnProperty shorthand","webpack://LIB/webpack/runtime/make namespace object","webpack://LIB/./src/platform.ts","webpack://LIB/./src/uri.ts","webpack://LIB/./src/utils.ts"],"sourcesContent":["// 'path' module extracted from Node.js v8.11.1 (only the posix part)\n// transplited with Babel\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));\n }\n}\n\n// Resolves . and .. elements in a path with directory names\nfunction normalizeStringPosix(path, allowAboveRoot) {\n var res = '';\n var lastSegmentLength = 0;\n var lastSlash = -1;\n var dots = 0;\n var code;\n for (var i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = path.charCodeAt(i);\n else if (code === 47 /*/*/)\n break;\n else\n code = 47 /*/*/;\n if (code === 47 /*/*/) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n if (res.length > 2) {\n var lastSlashIndex = res.lastIndexOf('/');\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n } else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0)\n res += '/..';\n else\n res = '..';\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0)\n res += '/' + path.slice(lastSlash + 1, i);\n else\n res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\nfunction _format(sep, pathObject) {\n var dir = pathObject.dir || pathObject.root;\n var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');\n if (!dir) {\n return base;\n }\n if (dir === pathObject.root) {\n return dir + base;\n }\n return dir + sep + base;\n}\n\nvar posix = {\n // path.resolve([from ...], to)\n resolve: function resolve() {\n var resolvedPath = '';\n var resolvedAbsolute = false;\n var cwd;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path;\n if (i >= 0)\n path = arguments[i];\n else {\n if (cwd === undefined)\n cwd = process.cwd();\n path = cwd;\n }\n\n assertPath(path);\n\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0)\n return '/' + resolvedPath;\n else\n return '/';\n } else if (resolvedPath.length > 0) {\n return resolvedPath;\n } else {\n return '.';\n }\n },\n\n normalize: function normalize(path) {\n assertPath(path);\n\n if (path.length === 0) return '.';\n\n var isAbsolute = path.charCodeAt(0) === 47 /*/*/;\n var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;\n\n // Normalize the path\n path = normalizeStringPosix(path, !isAbsolute);\n\n if (path.length === 0 && !isAbsolute) path = '.';\n if (path.length > 0 && trailingSeparator) path += '/';\n\n if (isAbsolute) return '/' + path;\n return path;\n },\n\n isAbsolute: function isAbsolute(path) {\n assertPath(path);\n return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;\n },\n\n join: function join() {\n if (arguments.length === 0)\n return '.';\n var joined;\n for (var i = 0; i < arguments.length; ++i) {\n var arg = arguments[i];\n assertPath(arg);\n if (arg.length > 0) {\n if (joined === undefined)\n joined = arg;\n else\n joined += '/' + arg;\n }\n }\n if (joined === undefined)\n return '.';\n return posix.normalize(joined);\n },\n\n relative: function relative(from, to) {\n assertPath(from);\n assertPath(to);\n\n if (from === to) return '';\n\n from = posix.resolve(from);\n to = posix.resolve(to);\n\n if (from === to) return '';\n\n // Trim any leading backslashes\n var fromStart = 1;\n for (; fromStart < from.length; ++fromStart) {\n if (from.charCodeAt(fromStart) !== 47 /*/*/)\n break;\n }\n var fromEnd = from.length;\n var fromLen = fromEnd - fromStart;\n\n // Trim any leading backslashes\n var toStart = 1;\n for (; toStart < to.length; ++toStart) {\n if (to.charCodeAt(toStart) !== 47 /*/*/)\n break;\n }\n var toEnd = to.length;\n var toLen = toEnd - toStart;\n\n // Compare paths to find the longest common path from root\n var length = fromLen < toLen ? fromLen : toLen;\n var lastCommonSep = -1;\n var i = 0;\n for (; i <= length; ++i) {\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === 47 /*/*/) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n } else if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n } else if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === 47 /*/*/) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n } else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo'; to='/'\n lastCommonSep = 0;\n }\n }\n break;\n }\n var fromCode = from.charCodeAt(fromStart + i);\n var toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode)\n break;\n else if (fromCode === 47 /*/*/)\n lastCommonSep = i;\n }\n\n var out = '';\n // Generate the relative path based on the path difference between `to`\n // and `from`\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {\n if (out.length === 0)\n out += '..';\n else\n out += '/..';\n }\n }\n\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0)\n return out + to.slice(toStart + lastCommonSep);\n else {\n toStart += lastCommonSep;\n if (to.charCodeAt(toStart) === 47 /*/*/)\n ++toStart;\n return to.slice(toStart);\n }\n },\n\n _makeLong: function _makeLong(path) {\n return path;\n },\n\n dirname: function dirname(path) {\n assertPath(path);\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) return '//';\n return path.slice(0, end);\n },\n\n basename: function basename(path, ext) {\n if (ext !== undefined && typeof ext !== 'string') throw new TypeError('\"ext\" argument must be a string');\n assertPath(path);\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext.length === path.length && ext === path) return '';\n var extIdx = ext.length - 1;\n var firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n\n if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;\n return path.slice(start, end);\n } else {\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n }\n },\n\n extname: function extname(path) {\n assertPath(path);\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n },\n\n format: function format(pathObject) {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new TypeError('The \"pathObject\" argument must be of type Object. Received type ' + typeof pathObject);\n }\n return _format('/', pathObject);\n },\n\n parse: function parse(path) {\n assertPath(path);\n\n var ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) return ret;\n var code = path.charCodeAt(0);\n var isAbsolute = code === 47 /*/*/;\n var start;\n if (isAbsolute) {\n ret.root = '/';\n start = 1;\n } else {\n start = 0;\n }\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n var i = path.length - 1;\n\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n\n // Get non-dir info\n for (; i >= start; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);\n }\n } else {\n if (startPart === 0 && isAbsolute) {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n\n if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';\n\n return ret;\n },\n\n sep: '/',\n delimiter: ':',\n win32: null,\n posix: null\n};\n\nposix.posix = posix;\n\nmodule.exports = posix;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\n// !!!!!\n// SEE https://github.com/microsoft/vscode/blob/master/src/vs/base/common/platform.ts\n// !!!!!\n\ndeclare const process: { platform: 'win32' };\ndeclare const navigator: { userAgent: string };\n\nexport let isWindows: boolean;\n\nif (typeof process === 'object') {\n\tisWindows = process.platform === 'win32';\n} else if (typeof navigator === 'object') {\n\tlet userAgent = navigator.userAgent;\n\tisWindows = userAgent.indexOf('Windows') >= 0;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nimport { CharCode } from './charCode'\nimport { isWindows } from './platform';\n\nconst _schemePattern = /^\\w[\\w\\d+.-]*$/;\nconst _singleSlashStart = /^\\//;\nconst _doubleSlashStart = /^\\/\\//;\n\nfunction _validateUri(ret: URI, _strict?: boolean): void {\n\n\t// scheme, must be set\n\tif (!ret.scheme && _strict) {\n\t\tthrow new Error(`[UriError]: Scheme is missing: {scheme: \"\", authority: \"${ret.authority}\", path: \"${ret.path}\", query: \"${ret.query}\", fragment: \"${ret.fragment}\"}`);\n\t}\n\n\t// scheme, https://tools.ietf.org/html/rfc3986#section-3.1\n\t// ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\n\tif (ret.scheme && !_schemePattern.test(ret.scheme)) {\n\t\tthrow new Error('[UriError]: Scheme contains illegal characters.');\n\t}\n\n\t// path, http://tools.ietf.org/html/rfc3986#section-3.3\n\t// If a URI contains an authority component, then the path component\n\t// must either be empty or begin with a slash (\"/\") character. If a URI\n\t// does not contain an authority component, then the path cannot begin\n\t// with two slash characters (\"//\").\n\tif (ret.path) {\n\t\tif (ret.authority) {\n\t\t\tif (!_singleSlashStart.test(ret.path)) {\n\t\t\t\tthrow new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character');\n\t\t\t}\n\t\t} else {\n\t\t\tif (_doubleSlashStart.test(ret.path)) {\n\t\t\t\tthrow new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")');\n\t\t\t}\n\t\t}\n\t}\n}\n\n// for a while we allowed uris *without* schemes and this is the migration\n// for them, e.g. an uri without scheme and without strict-mode warns and falls\n// back to the file-scheme. that should cause the least carnage and still be a\n// clear warning\nfunction _schemeFix(scheme: string, _strict: boolean): string {\n\tif (!scheme && !_strict) {\n\t\treturn 'file';\n\t}\n\treturn scheme;\n}\n\n// implements a bit of https://tools.ietf.org/html/rfc3986#section-5\nfunction _referenceResolution(scheme: string, path: string): string {\n\n\t// the slash-character is our 'default base' as we don't\n\t// support constructing URIs relative to other URIs. This\n\t// also means that we alter and potentially break paths.\n\t// see https://tools.ietf.org/html/rfc3986#section-5.1.4\n\tswitch (scheme) {\n\t\tcase 'https':\n\t\tcase 'http':\n\t\tcase 'file':\n\t\t\tif (!path) {\n\t\t\t\tpath = _slash;\n\t\t\t} else if (path[0] !== _slash) {\n\t\t\t\tpath = _slash + path;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn path;\n}\n\nconst _empty = '';\nconst _slash = '/';\nconst _regexp = /^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\n\n/**\n * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.\n * This class is a simple parser which creates the basic component parts\n * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation\n * and encoding.\n *\n * ```txt\n * foo://example.com:8042/over/there?name=ferret#nose\n * \\_/ \\______________/\\_________/ \\_________/ \\__/\n * | | | | |\n * scheme authority path query fragment\n * | _____________________|__\n * / \\ / \\\n * urn:example:animal:ferret:nose\n * ```\n */\nexport class URI implements UriComponents {\n\n\tstatic isUri(thing: any): thing is URI {\n\t\tif (thing instanceof URI) {\n\t\t\treturn true;\n\t\t}\n\t\tif (!thing) {\n\t\t\treturn false;\n\t\t}\n\t\treturn typeof (thing).authority === 'string'\n\t\t\t&& typeof (thing).fragment === 'string'\n\t\t\t&& typeof (thing).path === 'string'\n\t\t\t&& typeof (thing).query === 'string'\n\t\t\t&& typeof (thing).scheme === 'string'\n\t\t\t&& typeof (thing).fsPath === 'string'\n\t\t\t&& typeof (thing).with === 'function'\n\t\t\t&& typeof (thing).toString === 'function';\n\t}\n\n\t/**\n\t * scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.\n\t * The part before the first colon.\n\t */\n\treadonly scheme: string;\n\n\t/**\n\t * authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'.\n\t * The part between the first double slashes and the next slash.\n\t */\n\treadonly authority: string;\n\n\t/**\n\t * path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly path: string;\n\n\t/**\n\t * query is the 'query' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly query: string;\n\n\t/**\n\t * fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly fragment: string;\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean);\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(components: UriComponents);\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(schemeOrData: string | UriComponents, authority?: string, path?: string, query?: string, fragment?: string, _strict: boolean = false) {\n\n\t\tif (typeof schemeOrData === 'object') {\n\t\t\tthis.scheme = schemeOrData.scheme || _empty;\n\t\t\tthis.authority = schemeOrData.authority || _empty;\n\t\t\tthis.path = schemeOrData.path || _empty;\n\t\t\tthis.query = schemeOrData.query || _empty;\n\t\t\tthis.fragment = schemeOrData.fragment || _empty;\n\t\t\t// no validation because it's this URI\n\t\t\t// that creates uri components.\n\t\t\t// _validateUri(this);\n\t\t} else {\n\t\t\tthis.scheme = _schemeFix(schemeOrData, _strict);\n\t\t\tthis.authority = authority || _empty;\n\t\t\tthis.path = _referenceResolution(this.scheme, path || _empty);\n\t\t\tthis.query = query || _empty;\n\t\t\tthis.fragment = fragment || _empty;\n\n\t\t\t_validateUri(this, _strict);\n\t\t}\n\t}\n\n\t// ---- filesystem path -----------------------\n\n\t/**\n\t * Returns a string representing the corresponding file system path of this URI.\n\t * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the\n\t * platform specific path separator.\n\t *\n\t * * Will *not* validate the path for invalid characters and semantics.\n\t * * Will *not* look at the scheme of this URI.\n\t * * The result shall *not* be used for display purposes but for accessing a file on disk.\n\t *\n\t *\n\t * The *difference* to `URI#path` is the use of the platform specific separator and the handling\n\t * of UNC paths. See the below sample of a file-uri with an authority (UNC path).\n\t *\n\t * ```ts\n\t\tconst u = URI.parse('file://server/c$/folder/file.txt')\n\t\tu.authority === 'server'\n\t\tu.path === '/shares/c$/file.txt'\n\t\tu.fsPath === '\\\\server\\c$\\folder\\file.txt'\n\t```\n\t *\n\t * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,\n\t * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working\n\t * with URIs that represent files on disk (`file` scheme).\n\t */\n\tget fsPath(): string {\n\t\t// if (this.scheme !== 'file') {\n\t\t// \tconsole.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);\n\t\t// }\n\t\treturn uriToFsPath(this, false);\n\t}\n\n\t// ---- modify to new -------------------------\n\n\twith(change: { scheme?: string; authority?: string | null; path?: string | null; query?: string | null; fragment?: string | null }): URI {\n\n\t\tif (!change) {\n\t\t\treturn this;\n\t\t}\n\n\t\tlet { scheme, authority, path, query, fragment } = change;\n\t\tif (scheme === undefined) {\n\t\t\tscheme = this.scheme;\n\t\t} else if (scheme === null) {\n\t\t\tscheme = _empty;\n\t\t}\n\t\tif (authority === undefined) {\n\t\t\tauthority = this.authority;\n\t\t} else if (authority === null) {\n\t\t\tauthority = _empty;\n\t\t}\n\t\tif (path === undefined) {\n\t\t\tpath = this.path;\n\t\t} else if (path === null) {\n\t\t\tpath = _empty;\n\t\t}\n\t\tif (query === undefined) {\n\t\t\tquery = this.query;\n\t\t} else if (query === null) {\n\t\t\tquery = _empty;\n\t\t}\n\t\tif (fragment === undefined) {\n\t\t\tfragment = this.fragment;\n\t\t} else if (fragment === null) {\n\t\t\tfragment = _empty;\n\t\t}\n\n\t\tif (scheme === this.scheme\n\t\t\t&& authority === this.authority\n\t\t\t&& path === this.path\n\t\t\t&& query === this.query\n\t\t\t&& fragment === this.fragment) {\n\n\t\t\treturn this;\n\t\t}\n\n\t\treturn new Uri(scheme, authority, path, query, fragment);\n\t}\n\n\t// ---- parse & validate ------------------------\n\n\t/**\n\t * Creates a new URI from a string, e.g. `http://www.example.com/some/path`,\n\t * `file:///usr/home`, or `scheme:with/path`.\n\t *\n\t * @param value A string which represents an URI (see `URI#toString`).\n\t */\n\tstatic parse(value: string, _strict: boolean = false): URI {\n\t\tconst match = _regexp.exec(value);\n\t\tif (!match) {\n\t\t\treturn new Uri(_empty, _empty, _empty, _empty, _empty);\n\t\t}\n\t\treturn new Uri(\n\t\t\tmatch[2] || _empty,\n\t\t\tpercentDecode(match[4] || _empty),\n\t\t\tpercentDecode(match[5] || _empty),\n\t\t\tpercentDecode(match[7] || _empty),\n\t\t\tpercentDecode(match[9] || _empty),\n\t\t\t_strict\n\t\t);\n\t}\n\n\t/**\n\t * Creates a new URI from a file system path, e.g. `c:\\my\\files`,\n\t * `/usr/home`, or `\\\\server\\share\\some\\path`.\n\t *\n\t * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument\n\t * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**\n\t * `URI.parse('file://' + path)` because the path might contain characters that are\n\t * interpreted (# and ?). See the following sample:\n\t * ```ts\n\tconst good = URI.file('/coding/c#/project1');\n\tgood.scheme === 'file';\n\tgood.path === '/coding/c#/project1';\n\tgood.fragment === '';\n\tconst bad = URI.parse('file://' + '/coding/c#/project1');\n\tbad.scheme === 'file';\n\tbad.path === '/coding/c'; // path is now broken\n\tbad.fragment === '/project1';\n\t```\n\t *\n\t * @param path A file system path (see `URI#fsPath`)\n\t */\n\tstatic file(path: string): URI {\n\n\t\tlet authority = _empty;\n\n\t\t// normalize to fwd-slashes on windows,\n\t\t// on other systems bwd-slashes are valid\n\t\t// filename character, eg /f\\oo/ba\\r.txt\n\t\tif (isWindows) {\n\t\t\tpath = path.replace(/\\\\/g, _slash);\n\t\t}\n\n\t\t// check for authority as used in UNC shares\n\t\t// or use the path as given\n\t\tif (path[0] === _slash && path[1] === _slash) {\n\t\t\tconst idx = path.indexOf(_slash, 2);\n\t\t\tif (idx === -1) {\n\t\t\t\tauthority = path.substring(2);\n\t\t\t\tpath = _slash;\n\t\t\t} else {\n\t\t\t\tauthority = path.substring(2, idx);\n\t\t\t\tpath = path.substring(idx) || _slash;\n\t\t\t}\n\t\t}\n\n\t\treturn new Uri('file', authority, path, _empty, _empty);\n\t}\n\n\tstatic from(components: { scheme: string; authority?: string; path?: string; query?: string; fragment?: string }): URI {\n\t\tconst result = new Uri(\n\t\t\tcomponents.scheme,\n\t\t\tcomponents.authority,\n\t\t\tcomponents.path,\n\t\t\tcomponents.query,\n\t\t\tcomponents.fragment,\n\t\t);\n\t\t_validateUri(result, true);\n\t\treturn result;\n\t}\n\n\t// ---- printing/externalize ---------------------------\n\n\t/**\n\t * Creates a string representation for this URI. It's guaranteed that calling\n\t * `URI.parse` with the result of this function creates an URI which is equal\n\t * to this URI.\n\t *\n\t * * The result shall *not* be used for display purposes but for externalization or transport.\n\t * * The result will be encoded using the percentage encoding and encoding happens mostly\n\t * ignore the scheme-specific encoding rules.\n\t *\n\t * @param skipEncoding Do not encode the result, default is `false`\n\t */\n\ttoString(skipEncoding: boolean = false): string {\n\t\treturn _asFormatted(this, skipEncoding);\n\t}\n\n\ttoJSON(): UriComponents {\n\t\treturn this;\n\t}\n\n\tstatic revive(data: UriComponents | URI): URI;\n\tstatic revive(data: UriComponents | URI | undefined): URI | undefined;\n\tstatic revive(data: UriComponents | URI | null): URI | null;\n\tstatic revive(data: UriComponents | URI | undefined | null): URI | undefined | null;\n\tstatic revive(data: UriComponents | URI | undefined | null): URI | undefined | null {\n\t\tif (!data) {\n\t\t\treturn data;\n\t\t} else if (data instanceof URI) {\n\t\t\treturn data;\n\t\t} else {\n\t\t\tconst result = new Uri(data);\n\t\t\tresult._formatted = (data).external;\n\t\t\tresult._fsPath = (data)._sep === _pathSepMarker ? (data).fsPath : null;\n\t\t\treturn result;\n\t\t}\n\t}\n}\n\nexport interface UriComponents {\n\tscheme: string;\n\tauthority: string;\n\tpath: string;\n\tquery: string;\n\tfragment: string;\n}\n\ninterface UriState extends UriComponents {\n\t$mid: number;\n\texternal: string;\n\tfsPath: string;\n\t_sep: 1 | undefined;\n}\n\nconst _pathSepMarker = isWindows ? 1 : undefined;\n\n// This class exists so that URI is compatible with vscode.Uri (API).\nclass Uri extends URI {\n\n\t_formatted: string | null = null;\n\t_fsPath: string | null = null;\n\n\toverride get fsPath(): string {\n\t\tif (!this._fsPath) {\n\t\t\tthis._fsPath = uriToFsPath(this, false);\n\t\t}\n\t\treturn this._fsPath;\n\t}\n\n\toverride toString(skipEncoding: boolean = false): string {\n\t\tif (!skipEncoding) {\n\t\t\tif (!this._formatted) {\n\t\t\t\tthis._formatted = _asFormatted(this, false);\n\t\t\t}\n\t\t\treturn this._formatted;\n\t\t} else {\n\t\t\t// we don't cache that\n\t\t\treturn _asFormatted(this, true);\n\t\t}\n\t}\n\n\toverride toJSON(): UriComponents {\n\t\tconst res = {\n\t\t\t$mid: 1\n\t\t};\n\t\t// cached state\n\t\tif (this._fsPath) {\n\t\t\tres.fsPath = this._fsPath;\n\t\t\tres._sep = _pathSepMarker;\n\t\t}\n\t\tif (this._formatted) {\n\t\t\tres.external = this._formatted;\n\t\t}\n\t\t// uri components\n\t\tif (this.path) {\n\t\t\tres.path = this.path;\n\t\t}\n\t\tif (this.scheme) {\n\t\t\tres.scheme = this.scheme;\n\t\t}\n\t\tif (this.authority) {\n\t\t\tres.authority = this.authority;\n\t\t}\n\t\tif (this.query) {\n\t\t\tres.query = this.query;\n\t\t}\n\t\tif (this.fragment) {\n\t\t\tres.fragment = this.fragment;\n\t\t}\n\t\treturn res;\n\t}\n}\n\n// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2\nconst encodeTable: { [ch: number]: string } = {\n\t[CharCode.Colon]: '%3A', // gen-delims\n\t[CharCode.Slash]: '%2F',\n\t[CharCode.QuestionMark]: '%3F',\n\t[CharCode.Hash]: '%23',\n\t[CharCode.OpenSquareBracket]: '%5B',\n\t[CharCode.CloseSquareBracket]: '%5D',\n\t[CharCode.AtSign]: '%40',\n\n\t[CharCode.ExclamationMark]: '%21', // sub-delims\n\t[CharCode.DollarSign]: '%24',\n\t[CharCode.Ampersand]: '%26',\n\t[CharCode.SingleQuote]: '%27',\n\t[CharCode.OpenParen]: '%28',\n\t[CharCode.CloseParen]: '%29',\n\t[CharCode.Asterisk]: '%2A',\n\t[CharCode.Plus]: '%2B',\n\t[CharCode.Comma]: '%2C',\n\t[CharCode.Semicolon]: '%3B',\n\t[CharCode.Equals]: '%3D',\n\n\t[CharCode.Space]: '%20',\n};\n\nfunction encodeURIComponentFast(uriComponent: string, isPath: boolean, isAuthority: boolean): string {\n\tlet res: string | undefined = undefined;\n\tlet nativeEncodePos = -1;\n\n\tfor (let pos = 0; pos < uriComponent.length; pos++) {\n\t\tconst code = uriComponent.charCodeAt(pos);\n\n\t\t// unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3\n\t\tif (\n\t\t\t(code >= CharCode.a && code <= CharCode.z)\n\t\t\t|| (code >= CharCode.A && code <= CharCode.Z)\n\t\t\t|| (code >= CharCode.Digit0 && code <= CharCode.Digit9)\n\t\t\t|| code === CharCode.Dash\n\t\t\t|| code === CharCode.Period\n\t\t\t|| code === CharCode.Underline\n\t\t\t|| code === CharCode.Tilde\n\t\t\t|| (isPath && code === CharCode.Slash)\n\t\t\t|| (isAuthority && code === CharCode.OpenSquareBracket)\n\t\t\t|| (isAuthority && code === CharCode.CloseSquareBracket)\n\t\t\t|| (isAuthority && code === CharCode.Colon)\n\t\t) {\n\t\t\t// check if we are delaying native encode\n\t\t\tif (nativeEncodePos !== -1) {\n\t\t\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n\t\t\t\tnativeEncodePos = -1;\n\t\t\t}\n\t\t\t// check if we write into a new string (by default we try to return the param)\n\t\t\tif (res !== undefined) {\n\t\t\t\tres += uriComponent.charAt(pos);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// encoding needed, we need to allocate a new string\n\t\t\tif (res === undefined) {\n\t\t\t\tres = uriComponent.substr(0, pos);\n\t\t\t}\n\n\t\t\t// check with default table first\n\t\t\tconst escaped = encodeTable[code];\n\t\t\tif (escaped !== undefined) {\n\n\t\t\t\t// check if we are delaying native encode\n\t\t\t\tif (nativeEncodePos !== -1) {\n\t\t\t\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n\t\t\t\t\tnativeEncodePos = -1;\n\t\t\t\t}\n\n\t\t\t\t// append escaped variant to result\n\t\t\t\tres += escaped;\n\n\t\t\t} else if (nativeEncodePos === -1) {\n\t\t\t\t// use native encode only when needed\n\t\t\t\tnativeEncodePos = pos;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (nativeEncodePos !== -1) {\n\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos));\n\t}\n\n\treturn res !== undefined ? res : uriComponent;\n}\n\nfunction encodeURIComponentMinimal(path: string): string {\n\tlet res: string | undefined = undefined;\n\tfor (let pos = 0; pos < path.length; pos++) {\n\t\tconst code = path.charCodeAt(pos);\n\t\tif (code === CharCode.Hash || code === CharCode.QuestionMark) {\n\t\t\tif (res === undefined) {\n\t\t\t\tres = path.substr(0, pos);\n\t\t\t}\n\t\t\tres += encodeTable[code];\n\t\t} else {\n\t\t\tif (res !== undefined) {\n\t\t\t\tres += path[pos];\n\t\t\t}\n\t\t}\n\t}\n\treturn res !== undefined ? res : path;\n}\n\n/**\n * Compute `fsPath` for the given uri\n */\nexport function uriToFsPath(uri: URI, keepDriveLetterCasing: boolean): string {\n\n\tlet value: string;\n\tif (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {\n\t\t// unc path: file://shares/c$/far/boo\n\t\tvalue = `//${uri.authority}${uri.path}`;\n\t} else if (\n\t\turi.path.charCodeAt(0) === CharCode.Slash\n\t\t&& (uri.path.charCodeAt(1) >= CharCode.A && uri.path.charCodeAt(1) <= CharCode.Z || uri.path.charCodeAt(1) >= CharCode.a && uri.path.charCodeAt(1) <= CharCode.z)\n\t\t&& uri.path.charCodeAt(2) === CharCode.Colon\n\t) {\n\t\tif (!keepDriveLetterCasing) {\n\t\t\t// windows drive letter: file:///c:/far/boo\n\t\t\tvalue = uri.path[1].toLowerCase() + uri.path.substr(2);\n\t\t} else {\n\t\t\tvalue = uri.path.substr(1);\n\t\t}\n\t} else {\n\t\t// other path\n\t\tvalue = uri.path;\n\t}\n\tif (isWindows) {\n\t\tvalue = value.replace(/\\//g, '\\\\');\n\t}\n\treturn value;\n}\n\n/**\n * Create the external version of a uri\n */\nfunction _asFormatted(uri: URI, skipEncoding: boolean): string {\n\n\tconst encoder = !skipEncoding\n\t\t? encodeURIComponentFast\n\t\t: encodeURIComponentMinimal;\n\n\tlet res = '';\n\tlet { scheme, authority, path, query, fragment } = uri;\n\tif (scheme) {\n\t\tres += scheme;\n\t\tres += ':';\n\t}\n\tif (authority || scheme === 'file') {\n\t\tres += _slash;\n\t\tres += _slash;\n\t}\n\tif (authority) {\n\t\tlet idx = authority.indexOf('@');\n\t\tif (idx !== -1) {\n\t\t\t// @\n\t\t\tconst userinfo = authority.substr(0, idx);\n\t\t\tauthority = authority.substr(idx + 1);\n\t\t\tidx = userinfo.lastIndexOf(':');\n\t\t\tif (idx === -1) {\n\t\t\t\tres += encoder(userinfo, false, false);\n\t\t\t} else {\n\t\t\t\t// :@\n\t\t\t\tres += encoder(userinfo.substr(0, idx), false, false);\n\t\t\t\tres += ':';\n\t\t\t\tres += encoder(userinfo.substr(idx + 1), false, true);\n\t\t\t}\n\t\t\tres += '@';\n\t\t}\n\t\tauthority = authority.toLowerCase();\n\t\tidx = authority.lastIndexOf(':');\n\t\tif (idx === -1) {\n\t\t\tres += encoder(authority, false, true);\n\t\t} else {\n\t\t\t// :\n\t\t\tres += encoder(authority.substr(0, idx), false, true);\n\t\t\tres += authority.substr(idx);\n\t\t}\n\t}\n\tif (path) {\n\t\t// lower-case windows drive letters in /C:/fff or C:/fff\n\t\tif (path.length >= 3 && path.charCodeAt(0) === CharCode.Slash && path.charCodeAt(2) === CharCode.Colon) {\n\t\t\tconst code = path.charCodeAt(1);\n\t\t\tif (code >= CharCode.A && code <= CharCode.Z) {\n\t\t\t\tpath = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`; // \"/c:\".length === 3\n\t\t\t}\n\t\t} else if (path.length >= 2 && path.charCodeAt(1) === CharCode.Colon) {\n\t\t\tconst code = path.charCodeAt(0);\n\t\t\tif (code >= CharCode.A && code <= CharCode.Z) {\n\t\t\t\tpath = `${String.fromCharCode(code + 32)}:${path.substr(2)}`; // \"/c:\".length === 3\n\t\t\t}\n\t\t}\n\t\t// encode the rest of the path\n\t\tres += encoder(path, true, false);\n\t}\n\tif (query) {\n\t\tres += '?';\n\t\tres += encoder(query, false, false);\n\t}\n\tif (fragment) {\n\t\tres += '#';\n\t\tres += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment;\n\t}\n\treturn res;\n}\n\n// --- decode\n\nfunction decodeURIComponentGraceful(str: string): string {\n\ttry {\n\t\treturn decodeURIComponent(str);\n\t} catch {\n\t\tif (str.length > 3) {\n\t\t\treturn str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));\n\t\t} else {\n\t\t\treturn str;\n\t\t}\n\t}\n}\n\nconst _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;\n\nfunction percentDecode(str: string): string {\n\tif (!str.match(_rEncodedAsHex)) {\n\t\treturn str;\n\t}\n\treturn str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match));\n}\n\n/**\n * Mapped-type that replaces all occurrences of URI with UriComponents\n */\nexport type UriDto = { [K in keyof T]: T[K] extends URI\n\t? UriComponents\n\t: UriDto };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n'use strict';\n\nimport { CharCode } from './charCode';\nimport { URI } from './uri';\nimport * as nodePath from 'path';\n\nconst posixPath = nodePath.posix || nodePath;\nconst slash = '/';\n\nexport namespace Utils {\n\n /**\n * Joins one or more input paths to the path of URI. \n * '/' is used as the directory separation character. \n * \n * The resolved path will be normalized. That means:\n * - all '..' and '.' segments are resolved.\n * - multiple, sequential occurences of '/' are replaced by a single instance of '/'.\n * - trailing separators are preserved.\n * \n * @param uri The input URI.\n * @param paths The paths to be joined with the path of URI.\n * @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.\n */\n export function joinPath(uri: URI, ...paths: string[]): URI {\n return uri.with({ path: posixPath.join(uri.path, ...paths) });\n }\n\n\n /**\n * Resolves one or more paths against the path of a URI. \n * '/' is used as the directory separation character. \n * \n * The resolved path will be normalized. That means:\n * - all '..' and '.' segments are resolved. \n * - multiple, sequential occurences of '/' are replaced by a single instance of '/'.\n * - trailing separators are removed.\n * \n * @param uri The input URI.\n * @param paths The paths to resolve against the path of URI.\n * @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.\n */\n export function resolvePath(uri: URI, ...paths: string[]): URI {\n let path = uri.path; \n let slashAdded = false;\n if (path[0] !== slash) {\n path = slash + path; // make the path abstract: for posixPath.resolve the first segments has to be absolute or cwd is used.\n slashAdded = true;\n }\n let resolvedPath = posixPath.resolve(path, ...paths);\n if (slashAdded && resolvedPath[0] === slash && !uri.authority) {\n resolvedPath = resolvedPath.substring(1);\n }\n return uri.with({ path: resolvedPath });\n }\n\n /**\n * Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The orignal URI is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The last segment of the URIs path.\n */\n export function dirname(uri: URI): URI {\n if (uri.path.length === 0 || uri.path === slash) {\n return uri;\n }\n let path = posixPath.dirname(uri.path);\n if (path.length === 1 && path.charCodeAt(0) === CharCode.Period) {\n path = '';\n }\n return uri.with({ path });\n }\n\n /**\n * Returns the last segment of the path of a URI, similar to the Unix basename command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The empty string is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The base name of the URIs path.\n */\n export function basename(uri: URI): string {\n return posixPath.basename(uri.path);\n }\n\n /**\n * Returns the extension name of the path of a URI, similar to the Unix extname command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The empty string is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The extension name of the URIs path.\n */\n export function extname(uri: URI): string {\n return posixPath.extname(uri.path);\n }\n}"],"names":["assertPath","path","TypeError","JSON","stringify","normalizeStringPosix","allowAboveRoot","code","res","lastSegmentLength","lastSlash","dots","i","length","charCodeAt","lastSlashIndex","lastIndexOf","slice","posix","resolve","cwd","resolvedPath","resolvedAbsolute","arguments","undefined","process","normalize","isAbsolute","trailingSeparator","join","joined","arg","relative","from","to","fromStart","fromEnd","fromLen","toStart","toLen","lastCommonSep","fromCode","out","_makeLong","dirname","hasRoot","end","matchedSlash","basename","ext","start","extIdx","firstNonSlashEnd","extname","startDot","startPart","preDotState","format","pathObject","sep","dir","root","base","name","_format","parse","ret","delimiter","win32","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","isWindows","platform","navigator","userAgent","indexOf","_schemePattern","_singleSlashStart","_doubleSlashStart","_validateUri","_strict","scheme","Error","authority","query","fragment","test","_empty","_slash","_regexp","URI","isUri","thing","fsPath","with","toString","schemeOrData","this","_schemeFix","_referenceResolution","uriToFsPath","change","Uri","match","exec","percentDecode","file","replace","idx","substring","components","result","skipEncoding","_asFormatted","toJSON","revive","data","_formatted","external","_fsPath","_sep","_pathSepMarker","$mid","encodeTable","encodeURIComponentFast","uriComponent","isPath","isAuthority","nativeEncodePos","pos","encodeURIComponent","charAt","substr","escaped","encodeURIComponentMinimal","uri","keepDriveLetterCasing","toLowerCase","encoder","userinfo","String","fromCharCode","decodeURIComponentGraceful","str","decodeURIComponent","_rEncodedAsHex","posixPath","slash","Utils","joinPath","paths","resolvePath","slashAdded"],"sourceRoot":""} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/charCode.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/charCode.d.ts" index 086d0697e6121fb643b7d90a799dbbb0fae4066b..61c9a2fa955407a2a032f17e689298f9194f2fab 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/charCode.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/charCode.d.ts" @@ -1,3 +1,415 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:12589e6b27710c071911512033dcc0031cba705fe4dd911cb1b65139c7ef0fb9 -size 11020 +/** + * An inlined enum containing useful character codes (to be used with String.charCodeAt). + * Please leave the const keyword such that it gets inlined when compiled to JavaScript! + */ +export declare const enum CharCode { + Null = 0, + /** + * The `\b` character. + */ + Backspace = 8, + /** + * The `\t` character. + */ + Tab = 9, + /** + * The `\n` character. + */ + LineFeed = 10, + /** + * The `\r` character. + */ + CarriageReturn = 13, + Space = 32, + /** + * The `!` character. + */ + ExclamationMark = 33, + /** + * The `"` character. + */ + DoubleQuote = 34, + /** + * The `#` character. + */ + Hash = 35, + /** + * The `$` character. + */ + DollarSign = 36, + /** + * The `%` character. + */ + PercentSign = 37, + /** + * The `&` character. + */ + Ampersand = 38, + /** + * The `'` character. + */ + SingleQuote = 39, + /** + * The `(` character. + */ + OpenParen = 40, + /** + * The `)` character. + */ + CloseParen = 41, + /** + * The `*` character. + */ + Asterisk = 42, + /** + * The `+` character. + */ + Plus = 43, + /** + * The `,` character. + */ + Comma = 44, + /** + * The `-` character. + */ + Dash = 45, + /** + * The `.` character. + */ + Period = 46, + /** + * The `/` character. + */ + Slash = 47, + Digit0 = 48, + Digit1 = 49, + Digit2 = 50, + Digit3 = 51, + Digit4 = 52, + Digit5 = 53, + Digit6 = 54, + Digit7 = 55, + Digit8 = 56, + Digit9 = 57, + /** + * The `:` character. + */ + Colon = 58, + /** + * The `;` character. + */ + Semicolon = 59, + /** + * The `<` character. + */ + LessThan = 60, + /** + * The `=` character. + */ + Equals = 61, + /** + * The `>` character. + */ + GreaterThan = 62, + /** + * The `?` character. + */ + QuestionMark = 63, + /** + * The `@` character. + */ + AtSign = 64, + A = 65, + B = 66, + C = 67, + D = 68, + E = 69, + F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + /** + * The `[` character. + */ + OpenSquareBracket = 91, + /** + * The `\` character. + */ + Backslash = 92, + /** + * The `]` character. + */ + CloseSquareBracket = 93, + /** + * The `^` character. + */ + Caret = 94, + /** + * The `_` character. + */ + Underline = 95, + /** + * The ``(`)`` character. + */ + BackTick = 96, + a = 97, + b = 98, + c = 99, + d = 100, + e = 101, + f = 102, + g = 103, + h = 104, + i = 105, + j = 106, + k = 107, + l = 108, + m = 109, + n = 110, + o = 111, + p = 112, + q = 113, + r = 114, + s = 115, + t = 116, + u = 117, + v = 118, + w = 119, + x = 120, + y = 121, + z = 122, + /** + * The `{` character. + */ + OpenCurlyBrace = 123, + /** + * The `|` character. + */ + Pipe = 124, + /** + * The `}` character. + */ + CloseCurlyBrace = 125, + /** + * The `~` character. + */ + Tilde = 126, + U_Combining_Grave_Accent = 768, + U_Combining_Acute_Accent = 769, + U_Combining_Circumflex_Accent = 770, + U_Combining_Tilde = 771, + U_Combining_Macron = 772, + U_Combining_Overline = 773, + U_Combining_Breve = 774, + U_Combining_Dot_Above = 775, + U_Combining_Diaeresis = 776, + U_Combining_Hook_Above = 777, + U_Combining_Ring_Above = 778, + U_Combining_Double_Acute_Accent = 779, + U_Combining_Caron = 780, + U_Combining_Vertical_Line_Above = 781, + U_Combining_Double_Vertical_Line_Above = 782, + U_Combining_Double_Grave_Accent = 783, + U_Combining_Candrabindu = 784, + U_Combining_Inverted_Breve = 785, + U_Combining_Turned_Comma_Above = 786, + U_Combining_Comma_Above = 787, + U_Combining_Reversed_Comma_Above = 788, + U_Combining_Comma_Above_Right = 789, + U_Combining_Grave_Accent_Below = 790, + U_Combining_Acute_Accent_Below = 791, + U_Combining_Left_Tack_Below = 792, + U_Combining_Right_Tack_Below = 793, + U_Combining_Left_Angle_Above = 794, + U_Combining_Horn = 795, + U_Combining_Left_Half_Ring_Below = 796, + U_Combining_Up_Tack_Below = 797, + U_Combining_Down_Tack_Below = 798, + U_Combining_Plus_Sign_Below = 799, + U_Combining_Minus_Sign_Below = 800, + U_Combining_Palatalized_Hook_Below = 801, + U_Combining_Retroflex_Hook_Below = 802, + U_Combining_Dot_Below = 803, + U_Combining_Diaeresis_Below = 804, + U_Combining_Ring_Below = 805, + U_Combining_Comma_Below = 806, + U_Combining_Cedilla = 807, + U_Combining_Ogonek = 808, + U_Combining_Vertical_Line_Below = 809, + U_Combining_Bridge_Below = 810, + U_Combining_Inverted_Double_Arch_Below = 811, + U_Combining_Caron_Below = 812, + U_Combining_Circumflex_Accent_Below = 813, + U_Combining_Breve_Below = 814, + U_Combining_Inverted_Breve_Below = 815, + U_Combining_Tilde_Below = 816, + U_Combining_Macron_Below = 817, + U_Combining_Low_Line = 818, + U_Combining_Double_Low_Line = 819, + U_Combining_Tilde_Overlay = 820, + U_Combining_Short_Stroke_Overlay = 821, + U_Combining_Long_Stroke_Overlay = 822, + U_Combining_Short_Solidus_Overlay = 823, + U_Combining_Long_Solidus_Overlay = 824, + U_Combining_Right_Half_Ring_Below = 825, + U_Combining_Inverted_Bridge_Below = 826, + U_Combining_Square_Below = 827, + U_Combining_Seagull_Below = 828, + U_Combining_X_Above = 829, + U_Combining_Vertical_Tilde = 830, + U_Combining_Double_Overline = 831, + U_Combining_Grave_Tone_Mark = 832, + U_Combining_Acute_Tone_Mark = 833, + U_Combining_Greek_Perispomeni = 834, + U_Combining_Greek_Koronis = 835, + U_Combining_Greek_Dialytika_Tonos = 836, + U_Combining_Greek_Ypogegrammeni = 837, + U_Combining_Bridge_Above = 838, + U_Combining_Equals_Sign_Below = 839, + U_Combining_Double_Vertical_Line_Below = 840, + U_Combining_Left_Angle_Below = 841, + U_Combining_Not_Tilde_Above = 842, + U_Combining_Homothetic_Above = 843, + U_Combining_Almost_Equal_To_Above = 844, + U_Combining_Left_Right_Arrow_Below = 845, + U_Combining_Upwards_Arrow_Below = 846, + U_Combining_Grapheme_Joiner = 847, + U_Combining_Right_Arrowhead_Above = 848, + U_Combining_Left_Half_Ring_Above = 849, + U_Combining_Fermata = 850, + U_Combining_X_Below = 851, + U_Combining_Left_Arrowhead_Below = 852, + U_Combining_Right_Arrowhead_Below = 853, + U_Combining_Right_Arrowhead_And_Up_Arrowhead_Below = 854, + U_Combining_Right_Half_Ring_Above = 855, + U_Combining_Dot_Above_Right = 856, + U_Combining_Asterisk_Below = 857, + U_Combining_Double_Ring_Below = 858, + U_Combining_Zigzag_Above = 859, + U_Combining_Double_Breve_Below = 860, + U_Combining_Double_Breve = 861, + U_Combining_Double_Macron = 862, + U_Combining_Double_Macron_Below = 863, + U_Combining_Double_Tilde = 864, + U_Combining_Double_Inverted_Breve = 865, + U_Combining_Double_Rightwards_Arrow_Below = 866, + U_Combining_Latin_Small_Letter_A = 867, + U_Combining_Latin_Small_Letter_E = 868, + U_Combining_Latin_Small_Letter_I = 869, + U_Combining_Latin_Small_Letter_O = 870, + U_Combining_Latin_Small_Letter_U = 871, + U_Combining_Latin_Small_Letter_C = 872, + U_Combining_Latin_Small_Letter_D = 873, + U_Combining_Latin_Small_Letter_H = 874, + U_Combining_Latin_Small_Letter_M = 875, + U_Combining_Latin_Small_Letter_R = 876, + U_Combining_Latin_Small_Letter_T = 877, + U_Combining_Latin_Small_Letter_V = 878, + U_Combining_Latin_Small_Letter_X = 879, + /** + * Unicode Character 'LINE SEPARATOR' (U+2028) + * http://www.fileformat.info/info/unicode/char/2028/index.htm + */ + LINE_SEPARATOR = 8232, + /** + * Unicode Character 'PARAGRAPH SEPARATOR' (U+2029) + * http://www.fileformat.info/info/unicode/char/2029/index.htm + */ + PARAGRAPH_SEPARATOR = 8233, + /** + * Unicode Character 'NEXT LINE' (U+0085) + * http://www.fileformat.info/info/unicode/char/0085/index.htm + */ + NEXT_LINE = 133, + U_CIRCUMFLEX = 94, + U_GRAVE_ACCENT = 96, + U_DIAERESIS = 168, + U_MACRON = 175, + U_ACUTE_ACCENT = 180, + U_CEDILLA = 184, + U_MODIFIER_LETTER_LEFT_ARROWHEAD = 706, + U_MODIFIER_LETTER_RIGHT_ARROWHEAD = 707, + U_MODIFIER_LETTER_UP_ARROWHEAD = 708, + U_MODIFIER_LETTER_DOWN_ARROWHEAD = 709, + U_MODIFIER_LETTER_CENTRED_RIGHT_HALF_RING = 722, + U_MODIFIER_LETTER_CENTRED_LEFT_HALF_RING = 723, + U_MODIFIER_LETTER_UP_TACK = 724, + U_MODIFIER_LETTER_DOWN_TACK = 725, + U_MODIFIER_LETTER_PLUS_SIGN = 726, + U_MODIFIER_LETTER_MINUS_SIGN = 727, + U_BREVE = 728, + U_DOT_ABOVE = 729, + U_RING_ABOVE = 730, + U_OGONEK = 731, + U_SMALL_TILDE = 732, + U_DOUBLE_ACUTE_ACCENT = 733, + U_MODIFIER_LETTER_RHOTIC_HOOK = 734, + U_MODIFIER_LETTER_CROSS_ACCENT = 735, + U_MODIFIER_LETTER_EXTRA_HIGH_TONE_BAR = 741, + U_MODIFIER_LETTER_HIGH_TONE_BAR = 742, + U_MODIFIER_LETTER_MID_TONE_BAR = 743, + U_MODIFIER_LETTER_LOW_TONE_BAR = 744, + U_MODIFIER_LETTER_EXTRA_LOW_TONE_BAR = 745, + U_MODIFIER_LETTER_YIN_DEPARTING_TONE_MARK = 746, + U_MODIFIER_LETTER_YANG_DEPARTING_TONE_MARK = 747, + U_MODIFIER_LETTER_UNASPIRATED = 749, + U_MODIFIER_LETTER_LOW_DOWN_ARROWHEAD = 751, + U_MODIFIER_LETTER_LOW_UP_ARROWHEAD = 752, + U_MODIFIER_LETTER_LOW_LEFT_ARROWHEAD = 753, + U_MODIFIER_LETTER_LOW_RIGHT_ARROWHEAD = 754, + U_MODIFIER_LETTER_LOW_RING = 755, + U_MODIFIER_LETTER_MIDDLE_GRAVE_ACCENT = 756, + U_MODIFIER_LETTER_MIDDLE_DOUBLE_GRAVE_ACCENT = 757, + U_MODIFIER_LETTER_MIDDLE_DOUBLE_ACUTE_ACCENT = 758, + U_MODIFIER_LETTER_LOW_TILDE = 759, + U_MODIFIER_LETTER_RAISED_COLON = 760, + U_MODIFIER_LETTER_BEGIN_HIGH_TONE = 761, + U_MODIFIER_LETTER_END_HIGH_TONE = 762, + U_MODIFIER_LETTER_BEGIN_LOW_TONE = 763, + U_MODIFIER_LETTER_END_LOW_TONE = 764, + U_MODIFIER_LETTER_SHELF = 765, + U_MODIFIER_LETTER_OPEN_SHELF = 766, + U_MODIFIER_LETTER_LOW_LEFT_ARROW = 767, + U_GREEK_LOWER_NUMERAL_SIGN = 885, + U_GREEK_TONOS = 900, + U_GREEK_DIALYTIKA_TONOS = 901, + U_GREEK_KORONIS = 8125, + U_GREEK_PSILI = 8127, + U_GREEK_PERISPOMENI = 8128, + U_GREEK_DIALYTIKA_AND_PERISPOMENI = 8129, + U_GREEK_PSILI_AND_VARIA = 8141, + U_GREEK_PSILI_AND_OXIA = 8142, + U_GREEK_PSILI_AND_PERISPOMENI = 8143, + U_GREEK_DASIA_AND_VARIA = 8157, + U_GREEK_DASIA_AND_OXIA = 8158, + U_GREEK_DASIA_AND_PERISPOMENI = 8159, + U_GREEK_DIALYTIKA_AND_VARIA = 8173, + U_GREEK_DIALYTIKA_AND_OXIA = 8174, + U_GREEK_VARIA = 8175, + U_GREEK_OXIA = 8189, + U_GREEK_DASIA = 8190, + U_OVERLINE = 8254, + /** + * UTF-8 BOM + * Unicode Character 'ZERO WIDTH NO-BREAK SPACE' (U+FEFF) + * http://www.fileformat.info/info/unicode/char/feff/index.htm + */ + UTF8_BOM = 65279 +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/charCode.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/charCode.js" index e517ccbb668f7e36ac3c48e97d2fd42781ffb5c7..6bafcec8582c769c7ce9ec1c5f98d31fcee82d3f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/charCode.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/charCode.js" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8aff082422674415b257672bdb20d7ac94380c214180c36b4b9c3fed1e854a37 -size 429 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/index.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/index.d.ts" index df114ea5af6f21c61887982c0efece894f8a5b60..e1c71f78b237f5e759e635364534218a5425eb63 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/index.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/index.d.ts" @@ -1,3 +1,3 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a2ca9f3aee02a7fa0ec6f80afc09c5465191e5ca513be720bf858f5da275e66b -size 85 +import { URI } from './uri'; +import { Utils } from './utils'; +export { URI, Utils }; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/index.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/index.js" index bf563ad99e8d0c02beb9c1bcc1d7a28f97fd20b0..23225cf3764779dea56d2410e45ea9b48c08440d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/index.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/index.js" @@ -1,3 +1,2 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e3d74b5b62d5b58591240f96028d5ac8f3a7b759db97630d136c551db0378039 -size 11853 +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(this,(()=>(()=>{"use strict";var t={470:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",i=0,o=-1,s=0,a=0;a<=t.length;++a){if(a2){var h=n.lastIndexOf("/");if(h!==n.length-1){-1===h?(n="",i=0):i=(n=n.slice(0,h)).length-1-n.lastIndexOf("/"),o=a,s=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=a,s=0;continue}e&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+t.slice(o+1,a):n=t.slice(o+1,a),i=a-o-1;o=a,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var t,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(void 0===t&&(t=process.cwd()),s=t),e(s),0!==s.length&&(n=s+"/"+n,i=47===s.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return".";var n=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&i&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,r=0;r0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return"";if((t=n.resolve(t))===(r=n.resolve(r)))return"";for(var i=1;ic){if(47===r.charCodeAt(a+u))return r.slice(a+u+1);if(0===u)return r.slice(a+u)}else s>c&&(47===t.charCodeAt(i+u)?f=u:0===u&&(f=0));break}var l=t.charCodeAt(i+u);if(l!==r.charCodeAt(a+u))break;47===l&&(f=u)}var d="";for(u=i+f+1;u<=o;++u)u!==o&&47!==t.charCodeAt(u)||(0===d.length?d+="..":d+="/..");return d.length>0?d+r.slice(a+f):(a+=f,47===r.charCodeAt(a)&&++a,r.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,i=-1,o=!0,s=t.length-1;s>=1;--s)if(47===(r=t.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,i=0,o=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var a=r.length-1,h=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!s){i=n+1;break}}else-1===h&&(s=!1,h=n+1),a>=0&&(c===r.charCodeAt(a)?-1==--a&&(o=n):(a=-1,o=h))}return i===o?o=h:-1===o&&(o=t.length),t.slice(i,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!s){i=n+1;break}}else-1===o&&(s=!1,o=n+1);return-1===o?"":t.slice(i,o)},extname:function(t){e(t);for(var r=-1,n=0,i=-1,o=!0,s=0,a=t.length-1;a>=0;--a){var h=t.charCodeAt(a);if(47!==h)-1===i&&(o=!1,i=a+1),46===h?-1===r?r=a:1!==s&&(s=1):-1!==r&&(s=-1);else if(!o){n=a+1;break}}return-1===r||-1===i||0===s||1===s&&r===i-1&&r===n+1?"":t.slice(r,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,i=t.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var s=-1,a=0,h=-1,c=!0,f=t.length-1,u=0;f>=n;--f)if(47!==(i=t.charCodeAt(f)))-1===h&&(c=!1,h=f+1),46===i?-1===s?s=f:1!==u&&(u=1):-1!==s&&(u=-1);else if(!c){a=f+1;break}return-1===s||-1===h||0===u||1===u&&s===h-1&&s===a+1?-1!==h&&(r.base=r.name=0===a&&o?t.slice(1,h):t.slice(a,h)):(0===a&&o?(r.name=t.slice(1,s),r.base=t.slice(1,h)):(r.name=t.slice(a,s),r.base=t.slice(a,h)),r.ext=t.slice(s,h)),a>0?r.dir=t.slice(0,a-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n},674:(t,e)=>{if(Object.defineProperty(e,"__esModule",{value:!0}),e.isWindows=void 0,"object"==typeof process)e.isWindows="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e.isWindows=t.indexOf("Windows")>=0}},796:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const n=r(674),i=/^\w[\w\d+.-]*$/,o=/^\//,s=/^\/\//;function a(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!i.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!o.test(t.path))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')}else if(s.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const h="",c="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(t){return t instanceof u||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,n,i,o=!1){"object"==typeof t?(this.scheme=t.scheme||h,this.authority=t.authority||h,this.path=t.path||h,this.query=t.query||h,this.fragment=t.fragment||h):(this.scheme=function(t,e){return t||e?t:"file"}(t,o),this.authority=e||h,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==c&&(e=c+e):e=c}return e}(this.scheme,r||h),this.query=n||h,this.fragment=i||h,a(this,o))}get fsPath(){return v(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:n,query:i,fragment:o}=t;return void 0===e?e=this.scheme:null===e&&(e=h),void 0===r?r=this.authority:null===r&&(r=h),void 0===n?n=this.path:null===n&&(n=h),void 0===i?i=this.query:null===i&&(i=h),void 0===o?o=this.fragment:null===o&&(o=h),e===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&o===this.fragment?this:new d(e,r,n,i,o)}static parse(t,e=!1){const r=f.exec(t);return r?new d(r[2]||h,w(r[4]||h),w(r[5]||h),w(r[7]||h),w(r[9]||h),e):new d(h,h,h,h,h)}static file(t){let e=h;if(n.isWindows&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const r=t.indexOf(c,2);-1===r?(e=t.substring(2),t=c):(e=t.substring(2,r),t=t.substring(r)||c)}return new d("file",e,t,h,h)}static from(t){const e=new d(t.scheme,t.authority,t.path,t.query,t.fragment);return a(e,!0),e}toString(t=!1){return y(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof u)return t;{const e=new d(t);return e._formatted=t.external,e._fsPath=t._sep===l?t.fsPath:null,e}}return t}}e.URI=u;const l=n.isWindows?1:void 0;class d extends u{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(t=!1){return t?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=l),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function g(t,e,r){let n,i=-1;for(let o=0;o=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||e&&47===s||r&&91===s||r&&93===s||r&&58===s)-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),void 0!==n&&(n+=t.charAt(o));else{void 0===n&&(n=t.substr(0,o));const e=p[s];void 0!==e?(-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),n+=e):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(t.substring(i))),void 0!==n?n:t}function m(t){let e;for(let r=0;r1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,n.isWindows&&(r=r.replace(/\//g,"\\")),r}function y(t,e){const r=e?m:g;let n="",{scheme:i,authority:o,path:s,query:a,fragment:h}=t;if(i&&(n+=i,n+=":"),(o||"file"===i)&&(n+=c,n+=c),o){let t=o.indexOf("@");if(-1!==t){const e=o.substr(0,t);o=o.substr(t+1),t=e.lastIndexOf(":"),-1===t?n+=r(e,!1,!1):(n+=r(e.substr(0,t),!1,!1),n+=":",n+=r(e.substr(t+1),!1,!0)),n+="@"}o=o.toLowerCase(),t=o.lastIndexOf(":"),-1===t?n+=r(o,!1,!0):(n+=r(o.substr(0,t),!1,!0),n+=o.substr(t))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const t=s.charCodeAt(1);t>=65&&t<=90&&(s=`/${String.fromCharCode(t+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const t=s.charCodeAt(0);t>=65&&t<=90&&(s=`${String.fromCharCode(t+32)}:${s.substr(2)}`)}n+=r(s,!0,!1)}return a&&(n+="?",n+=r(a,!1,!1)),h&&(n+="#",n+=e?h:g(h,!1,!1)),n}function b(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+b(t.substr(3)):t}}e.uriToFsPath=v;const C=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(t){return t.match(C)?t.replace(C,(t=>b(t))):t}},679:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=void 0;const s=o(r(470)),a=s.posix||s,h="/";var c;!function(t){t.joinPath=function(t,...e){return t.with({path:a.join(t.path,...e)})},t.resolvePath=function(t,...e){let r=t.path,n=!1;r[0]!==h&&(r=h+r,n=!0);let i=a.resolve(r,...e);return n&&i[0]===h&&!t.authority&&(i=i.substring(1)),t.with({path:i})},t.dirname=function(t){if(0===t.path.length||t.path===h)return t;let e=a.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},t.basename=function(t){return a.basename(t.path)},t.extname=function(t){return a.extname(t.path)}}(c||(e.Utils=c={}))}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}var n={};return(()=>{var t=n;Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=t.URI=void 0;const e=r(796);Object.defineProperty(t,"URI",{enumerable:!0,get:function(){return e.URI}});const i=r(679);Object.defineProperty(t,"Utils",{enumerable:!0,get:function(){return i.Utils}})})(),n})())); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/index.js.map" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/index.js.map" index e19eb005b0290a056229c851716772a0c2048a92..fa77a4e34bba485d85178978c4058eeb02a6c310 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/index.js.map" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/index.js.map" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0b367b07824241bd4b143b765c3cc48f86dd77d1bbbccbc57ec8297b7fc9ad5a -size 62976 +{"version":3,"file":"index.js","mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,EACvE,CACA,CATD,CASGC,MAAM,I,kCCiBT,SAASC,EAAWC,GAClB,GAAoB,iBAATA,EACT,MAAM,IAAIC,UAAU,mCAAqCC,KAAKC,UAAUH,GAE5E,CAGA,SAASI,EAAqBJ,EAAMK,GAMlC,IALA,IAIIC,EAJAC,EAAM,GACNC,EAAoB,EACpBC,GAAa,EACbC,EAAO,EAEFb,EAAI,EAAGA,GAAKG,EAAKW,SAAUd,EAAG,CACrC,GAAIA,EAAIG,EAAKW,OACXL,EAAON,EAAKY,WAAWf,OACpB,IAAa,KAATS,EACP,MAEAA,EAAO,EAAQ,CACjB,GAAa,KAATA,EAAmB,CACrB,GAAIG,IAAcZ,EAAI,GAAc,IAATa,QAEpB,GAAID,IAAcZ,EAAI,GAAc,IAATa,EAAY,CAC5C,GAAIH,EAAII,OAAS,GAA2B,IAAtBH,GAA8D,KAAnCD,EAAIK,WAAWL,EAAII,OAAS,IAAsD,KAAnCJ,EAAIK,WAAWL,EAAII,OAAS,GAC1H,GAAIJ,EAAII,OAAS,EAAG,CAClB,IAAIE,EAAiBN,EAAIO,YAAY,KACrC,GAAID,IAAmBN,EAAII,OAAS,EAAG,EACb,IAApBE,GACFN,EAAM,GACNC,EAAoB,GAGpBA,GADAD,EAAMA,EAAIQ,MAAM,EAAGF,IACKF,OAAS,EAAIJ,EAAIO,YAAY,KAEvDL,EAAYZ,EACZa,EAAO,EACP,QACF,CACF,MAAO,GAAmB,IAAfH,EAAII,QAA+B,IAAfJ,EAAII,OAAc,CAC/CJ,EAAM,GACNC,EAAoB,EACpBC,EAAYZ,EACZa,EAAO,EACP,QACF,CAEEL,IACEE,EAAII,OAAS,EACfJ,GAAO,MAEPA,EAAM,KACRC,EAAoB,EAExB,MACMD,EAAII,OAAS,EACfJ,GAAO,IAAMP,EAAKe,MAAMN,EAAY,EAAGZ,GAEvCU,EAAMP,EAAKe,MAAMN,EAAY,EAAGZ,GAClCW,EAAoBX,EAAIY,EAAY,EAEtCA,EAAYZ,EACZa,EAAO,CACT,MAAoB,KAATJ,IAA+B,IAAVI,IAC5BA,EAEFA,GAAQ,CAEZ,CACA,OAAOH,CACT,CAcA,IAAIS,EAAQ,CAEVC,QAAS,WAKP,IAJA,IAEIC,EAFAC,EAAe,GACfC,GAAmB,EAGdvB,EAAIwB,UAAUV,OAAS,EAAGd,IAAM,IAAMuB,EAAkBvB,IAAK,CACpE,IAAIG,EACAH,GAAK,EACPG,EAAOqB,UAAUxB,SAELyB,IAARJ,IACFA,EAAMK,QAAQL,OAChBlB,EAAOkB,GAGTnB,EAAWC,GAGS,IAAhBA,EAAKW,SAITQ,EAAenB,EAAO,IAAMmB,EAC5BC,EAA0C,KAAvBpB,EAAKY,WAAW,GACrC,CAQA,OAFAO,EAAef,EAAqBe,GAAeC,GAE/CA,EACED,EAAaR,OAAS,EACjB,IAAMQ,EAEN,IACAA,EAAaR,OAAS,EACxBQ,EAEA,GAEX,EAEAK,UAAW,SAAmBxB,GAG5B,GAFAD,EAAWC,GAES,IAAhBA,EAAKW,OAAc,MAAO,IAE9B,IAAIc,EAAoC,KAAvBzB,EAAKY,WAAW,GAC7Bc,EAAyD,KAArC1B,EAAKY,WAAWZ,EAAKW,OAAS,GAQtD,OAHoB,KAFpBX,EAAOI,EAAqBJ,GAAOyB,IAE1Bd,QAAiBc,IAAYzB,EAAO,KACzCA,EAAKW,OAAS,GAAKe,IAAmB1B,GAAQ,KAE9CyB,EAAmB,IAAMzB,EACtBA,CACT,EAEAyB,WAAY,SAAoBzB,GAE9B,OADAD,EAAWC,GACJA,EAAKW,OAAS,GAA4B,KAAvBX,EAAKY,WAAW,EAC5C,EAEAe,KAAM,WACJ,GAAyB,IAArBN,UAAUV,OACZ,MAAO,IAET,IADA,IAAIiB,EACK/B,EAAI,EAAGA,EAAIwB,UAAUV,SAAUd,EAAG,CACzC,IAAIgC,EAAMR,UAAUxB,GACpBE,EAAW8B,GACPA,EAAIlB,OAAS,SACAW,IAAXM,EACFA,EAASC,EAETD,GAAU,IAAMC,EAEtB,CACA,YAAeP,IAAXM,EACK,IACFZ,EAAMQ,UAAUI,EACzB,EAEAE,SAAU,SAAkBC,EAAMC,GAIhC,GAHAjC,EAAWgC,GACXhC,EAAWiC,GAEPD,IAASC,EAAI,MAAO,GAKxB,IAHAD,EAAOf,EAAMC,QAAQc,OACrBC,EAAKhB,EAAMC,QAAQe,IAEF,MAAO,GAIxB,IADA,IAAIC,EAAY,EACTA,EAAYF,EAAKpB,QACa,KAA/BoB,EAAKnB,WAAWqB,KADYA,GASlC,IALA,IAAIC,EAAUH,EAAKpB,OACfwB,EAAUD,EAAUD,EAGpBG,EAAU,EACPA,EAAUJ,EAAGrB,QACa,KAA3BqB,EAAGpB,WAAWwB,KADUA,GAW9B,IAPA,IACIC,EADQL,EAAGrB,OACKyB,EAGhBzB,EAASwB,EAAUE,EAAQF,EAAUE,EACrCC,GAAiB,EACjBzC,EAAI,EACDA,GAAKc,IAAUd,EAAG,CACvB,GAAIA,IAAMc,EAAQ,CAChB,GAAI0B,EAAQ1B,EAAQ,CAClB,GAAmC,KAA/BqB,EAAGpB,WAAWwB,EAAUvC,GAG1B,OAAOmC,EAAGjB,MAAMqB,EAAUvC,EAAI,GACzB,GAAU,IAANA,EAGT,OAAOmC,EAAGjB,MAAMqB,EAAUvC,EAE9B,MAAWsC,EAAUxB,IACoB,KAAnCoB,EAAKnB,WAAWqB,EAAYpC,GAG9ByC,EAAgBzC,EACD,IAANA,IAGTyC,EAAgB,IAGpB,KACF,CACA,IAAIC,EAAWR,EAAKnB,WAAWqB,EAAYpC,GAE3C,GAAI0C,IADSP,EAAGpB,WAAWwB,EAAUvC,GAEnC,MACoB,KAAb0C,IACPD,EAAgBzC,EACpB,CAEA,IAAI2C,EAAM,GAGV,IAAK3C,EAAIoC,EAAYK,EAAgB,EAAGzC,GAAKqC,IAAWrC,EAClDA,IAAMqC,GAAkC,KAAvBH,EAAKnB,WAAWf,KAChB,IAAf2C,EAAI7B,OACN6B,GAAO,KAEPA,GAAO,OAMb,OAAIA,EAAI7B,OAAS,EACR6B,EAAMR,EAAGjB,MAAMqB,EAAUE,IAEhCF,GAAWE,EACoB,KAA3BN,EAAGpB,WAAWwB,MACdA,EACGJ,EAAGjB,MAAMqB,GAEpB,EAEAK,UAAW,SAAmBzC,GAC5B,OAAOA,CACT,EAEA0C,QAAS,SAAiB1C,GAExB,GADAD,EAAWC,GACS,IAAhBA,EAAKW,OAAc,MAAO,IAK9B,IAJA,IAAIL,EAAON,EAAKY,WAAW,GACvB+B,EAAmB,KAATrC,EACVsC,GAAO,EACPC,GAAe,EACVhD,EAAIG,EAAKW,OAAS,EAAGd,GAAK,IAAKA,EAEtC,GAAa,MADbS,EAAON,EAAKY,WAAWf,KAEnB,IAAKgD,EAAc,CACjBD,EAAM/C,EACN,KACF,OAGFgD,GAAe,EAInB,OAAa,IAATD,EAAmBD,EAAU,IAAM,IACnCA,GAAmB,IAARC,EAAkB,KAC1B5C,EAAKe,MAAM,EAAG6B,EACvB,EAEAE,SAAU,SAAkB9C,EAAM+C,GAChC,QAAYzB,IAARyB,GAAoC,iBAARA,EAAkB,MAAM,IAAI9C,UAAU,mCACtEF,EAAWC,GAEX,IAGIH,EAHAmD,EAAQ,EACRJ,GAAO,EACPC,GAAe,EAGnB,QAAYvB,IAARyB,GAAqBA,EAAIpC,OAAS,GAAKoC,EAAIpC,QAAUX,EAAKW,OAAQ,CACpE,GAAIoC,EAAIpC,SAAWX,EAAKW,QAAUoC,IAAQ/C,EAAM,MAAO,GACvD,IAAIiD,EAASF,EAAIpC,OAAS,EACtBuC,GAAoB,EACxB,IAAKrD,EAAIG,EAAKW,OAAS,EAAGd,GAAK,IAAKA,EAAG,CACrC,IAAIS,EAAON,EAAKY,WAAWf,GAC3B,GAAa,KAATS,GAGA,IAAKuC,EAAc,CACjBG,EAAQnD,EAAI,EACZ,KACF,OAEwB,IAAtBqD,IAGFL,GAAe,EACfK,EAAmBrD,EAAI,GAErBoD,GAAU,IAER3C,IAASyC,EAAInC,WAAWqC,IACR,KAAZA,IAGJL,EAAM/C,IAKRoD,GAAU,EACVL,EAAMM,GAId,CAGA,OADIF,IAAUJ,EAAKA,EAAMM,GAAmC,IAATN,IAAYA,EAAM5C,EAAKW,QACnEX,EAAKe,MAAMiC,EAAOJ,EAC3B,CACE,IAAK/C,EAAIG,EAAKW,OAAS,EAAGd,GAAK,IAAKA,EAClC,GAA2B,KAAvBG,EAAKY,WAAWf,IAGhB,IAAKgD,EAAc,CACjBG,EAAQnD,EAAI,EACZ,KACF,OACkB,IAAT+C,IAGXC,GAAe,EACfD,EAAM/C,EAAI,GAId,OAAa,IAAT+C,EAAmB,GAChB5C,EAAKe,MAAMiC,EAAOJ,EAE7B,EAEAO,QAAS,SAAiBnD,GACxBD,EAAWC,GAQX,IAPA,IAAIoD,GAAY,EACZC,EAAY,EACZT,GAAO,EACPC,GAAe,EAGfS,EAAc,EACTzD,EAAIG,EAAKW,OAAS,EAAGd,GAAK,IAAKA,EAAG,CACzC,IAAIS,EAAON,EAAKY,WAAWf,GAC3B,GAAa,KAATS,GASS,IAATsC,IAGFC,GAAe,EACfD,EAAM/C,EAAI,GAEC,KAATS,GAEkB,IAAd8C,EACFA,EAAWvD,EACY,IAAhByD,IACPA,EAAc,IACK,IAAdF,IAGTE,GAAe,QArBb,IAAKT,EAAc,CACjBQ,EAAYxD,EAAI,EAChB,KACF,CAoBN,CAEA,OAAkB,IAAduD,IAA4B,IAATR,GAEH,IAAhBU,GAEgB,IAAhBA,GAAqBF,IAAaR,EAAM,GAAKQ,IAAaC,EAAY,EACjE,GAEFrD,EAAKe,MAAMqC,EAAUR,EAC9B,EAEAW,OAAQ,SAAgBC,GACtB,GAAmB,OAAfA,GAA6C,iBAAfA,EAChC,MAAM,IAAIvD,UAAU,0EAA4EuD,GAElG,OAvVJ,SAAiBC,EAAKD,GACpB,IAAIE,EAAMF,EAAWE,KAAOF,EAAWlE,KACnCqE,EAAOH,EAAWG,OAASH,EAAWI,MAAQ,KAAOJ,EAAWT,KAAO,IAC3E,OAAKW,EAGDA,IAAQF,EAAWlE,KACdoE,EAAMC,EAERD,EA8UU,IA9UEC,EALVA,CAMX,CA6UWE,CAAQ,EAAKL,EACtB,EAEAM,MAAO,SAAe9D,GACpBD,EAAWC,GAEX,IAAI+D,EAAM,CAAEzE,KAAM,GAAIoE,IAAK,GAAIC,KAAM,GAAIZ,IAAK,GAAIa,KAAM,IACxD,GAAoB,IAAhB5D,EAAKW,OAAc,OAAOoD,EAC9B,IAEIf,EAFA1C,EAAON,EAAKY,WAAW,GACvBa,EAAsB,KAATnB,EAEbmB,GACFsC,EAAIzE,KAAO,IACX0D,EAAQ,GAERA,EAAQ,EAaV,IAXA,IAAII,GAAY,EACZC,EAAY,EACZT,GAAO,EACPC,GAAe,EACfhD,EAAIG,EAAKW,OAAS,EAIlB2C,EAAc,EAGXzD,GAAKmD,IAASnD,EAEnB,GAAa,MADbS,EAAON,EAAKY,WAAWf,KAUV,IAAT+C,IAGFC,GAAe,EACfD,EAAM/C,EAAI,GAEC,KAATS,GAEkB,IAAd8C,EAAiBA,EAAWvD,EAA2B,IAAhByD,IAAmBA,EAAc,IACrD,IAAdF,IAGXE,GAAe,QAlBb,IAAKT,EAAc,CACjBQ,EAAYxD,EAAI,EAChB,KACF,CAwCN,OArBkB,IAAduD,IAA4B,IAATR,GAEP,IAAhBU,GAEgB,IAAhBA,GAAqBF,IAAaR,EAAM,GAAKQ,IAAaC,EAAY,GACvD,IAATT,IACiCmB,EAAIJ,KAAOI,EAAIH,KAAhC,IAAdP,GAAmB5B,EAAkCzB,EAAKe,MAAM,EAAG6B,GAAgC5C,EAAKe,MAAMsC,EAAWT,KAG7G,IAAdS,GAAmB5B,GACrBsC,EAAIH,KAAO5D,EAAKe,MAAM,EAAGqC,GACzBW,EAAIJ,KAAO3D,EAAKe,MAAM,EAAG6B,KAEzBmB,EAAIH,KAAO5D,EAAKe,MAAMsC,EAAWD,GACjCW,EAAIJ,KAAO3D,EAAKe,MAAMsC,EAAWT,IAEnCmB,EAAIhB,IAAM/C,EAAKe,MAAMqC,EAAUR,IAG7BS,EAAY,EAAGU,EAAIL,IAAM1D,EAAKe,MAAM,EAAGsC,EAAY,GAAY5B,IAAYsC,EAAIL,IAAM,KAElFK,CACT,EAEAN,IAAK,IACLO,UAAW,IACXC,MAAO,KACPjD,MAAO,MAGTA,EAAMA,MAAQA,EAEdvB,EAAOD,QAAUwB,C,cCjgBjB,G,oEAAuB,iBAAZO,QACV,EAAA2C,UAAiC,UAArB3C,QAAQ4C,cACd,GAAyB,iBAAdC,UAAwB,CACzC,IAAIC,EAAYD,UAAUC,UAC1B,EAAAH,UAAYG,EAAUC,QAAQ,YAAc,C,6FCZ7C,eAEMC,EAAiB,iBACjBC,EAAoB,MACpBC,EAAoB,QAE1B,SAASC,EAAaX,EAAUY,GAG/B,IAAKZ,EAAIa,QAAUD,EAClB,MAAM,IAAIE,MAAM,2DAA2Dd,EAAIe,sBAAsBf,EAAI/D,kBAAkB+D,EAAIgB,sBAAsBhB,EAAIiB,cAK1J,GAAIjB,EAAIa,SAAWL,EAAeU,KAAKlB,EAAIa,QAC1C,MAAM,IAAIC,MAAM,mDAQjB,GAAId,EAAI/D,KACP,GAAI+D,EAAIe,WACP,IAAKN,EAAkBS,KAAKlB,EAAI/D,MAC/B,MAAM,IAAI6E,MAAM,iJAGjB,GAAIJ,EAAkBQ,KAAKlB,EAAI/D,MAC9B,MAAM,IAAI6E,MAAM,4HAIpB,CAkCA,MAAMK,EAAS,GACTC,EAAS,IACTC,EAAU,+DAkBhB,MAAaC,EAEZ,YAAOC,CAAMC,GACZ,OAAIA,aAAiBF,KAGhBE,GAGoC,iBAArBA,EAAOT,WACU,iBAApBS,EAAOP,UACS,iBAAhBO,EAAOvF,MACU,iBAAjBuF,EAAOR,OACW,iBAAlBQ,EAAOX,QACW,iBAAlBW,EAAOC,QACS,mBAAhBD,EAAOE,MACa,mBAApBF,EAAOG,QACzB,CAMSd,OAMAE,UAKA9E,KAKA+E,MAKAC,SAeT,YAAsBW,EAAsCb,EAAoB9E,EAAe+E,EAAgBC,EAAmBL,GAAmB,GAExH,iBAAjBgB,GACV7F,KAAK8E,OAASe,EAAaf,QAAUM,EACrCpF,KAAKgF,UAAYa,EAAab,WAAaI,EAC3CpF,KAAKE,KAAO2F,EAAa3F,MAAQkF,EACjCpF,KAAKiF,MAAQY,EAAaZ,OAASG,EACnCpF,KAAKkF,SAAWW,EAAaX,UAAYE,IAKzCpF,KAAK8E,OAvHR,SAAoBA,EAAgBD,GACnC,OAAKC,GAAWD,EAGTC,EAFC,MAGT,CAkHiBgB,CAAWD,EAAchB,GACvC7E,KAAKgF,UAAYA,GAAaI,EAC9BpF,KAAKE,KAjHR,SAA8B4E,EAAgB5E,GAM7C,OAAQ4E,GACP,IAAK,QACL,IAAK,OACL,IAAK,OACC5E,EAEMA,EAAK,KAAOmF,IACtBnF,EAAOmF,EAASnF,GAFhBA,EAAOmF,EAMV,OAAOnF,CACR,CA+Fe6F,CAAqB/F,KAAK8E,OAAQ5E,GAAQkF,GACtDpF,KAAKiF,MAAQA,GAASG,EACtBpF,KAAKkF,SAAWA,GAAYE,EAE5BR,EAAa5E,KAAM6E,GAErB,CA4BA,UAAIa,GAIH,OAAOM,EAAYhG,MAAM,EAC1B,CAIA,KAAKiG,GAEJ,IAAKA,EACJ,OAAOjG,KAGR,IAAI,OAAE8E,EAAM,UAAEE,EAAS,KAAE9E,EAAI,MAAE+E,EAAK,SAAEC,GAAae,EA2BnD,YA1BezE,IAAXsD,EACHA,EAAS9E,KAAK8E,OACO,OAAXA,IACVA,EAASM,QAEQ5D,IAAdwD,EACHA,EAAYhF,KAAKgF,UACO,OAAdA,IACVA,EAAYI,QAEA5D,IAATtB,EACHA,EAAOF,KAAKE,KACO,OAATA,IACVA,EAAOkF,QAEM5D,IAAVyD,EACHA,EAAQjF,KAAKiF,MACO,OAAVA,IACVA,EAAQG,QAEQ5D,IAAb0D,EACHA,EAAWlF,KAAKkF,SACO,OAAbA,IACVA,EAAWE,GAGRN,IAAW9E,KAAK8E,QAChBE,IAAchF,KAAKgF,WACnB9E,IAASF,KAAKE,MACd+E,IAAUjF,KAAKiF,OACfC,IAAalF,KAAKkF,SAEdlF,KAGD,IAAIkG,EAAIpB,EAAQE,EAAW9E,EAAM+E,EAAOC,EAChD,CAUA,YAAOlB,CAAMmC,EAAetB,GAAmB,GAC9C,MAAMuB,EAAQd,EAAQe,KAAKF,GAC3B,OAAKC,EAGE,IAAIF,EACVE,EAAM,IAAMhB,EACZkB,EAAcF,EAAM,IAAMhB,GAC1BkB,EAAcF,EAAM,IAAMhB,GAC1BkB,EAAcF,EAAM,IAAMhB,GAC1BkB,EAAcF,EAAM,IAAMhB,GAC1BP,GARO,IAAIqB,EAAId,EAAQA,EAAQA,EAAQA,EAAQA,EAUjD,CAuBA,WAAOmB,CAAKrG,GAEX,IAAI8E,EAAYI,EAWhB,GANI,EAAAhB,YACHlE,EAAOA,EAAKsG,QAAQ,MAAOnB,IAKxBnF,EAAK,KAAOmF,GAAUnF,EAAK,KAAOmF,EAAQ,CAC7C,MAAMoB,EAAMvG,EAAKsE,QAAQa,EAAQ,IACpB,IAAToB,GACHzB,EAAY9E,EAAKwG,UAAU,GAC3BxG,EAAOmF,IAEPL,EAAY9E,EAAKwG,UAAU,EAAGD,GAC9BvG,EAAOA,EAAKwG,UAAUD,IAAQpB,E,CAIhC,OAAO,IAAIa,EAAI,OAAQlB,EAAW9E,EAAMkF,EAAQA,EACjD,CAEA,WAAOnD,CAAK0E,GACX,MAAMC,EAAS,IAAIV,EAClBS,EAAW7B,OACX6B,EAAW3B,UACX2B,EAAWzG,KACXyG,EAAW1B,MACX0B,EAAWzB,UAGZ,OADAN,EAAagC,GAAQ,GACdA,CACR,CAeA,QAAAhB,CAASiB,GAAwB,GAChC,OAAOC,EAAa9G,KAAM6G,EAC3B,CAEA,MAAAE,GACC,OAAO/G,IACR,CAMA,aAAOgH,CAAOC,GACb,GAAKA,EAEE,IAAIA,aAAgB1B,EAC1B,OAAO0B,EACD,CACN,MAAML,EAAS,IAAIV,EAAIe,GAGvB,OAFAL,EAAOM,WAAwBD,EAAME,SACrCP,EAAOQ,QAAqBH,EAAMI,OAASC,EAA4BL,EAAMvB,OAAS,KAC/EkB,C,EAPP,OAAYK,CASd,EAxRD,QA0SA,MAAMK,EAAiB,EAAAlD,UAAY,OAAI5C,EAGvC,MAAM0E,UAAYX,EAEjB2B,WAA4B,KAC5BE,QAAyB,KAEzB,UAAa1B,GAIZ,OAHK1F,KAAKoH,UACTpH,KAAKoH,QAAUpB,EAAYhG,MAAM,IAE3BA,KAAKoH,OACb,CAES,QAAAxB,CAASiB,GAAwB,GACzC,OAAKA,EAOGC,EAAa9G,MAAM,IANrBA,KAAKkH,aACTlH,KAAKkH,WAAaJ,EAAa9G,MAAM,IAE/BA,KAAKkH,WAKd,CAES,MAAAH,GACR,MAAMtG,EAAgB,CACrB8G,KAAM,GA0BP,OAvBIvH,KAAKoH,UACR3G,EAAIiF,OAAS1F,KAAKoH,QAClB3G,EAAI4G,KAAOC,GAERtH,KAAKkH,aACRzG,EAAI0G,SAAWnH,KAAKkH,YAGjBlH,KAAKE,OACRO,EAAIP,KAAOF,KAAKE,MAEbF,KAAK8E,SACRrE,EAAIqE,OAAS9E,KAAK8E,QAEf9E,KAAKgF,YACRvE,EAAIuE,UAAYhF,KAAKgF,WAElBhF,KAAKiF,QACRxE,EAAIwE,MAAQjF,KAAKiF,OAEdjF,KAAKkF,WACRzE,EAAIyE,SAAWlF,KAAKkF,UAEdzE,CACR,EAID,MAAM+G,EAAwC,CAC7C,GAAkB,MAClB,GAAkB,MAClB,GAAyB,MACzB,GAAiB,MACjB,GAA8B,MAC9B,GAA+B,MAC/B,GAAmB,MAEnB,GAA4B,MAC5B,GAAuB,MACvB,GAAsB,MACtB,GAAwB,MACxB,GAAsB,MACtB,GAAuB,MACvB,GAAqB,MACrB,GAAiB,MACjB,GAAkB,MAClB,GAAsB,MACtB,GAAmB,MAEnB,GAAkB,OAGnB,SAASC,EAAuBC,EAAsBC,EAAiBC,GACtE,IAAInH,EACAoH,GAAmB,EAEvB,IAAK,IAAIC,EAAM,EAAGA,EAAMJ,EAAa7G,OAAQiH,IAAO,CACnD,MAAMtH,EAAOkH,EAAa5G,WAAWgH,GAGrC,GACEtH,GAAQ,IAAcA,GAAQ,KAC3BA,GAAQ,IAAcA,GAAQ,IAC9BA,GAAQ,IAAmBA,GAAQ,IAC3B,KAATA,GACS,KAATA,GACS,KAATA,GACS,MAATA,GACCmH,GAAmB,KAATnH,GACVoH,GAAwB,KAATpH,GACfoH,GAAwB,KAATpH,GACfoH,GAAwB,KAATpH,GAGM,IAArBqH,IACHpH,GAAOsH,mBAAmBL,EAAahB,UAAUmB,EAAiBC,IAClED,GAAmB,QAGRrG,IAARf,IACHA,GAAOiH,EAAaM,OAAOF,QAGtB,MAEMtG,IAARf,IACHA,EAAMiH,EAAaO,OAAO,EAAGH,IAI9B,MAAMI,EAAUV,EAAYhH,QACZgB,IAAZ0G,IAGsB,IAArBL,IACHpH,GAAOsH,mBAAmBL,EAAahB,UAAUmB,EAAiBC,IAClED,GAAmB,GAIpBpH,GAAOyH,IAEwB,IAArBL,IAEVA,EAAkBC,E,EASrB,OAJyB,IAArBD,IACHpH,GAAOsH,mBAAmBL,EAAahB,UAAUmB,UAGnCrG,IAARf,EAAoBA,EAAMiH,CAClC,CAEA,SAASS,EAA0BjI,GAClC,IAAIO,EACJ,IAAK,IAAIqH,EAAM,EAAGA,EAAM5H,EAAKW,OAAQiH,IAAO,CAC3C,MAAMtH,EAAON,EAAKY,WAAWgH,GAChB,KAATtH,GAAmC,KAATA,QACjBgB,IAARf,IACHA,EAAMP,EAAK+H,OAAO,EAAGH,IAEtBrH,GAAO+G,EAAYhH,SAEPgB,IAARf,IACHA,GAAOP,EAAK4H,G,CAIf,YAAetG,IAARf,EAAoBA,EAAMP,CAClC,CAKA,SAAgB8F,EAAYoC,EAAUC,GAErC,IAAIlC,EAsBJ,OAnBCA,EAFGiC,EAAIpD,WAAaoD,EAAIlI,KAAKW,OAAS,GAAoB,SAAfuH,EAAItD,OAEvC,KAAKsD,EAAIpD,YAAYoD,EAAIlI,OAEN,KAA3BkI,EAAIlI,KAAKY,WAAW,KAChBsH,EAAIlI,KAAKY,WAAW,IAAM,IAAcsH,EAAIlI,KAAKY,WAAW,IAAM,IAAcsH,EAAIlI,KAAKY,WAAW,IAAM,IAAcsH,EAAIlI,KAAKY,WAAW,IAAM,MACxH,KAA3BsH,EAAIlI,KAAKY,WAAW,GAElBuH,EAIID,EAAIlI,KAAK+H,OAAO,GAFhBG,EAAIlI,KAAK,GAAGoI,cAAgBF,EAAIlI,KAAK+H,OAAO,GAM7CG,EAAIlI,KAET,EAAAkE,YACH+B,EAAQA,EAAMK,QAAQ,MAAO,OAEvBL,CACR,CAKA,SAASW,EAAasB,EAAUvB,GAE/B,MAAM0B,EAAW1B,EAEdsB,EADAV,EAGH,IAAIhH,EAAM,IACN,OAAEqE,EAAM,UAAEE,EAAS,KAAE9E,EAAI,MAAE+E,EAAK,SAAEC,GAAakD,EASnD,GARItD,IACHrE,GAAOqE,EACPrE,GAAO,MAEJuE,GAAwB,SAAXF,KAChBrE,GAAO4E,EACP5E,GAAO4E,GAEJL,EAAW,CACd,IAAIyB,EAAMzB,EAAUR,QAAQ,KAC5B,IAAa,IAATiC,EAAY,CAEf,MAAM+B,EAAWxD,EAAUiD,OAAO,EAAGxB,GACrCzB,EAAYA,EAAUiD,OAAOxB,EAAM,GACnCA,EAAM+B,EAASxH,YAAY,MACd,IAATyF,EACHhG,GAAO8H,EAAQC,GAAU,GAAO,IAGhC/H,GAAO8H,EAAQC,EAASP,OAAO,EAAGxB,IAAM,GAAO,GAC/ChG,GAAO,IACPA,GAAO8H,EAAQC,EAASP,OAAOxB,EAAM,IAAI,GAAO,IAEjDhG,GAAO,G,CAERuE,EAAYA,EAAUsD,cACtB7B,EAAMzB,EAAUhE,YAAY,MACf,IAATyF,EACHhG,GAAO8H,EAAQvD,GAAW,GAAO,IAGjCvE,GAAO8H,EAAQvD,EAAUiD,OAAO,EAAGxB,IAAM,GAAO,GAChDhG,GAAOuE,EAAUiD,OAAOxB,G,CAG1B,GAAIvG,EAAM,CAET,GAAIA,EAAKW,QAAU,GAA4B,KAAvBX,EAAKY,WAAW,IAAgD,KAAvBZ,EAAKY,WAAW,GAAuB,CACvG,MAAMN,EAAON,EAAKY,WAAW,GACzBN,GAAQ,IAAcA,GAAQ,KACjCN,EAAO,IAAIuI,OAAOC,aAAalI,EAAO,OAAON,EAAK+H,OAAO,K,MAEpD,GAAI/H,EAAKW,QAAU,GAA4B,KAAvBX,EAAKY,WAAW,GAAuB,CACrE,MAAMN,EAAON,EAAKY,WAAW,GACzBN,GAAQ,IAAcA,GAAQ,KACjCN,EAAO,GAAGuI,OAAOC,aAAalI,EAAO,OAAON,EAAK+H,OAAO,K,CAI1DxH,GAAO8H,EAAQrI,GAAM,GAAM,E,CAU5B,OARI+E,IACHxE,GAAO,IACPA,GAAO8H,EAAQtD,GAAO,GAAO,IAE1BC,IACHzE,GAAO,IACPA,GAAQoG,EAAgE3B,EAAjDuC,EAAuBvC,GAAU,GAAO,IAEzDzE,CACR,CAIA,SAASkI,EAA2BC,GACnC,IACC,OAAOC,mBAAmBD,E,CACzB,MACD,OAAIA,EAAI/H,OAAS,EACT+H,EAAIX,OAAO,EAAG,GAAKU,EAA2BC,EAAIX,OAAO,IAEzDW,C,CAGV,CAhHA,gBAkHA,MAAME,EAAiB,8BAEvB,SAASxC,EAAcsC,GACtB,OAAKA,EAAIxC,MAAM0C,GAGRF,EAAIpC,QAAQsC,GAAiB1C,GAAUuC,EAA2BvC,KAFjEwC,CAGT,C,8tBCnqBA,kBAEMG,EAAYC,EAAS9H,OAAS8H,EAC9BC,EAAQ,IAEd,IAAiBC,GAAjB,SAAiBA,GAeG,EAAAC,SAAhB,SAAyBf,KAAagB,GAClC,OAAOhB,EAAIzC,KAAK,CAAEzF,KAAM6I,EAAUlH,KAAKuG,EAAIlI,QAASkJ,IACxD,EAgBgB,EAAAC,YAAhB,SAA4BjB,KAAagB,GACrC,IAAIlJ,EAAOkI,EAAIlI,KACXoJ,GAAa,EACbpJ,EAAK,KAAO+I,IACZ/I,EAAO+I,EAAQ/I,EACfoJ,GAAa,GAEjB,IAAIjI,EAAe0H,EAAU5H,QAAQjB,KAASkJ,GAI9C,OAHIE,GAAcjI,EAAa,KAAO4H,IAAUb,EAAIpD,YAChD3D,EAAeA,EAAaqF,UAAU,IAEnC0B,EAAIzC,KAAK,CAAEzF,KAAMmB,GAC5B,EAUgB,EAAAuB,QAAhB,SAAwBwF,GACpB,GAAwB,IAApBA,EAAIlI,KAAKW,QAAgBuH,EAAIlI,OAAS+I,EACtC,OAAOb,EAEX,IAAIlI,EAAO6I,EAAUnG,QAAQwF,EAAIlI,MAIjC,OAHoB,IAAhBA,EAAKW,QAAuC,KAAvBX,EAAKY,WAAW,KACrCZ,EAAO,IAEJkI,EAAIzC,KAAK,CAAEzF,QACtB,EAUgB,EAAA8C,SAAhB,SAAyBoF,GACrB,OAAOW,EAAU/F,SAASoF,EAAIlI,KAClC,EAUgB,EAAAmD,QAAhB,SAAwB+E,GACpB,OAAOW,EAAU1F,QAAQ+E,EAAIlI,KACjC,CACH,CAzFD,CAAiBgJ,IAAK,QAALA,EAAK,I,GCblBK,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBjI,IAAjBkI,EACH,OAAOA,EAAahK,QAGrB,IAAIC,EAAS4J,EAAyBE,GAAY,CAGjD/J,QAAS,CAAC,GAOX,OAHAiK,EAAoBF,GAAUG,KAAKjK,EAAOD,QAASC,EAAQA,EAAOD,QAAS8J,GAGpE7J,EAAOD,OACf,C,mGChBA,eAGS,mEAHA,EAAA6F,GAAG,IACZ,eAEc,qEAFL,EAAA2D,KAAK,G","sources":["webpack://vscode-uri/webpack/universalModuleDefinition","webpack://vscode-uri/./node_modules/path-browserify/index.js","webpack://vscode-uri/./src/platform.ts","webpack://vscode-uri/./src/uri.ts","webpack://vscode-uri/./src/utils.ts","webpack://vscode-uri/webpack/bootstrap","webpack://vscode-uri/./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, () => {\nreturn ","// 'path' module extracted from Node.js v8.11.1 (only the posix part)\n// transplited with Babel\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));\n }\n}\n\n// Resolves . and .. elements in a path with directory names\nfunction normalizeStringPosix(path, allowAboveRoot) {\n var res = '';\n var lastSegmentLength = 0;\n var lastSlash = -1;\n var dots = 0;\n var code;\n for (var i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = path.charCodeAt(i);\n else if (code === 47 /*/*/)\n break;\n else\n code = 47 /*/*/;\n if (code === 47 /*/*/) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n if (res.length > 2) {\n var lastSlashIndex = res.lastIndexOf('/');\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n } else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0)\n res += '/..';\n else\n res = '..';\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0)\n res += '/' + path.slice(lastSlash + 1, i);\n else\n res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\nfunction _format(sep, pathObject) {\n var dir = pathObject.dir || pathObject.root;\n var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');\n if (!dir) {\n return base;\n }\n if (dir === pathObject.root) {\n return dir + base;\n }\n return dir + sep + base;\n}\n\nvar posix = {\n // path.resolve([from ...], to)\n resolve: function resolve() {\n var resolvedPath = '';\n var resolvedAbsolute = false;\n var cwd;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path;\n if (i >= 0)\n path = arguments[i];\n else {\n if (cwd === undefined)\n cwd = process.cwd();\n path = cwd;\n }\n\n assertPath(path);\n\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0)\n return '/' + resolvedPath;\n else\n return '/';\n } else if (resolvedPath.length > 0) {\n return resolvedPath;\n } else {\n return '.';\n }\n },\n\n normalize: function normalize(path) {\n assertPath(path);\n\n if (path.length === 0) return '.';\n\n var isAbsolute = path.charCodeAt(0) === 47 /*/*/;\n var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;\n\n // Normalize the path\n path = normalizeStringPosix(path, !isAbsolute);\n\n if (path.length === 0 && !isAbsolute) path = '.';\n if (path.length > 0 && trailingSeparator) path += '/';\n\n if (isAbsolute) return '/' + path;\n return path;\n },\n\n isAbsolute: function isAbsolute(path) {\n assertPath(path);\n return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;\n },\n\n join: function join() {\n if (arguments.length === 0)\n return '.';\n var joined;\n for (var i = 0; i < arguments.length; ++i) {\n var arg = arguments[i];\n assertPath(arg);\n if (arg.length > 0) {\n if (joined === undefined)\n joined = arg;\n else\n joined += '/' + arg;\n }\n }\n if (joined === undefined)\n return '.';\n return posix.normalize(joined);\n },\n\n relative: function relative(from, to) {\n assertPath(from);\n assertPath(to);\n\n if (from === to) return '';\n\n from = posix.resolve(from);\n to = posix.resolve(to);\n\n if (from === to) return '';\n\n // Trim any leading backslashes\n var fromStart = 1;\n for (; fromStart < from.length; ++fromStart) {\n if (from.charCodeAt(fromStart) !== 47 /*/*/)\n break;\n }\n var fromEnd = from.length;\n var fromLen = fromEnd - fromStart;\n\n // Trim any leading backslashes\n var toStart = 1;\n for (; toStart < to.length; ++toStart) {\n if (to.charCodeAt(toStart) !== 47 /*/*/)\n break;\n }\n var toEnd = to.length;\n var toLen = toEnd - toStart;\n\n // Compare paths to find the longest common path from root\n var length = fromLen < toLen ? fromLen : toLen;\n var lastCommonSep = -1;\n var i = 0;\n for (; i <= length; ++i) {\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === 47 /*/*/) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n } else if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n } else if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === 47 /*/*/) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n } else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo'; to='/'\n lastCommonSep = 0;\n }\n }\n break;\n }\n var fromCode = from.charCodeAt(fromStart + i);\n var toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode)\n break;\n else if (fromCode === 47 /*/*/)\n lastCommonSep = i;\n }\n\n var out = '';\n // Generate the relative path based on the path difference between `to`\n // and `from`\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {\n if (out.length === 0)\n out += '..';\n else\n out += '/..';\n }\n }\n\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0)\n return out + to.slice(toStart + lastCommonSep);\n else {\n toStart += lastCommonSep;\n if (to.charCodeAt(toStart) === 47 /*/*/)\n ++toStart;\n return to.slice(toStart);\n }\n },\n\n _makeLong: function _makeLong(path) {\n return path;\n },\n\n dirname: function dirname(path) {\n assertPath(path);\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) return '//';\n return path.slice(0, end);\n },\n\n basename: function basename(path, ext) {\n if (ext !== undefined && typeof ext !== 'string') throw new TypeError('\"ext\" argument must be a string');\n assertPath(path);\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext.length === path.length && ext === path) return '';\n var extIdx = ext.length - 1;\n var firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n\n if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;\n return path.slice(start, end);\n } else {\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n }\n },\n\n extname: function extname(path) {\n assertPath(path);\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n },\n\n format: function format(pathObject) {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new TypeError('The \"pathObject\" argument must be of type Object. Received type ' + typeof pathObject);\n }\n return _format('/', pathObject);\n },\n\n parse: function parse(path) {\n assertPath(path);\n\n var ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) return ret;\n var code = path.charCodeAt(0);\n var isAbsolute = code === 47 /*/*/;\n var start;\n if (isAbsolute) {\n ret.root = '/';\n start = 1;\n } else {\n start = 0;\n }\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n var i = path.length - 1;\n\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n\n // Get non-dir info\n for (; i >= start; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);\n }\n } else {\n if (startPart === 0 && isAbsolute) {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n\n if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';\n\n return ret;\n },\n\n sep: '/',\n delimiter: ':',\n win32: null,\n posix: null\n};\n\nposix.posix = posix;\n\nmodule.exports = posix;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\n// !!!!!\n// SEE https://github.com/microsoft/vscode/blob/master/src/vs/base/common/platform.ts\n// !!!!!\n\ndeclare const process: { platform: 'win32' };\ndeclare const navigator: { userAgent: string };\n\nexport let isWindows: boolean;\n\nif (typeof process === 'object') {\n\tisWindows = process.platform === 'win32';\n} else if (typeof navigator === 'object') {\n\tlet userAgent = navigator.userAgent;\n\tisWindows = userAgent.indexOf('Windows') >= 0;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nimport { CharCode } from './charCode'\nimport { isWindows } from './platform';\n\nconst _schemePattern = /^\\w[\\w\\d+.-]*$/;\nconst _singleSlashStart = /^\\//;\nconst _doubleSlashStart = /^\\/\\//;\n\nfunction _validateUri(ret: URI, _strict?: boolean): void {\n\n\t// scheme, must be set\n\tif (!ret.scheme && _strict) {\n\t\tthrow new Error(`[UriError]: Scheme is missing: {scheme: \"\", authority: \"${ret.authority}\", path: \"${ret.path}\", query: \"${ret.query}\", fragment: \"${ret.fragment}\"}`);\n\t}\n\n\t// scheme, https://tools.ietf.org/html/rfc3986#section-3.1\n\t// ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\n\tif (ret.scheme && !_schemePattern.test(ret.scheme)) {\n\t\tthrow new Error('[UriError]: Scheme contains illegal characters.');\n\t}\n\n\t// path, http://tools.ietf.org/html/rfc3986#section-3.3\n\t// If a URI contains an authority component, then the path component\n\t// must either be empty or begin with a slash (\"/\") character. If a URI\n\t// does not contain an authority component, then the path cannot begin\n\t// with two slash characters (\"//\").\n\tif (ret.path) {\n\t\tif (ret.authority) {\n\t\t\tif (!_singleSlashStart.test(ret.path)) {\n\t\t\t\tthrow new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character');\n\t\t\t}\n\t\t} else {\n\t\t\tif (_doubleSlashStart.test(ret.path)) {\n\t\t\t\tthrow new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")');\n\t\t\t}\n\t\t}\n\t}\n}\n\n// for a while we allowed uris *without* schemes and this is the migration\n// for them, e.g. an uri without scheme and without strict-mode warns and falls\n// back to the file-scheme. that should cause the least carnage and still be a\n// clear warning\nfunction _schemeFix(scheme: string, _strict: boolean): string {\n\tif (!scheme && !_strict) {\n\t\treturn 'file';\n\t}\n\treturn scheme;\n}\n\n// implements a bit of https://tools.ietf.org/html/rfc3986#section-5\nfunction _referenceResolution(scheme: string, path: string): string {\n\n\t// the slash-character is our 'default base' as we don't\n\t// support constructing URIs relative to other URIs. This\n\t// also means that we alter and potentially break paths.\n\t// see https://tools.ietf.org/html/rfc3986#section-5.1.4\n\tswitch (scheme) {\n\t\tcase 'https':\n\t\tcase 'http':\n\t\tcase 'file':\n\t\t\tif (!path) {\n\t\t\t\tpath = _slash;\n\t\t\t} else if (path[0] !== _slash) {\n\t\t\t\tpath = _slash + path;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn path;\n}\n\nconst _empty = '';\nconst _slash = '/';\nconst _regexp = /^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\n\n/**\n * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.\n * This class is a simple parser which creates the basic component parts\n * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation\n * and encoding.\n *\n * ```txt\n * foo://example.com:8042/over/there?name=ferret#nose\n * \\_/ \\______________/\\_________/ \\_________/ \\__/\n * | | | | |\n * scheme authority path query fragment\n * | _____________________|__\n * / \\ / \\\n * urn:example:animal:ferret:nose\n * ```\n */\nexport class URI implements UriComponents {\n\n\tstatic isUri(thing: any): thing is URI {\n\t\tif (thing instanceof URI) {\n\t\t\treturn true;\n\t\t}\n\t\tif (!thing) {\n\t\t\treturn false;\n\t\t}\n\t\treturn typeof (thing).authority === 'string'\n\t\t\t&& typeof (thing).fragment === 'string'\n\t\t\t&& typeof (thing).path === 'string'\n\t\t\t&& typeof (thing).query === 'string'\n\t\t\t&& typeof (thing).scheme === 'string'\n\t\t\t&& typeof (thing).fsPath === 'string'\n\t\t\t&& typeof (thing).with === 'function'\n\t\t\t&& typeof (thing).toString === 'function';\n\t}\n\n\t/**\n\t * scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.\n\t * The part before the first colon.\n\t */\n\treadonly scheme: string;\n\n\t/**\n\t * authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'.\n\t * The part between the first double slashes and the next slash.\n\t */\n\treadonly authority: string;\n\n\t/**\n\t * path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly path: string;\n\n\t/**\n\t * query is the 'query' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly query: string;\n\n\t/**\n\t * fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly fragment: string;\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean);\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(components: UriComponents);\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(schemeOrData: string | UriComponents, authority?: string, path?: string, query?: string, fragment?: string, _strict: boolean = false) {\n\n\t\tif (typeof schemeOrData === 'object') {\n\t\t\tthis.scheme = schemeOrData.scheme || _empty;\n\t\t\tthis.authority = schemeOrData.authority || _empty;\n\t\t\tthis.path = schemeOrData.path || _empty;\n\t\t\tthis.query = schemeOrData.query || _empty;\n\t\t\tthis.fragment = schemeOrData.fragment || _empty;\n\t\t\t// no validation because it's this URI\n\t\t\t// that creates uri components.\n\t\t\t// _validateUri(this);\n\t\t} else {\n\t\t\tthis.scheme = _schemeFix(schemeOrData, _strict);\n\t\t\tthis.authority = authority || _empty;\n\t\t\tthis.path = _referenceResolution(this.scheme, path || _empty);\n\t\t\tthis.query = query || _empty;\n\t\t\tthis.fragment = fragment || _empty;\n\n\t\t\t_validateUri(this, _strict);\n\t\t}\n\t}\n\n\t// ---- filesystem path -----------------------\n\n\t/**\n\t * Returns a string representing the corresponding file system path of this URI.\n\t * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the\n\t * platform specific path separator.\n\t *\n\t * * Will *not* validate the path for invalid characters and semantics.\n\t * * Will *not* look at the scheme of this URI.\n\t * * The result shall *not* be used for display purposes but for accessing a file on disk.\n\t *\n\t *\n\t * The *difference* to `URI#path` is the use of the platform specific separator and the handling\n\t * of UNC paths. See the below sample of a file-uri with an authority (UNC path).\n\t *\n\t * ```ts\n\t\tconst u = URI.parse('file://server/c$/folder/file.txt')\n\t\tu.authority === 'server'\n\t\tu.path === '/shares/c$/file.txt'\n\t\tu.fsPath === '\\\\server\\c$\\folder\\file.txt'\n\t```\n\t *\n\t * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,\n\t * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working\n\t * with URIs that represent files on disk (`file` scheme).\n\t */\n\tget fsPath(): string {\n\t\t// if (this.scheme !== 'file') {\n\t\t// \tconsole.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);\n\t\t// }\n\t\treturn uriToFsPath(this, false);\n\t}\n\n\t// ---- modify to new -------------------------\n\n\twith(change: { scheme?: string; authority?: string | null; path?: string | null; query?: string | null; fragment?: string | null }): URI {\n\n\t\tif (!change) {\n\t\t\treturn this;\n\t\t}\n\n\t\tlet { scheme, authority, path, query, fragment } = change;\n\t\tif (scheme === undefined) {\n\t\t\tscheme = this.scheme;\n\t\t} else if (scheme === null) {\n\t\t\tscheme = _empty;\n\t\t}\n\t\tif (authority === undefined) {\n\t\t\tauthority = this.authority;\n\t\t} else if (authority === null) {\n\t\t\tauthority = _empty;\n\t\t}\n\t\tif (path === undefined) {\n\t\t\tpath = this.path;\n\t\t} else if (path === null) {\n\t\t\tpath = _empty;\n\t\t}\n\t\tif (query === undefined) {\n\t\t\tquery = this.query;\n\t\t} else if (query === null) {\n\t\t\tquery = _empty;\n\t\t}\n\t\tif (fragment === undefined) {\n\t\t\tfragment = this.fragment;\n\t\t} else if (fragment === null) {\n\t\t\tfragment = _empty;\n\t\t}\n\n\t\tif (scheme === this.scheme\n\t\t\t&& authority === this.authority\n\t\t\t&& path === this.path\n\t\t\t&& query === this.query\n\t\t\t&& fragment === this.fragment) {\n\n\t\t\treturn this;\n\t\t}\n\n\t\treturn new Uri(scheme, authority, path, query, fragment);\n\t}\n\n\t// ---- parse & validate ------------------------\n\n\t/**\n\t * Creates a new URI from a string, e.g. `http://www.example.com/some/path`,\n\t * `file:///usr/home`, or `scheme:with/path`.\n\t *\n\t * @param value A string which represents an URI (see `URI#toString`).\n\t */\n\tstatic parse(value: string, _strict: boolean = false): URI {\n\t\tconst match = _regexp.exec(value);\n\t\tif (!match) {\n\t\t\treturn new Uri(_empty, _empty, _empty, _empty, _empty);\n\t\t}\n\t\treturn new Uri(\n\t\t\tmatch[2] || _empty,\n\t\t\tpercentDecode(match[4] || _empty),\n\t\t\tpercentDecode(match[5] || _empty),\n\t\t\tpercentDecode(match[7] || _empty),\n\t\t\tpercentDecode(match[9] || _empty),\n\t\t\t_strict\n\t\t);\n\t}\n\n\t/**\n\t * Creates a new URI from a file system path, e.g. `c:\\my\\files`,\n\t * `/usr/home`, or `\\\\server\\share\\some\\path`.\n\t *\n\t * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument\n\t * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**\n\t * `URI.parse('file://' + path)` because the path might contain characters that are\n\t * interpreted (# and ?). See the following sample:\n\t * ```ts\n\tconst good = URI.file('/coding/c#/project1');\n\tgood.scheme === 'file';\n\tgood.path === '/coding/c#/project1';\n\tgood.fragment === '';\n\tconst bad = URI.parse('file://' + '/coding/c#/project1');\n\tbad.scheme === 'file';\n\tbad.path === '/coding/c'; // path is now broken\n\tbad.fragment === '/project1';\n\t```\n\t *\n\t * @param path A file system path (see `URI#fsPath`)\n\t */\n\tstatic file(path: string): URI {\n\n\t\tlet authority = _empty;\n\n\t\t// normalize to fwd-slashes on windows,\n\t\t// on other systems bwd-slashes are valid\n\t\t// filename character, eg /f\\oo/ba\\r.txt\n\t\tif (isWindows) {\n\t\t\tpath = path.replace(/\\\\/g, _slash);\n\t\t}\n\n\t\t// check for authority as used in UNC shares\n\t\t// or use the path as given\n\t\tif (path[0] === _slash && path[1] === _slash) {\n\t\t\tconst idx = path.indexOf(_slash, 2);\n\t\t\tif (idx === -1) {\n\t\t\t\tauthority = path.substring(2);\n\t\t\t\tpath = _slash;\n\t\t\t} else {\n\t\t\t\tauthority = path.substring(2, idx);\n\t\t\t\tpath = path.substring(idx) || _slash;\n\t\t\t}\n\t\t}\n\n\t\treturn new Uri('file', authority, path, _empty, _empty);\n\t}\n\n\tstatic from(components: { scheme: string; authority?: string; path?: string; query?: string; fragment?: string }): URI {\n\t\tconst result = new Uri(\n\t\t\tcomponents.scheme,\n\t\t\tcomponents.authority,\n\t\t\tcomponents.path,\n\t\t\tcomponents.query,\n\t\t\tcomponents.fragment,\n\t\t);\n\t\t_validateUri(result, true);\n\t\treturn result;\n\t}\n\n\t// ---- printing/externalize ---------------------------\n\n\t/**\n\t * Creates a string representation for this URI. It's guaranteed that calling\n\t * `URI.parse` with the result of this function creates an URI which is equal\n\t * to this URI.\n\t *\n\t * * The result shall *not* be used for display purposes but for externalization or transport.\n\t * * The result will be encoded using the percentage encoding and encoding happens mostly\n\t * ignore the scheme-specific encoding rules.\n\t *\n\t * @param skipEncoding Do not encode the result, default is `false`\n\t */\n\ttoString(skipEncoding: boolean = false): string {\n\t\treturn _asFormatted(this, skipEncoding);\n\t}\n\n\ttoJSON(): UriComponents {\n\t\treturn this;\n\t}\n\n\tstatic revive(data: UriComponents | URI): URI;\n\tstatic revive(data: UriComponents | URI | undefined): URI | undefined;\n\tstatic revive(data: UriComponents | URI | null): URI | null;\n\tstatic revive(data: UriComponents | URI | undefined | null): URI | undefined | null;\n\tstatic revive(data: UriComponents | URI | undefined | null): URI | undefined | null {\n\t\tif (!data) {\n\t\t\treturn data;\n\t\t} else if (data instanceof URI) {\n\t\t\treturn data;\n\t\t} else {\n\t\t\tconst result = new Uri(data);\n\t\t\tresult._formatted = (data).external;\n\t\t\tresult._fsPath = (data)._sep === _pathSepMarker ? (data).fsPath : null;\n\t\t\treturn result;\n\t\t}\n\t}\n}\n\nexport interface UriComponents {\n\tscheme: string;\n\tauthority: string;\n\tpath: string;\n\tquery: string;\n\tfragment: string;\n}\n\ninterface UriState extends UriComponents {\n\t$mid: number;\n\texternal: string;\n\tfsPath: string;\n\t_sep: 1 | undefined;\n}\n\nconst _pathSepMarker = isWindows ? 1 : undefined;\n\n// This class exists so that URI is compatible with vscode.Uri (API).\nclass Uri extends URI {\n\n\t_formatted: string | null = null;\n\t_fsPath: string | null = null;\n\n\toverride get fsPath(): string {\n\t\tif (!this._fsPath) {\n\t\t\tthis._fsPath = uriToFsPath(this, false);\n\t\t}\n\t\treturn this._fsPath;\n\t}\n\n\toverride toString(skipEncoding: boolean = false): string {\n\t\tif (!skipEncoding) {\n\t\t\tif (!this._formatted) {\n\t\t\t\tthis._formatted = _asFormatted(this, false);\n\t\t\t}\n\t\t\treturn this._formatted;\n\t\t} else {\n\t\t\t// we don't cache that\n\t\t\treturn _asFormatted(this, true);\n\t\t}\n\t}\n\n\toverride toJSON(): UriComponents {\n\t\tconst res = {\n\t\t\t$mid: 1\n\t\t};\n\t\t// cached state\n\t\tif (this._fsPath) {\n\t\t\tres.fsPath = this._fsPath;\n\t\t\tres._sep = _pathSepMarker;\n\t\t}\n\t\tif (this._formatted) {\n\t\t\tres.external = this._formatted;\n\t\t}\n\t\t// uri components\n\t\tif (this.path) {\n\t\t\tres.path = this.path;\n\t\t}\n\t\tif (this.scheme) {\n\t\t\tres.scheme = this.scheme;\n\t\t}\n\t\tif (this.authority) {\n\t\t\tres.authority = this.authority;\n\t\t}\n\t\tif (this.query) {\n\t\t\tres.query = this.query;\n\t\t}\n\t\tif (this.fragment) {\n\t\t\tres.fragment = this.fragment;\n\t\t}\n\t\treturn res;\n\t}\n}\n\n// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2\nconst encodeTable: { [ch: number]: string } = {\n\t[CharCode.Colon]: '%3A', // gen-delims\n\t[CharCode.Slash]: '%2F',\n\t[CharCode.QuestionMark]: '%3F',\n\t[CharCode.Hash]: '%23',\n\t[CharCode.OpenSquareBracket]: '%5B',\n\t[CharCode.CloseSquareBracket]: '%5D',\n\t[CharCode.AtSign]: '%40',\n\n\t[CharCode.ExclamationMark]: '%21', // sub-delims\n\t[CharCode.DollarSign]: '%24',\n\t[CharCode.Ampersand]: '%26',\n\t[CharCode.SingleQuote]: '%27',\n\t[CharCode.OpenParen]: '%28',\n\t[CharCode.CloseParen]: '%29',\n\t[CharCode.Asterisk]: '%2A',\n\t[CharCode.Plus]: '%2B',\n\t[CharCode.Comma]: '%2C',\n\t[CharCode.Semicolon]: '%3B',\n\t[CharCode.Equals]: '%3D',\n\n\t[CharCode.Space]: '%20',\n};\n\nfunction encodeURIComponentFast(uriComponent: string, isPath: boolean, isAuthority: boolean): string {\n\tlet res: string | undefined = undefined;\n\tlet nativeEncodePos = -1;\n\n\tfor (let pos = 0; pos < uriComponent.length; pos++) {\n\t\tconst code = uriComponent.charCodeAt(pos);\n\n\t\t// unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3\n\t\tif (\n\t\t\t(code >= CharCode.a && code <= CharCode.z)\n\t\t\t|| (code >= CharCode.A && code <= CharCode.Z)\n\t\t\t|| (code >= CharCode.Digit0 && code <= CharCode.Digit9)\n\t\t\t|| code === CharCode.Dash\n\t\t\t|| code === CharCode.Period\n\t\t\t|| code === CharCode.Underline\n\t\t\t|| code === CharCode.Tilde\n\t\t\t|| (isPath && code === CharCode.Slash)\n\t\t\t|| (isAuthority && code === CharCode.OpenSquareBracket)\n\t\t\t|| (isAuthority && code === CharCode.CloseSquareBracket)\n\t\t\t|| (isAuthority && code === CharCode.Colon)\n\t\t) {\n\t\t\t// check if we are delaying native encode\n\t\t\tif (nativeEncodePos !== -1) {\n\t\t\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n\t\t\t\tnativeEncodePos = -1;\n\t\t\t}\n\t\t\t// check if we write into a new string (by default we try to return the param)\n\t\t\tif (res !== undefined) {\n\t\t\t\tres += uriComponent.charAt(pos);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// encoding needed, we need to allocate a new string\n\t\t\tif (res === undefined) {\n\t\t\t\tres = uriComponent.substr(0, pos);\n\t\t\t}\n\n\t\t\t// check with default table first\n\t\t\tconst escaped = encodeTable[code];\n\t\t\tif (escaped !== undefined) {\n\n\t\t\t\t// check if we are delaying native encode\n\t\t\t\tif (nativeEncodePos !== -1) {\n\t\t\t\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n\t\t\t\t\tnativeEncodePos = -1;\n\t\t\t\t}\n\n\t\t\t\t// append escaped variant to result\n\t\t\t\tres += escaped;\n\n\t\t\t} else if (nativeEncodePos === -1) {\n\t\t\t\t// use native encode only when needed\n\t\t\t\tnativeEncodePos = pos;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (nativeEncodePos !== -1) {\n\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos));\n\t}\n\n\treturn res !== undefined ? res : uriComponent;\n}\n\nfunction encodeURIComponentMinimal(path: string): string {\n\tlet res: string | undefined = undefined;\n\tfor (let pos = 0; pos < path.length; pos++) {\n\t\tconst code = path.charCodeAt(pos);\n\t\tif (code === CharCode.Hash || code === CharCode.QuestionMark) {\n\t\t\tif (res === undefined) {\n\t\t\t\tres = path.substr(0, pos);\n\t\t\t}\n\t\t\tres += encodeTable[code];\n\t\t} else {\n\t\t\tif (res !== undefined) {\n\t\t\t\tres += path[pos];\n\t\t\t}\n\t\t}\n\t}\n\treturn res !== undefined ? res : path;\n}\n\n/**\n * Compute `fsPath` for the given uri\n */\nexport function uriToFsPath(uri: URI, keepDriveLetterCasing: boolean): string {\n\n\tlet value: string;\n\tif (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {\n\t\t// unc path: file://shares/c$/far/boo\n\t\tvalue = `//${uri.authority}${uri.path}`;\n\t} else if (\n\t\turi.path.charCodeAt(0) === CharCode.Slash\n\t\t&& (uri.path.charCodeAt(1) >= CharCode.A && uri.path.charCodeAt(1) <= CharCode.Z || uri.path.charCodeAt(1) >= CharCode.a && uri.path.charCodeAt(1) <= CharCode.z)\n\t\t&& uri.path.charCodeAt(2) === CharCode.Colon\n\t) {\n\t\tif (!keepDriveLetterCasing) {\n\t\t\t// windows drive letter: file:///c:/far/boo\n\t\t\tvalue = uri.path[1].toLowerCase() + uri.path.substr(2);\n\t\t} else {\n\t\t\tvalue = uri.path.substr(1);\n\t\t}\n\t} else {\n\t\t// other path\n\t\tvalue = uri.path;\n\t}\n\tif (isWindows) {\n\t\tvalue = value.replace(/\\//g, '\\\\');\n\t}\n\treturn value;\n}\n\n/**\n * Create the external version of a uri\n */\nfunction _asFormatted(uri: URI, skipEncoding: boolean): string {\n\n\tconst encoder = !skipEncoding\n\t\t? encodeURIComponentFast\n\t\t: encodeURIComponentMinimal;\n\n\tlet res = '';\n\tlet { scheme, authority, path, query, fragment } = uri;\n\tif (scheme) {\n\t\tres += scheme;\n\t\tres += ':';\n\t}\n\tif (authority || scheme === 'file') {\n\t\tres += _slash;\n\t\tres += _slash;\n\t}\n\tif (authority) {\n\t\tlet idx = authority.indexOf('@');\n\t\tif (idx !== -1) {\n\t\t\t// @\n\t\t\tconst userinfo = authority.substr(0, idx);\n\t\t\tauthority = authority.substr(idx + 1);\n\t\t\tidx = userinfo.lastIndexOf(':');\n\t\t\tif (idx === -1) {\n\t\t\t\tres += encoder(userinfo, false, false);\n\t\t\t} else {\n\t\t\t\t// :@\n\t\t\t\tres += encoder(userinfo.substr(0, idx), false, false);\n\t\t\t\tres += ':';\n\t\t\t\tres += encoder(userinfo.substr(idx + 1), false, true);\n\t\t\t}\n\t\t\tres += '@';\n\t\t}\n\t\tauthority = authority.toLowerCase();\n\t\tidx = authority.lastIndexOf(':');\n\t\tif (idx === -1) {\n\t\t\tres += encoder(authority, false, true);\n\t\t} else {\n\t\t\t// :\n\t\t\tres += encoder(authority.substr(0, idx), false, true);\n\t\t\tres += authority.substr(idx);\n\t\t}\n\t}\n\tif (path) {\n\t\t// lower-case windows drive letters in /C:/fff or C:/fff\n\t\tif (path.length >= 3 && path.charCodeAt(0) === CharCode.Slash && path.charCodeAt(2) === CharCode.Colon) {\n\t\t\tconst code = path.charCodeAt(1);\n\t\t\tif (code >= CharCode.A && code <= CharCode.Z) {\n\t\t\t\tpath = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`; // \"/c:\".length === 3\n\t\t\t}\n\t\t} else if (path.length >= 2 && path.charCodeAt(1) === CharCode.Colon) {\n\t\t\tconst code = path.charCodeAt(0);\n\t\t\tif (code >= CharCode.A && code <= CharCode.Z) {\n\t\t\t\tpath = `${String.fromCharCode(code + 32)}:${path.substr(2)}`; // \"/c:\".length === 3\n\t\t\t}\n\t\t}\n\t\t// encode the rest of the path\n\t\tres += encoder(path, true, false);\n\t}\n\tif (query) {\n\t\tres += '?';\n\t\tres += encoder(query, false, false);\n\t}\n\tif (fragment) {\n\t\tres += '#';\n\t\tres += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment;\n\t}\n\treturn res;\n}\n\n// --- decode\n\nfunction decodeURIComponentGraceful(str: string): string {\n\ttry {\n\t\treturn decodeURIComponent(str);\n\t} catch {\n\t\tif (str.length > 3) {\n\t\t\treturn str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));\n\t\t} else {\n\t\t\treturn str;\n\t\t}\n\t}\n}\n\nconst _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;\n\nfunction percentDecode(str: string): string {\n\tif (!str.match(_rEncodedAsHex)) {\n\t\treturn str;\n\t}\n\treturn str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match));\n}\n\n/**\n * Mapped-type that replaces all occurrences of URI with UriComponents\n */\nexport type UriDto = { [K in keyof T]: T[K] extends URI\n\t? UriComponents\n\t: UriDto };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n'use strict';\n\nimport { CharCode } from './charCode';\nimport { URI } from './uri';\nimport * as nodePath from 'path';\n\nconst posixPath = nodePath.posix || nodePath;\nconst slash = '/';\n\nexport namespace Utils {\n\n /**\n * Joins one or more input paths to the path of URI. \n * '/' is used as the directory separation character. \n * \n * The resolved path will be normalized. That means:\n * - all '..' and '.' segments are resolved.\n * - multiple, sequential occurences of '/' are replaced by a single instance of '/'.\n * - trailing separators are preserved.\n * \n * @param uri The input URI.\n * @param paths The paths to be joined with the path of URI.\n * @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.\n */\n export function joinPath(uri: URI, ...paths: string[]): URI {\n return uri.with({ path: posixPath.join(uri.path, ...paths) });\n }\n\n\n /**\n * Resolves one or more paths against the path of a URI. \n * '/' is used as the directory separation character. \n * \n * The resolved path will be normalized. That means:\n * - all '..' and '.' segments are resolved. \n * - multiple, sequential occurences of '/' are replaced by a single instance of '/'.\n * - trailing separators are removed.\n * \n * @param uri The input URI.\n * @param paths The paths to resolve against the path of URI.\n * @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.\n */\n export function resolvePath(uri: URI, ...paths: string[]): URI {\n let path = uri.path; \n let slashAdded = false;\n if (path[0] !== slash) {\n path = slash + path; // make the path abstract: for posixPath.resolve the first segments has to be absolute or cwd is used.\n slashAdded = true;\n }\n let resolvedPath = posixPath.resolve(path, ...paths);\n if (slashAdded && resolvedPath[0] === slash && !uri.authority) {\n resolvedPath = resolvedPath.substring(1);\n }\n return uri.with({ path: resolvedPath });\n }\n\n /**\n * Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The orignal URI is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The last segment of the URIs path.\n */\n export function dirname(uri: URI): URI {\n if (uri.path.length === 0 || uri.path === slash) {\n return uri;\n }\n let path = posixPath.dirname(uri.path);\n if (path.length === 1 && path.charCodeAt(0) === CharCode.Period) {\n path = '';\n }\n return uri.with({ path });\n }\n\n /**\n * Returns the last segment of the path of a URI, similar to the Unix basename command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The empty string is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The base name of the URIs path.\n */\n export function basename(uri: URI): string {\n return posixPath.basename(uri.path);\n }\n\n /**\n * Returns the extension name of the path of a URI, similar to the Unix extname command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The empty string is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The extension name of the URIs path.\n */\n export function extname(uri: URI): string {\n return posixPath.extname(uri.path);\n }\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nimport { URI } from './uri';\nimport { Utils } from './utils';\n\nexport { URI, Utils }"],"names":["root","factory","exports","module","define","amd","a","i","this","assertPath","path","TypeError","JSON","stringify","normalizeStringPosix","allowAboveRoot","code","res","lastSegmentLength","lastSlash","dots","length","charCodeAt","lastSlashIndex","lastIndexOf","slice","posix","resolve","cwd","resolvedPath","resolvedAbsolute","arguments","undefined","process","normalize","isAbsolute","trailingSeparator","join","joined","arg","relative","from","to","fromStart","fromEnd","fromLen","toStart","toLen","lastCommonSep","fromCode","out","_makeLong","dirname","hasRoot","end","matchedSlash","basename","ext","start","extIdx","firstNonSlashEnd","extname","startDot","startPart","preDotState","format","pathObject","sep","dir","base","name","_format","parse","ret","delimiter","win32","isWindows","platform","navigator","userAgent","indexOf","_schemePattern","_singleSlashStart","_doubleSlashStart","_validateUri","_strict","scheme","Error","authority","query","fragment","test","_empty","_slash","_regexp","URI","isUri","thing","fsPath","with","toString","schemeOrData","_schemeFix","_referenceResolution","uriToFsPath","change","Uri","value","match","exec","percentDecode","file","replace","idx","substring","components","result","skipEncoding","_asFormatted","toJSON","revive","data","_formatted","external","_fsPath","_sep","_pathSepMarker","$mid","encodeTable","encodeURIComponentFast","uriComponent","isPath","isAuthority","nativeEncodePos","pos","encodeURIComponent","charAt","substr","escaped","encodeURIComponentMinimal","uri","keepDriveLetterCasing","toLowerCase","encoder","userinfo","String","fromCharCode","decodeURIComponentGraceful","str","decodeURIComponent","_rEncodedAsHex","posixPath","nodePath","slash","Utils","joinPath","paths","resolvePath","slashAdded","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","call"],"sourceRoot":""} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/platform.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/platform.d.ts" index d02698ab0fab6ff243c2549df4b5776de03d267d..1660688e2e46a06cb97e0ab573e55856c6775f96 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/platform.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/platform.d.ts" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ab34bee45fe908c992964ac5f881e1c96140c04c2e4e6e7ad9b9a282bf4325de -size 39 +export declare let isWindows: boolean; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/platform.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/platform.js" index c47babcd8802d30a58dbd103d5e0131ee0b07e8d..f6538ab92dd08eb7c804c098029270fa155035f5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/platform.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/platform.js" @@ -1,3 +1,14 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8db7f807d815332325bd1c24b7e0862d4979305135ab4a5a8609ebe7f8d5ef16 -size 692 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isWindows = void 0; +if (typeof process === 'object') { + exports.isWindows = process.platform === 'win32'; +} +else if (typeof navigator === 'object') { + let userAgent = navigator.userAgent; + exports.isWindows = userAgent.indexOf('Windows') >= 0; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/uri.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/uri.d.ts" index 84c971220f6f53588ef4222a88f07e92149bff82..1d46b9b09c7228bb0f37c496f342d907ddcaeb20 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/uri.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/uri.d.ts" @@ -1,3 +1,151 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:657e6dc684415721980e91e97785f1b8e6da4134e194de757d2d3733c54b4f06 -size 5843 +/** + * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986. + * This class is a simple parser which creates the basic component parts + * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation + * and encoding. + * + * ```txt + * foo://example.com:8042/over/there?name=ferret#nose + * \_/ \______________/\_________/ \_________/ \__/ + * | | | | | + * scheme authority path query fragment + * | _____________________|__ + * / \ / \ + * urn:example:animal:ferret:nose + * ``` + */ +export declare class URI implements UriComponents { + static isUri(thing: any): thing is URI; + /** + * scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'. + * The part before the first colon. + */ + readonly scheme: string; + /** + * authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'. + * The part between the first double slashes and the next slash. + */ + readonly authority: string; + /** + * path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'. + */ + readonly path: string; + /** + * query is the 'query' part of 'http://www.example.com/some/path?query#fragment'. + */ + readonly query: string; + /** + * fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'. + */ + readonly fragment: string; + /** + * @internal + */ + protected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean); + /** + * @internal + */ + protected constructor(components: UriComponents); + /** + * Returns a string representing the corresponding file system path of this URI. + * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the + * platform specific path separator. + * + * * Will *not* validate the path for invalid characters and semantics. + * * Will *not* look at the scheme of this URI. + * * The result shall *not* be used for display purposes but for accessing a file on disk. + * + * + * The *difference* to `URI#path` is the use of the platform specific separator and the handling + * of UNC paths. See the below sample of a file-uri with an authority (UNC path). + * + * ```ts + const u = URI.parse('file://server/c$/folder/file.txt') + u.authority === 'server' + u.path === '/shares/c$/file.txt' + u.fsPath === '\\server\c$\folder\file.txt' + ``` + * + * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path, + * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working + * with URIs that represent files on disk (`file` scheme). + */ + get fsPath(): string; + with(change: { + scheme?: string; + authority?: string | null; + path?: string | null; + query?: string | null; + fragment?: string | null; + }): URI; + /** + * Creates a new URI from a string, e.g. `http://www.example.com/some/path`, + * `file:///usr/home`, or `scheme:with/path`. + * + * @param value A string which represents an URI (see `URI#toString`). + */ + static parse(value: string, _strict?: boolean): URI; + /** + * Creates a new URI from a file system path, e.g. `c:\my\files`, + * `/usr/home`, or `\\server\share\some\path`. + * + * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument + * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as** + * `URI.parse('file://' + path)` because the path might contain characters that are + * interpreted (# and ?). See the following sample: + * ```ts + const good = URI.file('/coding/c#/project1'); + good.scheme === 'file'; + good.path === '/coding/c#/project1'; + good.fragment === ''; + const bad = URI.parse('file://' + '/coding/c#/project1'); + bad.scheme === 'file'; + bad.path === '/coding/c'; // path is now broken + bad.fragment === '/project1'; + ``` + * + * @param path A file system path (see `URI#fsPath`) + */ + static file(path: string): URI; + static from(components: { + scheme: string; + authority?: string; + path?: string; + query?: string; + fragment?: string; + }): URI; + /** + * Creates a string representation for this URI. It's guaranteed that calling + * `URI.parse` with the result of this function creates an URI which is equal + * to this URI. + * + * * The result shall *not* be used for display purposes but for externalization or transport. + * * The result will be encoded using the percentage encoding and encoding happens mostly + * ignore the scheme-specific encoding rules. + * + * @param skipEncoding Do not encode the result, default is `false` + */ + toString(skipEncoding?: boolean): string; + toJSON(): UriComponents; + static revive(data: UriComponents | URI): URI; + static revive(data: UriComponents | URI | undefined): URI | undefined; + static revive(data: UriComponents | URI | null): URI | null; + static revive(data: UriComponents | URI | undefined | null): URI | undefined | null; +} +export interface UriComponents { + scheme: string; + authority: string; + path: string; + query: string; + fragment: string; +} +/** + * Compute `fsPath` for the given uri + */ +export declare function uriToFsPath(uri: URI, keepDriveLetterCasing: boolean): string; +/** + * Mapped-type that replaces all occurrences of URI with UriComponents + */ +export type UriDto = { + [K in keyof T]: T[K] extends URI ? UriComponents : UriDto; +}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/uri.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/uri.js" index efd918443ad9718950f15000dc56747ee67814e9..dc88986c27396e55133b2c07334e5350cd625551 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/uri.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/uri.js" @@ -1,3 +1,595 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c1c3551c85a2812e7e1e56a34d5a371f1114027bfca9bebee7eb88fe616afd4 -size 21939 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.uriToFsPath = exports.URI = void 0; +const platform_1 = require("./platform"); +const _schemePattern = /^\w[\w\d+.-]*$/; +const _singleSlashStart = /^\//; +const _doubleSlashStart = /^\/\//; +function _validateUri(ret, _strict) { + // scheme, must be set + if (!ret.scheme && _strict) { + throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${ret.authority}", path: "${ret.path}", query: "${ret.query}", fragment: "${ret.fragment}"}`); + } + // scheme, https://tools.ietf.org/html/rfc3986#section-3.1 + // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) + if (ret.scheme && !_schemePattern.test(ret.scheme)) { + throw new Error('[UriError]: Scheme contains illegal characters.'); + } + // path, http://tools.ietf.org/html/rfc3986#section-3.3 + // If a URI contains an authority component, then the path component + // must either be empty or begin with a slash ("/") character. If a URI + // does not contain an authority component, then the path cannot begin + // with two slash characters ("//"). + if (ret.path) { + if (ret.authority) { + if (!_singleSlashStart.test(ret.path)) { + 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'); + } + } + else { + if (_doubleSlashStart.test(ret.path)) { + throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'); + } + } + } +} +// for a while we allowed uris *without* schemes and this is the migration +// for them, e.g. an uri without scheme and without strict-mode warns and falls +// back to the file-scheme. that should cause the least carnage and still be a +// clear warning +function _schemeFix(scheme, _strict) { + if (!scheme && !_strict) { + return 'file'; + } + return scheme; +} +// implements a bit of https://tools.ietf.org/html/rfc3986#section-5 +function _referenceResolution(scheme, path) { + // the slash-character is our 'default base' as we don't + // support constructing URIs relative to other URIs. This + // also means that we alter and potentially break paths. + // see https://tools.ietf.org/html/rfc3986#section-5.1.4 + switch (scheme) { + case 'https': + case 'http': + case 'file': + if (!path) { + path = _slash; + } + else if (path[0] !== _slash) { + path = _slash + path; + } + break; + } + return path; +} +const _empty = ''; +const _slash = '/'; +const _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; +/** + * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986. + * This class is a simple parser which creates the basic component parts + * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation + * and encoding. + * + * ```txt + * foo://example.com:8042/over/there?name=ferret#nose + * \_/ \______________/\_________/ \_________/ \__/ + * | | | | | + * scheme authority path query fragment + * | _____________________|__ + * / \ / \ + * urn:example:animal:ferret:nose + * ``` + */ +class URI { + static isUri(thing) { + if (thing instanceof URI) { + return true; + } + if (!thing) { + return false; + } + return typeof thing.authority === 'string' + && typeof thing.fragment === 'string' + && typeof thing.path === 'string' + && typeof thing.query === 'string' + && typeof thing.scheme === 'string' + && typeof thing.fsPath === 'string' + && typeof thing.with === 'function' + && typeof thing.toString === 'function'; + } + /** + * scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'. + * The part before the first colon. + */ + scheme; + /** + * authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'. + * The part between the first double slashes and the next slash. + */ + authority; + /** + * path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'. + */ + path; + /** + * query is the 'query' part of 'http://www.example.com/some/path?query#fragment'. + */ + query; + /** + * fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'. + */ + fragment; + /** + * @internal + */ + constructor(schemeOrData, authority, path, query, fragment, _strict = false) { + if (typeof schemeOrData === 'object') { + this.scheme = schemeOrData.scheme || _empty; + this.authority = schemeOrData.authority || _empty; + this.path = schemeOrData.path || _empty; + this.query = schemeOrData.query || _empty; + this.fragment = schemeOrData.fragment || _empty; + // no validation because it's this URI + // that creates uri components. + // _validateUri(this); + } + else { + this.scheme = _schemeFix(schemeOrData, _strict); + this.authority = authority || _empty; + this.path = _referenceResolution(this.scheme, path || _empty); + this.query = query || _empty; + this.fragment = fragment || _empty; + _validateUri(this, _strict); + } + } + // ---- filesystem path ----------------------- + /** + * Returns a string representing the corresponding file system path of this URI. + * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the + * platform specific path separator. + * + * * Will *not* validate the path for invalid characters and semantics. + * * Will *not* look at the scheme of this URI. + * * The result shall *not* be used for display purposes but for accessing a file on disk. + * + * + * The *difference* to `URI#path` is the use of the platform specific separator and the handling + * of UNC paths. See the below sample of a file-uri with an authority (UNC path). + * + * ```ts + const u = URI.parse('file://server/c$/folder/file.txt') + u.authority === 'server' + u.path === '/shares/c$/file.txt' + u.fsPath === '\\server\c$\folder\file.txt' + ``` + * + * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path, + * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working + * with URIs that represent files on disk (`file` scheme). + */ + get fsPath() { + // if (this.scheme !== 'file') { + // console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`); + // } + return uriToFsPath(this, false); + } + // ---- modify to new ------------------------- + with(change) { + if (!change) { + return this; + } + let { scheme, authority, path, query, fragment } = change; + if (scheme === undefined) { + scheme = this.scheme; + } + else if (scheme === null) { + scheme = _empty; + } + if (authority === undefined) { + authority = this.authority; + } + else if (authority === null) { + authority = _empty; + } + if (path === undefined) { + path = this.path; + } + else if (path === null) { + path = _empty; + } + if (query === undefined) { + query = this.query; + } + else if (query === null) { + query = _empty; + } + if (fragment === undefined) { + fragment = this.fragment; + } + else if (fragment === null) { + fragment = _empty; + } + if (scheme === this.scheme + && authority === this.authority + && path === this.path + && query === this.query + && fragment === this.fragment) { + return this; + } + return new Uri(scheme, authority, path, query, fragment); + } + // ---- parse & validate ------------------------ + /** + * Creates a new URI from a string, e.g. `http://www.example.com/some/path`, + * `file:///usr/home`, or `scheme:with/path`. + * + * @param value A string which represents an URI (see `URI#toString`). + */ + static parse(value, _strict = false) { + const match = _regexp.exec(value); + if (!match) { + return new Uri(_empty, _empty, _empty, _empty, _empty); + } + return new Uri(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict); + } + /** + * Creates a new URI from a file system path, e.g. `c:\my\files`, + * `/usr/home`, or `\\server\share\some\path`. + * + * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument + * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as** + * `URI.parse('file://' + path)` because the path might contain characters that are + * interpreted (# and ?). See the following sample: + * ```ts + const good = URI.file('/coding/c#/project1'); + good.scheme === 'file'; + good.path === '/coding/c#/project1'; + good.fragment === ''; + const bad = URI.parse('file://' + '/coding/c#/project1'); + bad.scheme === 'file'; + bad.path === '/coding/c'; // path is now broken + bad.fragment === '/project1'; + ``` + * + * @param path A file system path (see `URI#fsPath`) + */ + static file(path) { + let authority = _empty; + // normalize to fwd-slashes on windows, + // on other systems bwd-slashes are valid + // filename character, eg /f\oo/ba\r.txt + if (platform_1.isWindows) { + path = path.replace(/\\/g, _slash); + } + // check for authority as used in UNC shares + // or use the path as given + if (path[0] === _slash && path[1] === _slash) { + const idx = path.indexOf(_slash, 2); + if (idx === -1) { + authority = path.substring(2); + path = _slash; + } + else { + authority = path.substring(2, idx); + path = path.substring(idx) || _slash; + } + } + return new Uri('file', authority, path, _empty, _empty); + } + static from(components) { + const result = new Uri(components.scheme, components.authority, components.path, components.query, components.fragment); + _validateUri(result, true); + return result; + } + // ---- printing/externalize --------------------------- + /** + * Creates a string representation for this URI. It's guaranteed that calling + * `URI.parse` with the result of this function creates an URI which is equal + * to this URI. + * + * * The result shall *not* be used for display purposes but for externalization or transport. + * * The result will be encoded using the percentage encoding and encoding happens mostly + * ignore the scheme-specific encoding rules. + * + * @param skipEncoding Do not encode the result, default is `false` + */ + toString(skipEncoding = false) { + return _asFormatted(this, skipEncoding); + } + toJSON() { + return this; + } + static revive(data) { + if (!data) { + return data; + } + else if (data instanceof URI) { + return data; + } + else { + const result = new Uri(data); + result._formatted = data.external; + result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null; + return result; + } + } +} +exports.URI = URI; +const _pathSepMarker = platform_1.isWindows ? 1 : undefined; +// This class exists so that URI is compatible with vscode.Uri (API). +class Uri extends URI { + _formatted = null; + _fsPath = null; + get fsPath() { + if (!this._fsPath) { + this._fsPath = uriToFsPath(this, false); + } + return this._fsPath; + } + toString(skipEncoding = false) { + if (!skipEncoding) { + if (!this._formatted) { + this._formatted = _asFormatted(this, false); + } + return this._formatted; + } + else { + // we don't cache that + return _asFormatted(this, true); + } + } + toJSON() { + const res = { + $mid: 1 + }; + // cached state + if (this._fsPath) { + res.fsPath = this._fsPath; + res._sep = _pathSepMarker; + } + if (this._formatted) { + res.external = this._formatted; + } + // uri components + if (this.path) { + res.path = this.path; + } + if (this.scheme) { + res.scheme = this.scheme; + } + if (this.authority) { + res.authority = this.authority; + } + if (this.query) { + res.query = this.query; + } + if (this.fragment) { + res.fragment = this.fragment; + } + return res; + } +} +// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2 +const encodeTable = { + [58 /* CharCode.Colon */]: '%3A', + [47 /* CharCode.Slash */]: '%2F', + [63 /* CharCode.QuestionMark */]: '%3F', + [35 /* CharCode.Hash */]: '%23', + [91 /* CharCode.OpenSquareBracket */]: '%5B', + [93 /* CharCode.CloseSquareBracket */]: '%5D', + [64 /* CharCode.AtSign */]: '%40', + [33 /* CharCode.ExclamationMark */]: '%21', + [36 /* CharCode.DollarSign */]: '%24', + [38 /* CharCode.Ampersand */]: '%26', + [39 /* CharCode.SingleQuote */]: '%27', + [40 /* CharCode.OpenParen */]: '%28', + [41 /* CharCode.CloseParen */]: '%29', + [42 /* CharCode.Asterisk */]: '%2A', + [43 /* CharCode.Plus */]: '%2B', + [44 /* CharCode.Comma */]: '%2C', + [59 /* CharCode.Semicolon */]: '%3B', + [61 /* CharCode.Equals */]: '%3D', + [32 /* CharCode.Space */]: '%20', +}; +function encodeURIComponentFast(uriComponent, isPath, isAuthority) { + let res = undefined; + let nativeEncodePos = -1; + for (let pos = 0; pos < uriComponent.length; pos++) { + const code = uriComponent.charCodeAt(pos); + // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3 + if ((code >= 97 /* CharCode.a */ && code <= 122 /* CharCode.z */) + || (code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */) + || (code >= 48 /* CharCode.Digit0 */ && code <= 57 /* CharCode.Digit9 */) + || code === 45 /* CharCode.Dash */ + || code === 46 /* CharCode.Period */ + || code === 95 /* CharCode.Underline */ + || code === 126 /* CharCode.Tilde */ + || (isPath && code === 47 /* CharCode.Slash */) + || (isAuthority && code === 91 /* CharCode.OpenSquareBracket */) + || (isAuthority && code === 93 /* CharCode.CloseSquareBracket */) + || (isAuthority && code === 58 /* CharCode.Colon */)) { + // check if we are delaying native encode + if (nativeEncodePos !== -1) { + res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos)); + nativeEncodePos = -1; + } + // check if we write into a new string (by default we try to return the param) + if (res !== undefined) { + res += uriComponent.charAt(pos); + } + } + else { + // encoding needed, we need to allocate a new string + if (res === undefined) { + res = uriComponent.substr(0, pos); + } + // check with default table first + const escaped = encodeTable[code]; + if (escaped !== undefined) { + // check if we are delaying native encode + if (nativeEncodePos !== -1) { + res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos)); + nativeEncodePos = -1; + } + // append escaped variant to result + res += escaped; + } + else if (nativeEncodePos === -1) { + // use native encode only when needed + nativeEncodePos = pos; + } + } + } + if (nativeEncodePos !== -1) { + res += encodeURIComponent(uriComponent.substring(nativeEncodePos)); + } + return res !== undefined ? res : uriComponent; +} +function encodeURIComponentMinimal(path) { + let res = undefined; + for (let pos = 0; pos < path.length; pos++) { + const code = path.charCodeAt(pos); + if (code === 35 /* CharCode.Hash */ || code === 63 /* CharCode.QuestionMark */) { + if (res === undefined) { + res = path.substr(0, pos); + } + res += encodeTable[code]; + } + else { + if (res !== undefined) { + res += path[pos]; + } + } + } + return res !== undefined ? res : path; +} +/** + * Compute `fsPath` for the given uri + */ +function uriToFsPath(uri, keepDriveLetterCasing) { + let value; + if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') { + // unc path: file://shares/c$/far/boo + value = `//${uri.authority}${uri.path}`; + } + else if (uri.path.charCodeAt(0) === 47 /* CharCode.Slash */ + && (uri.path.charCodeAt(1) >= 65 /* CharCode.A */ && uri.path.charCodeAt(1) <= 90 /* CharCode.Z */ || uri.path.charCodeAt(1) >= 97 /* CharCode.a */ && uri.path.charCodeAt(1) <= 122 /* CharCode.z */) + && uri.path.charCodeAt(2) === 58 /* CharCode.Colon */) { + if (!keepDriveLetterCasing) { + // windows drive letter: file:///c:/far/boo + value = uri.path[1].toLowerCase() + uri.path.substr(2); + } + else { + value = uri.path.substr(1); + } + } + else { + // other path + value = uri.path; + } + if (platform_1.isWindows) { + value = value.replace(/\//g, '\\'); + } + return value; +} +exports.uriToFsPath = uriToFsPath; +/** + * Create the external version of a uri + */ +function _asFormatted(uri, skipEncoding) { + const encoder = !skipEncoding + ? encodeURIComponentFast + : encodeURIComponentMinimal; + let res = ''; + let { scheme, authority, path, query, fragment } = uri; + if (scheme) { + res += scheme; + res += ':'; + } + if (authority || scheme === 'file') { + res += _slash; + res += _slash; + } + if (authority) { + let idx = authority.indexOf('@'); + if (idx !== -1) { + // @ + const userinfo = authority.substr(0, idx); + authority = authority.substr(idx + 1); + idx = userinfo.lastIndexOf(':'); + if (idx === -1) { + res += encoder(userinfo, false, false); + } + else { + // :@ + res += encoder(userinfo.substr(0, idx), false, false); + res += ':'; + res += encoder(userinfo.substr(idx + 1), false, true); + } + res += '@'; + } + authority = authority.toLowerCase(); + idx = authority.lastIndexOf(':'); + if (idx === -1) { + res += encoder(authority, false, true); + } + else { + // : + res += encoder(authority.substr(0, idx), false, true); + res += authority.substr(idx); + } + } + if (path) { + // lower-case windows drive letters in /C:/fff or C:/fff + if (path.length >= 3 && path.charCodeAt(0) === 47 /* CharCode.Slash */ && path.charCodeAt(2) === 58 /* CharCode.Colon */) { + const code = path.charCodeAt(1); + if (code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */) { + path = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`; // "/c:".length === 3 + } + } + else if (path.length >= 2 && path.charCodeAt(1) === 58 /* CharCode.Colon */) { + const code = path.charCodeAt(0); + if (code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */) { + path = `${String.fromCharCode(code + 32)}:${path.substr(2)}`; // "/c:".length === 3 + } + } + // encode the rest of the path + res += encoder(path, true, false); + } + if (query) { + res += '?'; + res += encoder(query, false, false); + } + if (fragment) { + res += '#'; + res += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment; + } + return res; +} +// --- decode +function decodeURIComponentGraceful(str) { + try { + return decodeURIComponent(str); + } + catch { + if (str.length > 3) { + return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3)); + } + else { + return str; + } + } +} +const _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g; +function percentDecode(str) { + if (!str.match(_rEncodedAsHex)) { + return str; + } + return str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match)); +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/utils.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/utils.d.ts" index 35a843864288a0ec3dc68953da034aac771c82f7..26ed5e6501878ef9c4440275fed08df1aca105a2 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/utils.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/utils.d.ts" @@ -1,3 +1,58 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bad1bc59cf9ba7f2b8efc0f7342b141843cbf3d3d791fa13df4ff9b86db26df9 -size 2861 +import { URI } from './uri'; +export declare namespace Utils { + /** + * Joins one or more input paths to the path of URI. + * '/' is used as the directory separation character. + * + * The resolved path will be normalized. That means: + * - all '..' and '.' segments are resolved. + * - multiple, sequential occurences of '/' are replaced by a single instance of '/'. + * - trailing separators are preserved. + * + * @param uri The input URI. + * @param paths The paths to be joined with the path of URI. + * @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI. + */ + function joinPath(uri: URI, ...paths: string[]): URI; + /** + * Resolves one or more paths against the path of a URI. + * '/' is used as the directory separation character. + * + * The resolved path will be normalized. That means: + * - all '..' and '.' segments are resolved. + * - multiple, sequential occurences of '/' are replaced by a single instance of '/'. + * - trailing separators are removed. + * + * @param uri The input URI. + * @param paths The paths to resolve against the path of URI. + * @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI. + */ + function resolvePath(uri: URI, ...paths: string[]): URI; + /** + * Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The orignal URI is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The last segment of the URIs path. + */ + function dirname(uri: URI): URI; + /** + * Returns the last segment of the path of a URI, similar to the Unix basename command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The empty string is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The base name of the URIs path. + */ + function basename(uri: URI): string; + /** + * Returns the extension name of the path of a URI, similar to the Unix extname command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The empty string is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The extension name of the URIs path. + */ + function extname(uri: URI): string; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/utils.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/utils.js" index 83efe6b9c8707bbd6324afa744fdcfe91cee46b2..c683b4cb5f93533fe407a785a2fc49050b6888be 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/utils.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/lib/umd/utils.js" @@ -1,3 +1,123 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9f9b8f431890c158e48c2d7d2eb509898efb88d2d20d46351f015dbce4439ed9 -size 5552 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Utils = void 0; +const nodePath = __importStar(require("path")); +const posixPath = nodePath.posix || nodePath; +const slash = '/'; +var Utils; +(function (Utils) { + /** + * Joins one or more input paths to the path of URI. + * '/' is used as the directory separation character. + * + * The resolved path will be normalized. That means: + * - all '..' and '.' segments are resolved. + * - multiple, sequential occurences of '/' are replaced by a single instance of '/'. + * - trailing separators are preserved. + * + * @param uri The input URI. + * @param paths The paths to be joined with the path of URI. + * @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI. + */ + function joinPath(uri, ...paths) { + return uri.with({ path: posixPath.join(uri.path, ...paths) }); + } + Utils.joinPath = joinPath; + /** + * Resolves one or more paths against the path of a URI. + * '/' is used as the directory separation character. + * + * The resolved path will be normalized. That means: + * - all '..' and '.' segments are resolved. + * - multiple, sequential occurences of '/' are replaced by a single instance of '/'. + * - trailing separators are removed. + * + * @param uri The input URI. + * @param paths The paths to resolve against the path of URI. + * @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI. + */ + function resolvePath(uri, ...paths) { + let path = uri.path; + let slashAdded = false; + if (path[0] !== slash) { + path = slash + path; // make the path abstract: for posixPath.resolve the first segments has to be absolute or cwd is used. + slashAdded = true; + } + let resolvedPath = posixPath.resolve(path, ...paths); + if (slashAdded && resolvedPath[0] === slash && !uri.authority) { + resolvedPath = resolvedPath.substring(1); + } + return uri.with({ path: resolvedPath }); + } + Utils.resolvePath = resolvePath; + /** + * Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The orignal URI is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The last segment of the URIs path. + */ + function dirname(uri) { + if (uri.path.length === 0 || uri.path === slash) { + return uri; + } + let path = posixPath.dirname(uri.path); + if (path.length === 1 && path.charCodeAt(0) === 46 /* CharCode.Period */) { + path = ''; + } + return uri.with({ path }); + } + Utils.dirname = dirname; + /** + * Returns the last segment of the path of a URI, similar to the Unix basename command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The empty string is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The base name of the URIs path. + */ + function basename(uri) { + return posixPath.basename(uri.path); + } + Utils.basename = basename; + /** + * Returns the extension name of the path of a URI, similar to the Unix extname command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The empty string is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The extension name of the URIs path. + */ + function extname(uri) { + return posixPath.extname(uri.path); + } + Utils.extname = extname; +})(Utils || (exports.Utils = Utils = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/package.json" index f6d52d484b26e8e314d90989ee0a2a1e8ba964bd..3cf2ab720e4f7962e0d61128f859ef2d2a735129 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/node_modules/vscode-uri/package.json" @@ -1,3 +1,43 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d09b69a9f81addcaf2e162ab64bba0496726b7dd7cca17985163795eb7601633 -size 1214 +{ + "name": "vscode-uri", + "author": "Microsoft", + "version": "3.0.8", + "description": "The URI implementation that is used by VS Code and its extensions", + "main": "./lib/umd/index.js", + "typings": "./lib/umd/index", + "exports": { + "import": "./lib/esm/index.mjs", + "require": "./lib/umd/index.js", + "types": "./lib/umd/index.d.ts", + "browser": "./lib/esm/index.mjs" + }, + "sideEffects": false, + "scripts": { + "clean": "rimraf lib", + "pack-production": "webpack --mode=production", + "pack-dev": "webpack", + "compile": "tsc -p ./src", + "prepublish": "npm run pack-production", + "test": "tsc -p ./src && npm run pack-dev && mocha" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/microsoft/vscode-uri.git" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/microsoft/vscode-uri/issues" + }, + "homepage": "https://github.com/microsoft/vscode-uri#readme", + "devDependencies": { + "@types/mocha": "^10.0.2", + "@types/node": "16.x", + "mocha": "^10.2.0", + "path-browserify": "^1.0.1", + "rimraf": "^5.0.5", + "ts-loader": "^9.4.4", + "typescript": "^5.2.2", + "webpack": "^5.88.2", + "webpack-cli": "^5.1.4" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/package.json" index 93629ff4f0a93dc86fb99deadbcd9d862cfad8d2..ad4f8d5c98e2be1a3882ca0e4571d695fa4d7cc8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageserver/package.json" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3e7159a7bc0aabd48f2e82a17e6b8e42237906e04c871645d686c3d8130970d2 -size 1116 +{"name":"vscode-json-languageserver","description":"JSON language server","version":"1.3.4","author":"Microsoft Corporation","license":"MIT","engines":{"node":"*"},"bin":{"vscode-json-languageserver":"./bin/vscode-json-languageserver"},"main":"./out/node/jsonServerMain","dependencies":{"@vscode/l10n":"^0.0.18","jsonc-parser":"^3.2.1","request-light":"^0.7.0","vscode-json-languageservice":"^5.3.11","vscode-languageserver":"^10.0.0-next.3","vscode-uri":"^3.0.8"},"devDependencies":{"@types/mocha":"^9.1.1","@types/node":"18.x"},"scripts":{"prepublishOnly":"npm run clean && npm run compile","compile":"npx gulp compile-extension:json-language-features-server","watch":"npx gulp watch-extension:json-language-features-server","clean":"../../../node_modules/.bin/rimraf out","install-service-next":"yarn add vscode-json-languageservice@next","install-service-local":"yarn link vscode-json-languageservice","install-server-next":"yarn add vscode-languageserver@next","install-server-local":"yarn link vscode-languageserver-server","version":"git commit -m \"JSON Language Server $npm_package_version\" package.json"}} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/CHANGELOG.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/CHANGELOG.md" index 7c110023b45e2db0e12f240c93d57650cce8dcf2..8ac3d90f0e7ea8f8e44b84f7f1d2d1431e821a6e 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/CHANGELOG.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/CHANGELOG.md" @@ -1,3 +1,166 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:34ba19a6b11919c219c0f388ffa877bae88328206bdfa731b8321394baf1203d -size 6792 +5.3.1 / 2023-02-24 +================ + * Fixing bugs in the sort feature + +5.3.0 / 2023-02-15 +================ + * new API `LanguageService.sort` for sorting all properties in a JSON document + * new API `SortOptions` + +5.2.0 / 2023-02-02 +================ + * Added `SchemaConfiguration.folderUri` for folder-specific schema associations + +5.1.1 / 2022-08/19 +================ +* new type `SchemaDraft`, representing the offical JSON schema draft versions +* new property `DocumentLanguageSettings.schemaDraft` to specify the schema version to use, if the schema does not contain a `$schema` property + +5.1.0 / 2022-07-11 +================ +* new API option `FormattingOptions.keepLines` to indicate the formatter should keep the initial line positions + +5.0.0 / 2022-05-17 +================ + * Update to `vscode-languageserver-types@3.17` + * Add more schema support + * Schema 2019-09: unevaluatedProperties, unevaluatedItems, minContains, maxContains, deprecated, dependentRequired, dependentSchemas, $defs, $anchor + * Schema 2020-12: prefixItem + +4.2.0 / 2022-01-25 +================ + * new API `LanguageService.getLanguageStatus` + * support for $ref with $id + +4.1.6 / 2021-07-16 +================ + * Replace minimatch with glob-to-regexp + +4.1.0 / 2021-04-24 +================ + * `SchemaConfiguration.fileMatch` now supports glob patterns (e.g. /foo/**/bar.json') + +4.0.0 / 2020-12-14 +================ + * Update to `vscode-languageserver-types@3.16` + * Removed deprecated `findColorSymbols` + +3.11.0 / 2020-11-30 +================ + * new API `FormattingOptions.insertFinalNewline` + +3.10.0 / 2020-11-03 +================ + * new API `findLinks` return links for local `$ref` links. Replaces `findDefinition` which no longer returns results ( kept for API compatibility) + +3.9.0 / 2020-09-28 +================= + * new API `DocumentLanguageSettings.schemaValidation`. The severity of problems from schema validation. If set to 'ignore', schema validation will be skipped. If not set, 'warning' is used. + * new API `DocumentLanguageSettings.schemaRequest`. The severity of problems that occurred while resolving and loading schemas. If set to 'ignore', schema resolving problems are not reported. If not set, 'warning' is used. + +3.8.0 / 2020-08-02 +================= + * new API `LanguageService.getMatchingSchemas`. Matches a document against its schema and list all AST nodes along with the matching sub schemas. + +3.7.0 / 2020-06-04 +================== + * New API `JSONSchema.suggestSortText` to set the sort order of completion proposals (VS Code specific JSON schema extension) + +3.6.0 / 2020-04-27 +================== + * New API `findDefinition` to find a definition of a `$ref` link + +3.5.0 / 2020-02-20 +================== + * Support for exclusive file pattern starting with '!'. A file match consists of an array of patterns. A match succeeds when there is at least one pattern matching and last matching pattern does not start with '!'. + +3.4.4 / 2019-11-04 +================== + * Using `vscode-languageserver-textdocument` for TextDocument + +3.4.0 / 2019-10-28 +================== + * Added `DocumentSymbolsContext` and `ColorInformationContext` with `resultLimit` and `onResultLimitExceeded`. `onResultLimitExceeded` is called when the result was cropped. + * Added commit characters for completion proposals (if supported by ClientCapabilities) + * Warn when using draft-03 or draft-08 schemas + +3.3.4 / 2019-09-20 +================== + * Renamed `schema.allowsTrailingCommas` -> `schema.allowTrailingCommas` + +3.3.3 / 2019-08-29 +================== + * Schemas can configure whether comments and/or trailing commas are permitted. + +3.3.0 / 2019-06-12 +================== + * New API `LanguageService.getSelectionRanges` to get semantic selection ranges. + * Manage schema dependencies so that `resetSchema` also resets schemas that depend on the schema. + +3.2.0 / 2018-09-27 +================== + * New API `LanguageServiceParams.ClientCapabilities` to define what LSP capabilities the client supports. + * For the best experiences, clients should always use `LanguageServiceParams.ClientCapabilities.LATEST`, which has all the latest LSP capabilities enabled. + * `LanguageServiceParams.ClientCapabilities` can allow `MarkupKind.Markdown` as valid documentationFormat (used by completions if schemas use `markdownDescription` or `markdownEnumDescriptions`). + * Snippets can now provide the description also in markdown format. + * Bundled draft-07-schema with descriptions. + * Propose `examples` in code completions. + +3.1.5 / 2018-08-14 +================== + * support for JSON schema draft-07 + * New API `LanguageService.findDocumentSymbols2` to get document symbols as `DocumentSymbol[]` + +3.1.2 / 2018-07-25 +================== + * New API `LanguageService.getFoldingRanges` + * doValidation can also be used with a given schema + +3.1.0 / 2018-04-09 +================== + * new APIs: `newJSONDocument` to create a JSON document from a custom AST + * new API types: ObjectASTNode, PropertyASTNode, ArrayASTNode, StringASTNode, NumberASTNode, BooleanASTNode, NullASTNode that allow creating a custom AST + +3.0.9 / 2018-03-07 +================== + * Provide ems modules in lib/esm + +3.0.2 / 2017-01-27 +================== + * Added document specific validation parameters: `DocumentLanguageSettings` + * API to define the severity of reported comments and trailing commas (`DocumentLanguageSettings.comments`, `DocumentLanguageSettings.trailingCommas`) + +3.0.0 / 2017-01-11 +================== + * Changed parameters of API `LanguageService.getColorPresentations` to separate color and range +. +2.0.19 / 2017-09-21 +=================== + * New API `LanguageService.getColorPresentations` returning presentations for a given color. + * New API type `ColorPresentation` added. + +2.0.15 / 2017-08-28 +=================== + * New API `LanguageService.findDocumentColors` returning the location and value of all colors in a document. + * New API types `ColorInformation` and `Color` added. + * Deprecated `LanguageService.findColorSymbols`. Use `LanguageService.findDocumentColors` instead. + +2.0.8 / 2017-04-25 +================== + * error code for CommentsNotAllowed + +2.0.5 / 2017-03-27 +================== + * Add new API findColorSymbols that returns all color values in a JSON document. To mark a value as a color, specify `"format": "color"` in the schema. + +2.0.4 / 2017-02-27 +================== + * Support for custom schema property 'patternErrorMessage'. The message is used as error message if the object is of type string and has a 'pattern' property that does not match the object to validate. + +2.0.1 / 2017-02-21 +================== + * Fixes for formatting content with errors + +2.0.0 / 2017-02-17 +================== + * Updating to [language server type 3.0](https://github.com/Microsoft/vscode-languageserver-node/tree/master/types) API diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/LICENSE.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/LICENSE.md" index 997570a75c8d0cc4002de3a19bfc25f8bc695f85..cf2521acbd403ac77c077fdd71b671aca7910a25 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/LICENSE.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/LICENSE.md" @@ -1,3 +1,47 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4742836d395a83a45d2278d9b738824d68abb1a03b81d567210a6cbc3e686e12 -size 2490 +The MIT License (MIT) + +Copyright (c) Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +Glob matching is based on code from https://github.com/fitzgen/glob-to-regexp + +Copyright (c) 2013, Nick Fitzgerald + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list +of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this list +of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/README.md" index 6745b65c02f28bccbe901c275b18572e18832286..5a85746ebb078df7bc7b321d76a02772ea5199ae 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/README.md" @@ -1,3 +1,65 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eb31d9413cb71cf4f8ac4dd78e9c35f52c5d80b9b8fe0758e1d83293210abb83 -size 3455 +# vscode-json-languageservice + +JSON language service extracted from VSCode to be reused, e.g in the Monaco editor. + +[![npm Package](https://img.shields.io/npm/v/vscode-json-languageservice.svg?style=flat-square)](https://www.npmjs.org/package/vscode-json-languageservice) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-json-languageservice.svg)](https://npmjs.org/package/vscode-json-languageservice) +[![Build Status](https://github.com/microsoft/vscode-json-languageservice/actions/workflows/node.js.yml/badge.svg)](https://github.com/microsoft/vscode-json-languageservice/actions) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) + +## Why? + +The _vscode-json-languageservice_ contains the language smarts behind the JSON editing experience of Visual Studio Code +and the Monaco editor. + +- _doValidation_ analyses an input string and returns syntax and lint errors. +- _doComplete_ provides completion proposals for a given location. +- _doResolve_ resolves a completion proposals. +- _doHover_ provides a hover text for a given location. +- _findDocumentSymbols_ provides all symbols in the given document. +- _findDocumentColors_ provides all color symbols in the given document. +- _getColorPresentations_ returns available color formats for a color symbol. +- _format_ formats the code at the given range. +- _getFoldingRanges_ gets folding ranges for the given document. +- _getSelectionRanges_ gets selection ranges for a given location. +- _getMatchingSchemas_ matches a document against its schema and returns all AST nodes along with the matching sub schemas. +- _parseJSONDocument_ creates a JSON document from source code. +- _newJSONDocument_ creates a JSON document from an AST. + +For the complete API see [jsonLanguageService.ts](./src/jsonLanguageService.ts) and [jsonLanguageTypes.ts](./src/jsonLanguageTypes.ts) + +## Installation + + npm install --save vscode-json-languageservice + +## Sample usage + +See [sample.ts](./src/example/sample.ts) for an example on how to use the JSON language service. + +To run the sample use `yarn sample` + +## Development + + git clone https://github.com/microsoft/vscode-json-languageservice + cd vscode-json-languageservice + yarn + +Use `yarn test` to compile and run tests + + +### How can I run and debug the service? + +- open the folder in VSCode. +- set breakpoints, e.g. in `jsonCompletion.ts` +- run the Unit tests from the run viewlet and wait until a breakpoint is hit: + ![image](https://user-images.githubusercontent.com/6461412/94239202-bdad4e80-ff11-11ea-99c3-cb9dbeb1c0b2.png) + +### How can I run and debug the service inside an instance of VSCode? + +- run VSCode out of sources setup as described here: https://github.com/Microsoft/vscode/wiki/How-to-Contribute +- use `yarn link vscode-json-languageservice` in `vscode/extensions/json-language-features/server` to run VSCode with the latest changes from `vscode-json-languageservice` +- run VSCode out of source (`vscode/scripts/code.sh|bat`) and open a `.json` file +- in VSCode window that is open on the `vscode-json-languageservice` sources, run command `Debug: Attach to Node process` and pick the `code-oss` process with the `json-language-features` path + ![image](https://user-images.githubusercontent.com/6461412/94242925-061b3b00-ff17-11ea-8c17-8da15268f1a1.png) +- set breakpoints, e.g. in `jsonCompletion.ts` +- in the instance run from sources, invoke code completion in the `.json` file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/SECURITY.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/SECURITY.md" index f5f6a3f8ada07060363bde77a27e754b69f75b67..f7b89984f0fb5dd204028bc525e19eefc0859f4f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/SECURITY.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/SECURITY.md" @@ -1,3 +1,41 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:830e94b83c3b6f45ceee5609de6249b2125927f95532e68427f09c99eed5e663 -size 2780 + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). + + \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonContributions.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonContributions.d.ts" index 9fdefd0e1c73fd9421666dd08abf0caaa811aa11..447835cd38f53c69ceb009da31c41aeafe65084d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonContributions.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonContributions.d.ts" @@ -1,3 +1,21 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d1eaa6456434da5abcc2211f1ba8ac16205e06aaa64bb6ff92cb32987f46e89a -size 1042 +import { Thenable, MarkedString, CompletionItem } from './jsonLanguageService'; +export interface JSONWorkerContribution { + getInfoContribution(uri: string, location: JSONPath): Thenable; + collectPropertyCompletions(uri: string, location: JSONPath, currentWord: string, addValue: boolean, isLast: boolean, result: CompletionsCollector): Thenable; + collectValueCompletions(uri: string, location: JSONPath, propertyKey: string, result: CompletionsCollector): Thenable; + collectDefaultCompletions(uri: string, result: CompletionsCollector): Thenable; + resolveCompletion?(item: CompletionItem): Thenable; +} +export type Segment = string | number; +export type JSONPath = Segment[]; +export type JSONCompletionItem = CompletionItem & { + insertText: string; +}; +export interface CompletionsCollector { + add(suggestion: JSONCompletionItem & { + insertText: string; + }): void; + error(message: string): void; + setAsIncomplete(): void; + getNumberOfProposals(): number; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonContributions.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonContributions.js" index a9755173b4bb6da2a9126864f68f2b7288ece072..cb0ff5c3b541f646105198ee23ac0fc3d805023e 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonContributions.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonContributions.js" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881 -size 11 +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonLanguageService.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonLanguageService.d.ts" index fa7ae2ea880109b2bb883b0f308b0a5c6d0b3292..8ad6c412c257db083fa814ca333a1621cddd7f89 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonLanguageService.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonLanguageService.d.ts" @@ -1,3 +1,30 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:079dd814fa01d224b99ea794eba05e8a4debc0a70c60550fd46d6754183f47cc -size 2835 +import { Thenable, ASTNode, Color, ColorInformation, ColorPresentation, LanguageServiceParams, LanguageSettings, DocumentLanguageSettings, FoldingRange, JSONSchema, SelectionRange, FoldingRangesContext, DocumentSymbolsContext, ColorInformationContext as DocumentColorsContext, TextDocument, Position, CompletionItem, CompletionList, Hover, Range, SymbolInformation, Diagnostic, TextEdit, FormattingOptions, DocumentSymbol, DefinitionLink, MatchingSchema, JSONLanguageStatus, SortOptions } from './jsonLanguageTypes'; +import { DocumentLink } from 'vscode-languageserver-types'; +export type JSONDocument = { + root: ASTNode | undefined; + getNodeFromOffset(offset: number, includeRightBound?: boolean): ASTNode | undefined; +}; +export * from './jsonLanguageTypes'; +export interface LanguageService { + configure(settings: LanguageSettings): void; + doValidation(document: TextDocument, jsonDocument: JSONDocument, documentSettings?: DocumentLanguageSettings, schema?: JSONSchema): Thenable; + parseJSONDocument(document: TextDocument): JSONDocument; + newJSONDocument(rootNode: ASTNode, syntaxDiagnostics?: Diagnostic[]): JSONDocument; + resetSchema(uri: string): boolean; + getMatchingSchemas(document: TextDocument, jsonDocument: JSONDocument, schema?: JSONSchema): Thenable; + getLanguageStatus(document: TextDocument, jsonDocument: JSONDocument): JSONLanguageStatus; + doResolve(item: CompletionItem): Thenable; + doComplete(document: TextDocument, position: Position, doc: JSONDocument): Thenable; + findDocumentSymbols(document: TextDocument, doc: JSONDocument, context?: DocumentSymbolsContext): SymbolInformation[]; + findDocumentSymbols2(document: TextDocument, doc: JSONDocument, context?: DocumentSymbolsContext): DocumentSymbol[]; + findDocumentColors(document: TextDocument, doc: JSONDocument, context?: DocumentColorsContext): Thenable; + getColorPresentations(document: TextDocument, doc: JSONDocument, color: Color, range: Range): ColorPresentation[]; + doHover(document: TextDocument, position: Position, doc: JSONDocument): Thenable; + getFoldingRanges(document: TextDocument, context?: FoldingRangesContext): FoldingRange[]; + getSelectionRanges(document: TextDocument, positions: Position[], doc: JSONDocument): SelectionRange[]; + findDefinition(document: TextDocument, position: Position, doc: JSONDocument): Thenable; + findLinks(document: TextDocument, doc: JSONDocument): Thenable; + format(document: TextDocument, range: Range, options: FormattingOptions): TextEdit[]; + sort(document: TextDocument, options: SortOptions): TextEdit[]; +} +export declare function getLanguageService(params: LanguageServiceParams): LanguageService; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonLanguageService.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonLanguageService.js" index afeef8086742292cee39caee9f410a99d6241b08..15d16e164430039ccc3c52b1d198ceb2952e358f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonLanguageService.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonLanguageService.js" @@ -1,3 +1,52 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f8147799a0e0aaa86db5c2ccfc3f8d4c843d2419708c9f773ef12685a7a28be8 -size 3340 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import { JSONCompletion } from './services/jsonCompletion'; +import { JSONHover } from './services/jsonHover'; +import { JSONValidation } from './services/jsonValidation'; +import { JSONDocumentSymbols } from './services/jsonDocumentSymbols'; +import { parse as parseJSON, newJSONDocument } from './parser/jsonParser'; +import { schemaContributions } from './services/configuration'; +import { JSONSchemaService } from './services/jsonSchemaService'; +import { getFoldingRanges } from './services/jsonFolding'; +import { getSelectionRanges } from './services/jsonSelectionRanges'; +import { sort } from './utils/sort'; +import { format } from './utils/format'; +import { findLinks } from './services/jsonLinks'; +export * from './jsonLanguageTypes'; +export function getLanguageService(params) { + const promise = params.promiseConstructor || Promise; + const jsonSchemaService = new JSONSchemaService(params.schemaRequestService, params.workspaceContext, promise); + jsonSchemaService.setSchemaContributions(schemaContributions); + const jsonCompletion = new JSONCompletion(jsonSchemaService, params.contributions, promise, params.clientCapabilities); + const jsonHover = new JSONHover(jsonSchemaService, params.contributions, promise); + const jsonDocumentSymbols = new JSONDocumentSymbols(jsonSchemaService); + const jsonValidation = new JSONValidation(jsonSchemaService, promise); + return { + configure: (settings) => { + jsonSchemaService.clearExternalSchemas(); + settings.schemas?.forEach(jsonSchemaService.registerExternalSchema.bind(jsonSchemaService)); + jsonValidation.configure(settings); + }, + resetSchema: (uri) => jsonSchemaService.onResourceChange(uri), + doValidation: jsonValidation.doValidation.bind(jsonValidation), + getLanguageStatus: jsonValidation.getLanguageStatus.bind(jsonValidation), + parseJSONDocument: (document) => parseJSON(document, { collectComments: true }), + newJSONDocument: (root, diagnostics) => newJSONDocument(root, diagnostics), + getMatchingSchemas: jsonSchemaService.getMatchingSchemas.bind(jsonSchemaService), + doResolve: jsonCompletion.doResolve.bind(jsonCompletion), + doComplete: jsonCompletion.doComplete.bind(jsonCompletion), + findDocumentSymbols: jsonDocumentSymbols.findDocumentSymbols.bind(jsonDocumentSymbols), + findDocumentSymbols2: jsonDocumentSymbols.findDocumentSymbols2.bind(jsonDocumentSymbols), + findDocumentColors: jsonDocumentSymbols.findDocumentColors.bind(jsonDocumentSymbols), + getColorPresentations: jsonDocumentSymbols.getColorPresentations.bind(jsonDocumentSymbols), + doHover: jsonHover.doHover.bind(jsonHover), + getFoldingRanges, + getSelectionRanges, + findDefinition: () => Promise.resolve([]), + findLinks, + format: (document, range, options) => format(document, options, range), + sort: (document, options) => sort(document, options) + }; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonLanguageTypes.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonLanguageTypes.d.ts" index f8525e5dc882351765ddab9b11ae9daac73fdbcf..d0a6d849d52973e914a60e8e32565534d09fbe80 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonLanguageTypes.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonLanguageTypes.d.ts" @@ -1,3 +1,306 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:687fe26725f3716645ea6d861af80c49c19b37685696b3b191cbc6ce762a6466 -size 12193 +import { JSONWorkerContribution, JSONPath, Segment, CompletionsCollector } from './jsonContributions'; +import { JSONSchema } from './jsonSchema'; +import { Range, Position, DocumentUri, MarkupContent, MarkupKind, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, CompletionItemTag, InsertTextFormat, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString, FormattingOptions as LSPFormattingOptions, DefinitionLink, CodeActionContext, Command, CodeAction, DocumentHighlight, DocumentLink, WorkspaceEdit, TextEdit, CodeActionKind, TextDocumentEdit, VersionedTextDocumentIdentifier, DocumentHighlightKind } from 'vscode-languageserver-types'; +import { TextDocument, TextDocumentContentChangeEvent } from 'vscode-languageserver-textdocument'; +export { TextDocument, TextDocumentContentChangeEvent, Range, Position, DocumentUri, MarkupContent, MarkupKind, JSONSchema, JSONWorkerContribution, JSONPath, Segment, CompletionsCollector, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, CompletionItemTag, InsertTextFormat, DefinitionLink, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString, CodeActionContext, Command, CodeAction, DocumentHighlight, DocumentLink, WorkspaceEdit, TextEdit, CodeActionKind, TextDocumentEdit, VersionedTextDocumentIdentifier, DocumentHighlightKind }; +/** + * Error codes used by diagnostics + */ +export declare enum ErrorCode { + Undefined = 0, + EnumValueMismatch = 1, + Deprecated = 2, + UnexpectedEndOfComment = 257, + UnexpectedEndOfString = 258, + UnexpectedEndOfNumber = 259, + InvalidUnicode = 260, + InvalidEscapeCharacter = 261, + InvalidCharacter = 262, + PropertyExpected = 513, + CommaExpected = 514, + ColonExpected = 515, + ValueExpected = 516, + CommaOrCloseBacketExpected = 517, + CommaOrCloseBraceExpected = 518, + TrailingComma = 519, + DuplicateKey = 520, + CommentNotPermitted = 521, + PropertyKeysMustBeDoublequoted = 528, + SchemaResolveError = 768, + SchemaUnsupportedFeature = 769 +} +export type ASTNode = ObjectASTNode | PropertyASTNode | ArrayASTNode | StringASTNode | NumberASTNode | BooleanASTNode | NullASTNode; +export interface BaseASTNode { + readonly type: 'object' | 'array' | 'property' | 'string' | 'number' | 'boolean' | 'null'; + readonly parent?: ASTNode; + readonly offset: number; + readonly length: number; + readonly children?: ASTNode[]; + readonly value?: string | boolean | number | null; +} +export interface ObjectASTNode extends BaseASTNode { + readonly type: 'object'; + readonly properties: PropertyASTNode[]; + readonly children: ASTNode[]; +} +export interface PropertyASTNode extends BaseASTNode { + readonly type: 'property'; + readonly keyNode: StringASTNode; + readonly valueNode?: ASTNode; + readonly colonOffset?: number; + readonly children: ASTNode[]; +} +export interface ArrayASTNode extends BaseASTNode { + readonly type: 'array'; + readonly items: ASTNode[]; + readonly children: ASTNode[]; +} +export interface StringASTNode extends BaseASTNode { + readonly type: 'string'; + readonly value: string; +} +export interface NumberASTNode extends BaseASTNode { + readonly type: 'number'; + readonly value: number; + readonly isInteger: boolean; +} +export interface BooleanASTNode extends BaseASTNode { + readonly type: 'boolean'; + readonly value: boolean; +} +export interface NullASTNode extends BaseASTNode { + readonly type: 'null'; + readonly value: null; +} +export interface MatchingSchema { + node: ASTNode; + schema: JSONSchema; +} +export interface JSONLanguageStatus { + schemas: string[]; +} +export interface LanguageSettings { + /** + * If set, the validator will return syntax and semantic errors. + */ + validate?: boolean; + /** + * Defines whether comments are allowed or not. If set to false, comments will be reported as errors. + * DocumentLanguageSettings.allowComments will override this setting. + */ + allowComments?: boolean; + /** + * A list of known schemas and/or associations of schemas to file names. + */ + schemas?: SchemaConfiguration[]; +} +export type SeverityLevel = 'error' | 'warning' | 'ignore'; +export declare enum SchemaDraft { + v3 = 3, + v4 = 4, + v6 = 6, + v7 = 7, + v2019_09 = 19, + v2020_12 = 20 +} +export interface DocumentLanguageSettings { + /** + * The severity of reported comments. If not set, 'LanguageSettings.allowComments' defines whether comments are ignored or reported as errors. + */ + comments?: SeverityLevel; + /** + * The severity of reported trailing commas. If not set, trailing commas will be reported as errors. + */ + trailingCommas?: SeverityLevel; + /** + * The severity of problems from schema validation. If set to 'ignore', schema validation will be skipped. If not set, 'warning' is used. + */ + schemaValidation?: SeverityLevel; + /** + * The severity of problems that occurred when resolving and loading schemas. If set to 'ignore', schema resolving problems are not reported. If not set, 'warning' is used. + */ + schemaRequest?: SeverityLevel; + /** + * The draft version of schema to use if the schema doesn't specify one at $schema + */ + schemaDraft?: SchemaDraft; +} +export interface SchemaConfiguration { + /** + * The URI of the schema, which is also the identifier of the schema. + */ + uri: string; + /** + * A list of glob patterns that describe for which file URIs the JSON schema will be used. + * '*' and '**' wildcards are supported. Exclusion patterns start with '!'. + * For example '*.schema.json', 'package.json', '!foo*.schema.json', 'foo/**\/BADRESP.json'. + * A match succeeds when there is at least one pattern matching and last matching pattern does not start with '!'. + */ + fileMatch?: string[]; + /** + * The schema for the given URI. + * If no schema is provided, the schema will be fetched with the schema request service (if available). + */ + schema?: JSONSchema; + /** + * A parent folder for folder specifc associations. An association that has a folder URI set is only used + * if the document that is validated has the folderUri as parent + */ + folderUri?: string; +} +export interface WorkspaceContextService { + resolveRelativePath(relativePath: string, resource: string): string; +} +/** + * The schema request service is used to fetch schemas. If successful, returns a resolved promise with the content of the schema. + * In case of an error, returns a rejected promise with a displayable error string. + */ +export interface SchemaRequestService { + (uri: string): Thenable; +} +export interface PromiseConstructor { + /** + * Creates a new Promise. + * @param executor A callback used to initialize the promise. This callback is passed two arguments: + * a resolve callback used resolve the promise with a value or the result of another promise, + * and a reject callback used to reject the promise with a provided reason or error. + */ + new (executor: (resolve: (value?: T | Thenable) => void, reject: (reason?: any) => void) => void): Thenable; + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: Array>): Thenable; + /** + * Creates a new rejected promise for the provided reason. + * @param reason The reason the promise was rejected. + * @returns A new rejected Promise. + */ + reject(reason: any): Thenable; + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T | Thenable): Thenable; +} +export interface Thenable { + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: (value: R) => TResult | Thenable, onrejected?: (reason: any) => TResult | Thenable): Thenable; + then(onfulfilled?: (value: R) => TResult | Thenable, onrejected?: (reason: any) => void): Thenable; +} +export interface LanguageServiceParams { + /** + * The schema request service is used to fetch schemas from a URI. The provider returns the schema file content, or, + * in case of an error, a displayable error string + */ + schemaRequestService?: SchemaRequestService; + /** + * The workspace context is used to resolve relative paths for relative schema references. + */ + workspaceContext?: WorkspaceContextService; + /** + * An optional set of completion and hover participants. + */ + contributions?: JSONWorkerContribution[]; + /** + * A promise constructor. If not set, the ES5 Promise will be used. + */ + promiseConstructor?: PromiseConstructor; + /** + * Describes the LSP capabilities the client supports. + */ + clientCapabilities?: ClientCapabilities; +} +/** + * Describes what LSP capabilities the client supports + */ +export interface ClientCapabilities { + /** + * The text document client capabilities + */ + textDocument?: { + /** + * Capabilities specific to completions. + */ + completion?: { + /** + * The client supports the following `CompletionItem` specific + * capabilities. + */ + completionItem?: { + /** + * Client supports the follow content formats for the documentation + * property. The order describes the preferred format of the client. + */ + documentationFormat?: MarkupKind[]; + /** + * The client supports commit characters on a completion item. + */ + commitCharactersSupport?: boolean; + /** + * The client has support for completion item label + * details (see also `CompletionItemLabelDetails`). + */ + labelDetailsSupport?: boolean; + }; + }; + /** + * Capabilities specific to hovers. + */ + hover?: { + /** + * Client supports the follow content formats for the content + * property. The order describes the preferred format of the client. + */ + contentFormat?: MarkupKind[]; + }; + }; +} +export declare namespace ClientCapabilities { + const LATEST: ClientCapabilities; +} +export interface FoldingRangesContext { + /** + * The maximal number of ranges returned. + */ + rangeLimit?: number; + /** + * Called when the result was cropped. + */ + onRangeLimitExceeded?: (uri: string) => void; +} +export interface DocumentSymbolsContext { + /** + * The maximal number of document symbols returned. + */ + resultLimit?: number; + /** + * Called when the result was cropped. + */ + onResultLimitExceeded?: (uri: string) => void; +} +export interface ColorInformationContext { + /** + * The maximal number of color informations returned. + */ + resultLimit?: number; + /** + * Called when the result was cropped. + */ + onResultLimitExceeded?: (uri: string) => void; +} +export interface FormattingOptions extends LSPFormattingOptions { + insertFinalNewline?: boolean; + keepLines?: boolean; +} +export interface SortOptions extends LSPFormattingOptions { + insertFinalNewline?: boolean; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonLanguageTypes.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonLanguageTypes.js" index 625dfe814d89cada87457e2d3204b78321a62df8..2096b7042a7787c9e3af2ce2547cc0a8f21e8e48 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonLanguageTypes.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonLanguageTypes.js" @@ -1,3 +1,57 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:56044c3cc068925b1df3135a1195e0308b6d3be778dae28c0eb9975587f08ac9 -size 4153 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import { Range, Position, DocumentUri, MarkupContent, MarkupKind, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, CompletionItemTag, InsertTextFormat, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString, CodeActionContext, Command, CodeAction, DocumentHighlight, DocumentLink, WorkspaceEdit, TextEdit, CodeActionKind, TextDocumentEdit, VersionedTextDocumentIdentifier, DocumentHighlightKind } from 'vscode-languageserver-types'; +import { TextDocument } from 'vscode-languageserver-textdocument'; +export { TextDocument, Range, Position, DocumentUri, MarkupContent, MarkupKind, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, CompletionItemTag, InsertTextFormat, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString, CodeActionContext, Command, CodeAction, DocumentHighlight, DocumentLink, WorkspaceEdit, TextEdit, CodeActionKind, TextDocumentEdit, VersionedTextDocumentIdentifier, DocumentHighlightKind }; +/** + * Error codes used by diagnostics + */ +export var ErrorCode; +(function (ErrorCode) { + ErrorCode[ErrorCode["Undefined"] = 0] = "Undefined"; + ErrorCode[ErrorCode["EnumValueMismatch"] = 1] = "EnumValueMismatch"; + ErrorCode[ErrorCode["Deprecated"] = 2] = "Deprecated"; + ErrorCode[ErrorCode["UnexpectedEndOfComment"] = 257] = "UnexpectedEndOfComment"; + ErrorCode[ErrorCode["UnexpectedEndOfString"] = 258] = "UnexpectedEndOfString"; + ErrorCode[ErrorCode["UnexpectedEndOfNumber"] = 259] = "UnexpectedEndOfNumber"; + ErrorCode[ErrorCode["InvalidUnicode"] = 260] = "InvalidUnicode"; + ErrorCode[ErrorCode["InvalidEscapeCharacter"] = 261] = "InvalidEscapeCharacter"; + ErrorCode[ErrorCode["InvalidCharacter"] = 262] = "InvalidCharacter"; + ErrorCode[ErrorCode["PropertyExpected"] = 513] = "PropertyExpected"; + ErrorCode[ErrorCode["CommaExpected"] = 514] = "CommaExpected"; + ErrorCode[ErrorCode["ColonExpected"] = 515] = "ColonExpected"; + ErrorCode[ErrorCode["ValueExpected"] = 516] = "ValueExpected"; + ErrorCode[ErrorCode["CommaOrCloseBacketExpected"] = 517] = "CommaOrCloseBacketExpected"; + ErrorCode[ErrorCode["CommaOrCloseBraceExpected"] = 518] = "CommaOrCloseBraceExpected"; + ErrorCode[ErrorCode["TrailingComma"] = 519] = "TrailingComma"; + ErrorCode[ErrorCode["DuplicateKey"] = 520] = "DuplicateKey"; + ErrorCode[ErrorCode["CommentNotPermitted"] = 521] = "CommentNotPermitted"; + ErrorCode[ErrorCode["PropertyKeysMustBeDoublequoted"] = 528] = "PropertyKeysMustBeDoublequoted"; + ErrorCode[ErrorCode["SchemaResolveError"] = 768] = "SchemaResolveError"; + ErrorCode[ErrorCode["SchemaUnsupportedFeature"] = 769] = "SchemaUnsupportedFeature"; +})(ErrorCode || (ErrorCode = {})); +export var SchemaDraft; +(function (SchemaDraft) { + SchemaDraft[SchemaDraft["v3"] = 3] = "v3"; + SchemaDraft[SchemaDraft["v4"] = 4] = "v4"; + SchemaDraft[SchemaDraft["v6"] = 6] = "v6"; + SchemaDraft[SchemaDraft["v7"] = 7] = "v7"; + SchemaDraft[SchemaDraft["v2019_09"] = 19] = "v2019_09"; + SchemaDraft[SchemaDraft["v2020_12"] = 20] = "v2020_12"; +})(SchemaDraft || (SchemaDraft = {})); +export var ClientCapabilities; +(function (ClientCapabilities) { + ClientCapabilities.LATEST = { + textDocument: { + completion: { + completionItem: { + documentationFormat: [MarkupKind.Markdown, MarkupKind.PlainText], + commitCharactersSupport: true, + labelDetailsSupport: true + } + } + } + }; +})(ClientCapabilities || (ClientCapabilities = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonSchema.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonSchema.d.ts" index 65dbe99be044b7c9e39dde75e03748024af3200e..f5ea51cbf51398d01791309f984dc314a2dd7129 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonSchema.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonSchema.d.ts" @@ -1,3 +1,89 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9a346f9804b713c20a9ab9f95460fb2f20e4281849893f4c892a55809874a5a4 -size 2419 +export type JSONSchemaRef = JSONSchema | boolean; +export interface JSONSchema { + id?: string; + $id?: string; + $schema?: string; + type?: string | string[]; + title?: string; + default?: any; + definitions?: { + [name: string]: JSONSchema; + }; + description?: string; + properties?: JSONSchemaMap; + patternProperties?: JSONSchemaMap; + additionalProperties?: JSONSchemaRef; + minProperties?: number; + maxProperties?: number; + dependencies?: JSONSchemaMap | { + [prop: string]: string[]; + }; + items?: JSONSchemaRef | JSONSchemaRef[]; + minItems?: number; + maxItems?: number; + uniqueItems?: boolean; + additionalItems?: JSONSchemaRef; + pattern?: string; + minLength?: number; + maxLength?: number; + minimum?: number; + maximum?: number; + exclusiveMinimum?: boolean | number; + exclusiveMaximum?: boolean | number; + multipleOf?: number; + required?: string[]; + $ref?: string; + anyOf?: JSONSchemaRef[]; + allOf?: JSONSchemaRef[]; + oneOf?: JSONSchemaRef[]; + not?: JSONSchemaRef; + enum?: any[]; + format?: string; + const?: any; + contains?: JSONSchemaRef; + propertyNames?: JSONSchemaRef; + examples?: any[]; + $comment?: string; + if?: JSONSchemaRef; + then?: JSONSchemaRef; + else?: JSONSchemaRef; + unevaluatedProperties?: boolean | JSONSchemaRef; + unevaluatedItems?: boolean | JSONSchemaRef; + minContains?: number; + maxContains?: number; + deprecated?: boolean; + dependentRequired?: { + [prop: string]: string[]; + }; + dependentSchemas?: JSONSchemaMap; + $defs?: { + [name: string]: JSONSchema; + }; + $anchor?: string; + $recursiveRef?: string; + $recursiveAnchor?: string; + $vocabulary?: any; + prefixItems?: JSONSchemaRef[]; + $dynamicRef?: string; + $dynamicAnchor?: string; + defaultSnippets?: { + label?: string; + description?: string; + markdownDescription?: string; + body?: any; + bodyText?: string; + }[]; + errorMessage?: string; + patternErrorMessage?: string; + deprecationMessage?: string; + enumDescriptions?: string[]; + markdownEnumDescriptions?: string[]; + markdownDescription?: string; + doNotSuggest?: boolean; + suggestSortText?: string; + allowComments?: boolean; + allowTrailingCommas?: boolean; +} +export interface JSONSchemaMap { + [name: string]: JSONSchemaRef; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonSchema.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonSchema.js" index a9755173b4bb6da2a9126864f68f2b7288ece072..cb0ff5c3b541f646105198ee23ac0fc3d805023e 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonSchema.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/jsonSchema.js" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881 -size 11 +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/parser/jsonParser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/parser/jsonParser.js" index 8b3ec5144bd7f56995dc7801e80efbdcbbba49cc..4d5f53619bed0ad590d9f3e9381d18c3155d9709 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/parser/jsonParser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/parser/jsonParser.js" @@ -1,3 +1,1244 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:de24ab0c0bb4ed275f367c4a923a2420f7e447c65024e6d5c3158ccf0a79ee89 -size 58823 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as Json from 'jsonc-parser'; +import { isNumber, equals, isBoolean, isString, isDefined, isObject } from '../utils/objects'; +import { extendedRegExp, stringLength } from '../utils/strings'; +import { ErrorCode, Diagnostic, DiagnosticSeverity, Range, SchemaDraft } from '../jsonLanguageTypes'; +import * as l10n from '@vscode/l10n'; +const formats = { + 'color-hex': { errorMessage: l10n.t('Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.'), pattern: /^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/ }, + 'date-time': { errorMessage: l10n.t('String is not a RFC3339 date-time.'), pattern: /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i }, + 'date': { errorMessage: l10n.t('String is not a RFC3339 date.'), pattern: /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i }, + 'time': { errorMessage: l10n.t('String is not a RFC3339 time.'), pattern: /^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i }, + 'email': { errorMessage: l10n.t('String is not an e-mail address.'), pattern: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/ }, + 'hostname': { errorMessage: l10n.t('String is not a hostname.'), pattern: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i }, + 'ipv4': { errorMessage: l10n.t('String is not an IPv4 address.'), pattern: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/ }, + 'ipv6': { errorMessage: l10n.t('String is not an IPv6 address.'), pattern: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i }, +}; +export class ASTNodeImpl { + constructor(parent, offset, length = 0) { + this.offset = offset; + this.length = length; + this.parent = parent; + } + get children() { + return []; + } + toString() { + return 'type: ' + this.type + ' (' + this.offset + '/' + this.length + ')' + (this.parent ? ' parent: {' + this.parent.toString() + '}' : ''); + } +} +export class NullASTNodeImpl extends ASTNodeImpl { + constructor(parent, offset) { + super(parent, offset); + this.type = 'null'; + this.value = null; + } +} +export class BooleanASTNodeImpl extends ASTNodeImpl { + constructor(parent, boolValue, offset) { + super(parent, offset); + this.type = 'boolean'; + this.value = boolValue; + } +} +export class ArrayASTNodeImpl extends ASTNodeImpl { + constructor(parent, offset) { + super(parent, offset); + this.type = 'array'; + this.items = []; + } + get children() { + return this.items; + } +} +export class NumberASTNodeImpl extends ASTNodeImpl { + constructor(parent, offset) { + super(parent, offset); + this.type = 'number'; + this.isInteger = true; + this.value = Number.NaN; + } +} +export class StringASTNodeImpl extends ASTNodeImpl { + constructor(parent, offset, length) { + super(parent, offset, length); + this.type = 'string'; + this.value = ''; + } +} +export class PropertyASTNodeImpl extends ASTNodeImpl { + constructor(parent, offset, keyNode) { + super(parent, offset); + this.type = 'property'; + this.colonOffset = -1; + this.keyNode = keyNode; + } + get children() { + return this.valueNode ? [this.keyNode, this.valueNode] : [this.keyNode]; + } +} +export class ObjectASTNodeImpl extends ASTNodeImpl { + constructor(parent, offset) { + super(parent, offset); + this.type = 'object'; + this.properties = []; + } + get children() { + return this.properties; + } +} +export function asSchema(schema) { + if (isBoolean(schema)) { + return schema ? {} : { "not": {} }; + } + return schema; +} +export var EnumMatch; +(function (EnumMatch) { + EnumMatch[EnumMatch["Key"] = 0] = "Key"; + EnumMatch[EnumMatch["Enum"] = 1] = "Enum"; +})(EnumMatch || (EnumMatch = {})); +const schemaDraftFromId = { + 'http://json-schema.org/draft-03/schema#': SchemaDraft.v3, + 'http://json-schema.org/draft-04/schema#': SchemaDraft.v4, + 'http://json-schema.org/draft-06/schema#': SchemaDraft.v6, + 'http://json-schema.org/draft-07/schema#': SchemaDraft.v7, + 'https://json-schema.org/draft/2019-09/schema': SchemaDraft.v2019_09, + 'https://json-schema.org/draft/2020-12/schema': SchemaDraft.v2020_12 +}; +class EvaluationContext { + constructor(schemaDraft) { + this.schemaDraft = schemaDraft; + } +} +class SchemaCollector { + constructor(focusOffset = -1, exclude) { + this.focusOffset = focusOffset; + this.exclude = exclude; + this.schemas = []; + } + add(schema) { + this.schemas.push(schema); + } + merge(other) { + Array.prototype.push.apply(this.schemas, other.schemas); + } + include(node) { + return (this.focusOffset === -1 || contains(node, this.focusOffset)) && (node !== this.exclude); + } + newSub() { + return new SchemaCollector(-1, this.exclude); + } +} +class NoOpSchemaCollector { + constructor() { } + get schemas() { return []; } + add(_schema) { } + merge(_other) { } + include(_node) { return true; } + newSub() { return this; } +} +NoOpSchemaCollector.instance = new NoOpSchemaCollector(); +export class ValidationResult { + constructor() { + this.problems = []; + this.propertiesMatches = 0; + this.processedProperties = new Set(); + this.propertiesValueMatches = 0; + this.primaryValueMatches = 0; + this.enumValueMatch = false; + this.enumValues = undefined; + } + hasProblems() { + return !!this.problems.length; + } + merge(validationResult) { + this.problems = this.problems.concat(validationResult.problems); + this.propertiesMatches += validationResult.propertiesMatches; + this.propertiesValueMatches += validationResult.propertiesValueMatches; + this.mergeProcessedProperties(validationResult); + } + mergeEnumValues(validationResult) { + if (!this.enumValueMatch && !validationResult.enumValueMatch && this.enumValues && validationResult.enumValues) { + this.enumValues = this.enumValues.concat(validationResult.enumValues); + for (const error of this.problems) { + if (error.code === ErrorCode.EnumValueMismatch) { + error.message = l10n.t('Value is not accepted. Valid values: {0}.', this.enumValues.map(v => JSON.stringify(v)).join(', ')); + } + } + } + } + mergePropertyMatch(propertyValidationResult) { + this.problems = this.problems.concat(propertyValidationResult.problems); + this.propertiesMatches++; + if (propertyValidationResult.enumValueMatch || !propertyValidationResult.hasProblems() && propertyValidationResult.propertiesMatches) { + this.propertiesValueMatches++; + } + if (propertyValidationResult.enumValueMatch && propertyValidationResult.enumValues && propertyValidationResult.enumValues.length === 1) { + this.primaryValueMatches++; + } + } + mergeProcessedProperties(validationResult) { + validationResult.processedProperties.forEach(p => this.processedProperties.add(p)); + } + compare(other) { + const hasProblems = this.hasProblems(); + if (hasProblems !== other.hasProblems()) { + return hasProblems ? -1 : 1; + } + if (this.enumValueMatch !== other.enumValueMatch) { + return other.enumValueMatch ? -1 : 1; + } + if (this.primaryValueMatches !== other.primaryValueMatches) { + return this.primaryValueMatches - other.primaryValueMatches; + } + if (this.propertiesValueMatches !== other.propertiesValueMatches) { + return this.propertiesValueMatches - other.propertiesValueMatches; + } + return this.propertiesMatches - other.propertiesMatches; + } +} +export function newJSONDocument(root, diagnostics = []) { + return new JSONDocument(root, diagnostics, []); +} +export function getNodeValue(node) { + return Json.getNodeValue(node); +} +export function getNodePath(node) { + return Json.getNodePath(node); +} +export function contains(node, offset, includeRightBound = false) { + return offset >= node.offset && offset < (node.offset + node.length) || includeRightBound && offset === (node.offset + node.length); +} +export class JSONDocument { + constructor(root, syntaxErrors = [], comments = []) { + this.root = root; + this.syntaxErrors = syntaxErrors; + this.comments = comments; + } + getNodeFromOffset(offset, includeRightBound = false) { + if (this.root) { + return Json.findNodeAtOffset(this.root, offset, includeRightBound); + } + return undefined; + } + visit(visitor) { + if (this.root) { + const doVisit = (node) => { + let ctn = visitor(node); + const children = node.children; + if (Array.isArray(children)) { + for (let i = 0; i < children.length && ctn; i++) { + ctn = doVisit(children[i]); + } + } + return ctn; + }; + doVisit(this.root); + } + } + validate(textDocument, schema, severity = DiagnosticSeverity.Warning, schemaDraft) { + if (this.root && schema) { + const validationResult = new ValidationResult(); + validate(this.root, schema, validationResult, NoOpSchemaCollector.instance, new EvaluationContext(schemaDraft ?? getSchemaDraft(schema))); + return validationResult.problems.map(p => { + const range = Range.create(textDocument.positionAt(p.location.offset), textDocument.positionAt(p.location.offset + p.location.length)); + return Diagnostic.create(range, p.message, p.severity ?? severity, p.code); + }); + } + return undefined; + } + getMatchingSchemas(schema, focusOffset = -1, exclude) { + if (this.root && schema) { + const matchingSchemas = new SchemaCollector(focusOffset, exclude); + const schemaDraft = getSchemaDraft(schema); + const context = new EvaluationContext(schemaDraft); + validate(this.root, schema, new ValidationResult(), matchingSchemas, context); + return matchingSchemas.schemas; + } + return []; + } +} +function getSchemaDraft(schema, fallBack = SchemaDraft.v2020_12) { + let schemaId = schema.$schema; + if (schemaId) { + return schemaDraftFromId[schemaId] ?? fallBack; + } + return fallBack; +} +function validate(n, schema, validationResult, matchingSchemas, context) { + if (!n || !matchingSchemas.include(n)) { + return; + } + if (n.type === 'property') { + return validate(n.valueNode, schema, validationResult, matchingSchemas, context); + } + const node = n; + _validateNode(); + switch (node.type) { + case 'object': + _validateObjectNode(node); + break; + case 'array': + _validateArrayNode(node); + break; + case 'string': + _validateStringNode(node); + break; + case 'number': + _validateNumberNode(node); + break; + } + matchingSchemas.add({ node: node, schema: schema }); + function _validateNode() { + function matchesType(type) { + return node.type === type || (type === 'integer' && node.type === 'number' && node.isInteger); + } + if (Array.isArray(schema.type)) { + if (!schema.type.some(matchesType)) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.errorMessage || l10n.t('Incorrect type. Expected one of {0}.', schema.type.join(', ')) + }); + } + } + else if (schema.type) { + if (!matchesType(schema.type)) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.errorMessage || l10n.t('Incorrect type. Expected "{0}".', schema.type) + }); + } + } + if (Array.isArray(schema.allOf)) { + for (const subSchemaRef of schema.allOf) { + const subValidationResult = new ValidationResult(); + const subMatchingSchemas = matchingSchemas.newSub(); + validate(node, asSchema(subSchemaRef), subValidationResult, subMatchingSchemas, context); + validationResult.merge(subValidationResult); + matchingSchemas.merge(subMatchingSchemas); + } + } + const notSchema = asSchema(schema.not); + if (notSchema) { + const subValidationResult = new ValidationResult(); + const subMatchingSchemas = matchingSchemas.newSub(); + validate(node, notSchema, subValidationResult, subMatchingSchemas, context); + if (!subValidationResult.hasProblems()) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.errorMessage || l10n.t("Matches a schema that is not allowed.") + }); + } + for (const ms of subMatchingSchemas.schemas) { + ms.inverted = !ms.inverted; + matchingSchemas.add(ms); + } + } + const testAlternatives = (alternatives, maxOneMatch) => { + const matches = []; + // remember the best match that is used for error messages + let bestMatch = undefined; + for (const subSchemaRef of alternatives) { + const subSchema = asSchema(subSchemaRef); + const subValidationResult = new ValidationResult(); + const subMatchingSchemas = matchingSchemas.newSub(); + validate(node, subSchema, subValidationResult, subMatchingSchemas, context); + if (!subValidationResult.hasProblems()) { + matches.push(subSchema); + } + if (!bestMatch) { + bestMatch = { schema: subSchema, validationResult: subValidationResult, matchingSchemas: subMatchingSchemas }; + } + else { + if (!maxOneMatch && !subValidationResult.hasProblems() && !bestMatch.validationResult.hasProblems()) { + // no errors, both are equally good matches + bestMatch.matchingSchemas.merge(subMatchingSchemas); + bestMatch.validationResult.propertiesMatches += subValidationResult.propertiesMatches; + bestMatch.validationResult.propertiesValueMatches += subValidationResult.propertiesValueMatches; + bestMatch.validationResult.mergeProcessedProperties(subValidationResult); + } + else { + const compareResult = subValidationResult.compare(bestMatch.validationResult); + if (compareResult > 0) { + // our node is the best matching so far + bestMatch = { schema: subSchema, validationResult: subValidationResult, matchingSchemas: subMatchingSchemas }; + } + else if (compareResult === 0) { + // there's already a best matching but we are as good + bestMatch.matchingSchemas.merge(subMatchingSchemas); + bestMatch.validationResult.mergeEnumValues(subValidationResult); + } + } + } + } + if (matches.length > 1 && maxOneMatch) { + validationResult.problems.push({ + location: { offset: node.offset, length: 1 }, + message: l10n.t("Matches multiple schemas when only one must validate.") + }); + } + if (bestMatch) { + validationResult.merge(bestMatch.validationResult); + matchingSchemas.merge(bestMatch.matchingSchemas); + } + return matches.length; + }; + if (Array.isArray(schema.anyOf)) { + testAlternatives(schema.anyOf, false); + } + if (Array.isArray(schema.oneOf)) { + testAlternatives(schema.oneOf, true); + } + const testBranch = (schema) => { + const subValidationResult = new ValidationResult(); + const subMatchingSchemas = matchingSchemas.newSub(); + validate(node, asSchema(schema), subValidationResult, subMatchingSchemas, context); + validationResult.merge(subValidationResult); + matchingSchemas.merge(subMatchingSchemas); + }; + const testCondition = (ifSchema, thenSchema, elseSchema) => { + const subSchema = asSchema(ifSchema); + const subValidationResult = new ValidationResult(); + const subMatchingSchemas = matchingSchemas.newSub(); + validate(node, subSchema, subValidationResult, subMatchingSchemas, context); + matchingSchemas.merge(subMatchingSchemas); + validationResult.mergeProcessedProperties(subValidationResult); + if (!subValidationResult.hasProblems()) { + if (thenSchema) { + testBranch(thenSchema); + } + } + else if (elseSchema) { + testBranch(elseSchema); + } + }; + const ifSchema = asSchema(schema.if); + if (ifSchema) { + testCondition(ifSchema, asSchema(schema.then), asSchema(schema.else)); + } + if (Array.isArray(schema.enum)) { + const val = getNodeValue(node); + let enumValueMatch = false; + for (const e of schema.enum) { + if (equals(val, e)) { + enumValueMatch = true; + break; + } + } + validationResult.enumValues = schema.enum; + validationResult.enumValueMatch = enumValueMatch; + if (!enumValueMatch) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + code: ErrorCode.EnumValueMismatch, + message: schema.errorMessage || l10n.t('Value is not accepted. Valid values: {0}.', schema.enum.map(v => JSON.stringify(v)).join(', ')) + }); + } + } + if (isDefined(schema.const)) { + const val = getNodeValue(node); + if (!equals(val, schema.const)) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + code: ErrorCode.EnumValueMismatch, + message: schema.errorMessage || l10n.t('Value must be {0}.', JSON.stringify(schema.const)) + }); + validationResult.enumValueMatch = false; + } + else { + validationResult.enumValueMatch = true; + } + validationResult.enumValues = [schema.const]; + } + let deprecationMessage = schema.deprecationMessage; + if (deprecationMessage || schema.deprecated) { + deprecationMessage = deprecationMessage || l10n.t('Value is deprecated'); + let targetNode = node.parent?.type === 'property' ? node.parent : node; + validationResult.problems.push({ + location: { offset: targetNode.offset, length: targetNode.length }, + severity: DiagnosticSeverity.Warning, + message: deprecationMessage, + code: ErrorCode.Deprecated + }); + } + } + function _validateNumberNode(node) { + const val = node.value; + function normalizeFloats(float) { + const parts = /^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(float.toString()); + return parts && { + value: Number(parts[1] + (parts[2] || '')), + multiplier: (parts[2]?.length || 0) - (parseInt(parts[3]) || 0) + }; + } + ; + if (isNumber(schema.multipleOf)) { + let remainder = -1; + if (Number.isInteger(schema.multipleOf)) { + remainder = val % schema.multipleOf; + } + else { + let normMultipleOf = normalizeFloats(schema.multipleOf); + let normValue = normalizeFloats(val); + if (normMultipleOf && normValue) { + const multiplier = 10 ** Math.abs(normValue.multiplier - normMultipleOf.multiplier); + if (normValue.multiplier < normMultipleOf.multiplier) { + normValue.value *= multiplier; + } + else { + normMultipleOf.value *= multiplier; + } + remainder = normValue.value % normMultipleOf.value; + } + } + if (remainder !== 0) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Value is not divisible by {0}.', schema.multipleOf) + }); + } + } + function getExclusiveLimit(limit, exclusive) { + if (isNumber(exclusive)) { + return exclusive; + } + if (isBoolean(exclusive) && exclusive) { + return limit; + } + return undefined; + } + function getLimit(limit, exclusive) { + if (!isBoolean(exclusive) || !exclusive) { + return limit; + } + return undefined; + } + const exclusiveMinimum = getExclusiveLimit(schema.minimum, schema.exclusiveMinimum); + if (isNumber(exclusiveMinimum) && val <= exclusiveMinimum) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Value is below the exclusive minimum of {0}.', exclusiveMinimum) + }); + } + const exclusiveMaximum = getExclusiveLimit(schema.maximum, schema.exclusiveMaximum); + if (isNumber(exclusiveMaximum) && val >= exclusiveMaximum) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Value is above the exclusive maximum of {0}.', exclusiveMaximum) + }); + } + const minimum = getLimit(schema.minimum, schema.exclusiveMinimum); + if (isNumber(minimum) && val < minimum) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Value is below the minimum of {0}.', minimum) + }); + } + const maximum = getLimit(schema.maximum, schema.exclusiveMaximum); + if (isNumber(maximum) && val > maximum) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Value is above the maximum of {0}.', maximum) + }); + } + } + function _validateStringNode(node) { + if (isNumber(schema.minLength) && stringLength(node.value) < schema.minLength) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('String is shorter than the minimum length of {0}.', schema.minLength) + }); + } + if (isNumber(schema.maxLength) && stringLength(node.value) > schema.maxLength) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('String is longer than the maximum length of {0}.', schema.maxLength) + }); + } + if (isString(schema.pattern)) { + const regex = extendedRegExp(schema.pattern); + if (!(regex?.test(node.value))) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.patternErrorMessage || schema.errorMessage || l10n.t('String does not match the pattern of "{0}".', schema.pattern) + }); + } + } + if (schema.format) { + switch (schema.format) { + case 'uri': + case 'uri-reference': + { + let errorMessage; + if (!node.value) { + errorMessage = l10n.t('URI expected.'); + } + else { + const match = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(node.value); + if (!match) { + errorMessage = l10n.t('URI is expected.'); + } + else if (!match[2] && schema.format === 'uri') { + errorMessage = l10n.t('URI with a scheme is expected.'); + } + } + if (errorMessage) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.patternErrorMessage || schema.errorMessage || l10n.t('String is not a URI: {0}', errorMessage) + }); + } + } + break; + case 'color-hex': + case 'date-time': + case 'date': + case 'time': + case 'email': + case 'hostname': + case 'ipv4': + case 'ipv6': + const format = formats[schema.format]; + if (!node.value || !format.pattern.exec(node.value)) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.patternErrorMessage || schema.errorMessage || format.errorMessage + }); + } + default: + } + } + } + function _validateArrayNode(node) { + let prefixItemsSchemas; + let additionalItemSchema; + if (context.schemaDraft >= SchemaDraft.v2020_12) { + prefixItemsSchemas = schema.prefixItems; + additionalItemSchema = !Array.isArray(schema.items) ? schema.items : undefined; + } + else { + prefixItemsSchemas = Array.isArray(schema.items) ? schema.items : undefined; + additionalItemSchema = !Array.isArray(schema.items) ? schema.items : schema.additionalItems; + } + let index = 0; + if (prefixItemsSchemas !== undefined) { + const max = Math.min(prefixItemsSchemas.length, node.items.length); + for (; index < max; index++) { + const subSchemaRef = prefixItemsSchemas[index]; + const subSchema = asSchema(subSchemaRef); + const itemValidationResult = new ValidationResult(); + const item = node.items[index]; + if (item) { + validate(item, subSchema, itemValidationResult, matchingSchemas, context); + validationResult.mergePropertyMatch(itemValidationResult); + } + validationResult.processedProperties.add(String(index)); + } + } + if (additionalItemSchema !== undefined && index < node.items.length) { + if (typeof additionalItemSchema === 'boolean') { + if (additionalItemSchema === false) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Array has too many items according to schema. Expected {0} or fewer.', index) + }); + } + for (; index < node.items.length; index++) { + validationResult.processedProperties.add(String(index)); + validationResult.propertiesValueMatches++; + } + } + else { + for (; index < node.items.length; index++) { + const itemValidationResult = new ValidationResult(); + validate(node.items[index], additionalItemSchema, itemValidationResult, matchingSchemas, context); + validationResult.mergePropertyMatch(itemValidationResult); + validationResult.processedProperties.add(String(index)); + } + } + } + const containsSchema = asSchema(schema.contains); + if (containsSchema) { + let containsCount = 0; + for (let index = 0; index < node.items.length; index++) { + const item = node.items[index]; + const itemValidationResult = new ValidationResult(); + validate(item, containsSchema, itemValidationResult, NoOpSchemaCollector.instance, context); + if (!itemValidationResult.hasProblems()) { + containsCount++; + if (context.schemaDraft >= SchemaDraft.v2020_12) { + validationResult.processedProperties.add(String(index)); + } + } + } + if (containsCount === 0 && !isNumber(schema.minContains)) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.errorMessage || l10n.t('Array does not contain required item.') + }); + } + if (isNumber(schema.minContains) && containsCount < schema.minContains) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.errorMessage || l10n.t('Array has too few items that match the contains contraint. Expected {0} or more.', schema.minContains) + }); + } + if (isNumber(schema.maxContains) && containsCount > schema.maxContains) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.errorMessage || l10n.t('Array has too many items that match the contains contraint. Expected {0} or less.', schema.maxContains) + }); + } + } + const unevaluatedItems = schema.unevaluatedItems; + if (unevaluatedItems !== undefined) { + for (let i = 0; i < node.items.length; i++) { + if (!validationResult.processedProperties.has(String(i))) { + if (unevaluatedItems === false) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Item does not match any validation rule from the array.') + }); + } + else { + const itemValidationResult = new ValidationResult(); + validate(node.items[i], schema.unevaluatedItems, itemValidationResult, matchingSchemas, context); + validationResult.mergePropertyMatch(itemValidationResult); + } + } + validationResult.processedProperties.add(String(i)); + validationResult.propertiesValueMatches++; + } + } + if (isNumber(schema.minItems) && node.items.length < schema.minItems) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Array has too few items. Expected {0} or more.', schema.minItems) + }); + } + if (isNumber(schema.maxItems) && node.items.length > schema.maxItems) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Array has too many items. Expected {0} or fewer.', schema.maxItems) + }); + } + if (schema.uniqueItems === true) { + const values = getNodeValue(node); + function hasDuplicates() { + for (let i = 0; i < values.length - 1; i++) { + const value = values[i]; + for (let j = i + 1; j < values.length; j++) { + if (equals(value, values[j])) { + return true; + } + } + } + return false; + } + if (hasDuplicates()) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Array has duplicate items.') + }); + } + } + } + function _validateObjectNode(node) { + const seenKeys = Object.create(null); + const unprocessedProperties = new Set(); + for (const propertyNode of node.properties) { + const key = propertyNode.keyNode.value; + seenKeys[key] = propertyNode.valueNode; + unprocessedProperties.add(key); + } + if (Array.isArray(schema.required)) { + for (const propertyName of schema.required) { + if (!seenKeys[propertyName]) { + const keyNode = node.parent && node.parent.type === 'property' && node.parent.keyNode; + const location = keyNode ? { offset: keyNode.offset, length: keyNode.length } : { offset: node.offset, length: 1 }; + validationResult.problems.push({ + location: location, + message: l10n.t('Missing property "{0}".', propertyName) + }); + } + } + } + const propertyProcessed = (prop) => { + unprocessedProperties.delete(prop); + validationResult.processedProperties.add(prop); + }; + if (schema.properties) { + for (const propertyName of Object.keys(schema.properties)) { + propertyProcessed(propertyName); + const propertySchema = schema.properties[propertyName]; + const child = seenKeys[propertyName]; + if (child) { + if (isBoolean(propertySchema)) { + if (!propertySchema) { + const propertyNode = child.parent; + validationResult.problems.push({ + location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length }, + message: schema.errorMessage || l10n.t('Property {0} is not allowed.', propertyName) + }); + } + else { + validationResult.propertiesMatches++; + validationResult.propertiesValueMatches++; + } + } + else { + const propertyValidationResult = new ValidationResult(); + validate(child, propertySchema, propertyValidationResult, matchingSchemas, context); + validationResult.mergePropertyMatch(propertyValidationResult); + } + } + } + } + if (schema.patternProperties) { + for (const propertyPattern of Object.keys(schema.patternProperties)) { + const regex = extendedRegExp(propertyPattern); + if (regex) { + const processed = []; + for (const propertyName of unprocessedProperties) { + if (regex.test(propertyName)) { + processed.push(propertyName); + const child = seenKeys[propertyName]; + if (child) { + const propertySchema = schema.patternProperties[propertyPattern]; + if (isBoolean(propertySchema)) { + if (!propertySchema) { + const propertyNode = child.parent; + validationResult.problems.push({ + location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length }, + message: schema.errorMessage || l10n.t('Property {0} is not allowed.', propertyName) + }); + } + else { + validationResult.propertiesMatches++; + validationResult.propertiesValueMatches++; + } + } + else { + const propertyValidationResult = new ValidationResult(); + validate(child, propertySchema, propertyValidationResult, matchingSchemas, context); + validationResult.mergePropertyMatch(propertyValidationResult); + } + } + } + } + processed.forEach(propertyProcessed); + } + } + } + const additionalProperties = schema.additionalProperties; + if (additionalProperties !== undefined) { + for (const propertyName of unprocessedProperties) { + propertyProcessed(propertyName); + const child = seenKeys[propertyName]; + if (child) { + if (additionalProperties === false) { + const propertyNode = child.parent; + validationResult.problems.push({ + location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length }, + message: schema.errorMessage || l10n.t('Property {0} is not allowed.', propertyName) + }); + } + else if (additionalProperties !== true) { + const propertyValidationResult = new ValidationResult(); + validate(child, additionalProperties, propertyValidationResult, matchingSchemas, context); + validationResult.mergePropertyMatch(propertyValidationResult); + } + } + } + } + const unevaluatedProperties = schema.unevaluatedProperties; + if (unevaluatedProperties !== undefined) { + const processed = []; + for (const propertyName of unprocessedProperties) { + if (!validationResult.processedProperties.has(propertyName)) { + processed.push(propertyName); + const child = seenKeys[propertyName]; + if (child) { + if (unevaluatedProperties === false) { + const propertyNode = child.parent; + validationResult.problems.push({ + location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length }, + message: schema.errorMessage || l10n.t('Property {0} is not allowed.', propertyName) + }); + } + else if (unevaluatedProperties !== true) { + const propertyValidationResult = new ValidationResult(); + validate(child, unevaluatedProperties, propertyValidationResult, matchingSchemas, context); + validationResult.mergePropertyMatch(propertyValidationResult); + } + } + } + } + processed.forEach(propertyProcessed); + } + if (isNumber(schema.maxProperties)) { + if (node.properties.length > schema.maxProperties) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Object has more properties than limit of {0}.', schema.maxProperties) + }); + } + } + if (isNumber(schema.minProperties)) { + if (node.properties.length < schema.minProperties) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Object has fewer properties than the required number of {0}', schema.minProperties) + }); + } + } + if (schema.dependentRequired) { + for (const key in schema.dependentRequired) { + const prop = seenKeys[key]; + const propertyDeps = schema.dependentRequired[key]; + if (prop && Array.isArray(propertyDeps)) { + _validatePropertyDependencies(key, propertyDeps); + } + } + } + if (schema.dependentSchemas) { + for (const key in schema.dependentSchemas) { + const prop = seenKeys[key]; + const propertyDeps = schema.dependentSchemas[key]; + if (prop && isObject(propertyDeps)) { + _validatePropertyDependencies(key, propertyDeps); + } + } + } + if (schema.dependencies) { + for (const key in schema.dependencies) { + const prop = seenKeys[key]; + if (prop) { + _validatePropertyDependencies(key, schema.dependencies[key]); + } + } + } + const propertyNames = asSchema(schema.propertyNames); + if (propertyNames) { + for (const f of node.properties) { + const key = f.keyNode; + if (key) { + validate(key, propertyNames, validationResult, NoOpSchemaCollector.instance, context); + } + } + } + function _validatePropertyDependencies(key, propertyDep) { + if (Array.isArray(propertyDep)) { + for (const requiredProp of propertyDep) { + if (!seenKeys[requiredProp]) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Object is missing property {0} required by property {1}.', requiredProp, key) + }); + } + else { + validationResult.propertiesValueMatches++; + } + } + } + else { + const propertySchema = asSchema(propertyDep); + if (propertySchema) { + const propertyValidationResult = new ValidationResult(); + validate(node, propertySchema, propertyValidationResult, matchingSchemas, context); + validationResult.mergePropertyMatch(propertyValidationResult); + } + } + } + } +} +export function parse(textDocument, config) { + const problems = []; + let lastProblemOffset = -1; + const text = textDocument.getText(); + const scanner = Json.createScanner(text, false); + const commentRanges = config && config.collectComments ? [] : undefined; + function _scanNext() { + while (true) { + const token = scanner.scan(); + _checkScanError(); + switch (token) { + case 12 /* Json.SyntaxKind.LineCommentTrivia */: + case 13 /* Json.SyntaxKind.BlockCommentTrivia */: + if (Array.isArray(commentRanges)) { + commentRanges.push(Range.create(textDocument.positionAt(scanner.getTokenOffset()), textDocument.positionAt(scanner.getTokenOffset() + scanner.getTokenLength()))); + } + break; + case 15 /* Json.SyntaxKind.Trivia */: + case 14 /* Json.SyntaxKind.LineBreakTrivia */: + break; + default: + return token; + } + } + } + function _accept(token) { + if (scanner.getToken() === token) { + _scanNext(); + return true; + } + return false; + } + function _errorAtRange(message, code, startOffset, endOffset, severity = DiagnosticSeverity.Error) { + if (problems.length === 0 || startOffset !== lastProblemOffset) { + const range = Range.create(textDocument.positionAt(startOffset), textDocument.positionAt(endOffset)); + problems.push(Diagnostic.create(range, message, severity, code, textDocument.languageId)); + lastProblemOffset = startOffset; + } + } + function _error(message, code, node = undefined, skipUntilAfter = [], skipUntil = []) { + let start = scanner.getTokenOffset(); + let end = scanner.getTokenOffset() + scanner.getTokenLength(); + if (start === end && start > 0) { + start--; + while (start > 0 && /\s/.test(text.charAt(start))) { + start--; + } + end = start + 1; + } + _errorAtRange(message, code, start, end); + if (node) { + _finalize(node, false); + } + if (skipUntilAfter.length + skipUntil.length > 0) { + let token = scanner.getToken(); + while (token !== 17 /* Json.SyntaxKind.EOF */) { + if (skipUntilAfter.indexOf(token) !== -1) { + _scanNext(); + break; + } + else if (skipUntil.indexOf(token) !== -1) { + break; + } + token = _scanNext(); + } + } + return node; + } + function _checkScanError() { + switch (scanner.getTokenError()) { + case 4 /* Json.ScanError.InvalidUnicode */: + _error(l10n.t('Invalid unicode sequence in string.'), ErrorCode.InvalidUnicode); + return true; + case 5 /* Json.ScanError.InvalidEscapeCharacter */: + _error(l10n.t('Invalid escape character in string.'), ErrorCode.InvalidEscapeCharacter); + return true; + case 3 /* Json.ScanError.UnexpectedEndOfNumber */: + _error(l10n.t('Unexpected end of number.'), ErrorCode.UnexpectedEndOfNumber); + return true; + case 1 /* Json.ScanError.UnexpectedEndOfComment */: + _error(l10n.t('Unexpected end of comment.'), ErrorCode.UnexpectedEndOfComment); + return true; + case 2 /* Json.ScanError.UnexpectedEndOfString */: + _error(l10n.t('Unexpected end of string.'), ErrorCode.UnexpectedEndOfString); + return true; + case 6 /* Json.ScanError.InvalidCharacter */: + _error(l10n.t('Invalid characters in string. Control characters must be escaped.'), ErrorCode.InvalidCharacter); + return true; + } + return false; + } + function _finalize(node, scanNext) { + node.length = scanner.getTokenOffset() + scanner.getTokenLength() - node.offset; + if (scanNext) { + _scanNext(); + } + return node; + } + function _parseArray(parent) { + if (scanner.getToken() !== 3 /* Json.SyntaxKind.OpenBracketToken */) { + return undefined; + } + const node = new ArrayASTNodeImpl(parent, scanner.getTokenOffset()); + _scanNext(); // consume OpenBracketToken + const count = 0; + let needsComma = false; + while (scanner.getToken() !== 4 /* Json.SyntaxKind.CloseBracketToken */ && scanner.getToken() !== 17 /* Json.SyntaxKind.EOF */) { + if (scanner.getToken() === 5 /* Json.SyntaxKind.CommaToken */) { + if (!needsComma) { + _error(l10n.t('Value expected'), ErrorCode.ValueExpected); + } + const commaOffset = scanner.getTokenOffset(); + _scanNext(); // consume comma + if (scanner.getToken() === 4 /* Json.SyntaxKind.CloseBracketToken */) { + if (needsComma) { + _errorAtRange(l10n.t('Trailing comma'), ErrorCode.TrailingComma, commaOffset, commaOffset + 1); + } + continue; + } + } + else if (needsComma) { + _error(l10n.t('Expected comma'), ErrorCode.CommaExpected); + } + const item = _parseValue(node); + if (!item) { + _error(l10n.t('Value expected'), ErrorCode.ValueExpected, undefined, [], [4 /* Json.SyntaxKind.CloseBracketToken */, 5 /* Json.SyntaxKind.CommaToken */]); + } + else { + node.items.push(item); + } + needsComma = true; + } + if (scanner.getToken() !== 4 /* Json.SyntaxKind.CloseBracketToken */) { + return _error(l10n.t('Expected comma or closing bracket'), ErrorCode.CommaOrCloseBacketExpected, node); + } + return _finalize(node, true); + } + const keyPlaceholder = new StringASTNodeImpl(undefined, 0, 0); + function _parseProperty(parent, keysSeen) { + const node = new PropertyASTNodeImpl(parent, scanner.getTokenOffset(), keyPlaceholder); + let key = _parseString(node); + if (!key) { + if (scanner.getToken() === 16 /* Json.SyntaxKind.Unknown */) { + // give a more helpful error message + _error(l10n.t('Property keys must be doublequoted'), ErrorCode.PropertyKeysMustBeDoublequoted); + const keyNode = new StringASTNodeImpl(node, scanner.getTokenOffset(), scanner.getTokenLength()); + keyNode.value = scanner.getTokenValue(); + key = keyNode; + _scanNext(); // consume Unknown + } + else { + return undefined; + } + } + node.keyNode = key; + // For JSON files that forbid code comments, there is a convention to use the key name "//" to add comments. + // Multiple instances of "//" are okay. + if (key.value !== "//") { + const seen = keysSeen[key.value]; + if (seen) { + _errorAtRange(l10n.t("Duplicate object key"), ErrorCode.DuplicateKey, node.keyNode.offset, node.keyNode.offset + node.keyNode.length, DiagnosticSeverity.Warning); + if (isObject(seen)) { + _errorAtRange(l10n.t("Duplicate object key"), ErrorCode.DuplicateKey, seen.keyNode.offset, seen.keyNode.offset + seen.keyNode.length, DiagnosticSeverity.Warning); + } + keysSeen[key.value] = true; // if the same key is duplicate again, avoid duplicate error reporting + } + else { + keysSeen[key.value] = node; + } + } + if (scanner.getToken() === 6 /* Json.SyntaxKind.ColonToken */) { + node.colonOffset = scanner.getTokenOffset(); + _scanNext(); // consume ColonToken + } + else { + _error(l10n.t('Colon expected'), ErrorCode.ColonExpected); + if (scanner.getToken() === 10 /* Json.SyntaxKind.StringLiteral */ && textDocument.positionAt(key.offset + key.length).line < textDocument.positionAt(scanner.getTokenOffset()).line) { + node.length = key.length; + return node; + } + } + const value = _parseValue(node); + if (!value) { + return _error(l10n.t('Value expected'), ErrorCode.ValueExpected, node, [], [2 /* Json.SyntaxKind.CloseBraceToken */, 5 /* Json.SyntaxKind.CommaToken */]); + } + node.valueNode = value; + node.length = value.offset + value.length - node.offset; + return node; + } + function _parseObject(parent) { + if (scanner.getToken() !== 1 /* Json.SyntaxKind.OpenBraceToken */) { + return undefined; + } + const node = new ObjectASTNodeImpl(parent, scanner.getTokenOffset()); + const keysSeen = Object.create(null); + _scanNext(); // consume OpenBraceToken + let needsComma = false; + while (scanner.getToken() !== 2 /* Json.SyntaxKind.CloseBraceToken */ && scanner.getToken() !== 17 /* Json.SyntaxKind.EOF */) { + if (scanner.getToken() === 5 /* Json.SyntaxKind.CommaToken */) { + if (!needsComma) { + _error(l10n.t('Property expected'), ErrorCode.PropertyExpected); + } + const commaOffset = scanner.getTokenOffset(); + _scanNext(); // consume comma + if (scanner.getToken() === 2 /* Json.SyntaxKind.CloseBraceToken */) { + if (needsComma) { + _errorAtRange(l10n.t('Trailing comma'), ErrorCode.TrailingComma, commaOffset, commaOffset + 1); + } + continue; + } + } + else if (needsComma) { + _error(l10n.t('Expected comma'), ErrorCode.CommaExpected); + } + const property = _parseProperty(node, keysSeen); + if (!property) { + _error(l10n.t('Property expected'), ErrorCode.PropertyExpected, undefined, [], [2 /* Json.SyntaxKind.CloseBraceToken */, 5 /* Json.SyntaxKind.CommaToken */]); + } + else { + node.properties.push(property); + } + needsComma = true; + } + if (scanner.getToken() !== 2 /* Json.SyntaxKind.CloseBraceToken */) { + return _error(l10n.t('Expected comma or closing brace'), ErrorCode.CommaOrCloseBraceExpected, node); + } + return _finalize(node, true); + } + function _parseString(parent) { + if (scanner.getToken() !== 10 /* Json.SyntaxKind.StringLiteral */) { + return undefined; + } + const node = new StringASTNodeImpl(parent, scanner.getTokenOffset()); + node.value = scanner.getTokenValue(); + return _finalize(node, true); + } + function _parseNumber(parent) { + if (scanner.getToken() !== 11 /* Json.SyntaxKind.NumericLiteral */) { + return undefined; + } + const node = new NumberASTNodeImpl(parent, scanner.getTokenOffset()); + if (scanner.getTokenError() === 0 /* Json.ScanError.None */) { + const tokenValue = scanner.getTokenValue(); + try { + const numberValue = JSON.parse(tokenValue); + if (!isNumber(numberValue)) { + return _error(l10n.t('Invalid number format.'), ErrorCode.Undefined, node); + } + node.value = numberValue; + } + catch (e) { + return _error(l10n.t('Invalid number format.'), ErrorCode.Undefined, node); + } + node.isInteger = tokenValue.indexOf('.') === -1; + } + return _finalize(node, true); + } + function _parseLiteral(parent) { + let node; + switch (scanner.getToken()) { + case 7 /* Json.SyntaxKind.NullKeyword */: + return _finalize(new NullASTNodeImpl(parent, scanner.getTokenOffset()), true); + case 8 /* Json.SyntaxKind.TrueKeyword */: + return _finalize(new BooleanASTNodeImpl(parent, true, scanner.getTokenOffset()), true); + case 9 /* Json.SyntaxKind.FalseKeyword */: + return _finalize(new BooleanASTNodeImpl(parent, false, scanner.getTokenOffset()), true); + default: + return undefined; + } + } + function _parseValue(parent) { + return _parseArray(parent) || _parseObject(parent) || _parseString(parent) || _parseNumber(parent) || _parseLiteral(parent); + } + let _root = undefined; + const token = _scanNext(); + if (token !== 17 /* Json.SyntaxKind.EOF */) { + _root = _parseValue(_root); + if (!_root) { + _error(l10n.t('Expected a JSON object, array or literal.'), ErrorCode.Undefined); + } + else if (scanner.getToken() !== 17 /* Json.SyntaxKind.EOF */) { + _error(l10n.t('End of file expected.'), ErrorCode.Undefined); + } + } + return new JSONDocument(_root, problems, commentRanges); +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/configuration.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/configuration.js" index 1950de5f47214a78880cd2c51465a7d1de56f304..e35bbe449edfc7e153df3c09db5fb28c6510d2d5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/configuration.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/configuration.js" @@ -1,3 +1,520 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eb410df5f1d3bdb12d08305bf3cc79e8488b9a68389ec2abaa3ffa5a78efae04 -size 21171 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as l10n from '@vscode/l10n'; +export const schemaContributions = { + schemaAssociations: [], + schemas: { + // bundle the schema-schema to include (localized) descriptions + 'http://json-schema.org/draft-04/schema#': { + '$schema': 'http://json-schema.org/draft-04/schema#', + 'definitions': { + 'schemaArray': { + 'type': 'array', + 'minItems': 1, + 'items': { + '$ref': '#' + } + }, + 'positiveInteger': { + 'type': 'integer', + 'minimum': 0 + }, + 'positiveIntegerDefault0': { + 'allOf': [ + { + '$ref': '#/definitions/positiveInteger' + }, + { + 'default': 0 + } + ] + }, + 'simpleTypes': { + 'type': 'string', + 'enum': [ + 'array', + 'boolean', + 'integer', + 'null', + 'number', + 'object', + 'string' + ] + }, + 'stringArray': { + 'type': 'array', + 'items': { + 'type': 'string' + }, + 'minItems': 1, + 'uniqueItems': true + } + }, + 'type': 'object', + 'properties': { + 'id': { + 'type': 'string', + 'format': 'uri' + }, + '$schema': { + 'type': 'string', + 'format': 'uri' + }, + 'title': { + 'type': 'string' + }, + 'description': { + 'type': 'string' + }, + 'default': {}, + 'multipleOf': { + 'type': 'number', + 'minimum': 0, + 'exclusiveMinimum': true + }, + 'maximum': { + 'type': 'number' + }, + 'exclusiveMaximum': { + 'type': 'boolean', + 'default': false + }, + 'minimum': { + 'type': 'number' + }, + 'exclusiveMinimum': { + 'type': 'boolean', + 'default': false + }, + 'maxLength': { + 'allOf': [ + { + '$ref': '#/definitions/positiveInteger' + } + ] + }, + 'minLength': { + 'allOf': [ + { + '$ref': '#/definitions/positiveIntegerDefault0' + } + ] + }, + 'pattern': { + 'type': 'string', + 'format': 'regex' + }, + 'additionalItems': { + 'anyOf': [ + { + 'type': 'boolean' + }, + { + '$ref': '#' + } + ], + 'default': {} + }, + 'items': { + 'anyOf': [ + { + '$ref': '#' + }, + { + '$ref': '#/definitions/schemaArray' + } + ], + 'default': {} + }, + 'maxItems': { + 'allOf': [ + { + '$ref': '#/definitions/positiveInteger' + } + ] + }, + 'minItems': { + 'allOf': [ + { + '$ref': '#/definitions/positiveIntegerDefault0' + } + ] + }, + 'uniqueItems': { + 'type': 'boolean', + 'default': false + }, + 'maxProperties': { + 'allOf': [ + { + '$ref': '#/definitions/positiveInteger' + } + ] + }, + 'minProperties': { + 'allOf': [ + { + '$ref': '#/definitions/positiveIntegerDefault0' + } + ] + }, + 'required': { + 'allOf': [ + { + '$ref': '#/definitions/stringArray' + } + ] + }, + 'additionalProperties': { + 'anyOf': [ + { + 'type': 'boolean' + }, + { + '$ref': '#' + } + ], + 'default': {} + }, + 'definitions': { + 'type': 'object', + 'additionalProperties': { + '$ref': '#' + }, + 'default': {} + }, + 'properties': { + 'type': 'object', + 'additionalProperties': { + '$ref': '#' + }, + 'default': {} + }, + 'patternProperties': { + 'type': 'object', + 'additionalProperties': { + '$ref': '#' + }, + 'default': {} + }, + 'dependencies': { + 'type': 'object', + 'additionalProperties': { + 'anyOf': [ + { + '$ref': '#' + }, + { + '$ref': '#/definitions/stringArray' + } + ] + } + }, + 'enum': { + 'type': 'array', + 'minItems': 1, + 'uniqueItems': true + }, + 'type': { + 'anyOf': [ + { + '$ref': '#/definitions/simpleTypes' + }, + { + 'type': 'array', + 'items': { + '$ref': '#/definitions/simpleTypes' + }, + 'minItems': 1, + 'uniqueItems': true + } + ] + }, + 'format': { + 'anyOf': [ + { + 'type': 'string', + 'enum': [ + 'date-time', + 'uri', + 'email', + 'hostname', + 'ipv4', + 'ipv6', + 'regex' + ] + }, + { + 'type': 'string' + } + ] + }, + 'allOf': { + 'allOf': [ + { + '$ref': '#/definitions/schemaArray' + } + ] + }, + 'anyOf': { + 'allOf': [ + { + '$ref': '#/definitions/schemaArray' + } + ] + }, + 'oneOf': { + 'allOf': [ + { + '$ref': '#/definitions/schemaArray' + } + ] + }, + 'not': { + 'allOf': [ + { + '$ref': '#' + } + ] + } + }, + 'dependencies': { + 'exclusiveMaximum': [ + 'maximum' + ], + 'exclusiveMinimum': [ + 'minimum' + ] + }, + 'default': {} + }, + 'http://json-schema.org/draft-07/schema#': { + 'definitions': { + 'schemaArray': { + 'type': 'array', + 'minItems': 1, + 'items': { '$ref': '#' } + }, + 'nonNegativeInteger': { + 'type': 'integer', + 'minimum': 0 + }, + 'nonNegativeIntegerDefault0': { + 'allOf': [ + { '$ref': '#/definitions/nonNegativeInteger' }, + { 'default': 0 } + ] + }, + 'simpleTypes': { + 'enum': [ + 'array', + 'boolean', + 'integer', + 'null', + 'number', + 'object', + 'string' + ] + }, + 'stringArray': { + 'type': 'array', + 'items': { 'type': 'string' }, + 'uniqueItems': true, + 'default': [] + } + }, + 'type': ['object', 'boolean'], + 'properties': { + '$id': { + 'type': 'string', + 'format': 'uri-reference' + }, + '$schema': { + 'type': 'string', + 'format': 'uri' + }, + '$ref': { + 'type': 'string', + 'format': 'uri-reference' + }, + '$comment': { + 'type': 'string' + }, + 'title': { + 'type': 'string' + }, + 'description': { + 'type': 'string' + }, + 'default': true, + 'readOnly': { + 'type': 'boolean', + 'default': false + }, + 'examples': { + 'type': 'array', + 'items': true + }, + 'multipleOf': { + 'type': 'number', + 'exclusiveMinimum': 0 + }, + 'maximum': { + 'type': 'number' + }, + 'exclusiveMaximum': { + 'type': 'number' + }, + 'minimum': { + 'type': 'number' + }, + 'exclusiveMinimum': { + 'type': 'number' + }, + 'maxLength': { '$ref': '#/definitions/nonNegativeInteger' }, + 'minLength': { '$ref': '#/definitions/nonNegativeIntegerDefault0' }, + 'pattern': { + 'type': 'string', + 'format': 'regex' + }, + 'additionalItems': { '$ref': '#' }, + 'items': { + 'anyOf': [ + { '$ref': '#' }, + { '$ref': '#/definitions/schemaArray' } + ], + 'default': true + }, + 'maxItems': { '$ref': '#/definitions/nonNegativeInteger' }, + 'minItems': { '$ref': '#/definitions/nonNegativeIntegerDefault0' }, + 'uniqueItems': { + 'type': 'boolean', + 'default': false + }, + 'contains': { '$ref': '#' }, + 'maxProperties': { '$ref': '#/definitions/nonNegativeInteger' }, + 'minProperties': { '$ref': '#/definitions/nonNegativeIntegerDefault0' }, + 'required': { '$ref': '#/definitions/stringArray' }, + 'additionalProperties': { '$ref': '#' }, + 'definitions': { + 'type': 'object', + 'additionalProperties': { '$ref': '#' }, + 'default': {} + }, + 'properties': { + 'type': 'object', + 'additionalProperties': { '$ref': '#' }, + 'default': {} + }, + 'patternProperties': { + 'type': 'object', + 'additionalProperties': { '$ref': '#' }, + 'propertyNames': { 'format': 'regex' }, + 'default': {} + }, + 'dependencies': { + 'type': 'object', + 'additionalProperties': { + 'anyOf': [ + { '$ref': '#' }, + { '$ref': '#/definitions/stringArray' } + ] + } + }, + 'propertyNames': { '$ref': '#' }, + 'const': true, + 'enum': { + 'type': 'array', + 'items': true, + 'minItems': 1, + 'uniqueItems': true + }, + 'type': { + 'anyOf': [ + { '$ref': '#/definitions/simpleTypes' }, + { + 'type': 'array', + 'items': { '$ref': '#/definitions/simpleTypes' }, + 'minItems': 1, + 'uniqueItems': true + } + ] + }, + 'format': { 'type': 'string' }, + 'contentMediaType': { 'type': 'string' }, + 'contentEncoding': { 'type': 'string' }, + 'if': { '$ref': '#' }, + 'then': { '$ref': '#' }, + 'else': { '$ref': '#' }, + 'allOf': { '$ref': '#/definitions/schemaArray' }, + 'anyOf': { '$ref': '#/definitions/schemaArray' }, + 'oneOf': { '$ref': '#/definitions/schemaArray' }, + 'not': { '$ref': '#' } + }, + 'default': true + } + } +}; +const descriptions = { + id: l10n.t("A unique identifier for the schema."), + $schema: l10n.t("The schema to verify this document against."), + title: l10n.t("A descriptive title of the element."), + description: l10n.t("A long description of the element. Used in hover menus and suggestions."), + default: l10n.t("A default value. Used by suggestions."), + multipleOf: l10n.t("A number that should cleanly divide the current value (i.e. have no remainder)."), + maximum: l10n.t("The maximum numerical value, inclusive by default."), + exclusiveMaximum: l10n.t("Makes the maximum property exclusive."), + minimum: l10n.t("The minimum numerical value, inclusive by default."), + exclusiveMinimum: l10n.t("Makes the minimum property exclusive."), + maxLength: l10n.t("The maximum length of a string."), + minLength: l10n.t("The minimum length of a string."), + pattern: l10n.t("A regular expression to match the string against. It is not implicitly anchored."), + additionalItems: l10n.t("For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."), + items: l10n.t("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."), + maxItems: l10n.t("The maximum number of items that can be inside an array. Inclusive."), + minItems: l10n.t("The minimum number of items that can be inside an array. Inclusive."), + uniqueItems: l10n.t("If all of the items in the array must be unique. Defaults to false."), + maxProperties: l10n.t("The maximum number of properties an object can have. Inclusive."), + minProperties: l10n.t("The minimum number of properties an object can have. Inclusive."), + required: l10n.t("An array of strings that lists the names of all properties required on this object."), + additionalProperties: l10n.t("Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."), + definitions: l10n.t("Not used for validation. Place subschemas here that you wish to reference inline with $ref."), + properties: l10n.t("A map of property names to schemas for each property."), + patternProperties: l10n.t("A map of regular expressions on property names to schemas for matching properties."), + dependencies: l10n.t("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."), + enum: l10n.t("The set of literal values that are valid."), + type: l10n.t("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."), + format: l10n.t("Describes the format expected for the value."), + allOf: l10n.t("An array of schemas, all of which must match."), + anyOf: l10n.t("An array of schemas, where at least one must match."), + oneOf: l10n.t("An array of schemas, exactly one of which must match."), + not: l10n.t("A schema which must not match."), + $id: l10n.t("A unique identifier for the schema."), + $ref: l10n.t("Reference a definition hosted on any location."), + $comment: l10n.t("Comments from schema authors to readers or maintainers of the schema."), + readOnly: l10n.t("Indicates that the value of the instance is managed exclusively by the owning authority."), + examples: l10n.t("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."), + contains: l10n.t("An array instance is valid against \"contains\" if at least one of its elements is valid against the given schema."), + propertyNames: l10n.t("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."), + const: l10n.t("An instance validates successfully against this keyword if its value is equal to the value of the keyword."), + contentMediaType: l10n.t("Describes the media type of a string property."), + contentEncoding: l10n.t("Describes the content encoding of a string property."), + if: l10n.t("The validation outcome of the \"if\" subschema controls which of the \"then\" or \"else\" keywords are evaluated."), + then: l10n.t("The \"if\" subschema is used for validation when the \"if\" subschema succeeds."), + else: l10n.t("The \"else\" subschema is used for validation when the \"if\" subschema fails.") +}; +for (const schemaName in schemaContributions.schemas) { + const schema = schemaContributions.schemas[schemaName]; + for (const property in schema.properties) { + let propertyObject = schema.properties[property]; + if (typeof propertyObject === 'boolean') { + propertyObject = schema.properties[property] = {}; + } + const description = descriptions[property]; + if (description) { + propertyObject['description'] = description; + } + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonCompletion.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonCompletion.js" index 9ac53f81523397baca9975a7be6622fd279f0ffb..4d81807965c67ed4c709e2a6403d03e1b6042a25 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonCompletion.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonCompletion.js" @@ -1,3 +1,957 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0526f49ad710400205793c85817d6da9adc706bff23b00a1b894b968e55b21cf -size 44637 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as Parser from '../parser/jsonParser'; +import * as Json from 'jsonc-parser'; +import { stringifyObject } from '../utils/json'; +import { endsWith, extendedRegExp } from '../utils/strings'; +import { isDefined } from '../utils/objects'; +import { CompletionItem, CompletionItemKind, Range, TextEdit, InsertTextFormat, MarkupKind } from '../jsonLanguageTypes'; +import * as l10n from '@vscode/l10n'; +const valueCommitCharacters = [',', '}', ']']; +const propertyCommitCharacters = [':']; +export class JSONCompletion { + constructor(schemaService, contributions = [], promiseConstructor = Promise, clientCapabilities = {}) { + this.schemaService = schemaService; + this.contributions = contributions; + this.promiseConstructor = promiseConstructor; + this.clientCapabilities = clientCapabilities; + } + doResolve(item) { + for (let i = this.contributions.length - 1; i >= 0; i--) { + const resolveCompletion = this.contributions[i].resolveCompletion; + if (resolveCompletion) { + const resolver = resolveCompletion(item); + if (resolver) { + return resolver; + } + } + } + return this.promiseConstructor.resolve(item); + } + doComplete(document, position, doc) { + const result = { + items: [], + isIncomplete: false + }; + const text = document.getText(); + const offset = document.offsetAt(position); + let node = doc.getNodeFromOffset(offset, true); + if (this.isInComment(document, node ? node.offset : 0, offset)) { + return Promise.resolve(result); + } + if (node && (offset === node.offset + node.length) && offset > 0) { + const ch = text[offset - 1]; + if (node.type === 'object' && ch === '}' || node.type === 'array' && ch === ']') { + // after ] or } + node = node.parent; + } + } + const currentWord = this.getCurrentWord(document, offset); + let overwriteRange; + if (node && (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null')) { + overwriteRange = Range.create(document.positionAt(node.offset), document.positionAt(node.offset + node.length)); + } + else { + let overwriteStart = offset - currentWord.length; + if (overwriteStart > 0 && text[overwriteStart - 1] === '"') { + overwriteStart--; + } + overwriteRange = Range.create(document.positionAt(overwriteStart), position); + } + const supportsCommitCharacters = false; //this.doesSupportsCommitCharacters(); disabled for now, waiting for new API: https://github.com/microsoft/vscode/issues/42544 + const proposed = new Map(); + const collector = { + add: (suggestion) => { + let label = suggestion.label; + const existing = proposed.get(label); + if (!existing) { + label = label.replace(/[\n]/g, '↵'); + if (label.length > 60) { + const shortendedLabel = label.substr(0, 57).trim() + '...'; + if (!proposed.has(shortendedLabel)) { + label = shortendedLabel; + } + } + suggestion.textEdit = TextEdit.replace(overwriteRange, suggestion.insertText); + if (supportsCommitCharacters) { + suggestion.commitCharacters = suggestion.kind === CompletionItemKind.Property ? propertyCommitCharacters : valueCommitCharacters; + } + suggestion.label = label; + proposed.set(label, suggestion); + result.items.push(suggestion); + } + else { + if (!existing.documentation) { + existing.documentation = suggestion.documentation; + } + if (!existing.detail) { + existing.detail = suggestion.detail; + } + if (!existing.labelDetails) { + existing.labelDetails = suggestion.labelDetails; + } + } + }, + setAsIncomplete: () => { + result.isIncomplete = true; + }, + error: (message) => { + console.error(message); + }, + getNumberOfProposals: () => { + return result.items.length; + } + }; + return this.schemaService.getSchemaForResource(document.uri, doc).then((schema) => { + const collectionPromises = []; + let addValue = true; + let currentKey = ''; + let currentProperty = undefined; + if (node) { + if (node.type === 'string') { + const parent = node.parent; + if (parent && parent.type === 'property' && parent.keyNode === node) { + addValue = !parent.valueNode; + currentProperty = parent; + currentKey = text.substr(node.offset + 1, node.length - 2); + if (parent) { + node = parent.parent; + } + } + } + } + // proposals for properties + if (node && node.type === 'object') { + // don't suggest keys when the cursor is just before the opening curly brace + if (node.offset === offset) { + return result; + } + // don't suggest properties that are already present + const properties = node.properties; + properties.forEach(p => { + if (!currentProperty || currentProperty !== p) { + proposed.set(p.keyNode.value, CompletionItem.create('__')); + } + }); + let separatorAfter = ''; + if (addValue) { + separatorAfter = this.evaluateSeparatorAfter(document, document.offsetAt(overwriteRange.end)); + } + if (schema) { + // property proposals with schema + this.getPropertyCompletions(schema, doc, node, addValue, separatorAfter, collector); + } + else { + // property proposals without schema + this.getSchemaLessPropertyCompletions(doc, node, currentKey, collector); + } + const location = Parser.getNodePath(node); + this.contributions.forEach((contribution) => { + const collectPromise = contribution.collectPropertyCompletions(document.uri, location, currentWord, addValue, separatorAfter === '', collector); + if (collectPromise) { + collectionPromises.push(collectPromise); + } + }); + if ((!schema && currentWord.length > 0 && text.charAt(offset - currentWord.length - 1) !== '"')) { + collector.add({ + kind: CompletionItemKind.Property, + label: this.getLabelForValue(currentWord), + insertText: this.getInsertTextForProperty(currentWord, undefined, false, separatorAfter), + insertTextFormat: InsertTextFormat.Snippet, documentation: '', + }); + collector.setAsIncomplete(); + } + } + // proposals for values + const types = {}; + if (schema) { + // value proposals with schema + this.getValueCompletions(schema, doc, node, offset, document, collector, types); + } + else { + // value proposals without schema + this.getSchemaLessValueCompletions(doc, node, offset, document, collector); + } + if (this.contributions.length > 0) { + this.getContributedValueCompletions(doc, node, offset, document, collector, collectionPromises); + } + return this.promiseConstructor.all(collectionPromises).then(() => { + if (collector.getNumberOfProposals() === 0) { + let offsetForSeparator = offset; + if (node && (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null')) { + offsetForSeparator = node.offset + node.length; + } + const separatorAfter = this.evaluateSeparatorAfter(document, offsetForSeparator); + this.addFillerValueCompletions(types, separatorAfter, collector); + } + return result; + }); + }); + } + getPropertyCompletions(schema, doc, node, addValue, separatorAfter, collector) { + const matchingSchemas = doc.getMatchingSchemas(schema.schema, node.offset); + matchingSchemas.forEach((s) => { + if (s.node === node && !s.inverted) { + const schemaProperties = s.schema.properties; + if (schemaProperties) { + Object.keys(schemaProperties).forEach((key) => { + const propertySchema = schemaProperties[key]; + if (typeof propertySchema === 'object' && !propertySchema.deprecationMessage && !propertySchema.doNotSuggest) { + const proposal = { + kind: CompletionItemKind.Property, + label: key, + insertText: this.getInsertTextForProperty(key, propertySchema, addValue, separatorAfter), + insertTextFormat: InsertTextFormat.Snippet, + filterText: this.getFilterTextForValue(key), + documentation: this.fromMarkup(propertySchema.markdownDescription) || propertySchema.description || '', + }; + if (propertySchema.suggestSortText !== undefined) { + proposal.sortText = propertySchema.suggestSortText; + } + if (proposal.insertText && endsWith(proposal.insertText, `$1${separatorAfter}`)) { + proposal.command = { + title: 'Suggest', + command: 'editor.action.triggerSuggest' + }; + } + collector.add(proposal); + } + }); + } + const schemaPropertyNames = s.schema.propertyNames; + if (typeof schemaPropertyNames === 'object' && !schemaPropertyNames.deprecationMessage && !schemaPropertyNames.doNotSuggest) { + const propertyNameCompletionItem = (name, enumDescription = undefined) => { + const proposal = { + kind: CompletionItemKind.Property, + label: name, + insertText: this.getInsertTextForProperty(name, undefined, addValue, separatorAfter), + insertTextFormat: InsertTextFormat.Snippet, + filterText: this.getFilterTextForValue(name), + documentation: enumDescription || this.fromMarkup(schemaPropertyNames.markdownDescription) || schemaPropertyNames.description || '', + }; + if (schemaPropertyNames.suggestSortText !== undefined) { + proposal.sortText = schemaPropertyNames.suggestSortText; + } + if (proposal.insertText && endsWith(proposal.insertText, `$1${separatorAfter}`)) { + proposal.command = { + title: 'Suggest', + command: 'editor.action.triggerSuggest' + }; + } + collector.add(proposal); + }; + if (schemaPropertyNames.enum) { + for (let i = 0; i < schemaPropertyNames.enum.length; i++) { + let enumDescription = undefined; + if (schemaPropertyNames.markdownEnumDescriptions && i < schemaPropertyNames.markdownEnumDescriptions.length) { + enumDescription = this.fromMarkup(schemaPropertyNames.markdownEnumDescriptions[i]); + } + else if (schemaPropertyNames.enumDescriptions && i < schemaPropertyNames.enumDescriptions.length) { + enumDescription = schemaPropertyNames.enumDescriptions[i]; + } + propertyNameCompletionItem(schemaPropertyNames.enum[i], enumDescription); + } + } + if (schemaPropertyNames.const) { + propertyNameCompletionItem(schemaPropertyNames.const); + } + } + } + }); + } + getSchemaLessPropertyCompletions(doc, node, currentKey, collector) { + const collectCompletionsForSimilarObject = (obj) => { + obj.properties.forEach((p) => { + const key = p.keyNode.value; + collector.add({ + kind: CompletionItemKind.Property, + label: key, + insertText: this.getInsertTextForValue(key, ''), + insertTextFormat: InsertTextFormat.Snippet, + filterText: this.getFilterTextForValue(key), + documentation: '' + }); + }); + }; + if (node.parent) { + if (node.parent.type === 'property') { + // if the object is a property value, check the tree for other objects that hang under a property of the same name + const parentKey = node.parent.keyNode.value; + doc.visit(n => { + if (n.type === 'property' && n !== node.parent && n.keyNode.value === parentKey && n.valueNode && n.valueNode.type === 'object') { + collectCompletionsForSimilarObject(n.valueNode); + } + return true; + }); + } + else if (node.parent.type === 'array') { + // if the object is in an array, use all other array elements as similar objects + node.parent.items.forEach(n => { + if (n.type === 'object' && n !== node) { + collectCompletionsForSimilarObject(n); + } + }); + } + } + else if (node.type === 'object') { + collector.add({ + kind: CompletionItemKind.Property, + label: '$schema', + insertText: this.getInsertTextForProperty('$schema', undefined, true, ''), + insertTextFormat: InsertTextFormat.Snippet, documentation: '', + filterText: this.getFilterTextForValue("$schema") + }); + } + } + getSchemaLessValueCompletions(doc, node, offset, document, collector) { + let offsetForSeparator = offset; + if (node && (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null')) { + offsetForSeparator = node.offset + node.length; + node = node.parent; + } + if (!node) { + collector.add({ + kind: this.getSuggestionKind('object'), + label: 'Empty object', + insertText: this.getInsertTextForValue({}, ''), + insertTextFormat: InsertTextFormat.Snippet, + documentation: '' + }); + collector.add({ + kind: this.getSuggestionKind('array'), + label: 'Empty array', + insertText: this.getInsertTextForValue([], ''), + insertTextFormat: InsertTextFormat.Snippet, + documentation: '' + }); + return; + } + const separatorAfter = this.evaluateSeparatorAfter(document, offsetForSeparator); + const collectSuggestionsForValues = (value) => { + if (value.parent && !Parser.contains(value.parent, offset, true)) { + collector.add({ + kind: this.getSuggestionKind(value.type), + label: this.getLabelTextForMatchingNode(value, document), + insertText: this.getInsertTextForMatchingNode(value, document, separatorAfter), + insertTextFormat: InsertTextFormat.Snippet, documentation: '' + }); + } + if (value.type === 'boolean') { + this.addBooleanValueCompletion(!value.value, separatorAfter, collector); + } + }; + if (node.type === 'property') { + if (offset > (node.colonOffset || 0)) { + const valueNode = node.valueNode; + if (valueNode && (offset > (valueNode.offset + valueNode.length) || valueNode.type === 'object' || valueNode.type === 'array')) { + return; + } + // suggest values at the same key + const parentKey = node.keyNode.value; + doc.visit(n => { + if (n.type === 'property' && n.keyNode.value === parentKey && n.valueNode) { + collectSuggestionsForValues(n.valueNode); + } + return true; + }); + if (parentKey === '$schema' && node.parent && !node.parent.parent) { + this.addDollarSchemaCompletions(separatorAfter, collector); + } + } + } + if (node.type === 'array') { + if (node.parent && node.parent.type === 'property') { + // suggest items of an array at the same key + const parentKey = node.parent.keyNode.value; + doc.visit((n) => { + if (n.type === 'property' && n.keyNode.value === parentKey && n.valueNode && n.valueNode.type === 'array') { + n.valueNode.items.forEach(collectSuggestionsForValues); + } + return true; + }); + } + else { + // suggest items in the same array + node.items.forEach(collectSuggestionsForValues); + } + } + } + getValueCompletions(schema, doc, node, offset, document, collector, types) { + let offsetForSeparator = offset; + let parentKey = undefined; + let valueNode = undefined; + if (node && (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null')) { + offsetForSeparator = node.offset + node.length; + valueNode = node; + node = node.parent; + } + if (!node) { + this.addSchemaValueCompletions(schema.schema, '', collector, types); + return; + } + if ((node.type === 'property') && offset > (node.colonOffset || 0)) { + const valueNode = node.valueNode; + if (valueNode && offset > (valueNode.offset + valueNode.length)) { + return; // we are past the value node + } + parentKey = node.keyNode.value; + node = node.parent; + } + if (node && (parentKey !== undefined || node.type === 'array')) { + const separatorAfter = this.evaluateSeparatorAfter(document, offsetForSeparator); + const matchingSchemas = doc.getMatchingSchemas(schema.schema, node.offset, valueNode); + for (const s of matchingSchemas) { + if (s.node === node && !s.inverted && s.schema) { + if (node.type === 'array' && s.schema.items) { + let c = collector; + if (s.schema.uniqueItems) { + const existingValues = new Set(); + node.children.forEach(n => { + if (n.type !== 'array' && n.type !== 'object') { + existingValues.add(this.getLabelForValue(Parser.getNodeValue(n))); + } + }); + c = { + ...collector, + add(suggestion) { + if (!existingValues.has(suggestion.label)) { + collector.add(suggestion); + } + } + }; + } + if (Array.isArray(s.schema.items)) { + const index = this.findItemAtOffset(node, document, offset); + if (index < s.schema.items.length) { + this.addSchemaValueCompletions(s.schema.items[index], separatorAfter, c, types); + } + } + else { + this.addSchemaValueCompletions(s.schema.items, separatorAfter, c, types); + } + } + if (parentKey !== undefined) { + let propertyMatched = false; + if (s.schema.properties) { + const propertySchema = s.schema.properties[parentKey]; + if (propertySchema) { + propertyMatched = true; + this.addSchemaValueCompletions(propertySchema, separatorAfter, collector, types); + } + } + if (s.schema.patternProperties && !propertyMatched) { + for (const pattern of Object.keys(s.schema.patternProperties)) { + const regex = extendedRegExp(pattern); + if (regex?.test(parentKey)) { + propertyMatched = true; + const propertySchema = s.schema.patternProperties[pattern]; + this.addSchemaValueCompletions(propertySchema, separatorAfter, collector, types); + } + } + } + if (s.schema.additionalProperties && !propertyMatched) { + const propertySchema = s.schema.additionalProperties; + this.addSchemaValueCompletions(propertySchema, separatorAfter, collector, types); + } + } + } + } + if (parentKey === '$schema' && !node.parent) { + this.addDollarSchemaCompletions(separatorAfter, collector); + } + if (types['boolean']) { + this.addBooleanValueCompletion(true, separatorAfter, collector); + this.addBooleanValueCompletion(false, separatorAfter, collector); + } + if (types['null']) { + this.addNullValueCompletion(separatorAfter, collector); + } + } + } + getContributedValueCompletions(doc, node, offset, document, collector, collectionPromises) { + if (!node) { + this.contributions.forEach((contribution) => { + const collectPromise = contribution.collectDefaultCompletions(document.uri, collector); + if (collectPromise) { + collectionPromises.push(collectPromise); + } + }); + } + else { + if (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null') { + node = node.parent; + } + if (node && (node.type === 'property') && offset > (node.colonOffset || 0)) { + const parentKey = node.keyNode.value; + const valueNode = node.valueNode; + if ((!valueNode || offset <= (valueNode.offset + valueNode.length)) && node.parent) { + const location = Parser.getNodePath(node.parent); + this.contributions.forEach((contribution) => { + const collectPromise = contribution.collectValueCompletions(document.uri, location, parentKey, collector); + if (collectPromise) { + collectionPromises.push(collectPromise); + } + }); + } + } + } + } + addSchemaValueCompletions(schema, separatorAfter, collector, types) { + if (typeof schema === 'object') { + this.addEnumValueCompletions(schema, separatorAfter, collector); + this.addDefaultValueCompletions(schema, separatorAfter, collector); + this.collectTypes(schema, types); + if (Array.isArray(schema.allOf)) { + schema.allOf.forEach(s => this.addSchemaValueCompletions(s, separatorAfter, collector, types)); + } + if (Array.isArray(schema.anyOf)) { + schema.anyOf.forEach(s => this.addSchemaValueCompletions(s, separatorAfter, collector, types)); + } + if (Array.isArray(schema.oneOf)) { + schema.oneOf.forEach(s => this.addSchemaValueCompletions(s, separatorAfter, collector, types)); + } + } + } + addDefaultValueCompletions(schema, separatorAfter, collector, arrayDepth = 0) { + let hasProposals = false; + if (isDefined(schema.default)) { + let type = schema.type; + let value = schema.default; + for (let i = arrayDepth; i > 0; i--) { + value = [value]; + type = 'array'; + } + const completionItem = { + kind: this.getSuggestionKind(type), + label: this.getLabelForValue(value), + insertText: this.getInsertTextForValue(value, separatorAfter), + insertTextFormat: InsertTextFormat.Snippet + }; + if (this.doesSupportsLabelDetails()) { + completionItem.labelDetails = { description: l10n.t('Default value') }; + } + else { + completionItem.detail = l10n.t('Default value'); + } + collector.add(completionItem); + hasProposals = true; + } + if (Array.isArray(schema.examples)) { + schema.examples.forEach(example => { + let type = schema.type; + let value = example; + for (let i = arrayDepth; i > 0; i--) { + value = [value]; + type = 'array'; + } + collector.add({ + kind: this.getSuggestionKind(type), + label: this.getLabelForValue(value), + insertText: this.getInsertTextForValue(value, separatorAfter), + insertTextFormat: InsertTextFormat.Snippet + }); + hasProposals = true; + }); + } + if (Array.isArray(schema.defaultSnippets)) { + schema.defaultSnippets.forEach(s => { + let type = schema.type; + let value = s.body; + let label = s.label; + let insertText; + let filterText; + if (isDefined(value)) { + let type = schema.type; + for (let i = arrayDepth; i > 0; i--) { + value = [value]; + type = 'array'; + } + insertText = this.getInsertTextForSnippetValue(value, separatorAfter); + filterText = this.getFilterTextForSnippetValue(value); + label = label || this.getLabelForSnippetValue(value); + } + else if (typeof s.bodyText === 'string') { + let prefix = '', suffix = '', indent = ''; + for (let i = arrayDepth; i > 0; i--) { + prefix = prefix + indent + '[\n'; + suffix = suffix + '\n' + indent + ']'; + indent += '\t'; + type = 'array'; + } + insertText = prefix + indent + s.bodyText.split('\n').join('\n' + indent) + suffix + separatorAfter; + label = label || insertText, + filterText = insertText.replace(/[\n]/g, ''); // remove new lines + } + else { + return; + } + collector.add({ + kind: this.getSuggestionKind(type), + label, + documentation: this.fromMarkup(s.markdownDescription) || s.description, + insertText, + insertTextFormat: InsertTextFormat.Snippet, + filterText + }); + hasProposals = true; + }); + } + if (!hasProposals && typeof schema.items === 'object' && !Array.isArray(schema.items) && arrayDepth < 5 /* beware of recursion */) { + this.addDefaultValueCompletions(schema.items, separatorAfter, collector, arrayDepth + 1); + } + } + addEnumValueCompletions(schema, separatorAfter, collector) { + if (isDefined(schema.const)) { + collector.add({ + kind: this.getSuggestionKind(schema.type), + label: this.getLabelForValue(schema.const), + insertText: this.getInsertTextForValue(schema.const, separatorAfter), + insertTextFormat: InsertTextFormat.Snippet, + documentation: this.fromMarkup(schema.markdownDescription) || schema.description + }); + } + if (Array.isArray(schema.enum)) { + for (let i = 0, length = schema.enum.length; i < length; i++) { + const enm = schema.enum[i]; + let documentation = this.fromMarkup(schema.markdownDescription) || schema.description; + if (schema.markdownEnumDescriptions && i < schema.markdownEnumDescriptions.length && this.doesSupportMarkdown()) { + documentation = this.fromMarkup(schema.markdownEnumDescriptions[i]); + } + else if (schema.enumDescriptions && i < schema.enumDescriptions.length) { + documentation = schema.enumDescriptions[i]; + } + collector.add({ + kind: this.getSuggestionKind(schema.type), + label: this.getLabelForValue(enm), + insertText: this.getInsertTextForValue(enm, separatorAfter), + insertTextFormat: InsertTextFormat.Snippet, + documentation + }); + } + } + } + collectTypes(schema, types) { + if (Array.isArray(schema.enum) || isDefined(schema.const)) { + return; + } + const type = schema.type; + if (Array.isArray(type)) { + type.forEach(t => types[t] = true); + } + else if (type) { + types[type] = true; + } + } + addFillerValueCompletions(types, separatorAfter, collector) { + if (types['object']) { + collector.add({ + kind: this.getSuggestionKind('object'), + label: '{}', + insertText: this.getInsertTextForGuessedValue({}, separatorAfter), + insertTextFormat: InsertTextFormat.Snippet, + detail: l10n.t('New object'), + documentation: '' + }); + } + if (types['array']) { + collector.add({ + kind: this.getSuggestionKind('array'), + label: '[]', + insertText: this.getInsertTextForGuessedValue([], separatorAfter), + insertTextFormat: InsertTextFormat.Snippet, + detail: l10n.t('New array'), + documentation: '' + }); + } + } + addBooleanValueCompletion(value, separatorAfter, collector) { + collector.add({ + kind: this.getSuggestionKind('boolean'), + label: value ? 'true' : 'false', + insertText: this.getInsertTextForValue(value, separatorAfter), + insertTextFormat: InsertTextFormat.Snippet, + documentation: '' + }); + } + addNullValueCompletion(separatorAfter, collector) { + collector.add({ + kind: this.getSuggestionKind('null'), + label: 'null', + insertText: 'null' + separatorAfter, + insertTextFormat: InsertTextFormat.Snippet, + documentation: '' + }); + } + addDollarSchemaCompletions(separatorAfter, collector) { + const schemaIds = this.schemaService.getRegisteredSchemaIds(schema => schema === 'http' || schema === 'https'); + schemaIds.forEach(schemaId => { + if (schemaId.startsWith('http://json-schema.org/draft-')) { + schemaId = schemaId + '#'; + } + collector.add({ + kind: CompletionItemKind.Module, + label: this.getLabelForValue(schemaId), + filterText: this.getFilterTextForValue(schemaId), + insertText: this.getInsertTextForValue(schemaId, separatorAfter), + insertTextFormat: InsertTextFormat.Snippet, documentation: '' + }); + }); + } + getLabelForValue(value) { + return JSON.stringify(value); + } + getValueFromLabel(value) { + return JSON.parse(value); + } + getFilterTextForValue(value) { + return JSON.stringify(value); + } + getFilterTextForSnippetValue(value) { + return JSON.stringify(value).replace(/\$\{\d+:([^}]+)\}|\$\d+/g, '$1'); + } + getLabelForSnippetValue(value) { + const label = JSON.stringify(value); + return label.replace(/\$\{\d+:([^}]+)\}|\$\d+/g, '$1'); + } + getInsertTextForPlainText(text) { + return text.replace(/[\\\$\}]/g, '\\$&'); // escape $, \ and } + } + getInsertTextForValue(value, separatorAfter) { + const text = JSON.stringify(value, null, '\t'); + if (text === '{}') { + return '{$1}' + separatorAfter; + } + else if (text === '[]') { + return '[$1]' + separatorAfter; + } + return this.getInsertTextForPlainText(text + separatorAfter); + } + getInsertTextForSnippetValue(value, separatorAfter) { + const replacer = (value) => { + if (typeof value === 'string') { + if (value[0] === '^') { + return value.substr(1); + } + } + return JSON.stringify(value); + }; + return stringifyObject(value, '', replacer) + separatorAfter; + } + getInsertTextForGuessedValue(value, separatorAfter) { + switch (typeof value) { + case 'object': + if (value === null) { + return '${1:null}' + separatorAfter; + } + return this.getInsertTextForValue(value, separatorAfter); + case 'string': + let snippetValue = JSON.stringify(value); + snippetValue = snippetValue.substr(1, snippetValue.length - 2); // remove quotes + snippetValue = this.getInsertTextForPlainText(snippetValue); // escape \ and } + return '"${1:' + snippetValue + '}"' + separatorAfter; + case 'number': + case 'boolean': + return '${1:' + JSON.stringify(value) + '}' + separatorAfter; + } + return this.getInsertTextForValue(value, separatorAfter); + } + getSuggestionKind(type) { + if (Array.isArray(type)) { + const array = type; + type = array.length > 0 ? array[0] : undefined; + } + if (!type) { + return CompletionItemKind.Value; + } + switch (type) { + case 'string': return CompletionItemKind.Value; + case 'object': return CompletionItemKind.Module; + case 'property': return CompletionItemKind.Property; + default: return CompletionItemKind.Value; + } + } + getLabelTextForMatchingNode(node, document) { + switch (node.type) { + case 'array': + return '[]'; + case 'object': + return '{}'; + default: + const content = document.getText().substr(node.offset, node.length); + return content; + } + } + getInsertTextForMatchingNode(node, document, separatorAfter) { + switch (node.type) { + case 'array': + return this.getInsertTextForValue([], separatorAfter); + case 'object': + return this.getInsertTextForValue({}, separatorAfter); + default: + const content = document.getText().substr(node.offset, node.length) + separatorAfter; + return this.getInsertTextForPlainText(content); + } + } + getInsertTextForProperty(key, propertySchema, addValue, separatorAfter) { + const propertyText = this.getInsertTextForValue(key, ''); + if (!addValue) { + return propertyText; + } + const resultText = propertyText + ': '; + let value; + let nValueProposals = 0; + if (propertySchema) { + if (Array.isArray(propertySchema.defaultSnippets)) { + if (propertySchema.defaultSnippets.length === 1) { + const body = propertySchema.defaultSnippets[0].body; + if (isDefined(body)) { + value = this.getInsertTextForSnippetValue(body, ''); + } + } + nValueProposals += propertySchema.defaultSnippets.length; + } + if (propertySchema.enum) { + if (!value && propertySchema.enum.length === 1) { + value = this.getInsertTextForGuessedValue(propertySchema.enum[0], ''); + } + nValueProposals += propertySchema.enum.length; + } + if (isDefined(propertySchema.const)) { + if (!value) { + value = this.getInsertTextForGuessedValue(propertySchema.const, ''); + } + nValueProposals++; + } + if (isDefined(propertySchema.default)) { + if (!value) { + value = this.getInsertTextForGuessedValue(propertySchema.default, ''); + } + nValueProposals++; + } + if (Array.isArray(propertySchema.examples) && propertySchema.examples.length) { + if (!value) { + value = this.getInsertTextForGuessedValue(propertySchema.examples[0], ''); + } + nValueProposals += propertySchema.examples.length; + } + if (nValueProposals === 0) { + let type = Array.isArray(propertySchema.type) ? propertySchema.type[0] : propertySchema.type; + if (!type) { + if (propertySchema.properties) { + type = 'object'; + } + else if (propertySchema.items) { + type = 'array'; + } + } + switch (type) { + case 'boolean': + value = '$1'; + break; + case 'string': + value = '"$1"'; + break; + case 'object': + value = '{$1}'; + break; + case 'array': + value = '[$1]'; + break; + case 'number': + case 'integer': + value = '${1:0}'; + break; + case 'null': + value = '${1:null}'; + break; + default: + return propertyText; + } + } + } + if (!value || nValueProposals > 1) { + value = '$1'; + } + return resultText + value + separatorAfter; + } + getCurrentWord(document, offset) { + let i = offset - 1; + const text = document.getText(); + while (i >= 0 && ' \t\n\r\v":{[,]}'.indexOf(text.charAt(i)) === -1) { + i--; + } + return text.substring(i + 1, offset); + } + evaluateSeparatorAfter(document, offset) { + const scanner = Json.createScanner(document.getText(), true); + scanner.setPosition(offset); + const token = scanner.scan(); + switch (token) { + case 5 /* Json.SyntaxKind.CommaToken */: + case 2 /* Json.SyntaxKind.CloseBraceToken */: + case 4 /* Json.SyntaxKind.CloseBracketToken */: + case 17 /* Json.SyntaxKind.EOF */: + return ''; + default: + return ','; + } + } + findItemAtOffset(node, document, offset) { + const scanner = Json.createScanner(document.getText(), true); + const children = node.items; + for (let i = children.length - 1; i >= 0; i--) { + const child = children[i]; + if (offset > child.offset + child.length) { + scanner.setPosition(child.offset + child.length); + const token = scanner.scan(); + if (token === 5 /* Json.SyntaxKind.CommaToken */ && offset >= scanner.getTokenOffset() + scanner.getTokenLength()) { + return i + 1; + } + return i; + } + else if (offset >= child.offset) { + return i; + } + } + return 0; + } + isInComment(document, start, offset) { + const scanner = Json.createScanner(document.getText(), false); + scanner.setPosition(start); + let token = scanner.scan(); + while (token !== 17 /* Json.SyntaxKind.EOF */ && (scanner.getTokenOffset() + scanner.getTokenLength() < offset)) { + token = scanner.scan(); + } + return (token === 12 /* Json.SyntaxKind.LineCommentTrivia */ || token === 13 /* Json.SyntaxKind.BlockCommentTrivia */) && scanner.getTokenOffset() <= offset; + } + fromMarkup(markupString) { + if (markupString && this.doesSupportMarkdown()) { + return { + kind: MarkupKind.Markdown, + value: markupString + }; + } + return undefined; + } + doesSupportMarkdown() { + if (!isDefined(this.supportsMarkdown)) { + const documentationFormat = this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat; + this.supportsMarkdown = Array.isArray(documentationFormat) && documentationFormat.indexOf(MarkupKind.Markdown) !== -1; + } + return this.supportsMarkdown; + } + doesSupportsCommitCharacters() { + if (!isDefined(this.supportsCommitCharacters)) { + this.labelDetailsSupport = this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport; + } + return this.supportsCommitCharacters; + } + doesSupportsLabelDetails() { + if (!isDefined(this.labelDetailsSupport)) { + this.labelDetailsSupport = this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport; + } + return this.labelDetailsSupport; + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonDocumentSymbols.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonDocumentSymbols.js" index b8d03539f8758f1c2f76c9f05be9b6dac0630d7d..8140bb245973f4ef889b24c1b69f7916de29d675 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonDocumentSymbols.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonDocumentSymbols.js" @@ -1,3 +1,271 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d46428062dded6f5ba3285cc61841a9313c400299f878b60cc5dee4242ebdbe4 -size 12155 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as Parser from '../parser/jsonParser'; +import * as Strings from '../utils/strings'; +import { colorFromHex } from '../utils/colors'; +import * as l10n from '@vscode/l10n'; +import { Range, TextEdit, SymbolKind, Location } from "../jsonLanguageTypes"; +export class JSONDocumentSymbols { + constructor(schemaService) { + this.schemaService = schemaService; + } + findDocumentSymbols(document, doc, context = { resultLimit: Number.MAX_VALUE }) { + const root = doc.root; + if (!root) { + return []; + } + let limit = context.resultLimit || Number.MAX_VALUE; + // special handling for key bindings + const resourceString = document.uri; + if ((resourceString === 'vscode://defaultsettings/keybindings.json') || Strings.endsWith(resourceString.toLowerCase(), '/user/keybindings.json')) { + if (root.type === 'array') { + const result = []; + for (const item of root.items) { + if (item.type === 'object') { + for (const property of item.properties) { + if (property.keyNode.value === 'key' && property.valueNode) { + const location = Location.create(document.uri, getRange(document, item)); + result.push({ name: getName(property.valueNode), kind: SymbolKind.Function, location: location }); + limit--; + if (limit <= 0) { + if (context && context.onResultLimitExceeded) { + context.onResultLimitExceeded(resourceString); + } + return result; + } + } + } + } + } + return result; + } + } + const toVisit = [ + { node: root, containerName: '' } + ]; + let nextToVisit = 0; + let limitExceeded = false; + const result = []; + const collectOutlineEntries = (node, containerName) => { + if (node.type === 'array') { + node.items.forEach(node => { + if (node) { + toVisit.push({ node, containerName }); + } + }); + } + else if (node.type === 'object') { + node.properties.forEach((property) => { + const valueNode = property.valueNode; + if (valueNode) { + if (limit > 0) { + limit--; + const location = Location.create(document.uri, getRange(document, property)); + const childContainerName = containerName ? containerName + '.' + property.keyNode.value : property.keyNode.value; + result.push({ name: this.getKeyLabel(property), kind: this.getSymbolKind(valueNode.type), location: location, containerName: containerName }); + toVisit.push({ node: valueNode, containerName: childContainerName }); + } + else { + limitExceeded = true; + } + } + }); + } + }; + // breath first traversal + while (nextToVisit < toVisit.length) { + const next = toVisit[nextToVisit++]; + collectOutlineEntries(next.node, next.containerName); + } + if (limitExceeded && context && context.onResultLimitExceeded) { + context.onResultLimitExceeded(resourceString); + } + return result; + } + findDocumentSymbols2(document, doc, context = { resultLimit: Number.MAX_VALUE }) { + const root = doc.root; + if (!root) { + return []; + } + let limit = context.resultLimit || Number.MAX_VALUE; + // special handling for key bindings + const resourceString = document.uri; + if ((resourceString === 'vscode://defaultsettings/keybindings.json') || Strings.endsWith(resourceString.toLowerCase(), '/user/keybindings.json')) { + if (root.type === 'array') { + const result = []; + for (const item of root.items) { + if (item.type === 'object') { + for (const property of item.properties) { + if (property.keyNode.value === 'key' && property.valueNode) { + const range = getRange(document, item); + const selectionRange = getRange(document, property.keyNode); + result.push({ name: getName(property.valueNode), kind: SymbolKind.Function, range, selectionRange }); + limit--; + if (limit <= 0) { + if (context && context.onResultLimitExceeded) { + context.onResultLimitExceeded(resourceString); + } + return result; + } + } + } + } + } + return result; + } + } + const result = []; + const toVisit = [ + { node: root, result } + ]; + let nextToVisit = 0; + let limitExceeded = false; + const collectOutlineEntries = (node, result) => { + if (node.type === 'array') { + node.items.forEach((node, index) => { + if (node) { + if (limit > 0) { + limit--; + const range = getRange(document, node); + const selectionRange = range; + const name = String(index); + const symbol = { name, kind: this.getSymbolKind(node.type), range, selectionRange, children: [] }; + result.push(symbol); + toVisit.push({ result: symbol.children, node }); + } + else { + limitExceeded = true; + } + } + }); + } + else if (node.type === 'object') { + node.properties.forEach((property) => { + const valueNode = property.valueNode; + if (valueNode) { + if (limit > 0) { + limit--; + const range = getRange(document, property); + const selectionRange = getRange(document, property.keyNode); + const children = []; + const symbol = { name: this.getKeyLabel(property), kind: this.getSymbolKind(valueNode.type), range, selectionRange, children, detail: this.getDetail(valueNode) }; + result.push(symbol); + toVisit.push({ result: children, node: valueNode }); + } + else { + limitExceeded = true; + } + } + }); + } + }; + // breath first traversal + while (nextToVisit < toVisit.length) { + const next = toVisit[nextToVisit++]; + collectOutlineEntries(next.node, next.result); + } + if (limitExceeded && context && context.onResultLimitExceeded) { + context.onResultLimitExceeded(resourceString); + } + return result; + } + getSymbolKind(nodeType) { + switch (nodeType) { + case 'object': + return SymbolKind.Module; + case 'string': + return SymbolKind.String; + case 'number': + return SymbolKind.Number; + case 'array': + return SymbolKind.Array; + case 'boolean': + return SymbolKind.Boolean; + default: // 'null' + return SymbolKind.Variable; + } + } + getKeyLabel(property) { + let name = property.keyNode.value; + if (name) { + name = name.replace(/[\n]/g, '↵'); + } + if (name && name.trim()) { + return name; + } + return `"${name}"`; + } + getDetail(node) { + if (!node) { + return undefined; + } + if (node.type === 'boolean' || node.type === 'number' || node.type === 'null' || node.type === 'string') { + return String(node.value); + } + else { + if (node.type === 'array') { + return node.children.length ? undefined : '[]'; + } + else if (node.type === 'object') { + return node.children.length ? undefined : '{}'; + } + } + return undefined; + } + findDocumentColors(document, doc, context) { + return this.schemaService.getSchemaForResource(document.uri, doc).then(schema => { + const result = []; + if (schema) { + let limit = context && typeof context.resultLimit === 'number' ? context.resultLimit : Number.MAX_VALUE; + const matchingSchemas = doc.getMatchingSchemas(schema.schema); + const visitedNode = {}; + for (const s of matchingSchemas) { + if (!s.inverted && s.schema && (s.schema.format === 'color' || s.schema.format === 'color-hex') && s.node && s.node.type === 'string') { + const nodeId = String(s.node.offset); + if (!visitedNode[nodeId]) { + const color = colorFromHex(Parser.getNodeValue(s.node)); + if (color) { + const range = getRange(document, s.node); + result.push({ color, range }); + } + visitedNode[nodeId] = true; + limit--; + if (limit <= 0) { + if (context && context.onResultLimitExceeded) { + context.onResultLimitExceeded(document.uri); + } + return result; + } + } + } + } + } + return result; + }); + } + getColorPresentations(document, doc, color, range) { + const result = []; + const red256 = Math.round(color.red * 255), green256 = Math.round(color.green * 255), blue256 = Math.round(color.blue * 255); + function toTwoDigitHex(n) { + const r = n.toString(16); + return r.length !== 2 ? '0' + r : r; + } + let label; + if (color.alpha === 1) { + label = `#${toTwoDigitHex(red256)}${toTwoDigitHex(green256)}${toTwoDigitHex(blue256)}`; + } + else { + label = `#${toTwoDigitHex(red256)}${toTwoDigitHex(green256)}${toTwoDigitHex(blue256)}${toTwoDigitHex(Math.round(color.alpha * 255))}`; + } + result.push({ label: label, textEdit: TextEdit.replace(range, JSON.stringify(label)) }); + return result; + } +} +function getRange(document, node) { + return Range.create(document.positionAt(node.offset), document.positionAt(node.offset + node.length)); +} +function getName(node) { + return Parser.getNodeValue(node) || l10n.t(''); +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonFolding.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonFolding.js" index 8e92b6cf9dd54e26fb205da5223e8ed0729aaba9..edd1f1203e8ffa08df00ae2b8fd17bd12721e52a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonFolding.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonFolding.js" @@ -1,3 +1,120 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3bb8aba3eb8c61f6246195cde197f92612a7520c667514af747d9ccef6192478 -size 5222 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import { createScanner } from 'jsonc-parser'; +import { FoldingRangeKind, Position } from '../jsonLanguageTypes'; +export function getFoldingRanges(document, context) { + const ranges = []; + const nestingLevels = []; + const stack = []; + let prevStart = -1; + const scanner = createScanner(document.getText(), false); + let token = scanner.scan(); + function addRange(range) { + ranges.push(range); + nestingLevels.push(stack.length); + } + while (token !== 17 /* SyntaxKind.EOF */) { + switch (token) { + case 1 /* SyntaxKind.OpenBraceToken */: + case 3 /* SyntaxKind.OpenBracketToken */: { + const startLine = document.positionAt(scanner.getTokenOffset()).line; + const range = { startLine, endLine: startLine, kind: token === 1 /* SyntaxKind.OpenBraceToken */ ? 'object' : 'array' }; + stack.push(range); + break; + } + case 2 /* SyntaxKind.CloseBraceToken */: + case 4 /* SyntaxKind.CloseBracketToken */: { + const kind = token === 2 /* SyntaxKind.CloseBraceToken */ ? 'object' : 'array'; + if (stack.length > 0 && stack[stack.length - 1].kind === kind) { + const range = stack.pop(); + const line = document.positionAt(scanner.getTokenOffset()).line; + if (range && line > range.startLine + 1 && prevStart !== range.startLine) { + range.endLine = line - 1; + addRange(range); + prevStart = range.startLine; + } + } + break; + } + case 13 /* SyntaxKind.BlockCommentTrivia */: { + const startLine = document.positionAt(scanner.getTokenOffset()).line; + const endLine = document.positionAt(scanner.getTokenOffset() + scanner.getTokenLength()).line; + if (scanner.getTokenError() === 1 /* ScanError.UnexpectedEndOfComment */ && startLine + 1 < document.lineCount) { + scanner.setPosition(document.offsetAt(Position.create(startLine + 1, 0))); + } + else { + if (startLine < endLine) { + addRange({ startLine, endLine, kind: FoldingRangeKind.Comment }); + prevStart = startLine; + } + } + break; + } + case 12 /* SyntaxKind.LineCommentTrivia */: { + const text = document.getText().substr(scanner.getTokenOffset(), scanner.getTokenLength()); + const m = text.match(/^\/\/\s*#(region\b)|(endregion\b)/); + if (m) { + const line = document.positionAt(scanner.getTokenOffset()).line; + if (m[1]) { // start pattern match + const range = { startLine: line, endLine: line, kind: FoldingRangeKind.Region }; + stack.push(range); + } + else { + let i = stack.length - 1; + while (i >= 0 && stack[i].kind !== FoldingRangeKind.Region) { + i--; + } + if (i >= 0) { + const range = stack[i]; + stack.length = i; + if (line > range.startLine && prevStart !== range.startLine) { + range.endLine = line; + addRange(range); + prevStart = range.startLine; + } + } + } + } + break; + } + } + token = scanner.scan(); + } + const rangeLimit = context && context.rangeLimit; + if (typeof rangeLimit !== 'number' || ranges.length <= rangeLimit) { + return ranges; + } + if (context && context.onRangeLimitExceeded) { + context.onRangeLimitExceeded(document.uri); + } + const counts = []; + for (let level of nestingLevels) { + if (level < 30) { + counts[level] = (counts[level] || 0) + 1; + } + } + let entries = 0; + let maxLevel = 0; + for (let i = 0; i < counts.length; i++) { + const n = counts[i]; + if (n) { + if (n + entries > rangeLimit) { + maxLevel = i; + break; + } + entries += n; + } + } + const result = []; + for (let i = 0; i < ranges.length; i++) { + const level = nestingLevels[i]; + if (typeof level === 'number') { + if (level < maxLevel || (level === maxLevel && entries++ < rangeLimit)) { + result.push(ranges[i]); + } + } + } + return result; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonHover.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonHover.js" index 61caf54796441e5a2603310b6690775a37416164..739e2b3a27f736ee7aef3f541c2bce0a54696b70 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonHover.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonHover.js" @@ -1,3 +1,109 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3f0d63afb84d8a537d1f921ff1720d1ca41fc5c6a83956d8ff88791c4e56f146 -size 5206 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as Parser from '../parser/jsonParser'; +import { Range } from '../jsonLanguageTypes'; +export class JSONHover { + constructor(schemaService, contributions = [], promiseConstructor) { + this.schemaService = schemaService; + this.contributions = contributions; + this.promise = promiseConstructor || Promise; + } + doHover(document, position, doc) { + const offset = document.offsetAt(position); + let node = doc.getNodeFromOffset(offset); + if (!node || (node.type === 'object' || node.type === 'array') && offset > node.offset + 1 && offset < node.offset + node.length - 1) { + return this.promise.resolve(null); + } + const hoverRangeNode = node; + // use the property description when hovering over an object key + if (node.type === 'string') { + const parent = node.parent; + if (parent && parent.type === 'property' && parent.keyNode === node) { + node = parent.valueNode; + if (!node) { + return this.promise.resolve(null); + } + } + } + const hoverRange = Range.create(document.positionAt(hoverRangeNode.offset), document.positionAt(hoverRangeNode.offset + hoverRangeNode.length)); + const createHover = (contents) => { + const result = { + contents: contents, + range: hoverRange + }; + return result; + }; + const location = Parser.getNodePath(node); + for (let i = this.contributions.length - 1; i >= 0; i--) { + const contribution = this.contributions[i]; + const promise = contribution.getInfoContribution(document.uri, location); + if (promise) { + return promise.then(htmlContent => createHover(htmlContent)); + } + } + return this.schemaService.getSchemaForResource(document.uri, doc).then((schema) => { + if (schema && node) { + const matchingSchemas = doc.getMatchingSchemas(schema.schema, node.offset); + let title = undefined; + let markdownDescription = undefined; + let markdownEnumValueDescription = undefined, enumValue = undefined; + matchingSchemas.every((s) => { + if (s.node === node && !s.inverted && s.schema) { + title = title || s.schema.title; + markdownDescription = markdownDescription || s.schema.markdownDescription || toMarkdown(s.schema.description); + if (s.schema.enum) { + const idx = s.schema.enum.indexOf(Parser.getNodeValue(node)); + if (s.schema.markdownEnumDescriptions) { + markdownEnumValueDescription = s.schema.markdownEnumDescriptions[idx]; + } + else if (s.schema.enumDescriptions) { + markdownEnumValueDescription = toMarkdown(s.schema.enumDescriptions[idx]); + } + if (markdownEnumValueDescription) { + enumValue = s.schema.enum[idx]; + if (typeof enumValue !== 'string') { + enumValue = JSON.stringify(enumValue); + } + } + } + } + return true; + }); + let result = ''; + if (title) { + result = toMarkdown(title); + } + if (markdownDescription) { + if (result.length > 0) { + result += "\n\n"; + } + result += markdownDescription; + } + if (markdownEnumValueDescription) { + if (result.length > 0) { + result += "\n\n"; + } + result += `\`${toMarkdownCodeBlock(enumValue)}\`: ${markdownEnumValueDescription}`; + } + return createHover([result]); + } + return null; + }); + } +} +function toMarkdown(plain) { + if (plain) { + const res = plain.replace(/([^\n\r])(\r?\n)([^\n\r])/gm, '$1\n\n$3'); // single new lines to \n\n (Markdown paragraph) + return res.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash + } + return undefined; +} +function toMarkdownCodeBlock(content) { + // see https://daringfireball.net/projects/markdown/syntax#precode + if (content.indexOf('`') !== -1) { + return '`` ' + content + ' ``'; + } + return content; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonLinks.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonLinks.js" index ac2e5550ee37ed5f9abc77139940427ac10de3b7..edbac41976cbb805431998b65327781c6bf7abbd 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonLinks.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonLinks.js" @@ -1,3 +1,72 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f195f7a776f8be67c729ea26434bbe4ed3049c985e7eda0a454a948d564271c9 -size 2526 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import { Range } from '../jsonLanguageTypes'; +export function findLinks(document, doc) { + const links = []; + doc.visit(node => { + if (node.type === "property" && node.keyNode.value === "$ref" && node.valueNode?.type === 'string') { + const path = node.valueNode.value; + const targetNode = findTargetNode(doc, path); + if (targetNode) { + const targetPos = document.positionAt(targetNode.offset); + links.push({ + target: `${document.uri}#${targetPos.line + 1},${targetPos.character + 1}`, + range: createRange(document, node.valueNode) + }); + } + } + return true; + }); + return Promise.resolve(links); +} +function createRange(document, node) { + return Range.create(document.positionAt(node.offset + 1), document.positionAt(node.offset + node.length - 1)); +} +function findTargetNode(doc, path) { + const tokens = parseJSONPointer(path); + if (!tokens) { + return null; + } + return findNode(tokens, doc.root); +} +function findNode(pointer, node) { + if (!node) { + return null; + } + if (pointer.length === 0) { + return node; + } + const token = pointer.shift(); + if (node && node.type === 'object') { + const propertyNode = node.properties.find((propertyNode) => propertyNode.keyNode.value === token); + if (!propertyNode) { + return null; + } + return findNode(pointer, propertyNode.valueNode); + } + else if (node && node.type === 'array') { + if (token.match(/^(0|[1-9][0-9]*)$/)) { + const index = Number.parseInt(token); + const arrayItem = node.items[index]; + if (!arrayItem) { + return null; + } + return findNode(pointer, arrayItem); + } + } + return null; +} +function parseJSONPointer(path) { + if (path === "#") { + return []; + } + if (path[0] !== '#' || path[1] !== '/') { + return null; + } + return path.substring(2).split(/\//).map(unescape); +} +function unescape(str) { + return str.replace(/~1/g, '/').replace(/~0/g, '~'); +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonSchemaService.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonSchemaService.js" index 92f77fea3d1f42f5b7d1cc32e21553f71846117c..354d70eddab8bde385f3bfa02b7fa4640b58df27 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonSchemaService.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonSchemaService.js" @@ -1,3 +1,606 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8dd6abf5a7c5dae2d0f1239416072e11757fbcbe7da579c1a05dcd7f5c4a078f -size 24681 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as Json from 'jsonc-parser'; +import { URI } from 'vscode-uri'; +import * as Strings from '../utils/strings'; +import * as Parser from '../parser/jsonParser'; +import * as l10n from '@vscode/l10n'; +import { createRegex } from '../utils/glob'; +import { isObject, isString } from '../utils/objects'; +const BANG = '!'; +const PATH_SEP = '/'; +class FilePatternAssociation { + constructor(pattern, folderUri, uris) { + this.folderUri = folderUri; + this.uris = uris; + this.globWrappers = []; + try { + for (let patternString of pattern) { + const include = patternString[0] !== BANG; + if (!include) { + patternString = patternString.substring(1); + } + if (patternString.length > 0) { + if (patternString[0] === PATH_SEP) { + patternString = patternString.substring(1); + } + this.globWrappers.push({ + regexp: createRegex('**/' + patternString, { extended: true, globstar: true }), + include: include, + }); + } + } + ; + if (folderUri) { + folderUri = normalizeResourceForMatching(folderUri); + if (!folderUri.endsWith('/')) { + folderUri = folderUri + '/'; + } + this.folderUri = folderUri; + } + } + catch (e) { + this.globWrappers.length = 0; + this.uris = []; + } + } + matchesPattern(fileName) { + if (this.folderUri && !fileName.startsWith(this.folderUri)) { + return false; + } + let match = false; + for (const { regexp, include } of this.globWrappers) { + if (regexp.test(fileName)) { + match = include; + } + } + return match; + } + getURIs() { + return this.uris; + } +} +class SchemaHandle { + constructor(service, uri, unresolvedSchemaContent) { + this.service = service; + this.uri = uri; + this.dependencies = new Set(); + this.anchors = undefined; + if (unresolvedSchemaContent) { + this.unresolvedSchema = this.service.promise.resolve(new UnresolvedSchema(unresolvedSchemaContent)); + } + } + getUnresolvedSchema() { + if (!this.unresolvedSchema) { + this.unresolvedSchema = this.service.loadSchema(this.uri); + } + return this.unresolvedSchema; + } + getResolvedSchema() { + if (!this.resolvedSchema) { + this.resolvedSchema = this.getUnresolvedSchema().then(unresolved => { + return this.service.resolveSchemaContent(unresolved, this); + }); + } + return this.resolvedSchema; + } + clearSchema() { + const hasChanges = !!this.unresolvedSchema; + this.resolvedSchema = undefined; + this.unresolvedSchema = undefined; + this.dependencies.clear(); + this.anchors = undefined; + return hasChanges; + } +} +export class UnresolvedSchema { + constructor(schema, errors = []) { + this.schema = schema; + this.errors = errors; + } +} +export class ResolvedSchema { + constructor(schema, errors = [], warnings = [], schemaDraft) { + this.schema = schema; + this.errors = errors; + this.warnings = warnings; + this.schemaDraft = schemaDraft; + } + getSection(path) { + const schemaRef = this.getSectionRecursive(path, this.schema); + if (schemaRef) { + return Parser.asSchema(schemaRef); + } + return undefined; + } + getSectionRecursive(path, schema) { + if (!schema || typeof schema === 'boolean' || path.length === 0) { + return schema; + } + const next = path.shift(); + if (schema.properties && typeof schema.properties[next]) { + return this.getSectionRecursive(path, schema.properties[next]); + } + else if (schema.patternProperties) { + for (const pattern of Object.keys(schema.patternProperties)) { + const regex = Strings.extendedRegExp(pattern); + if (regex?.test(next)) { + return this.getSectionRecursive(path, schema.patternProperties[pattern]); + } + } + } + else if (typeof schema.additionalProperties === 'object') { + return this.getSectionRecursive(path, schema.additionalProperties); + } + else if (next.match('[0-9]+')) { + if (Array.isArray(schema.items)) { + const index = parseInt(next, 10); + if (!isNaN(index) && schema.items[index]) { + return this.getSectionRecursive(path, schema.items[index]); + } + } + else if (schema.items) { + return this.getSectionRecursive(path, schema.items); + } + } + return undefined; + } +} +export class JSONSchemaService { + constructor(requestService, contextService, promiseConstructor) { + this.contextService = contextService; + this.requestService = requestService; + this.promiseConstructor = promiseConstructor || Promise; + this.callOnDispose = []; + this.contributionSchemas = {}; + this.contributionAssociations = []; + this.schemasById = {}; + this.filePatternAssociations = []; + this.registeredSchemasIds = {}; + } + getRegisteredSchemaIds(filter) { + return Object.keys(this.registeredSchemasIds).filter(id => { + const scheme = URI.parse(id).scheme; + return scheme !== 'schemaservice' && (!filter || filter(scheme)); + }); + } + get promise() { + return this.promiseConstructor; + } + dispose() { + while (this.callOnDispose.length > 0) { + this.callOnDispose.pop()(); + } + } + onResourceChange(uri) { + // always clear this local cache when a resource changes + this.cachedSchemaForResource = undefined; + let hasChanges = false; + uri = normalizeId(uri); + const toWalk = [uri]; + const all = Object.keys(this.schemasById).map(key => this.schemasById[key]); + while (toWalk.length) { + const curr = toWalk.pop(); + for (let i = 0; i < all.length; i++) { + const handle = all[i]; + if (handle && (handle.uri === curr || handle.dependencies.has(curr))) { + if (handle.uri !== curr) { + toWalk.push(handle.uri); + } + if (handle.clearSchema()) { + hasChanges = true; + } + all[i] = undefined; + } + } + } + return hasChanges; + } + setSchemaContributions(schemaContributions) { + if (schemaContributions.schemas) { + const schemas = schemaContributions.schemas; + for (const id in schemas) { + const normalizedId = normalizeId(id); + this.contributionSchemas[normalizedId] = this.addSchemaHandle(normalizedId, schemas[id]); + } + } + if (Array.isArray(schemaContributions.schemaAssociations)) { + const schemaAssociations = schemaContributions.schemaAssociations; + for (let schemaAssociation of schemaAssociations) { + const uris = schemaAssociation.uris.map(normalizeId); + const association = this.addFilePatternAssociation(schemaAssociation.pattern, schemaAssociation.folderUri, uris); + this.contributionAssociations.push(association); + } + } + } + addSchemaHandle(id, unresolvedSchemaContent) { + const schemaHandle = new SchemaHandle(this, id, unresolvedSchemaContent); + this.schemasById[id] = schemaHandle; + return schemaHandle; + } + getOrAddSchemaHandle(id, unresolvedSchemaContent) { + return this.schemasById[id] || this.addSchemaHandle(id, unresolvedSchemaContent); + } + addFilePatternAssociation(pattern, folderUri, uris) { + const fpa = new FilePatternAssociation(pattern, folderUri, uris); + this.filePatternAssociations.push(fpa); + return fpa; + } + registerExternalSchema(config) { + const id = normalizeId(config.uri); + this.registeredSchemasIds[id] = true; + this.cachedSchemaForResource = undefined; + if (config.fileMatch && config.fileMatch.length) { + this.addFilePatternAssociation(config.fileMatch, config.folderUri, [id]); + } + return config.schema ? this.addSchemaHandle(id, config.schema) : this.getOrAddSchemaHandle(id); + } + clearExternalSchemas() { + this.schemasById = {}; + this.filePatternAssociations = []; + this.registeredSchemasIds = {}; + this.cachedSchemaForResource = undefined; + for (const id in this.contributionSchemas) { + this.schemasById[id] = this.contributionSchemas[id]; + this.registeredSchemasIds[id] = true; + } + for (const contributionAssociation of this.contributionAssociations) { + this.filePatternAssociations.push(contributionAssociation); + } + } + getResolvedSchema(schemaId) { + const id = normalizeId(schemaId); + const schemaHandle = this.schemasById[id]; + if (schemaHandle) { + return schemaHandle.getResolvedSchema(); + } + return this.promise.resolve(undefined); + } + loadSchema(url) { + if (!this.requestService) { + const errorMessage = l10n.t('Unable to load schema from \'{0}\'. No schema request service available', toDisplayString(url)); + return this.promise.resolve(new UnresolvedSchema({}, [errorMessage])); + } + if (url.startsWith('http://json-schema.org/')) { + url = 'https' + url.substring(4); // always access json-schema.org with https. See https://github.com/microsoft/vscode/issues/195189 + } + return this.requestService(url).then(content => { + if (!content) { + const errorMessage = l10n.t('Unable to load schema from \'{0}\': No content.', toDisplayString(url)); + return new UnresolvedSchema({}, [errorMessage]); + } + const errors = []; + if (content.charCodeAt(0) === 65279) { + errors.push(l10n.t('Problem reading content from \'{0}\': UTF-8 with BOM detected, only UTF 8 is allowed.', toDisplayString(url))); + content = content.trimStart(); + } + let schemaContent = {}; + const jsonErrors = []; + schemaContent = Json.parse(content, jsonErrors); + if (jsonErrors.length) { + errors.push(l10n.t('Unable to parse content from \'{0}\': Parse error at offset {1}.', toDisplayString(url), jsonErrors[0].offset)); + } + return new UnresolvedSchema(schemaContent, errors); + }, (error) => { + let errorMessage = error.toString(); + const errorSplit = error.toString().split('Error: '); + if (errorSplit.length > 1) { + // more concise error message, URL and context are attached by caller anyways + errorMessage = errorSplit[1]; + } + if (Strings.endsWith(errorMessage, '.')) { + errorMessage = errorMessage.substr(0, errorMessage.length - 1); + } + return new UnresolvedSchema({}, [l10n.t('Unable to load schema from \'{0}\': {1}.', toDisplayString(url), errorMessage)]); + }); + } + resolveSchemaContent(schemaToResolve, handle) { + const resolveErrors = schemaToResolve.errors.slice(0); + const schema = schemaToResolve.schema; + let schemaDraft = schema.$schema ? normalizeId(schema.$schema) : undefined; + if (schemaDraft === 'http://json-schema.org/draft-03/schema') { + return this.promise.resolve(new ResolvedSchema({}, [l10n.t("Draft-03 schemas are not supported.")], [], schemaDraft)); + } + let usesUnsupportedFeatures = new Set(); + const contextService = this.contextService; + const findSectionByJSONPointer = (schema, path) => { + path = decodeURIComponent(path); + let current = schema; + if (path[0] === '/') { + path = path.substring(1); + } + path.split('/').some((part) => { + part = part.replace(/~1/g, '/').replace(/~0/g, '~'); + current = current[part]; + return !current; + }); + return current; + }; + const findSchemaById = (schema, handle, id) => { + if (!handle.anchors) { + handle.anchors = collectAnchors(schema); + } + return handle.anchors.get(id); + }; + const merge = (target, section) => { + for (const key in section) { + if (section.hasOwnProperty(key) && key !== 'id' && key !== '$id') { + target[key] = section[key]; + } + } + }; + const mergeRef = (target, sourceRoot, sourceHandle, refSegment) => { + let section; + if (refSegment === undefined || refSegment.length === 0) { + section = sourceRoot; + } + else if (refSegment.charAt(0) === '/') { + // A $ref to a JSON Pointer (i.e #/definitions/foo) + section = findSectionByJSONPointer(sourceRoot, refSegment); + } + else { + // A $ref to a sub-schema with an $id (i.e #hello) + section = findSchemaById(sourceRoot, sourceHandle, refSegment); + } + if (section) { + merge(target, section); + } + else { + resolveErrors.push(l10n.t('$ref \'{0}\' in \'{1}\' can not be resolved.', refSegment || '', sourceHandle.uri)); + } + }; + const resolveExternalLink = (node, uri, refSegment, parentHandle) => { + if (contextService && !/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(uri)) { + uri = contextService.resolveRelativePath(uri, parentHandle.uri); + } + uri = normalizeId(uri); + const referencedHandle = this.getOrAddSchemaHandle(uri); + return referencedHandle.getUnresolvedSchema().then(unresolvedSchema => { + parentHandle.dependencies.add(uri); + if (unresolvedSchema.errors.length) { + const loc = refSegment ? uri + '#' + refSegment : uri; + resolveErrors.push(l10n.t('Problems loading reference \'{0}\': {1}', loc, unresolvedSchema.errors[0])); + } + mergeRef(node, unresolvedSchema.schema, referencedHandle, refSegment); + return resolveRefs(node, unresolvedSchema.schema, referencedHandle); + }); + }; + const resolveRefs = (node, parentSchema, parentHandle) => { + const openPromises = []; + this.traverseNodes(node, next => { + const seenRefs = new Set(); + while (next.$ref) { + const ref = next.$ref; + const segments = ref.split('#', 2); + delete next.$ref; + if (segments[0].length > 0) { + // This is a reference to an external schema + openPromises.push(resolveExternalLink(next, segments[0], segments[1], parentHandle)); + return; + } + else { + // This is a reference inside the current schema + if (!seenRefs.has(ref)) { + const id = segments[1]; + mergeRef(next, parentSchema, parentHandle, id); + seenRefs.add(ref); + } + } + } + if (next.$recursiveRef) { + usesUnsupportedFeatures.add('$recursiveRef'); + } + if (next.$dynamicRef) { + usesUnsupportedFeatures.add('$dynamicRef'); + } + }); + return this.promise.all(openPromises); + }; + const collectAnchors = (root) => { + const result = new Map(); + this.traverseNodes(root, next => { + const id = next.$id || next.id; + const anchor = isString(id) && id.charAt(0) === '#' ? id.substring(1) : next.$anchor; + if (anchor) { + if (result.has(anchor)) { + resolveErrors.push(l10n.t('Duplicate anchor declaration: \'{0}\'', anchor)); + } + else { + result.set(anchor, next); + } + } + if (next.$recursiveAnchor) { + usesUnsupportedFeatures.add('$recursiveAnchor'); + } + if (next.$dynamicAnchor) { + usesUnsupportedFeatures.add('$dynamicAnchor'); + } + }); + return result; + }; + return resolveRefs(schema, schema, handle).then(_ => { + let resolveWarnings = []; + if (usesUnsupportedFeatures.size) { + resolveWarnings.push(l10n.t('The schema uses meta-schema features ({0}) that are not yet supported by the validator.', Array.from(usesUnsupportedFeatures.keys()).join(', '))); + } + return new ResolvedSchema(schema, resolveErrors, resolveWarnings, schemaDraft); + }); + } + traverseNodes(root, handle) { + if (!root || typeof root !== 'object') { + return Promise.resolve(null); + } + const seen = new Set(); + const collectEntries = (...entries) => { + for (const entry of entries) { + if (isObject(entry)) { + toWalk.push(entry); + } + } + }; + const collectMapEntries = (...maps) => { + for (const map of maps) { + if (isObject(map)) { + for (const k in map) { + const key = k; + const entry = map[key]; + if (isObject(entry)) { + toWalk.push(entry); + } + } + } + } + }; + const collectArrayEntries = (...arrays) => { + for (const array of arrays) { + if (Array.isArray(array)) { + for (const entry of array) { + if (isObject(entry)) { + toWalk.push(entry); + } + } + } + } + }; + const collectEntryOrArrayEntries = (items) => { + if (Array.isArray(items)) { + for (const entry of items) { + if (isObject(entry)) { + toWalk.push(entry); + } + } + } + else if (isObject(items)) { + toWalk.push(items); + } + }; + const toWalk = [root]; + let next = toWalk.pop(); + while (next) { + if (!seen.has(next)) { + seen.add(next); + handle(next); + collectEntries(next.additionalItems, next.additionalProperties, next.not, next.contains, next.propertyNames, next.if, next.then, next.else, next.unevaluatedItems, next.unevaluatedProperties); + collectMapEntries(next.definitions, next.$defs, next.properties, next.patternProperties, next.dependencies, next.dependentSchemas); + collectArrayEntries(next.anyOf, next.allOf, next.oneOf, next.prefixItems); + collectEntryOrArrayEntries(next.items); + } + next = toWalk.pop(); + } + } + ; + getSchemaFromProperty(resource, document) { + if (document.root?.type === 'object') { + for (const p of document.root.properties) { + if (p.keyNode.value === '$schema' && p.valueNode?.type === 'string') { + let schemaId = p.valueNode.value; + if (this.contextService && !/^\w[\w\d+.-]*:/.test(schemaId)) { // has scheme + schemaId = this.contextService.resolveRelativePath(schemaId, resource); + } + return schemaId; + } + } + } + return undefined; + } + getAssociatedSchemas(resource) { + const seen = Object.create(null); + const schemas = []; + const normalizedResource = normalizeResourceForMatching(resource); + for (const entry of this.filePatternAssociations) { + if (entry.matchesPattern(normalizedResource)) { + for (const schemaId of entry.getURIs()) { + if (!seen[schemaId]) { + schemas.push(schemaId); + seen[schemaId] = true; + } + } + } + } + return schemas; + } + getSchemaURIsForResource(resource, document) { + let schemeId = document && this.getSchemaFromProperty(resource, document); + if (schemeId) { + return [schemeId]; + } + return this.getAssociatedSchemas(resource); + } + getSchemaForResource(resource, document) { + if (document) { + // first use $schema if present + let schemeId = this.getSchemaFromProperty(resource, document); + if (schemeId) { + const id = normalizeId(schemeId); + return this.getOrAddSchemaHandle(id).getResolvedSchema(); + } + } + if (this.cachedSchemaForResource && this.cachedSchemaForResource.resource === resource) { + return this.cachedSchemaForResource.resolvedSchema; + } + const schemas = this.getAssociatedSchemas(resource); + const resolvedSchema = schemas.length > 0 ? this.createCombinedSchema(resource, schemas).getResolvedSchema() : this.promise.resolve(undefined); + this.cachedSchemaForResource = { resource, resolvedSchema }; + return resolvedSchema; + } + createCombinedSchema(resource, schemaIds) { + if (schemaIds.length === 1) { + return this.getOrAddSchemaHandle(schemaIds[0]); + } + else { + const combinedSchemaId = 'schemaservice://combinedSchema/' + encodeURIComponent(resource); + const combinedSchema = { + allOf: schemaIds.map(schemaId => ({ $ref: schemaId })) + }; + return this.addSchemaHandle(combinedSchemaId, combinedSchema); + } + } + getMatchingSchemas(document, jsonDocument, schema) { + if (schema) { + const id = schema.id || ('schemaservice://untitled/matchingSchemas/' + idCounter++); + const handle = this.addSchemaHandle(id, schema); + return handle.getResolvedSchema().then(resolvedSchema => { + return jsonDocument.getMatchingSchemas(resolvedSchema.schema).filter(s => !s.inverted); + }); + } + return this.getSchemaForResource(document.uri, jsonDocument).then(schema => { + if (schema) { + return jsonDocument.getMatchingSchemas(schema.schema).filter(s => !s.inverted); + } + return []; + }); + } +} +let idCounter = 0; +function normalizeId(id) { + // remove trailing '#', normalize drive capitalization + try { + return URI.parse(id).toString(true); + } + catch (e) { + return id; + } +} +function normalizeResourceForMatching(resource) { + // remove queries and fragments, normalize drive capitalization + try { + return URI.parse(resource).with({ fragment: null, query: null }).toString(true); + } + catch (e) { + return resource; + } +} +function toDisplayString(url) { + try { + const uri = URI.parse(url); + if (uri.scheme === 'file') { + return uri.fsPath; + } + } + catch (e) { + // ignore + } + return url; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonSelectionRanges.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonSelectionRanges.js" index 2718c336176841b33e5415973a2e4c260c524941..ca4f45750ea1df719cad8c2272fb0aaabde06941 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonSelectionRanges.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonSelectionRanges.js" @@ -1,3 +1,61 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e317bbf5457aa44adc09bab2dd8cd27568e4d23f7517fe0c73c206cfcfdeb35c -size 2751 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import { Range, SelectionRange } from '../jsonLanguageTypes'; +import { createScanner } from 'jsonc-parser'; +export function getSelectionRanges(document, positions, doc) { + function getSelectionRange(position) { + let offset = document.offsetAt(position); + let node = doc.getNodeFromOffset(offset, true); + const result = []; + while (node) { + switch (node.type) { + case 'string': + case 'object': + case 'array': + // range without ", [ or { + const cStart = node.offset + 1, cEnd = node.offset + node.length - 1; + if (cStart < cEnd && offset >= cStart && offset <= cEnd) { + result.push(newRange(cStart, cEnd)); + } + result.push(newRange(node.offset, node.offset + node.length)); + break; + case 'number': + case 'boolean': + case 'null': + case 'property': + result.push(newRange(node.offset, node.offset + node.length)); + break; + } + if (node.type === 'property' || node.parent && node.parent.type === 'array') { + const afterCommaOffset = getOffsetAfterNextToken(node.offset + node.length, 5 /* SyntaxKind.CommaToken */); + if (afterCommaOffset !== -1) { + result.push(newRange(node.offset, afterCommaOffset)); + } + } + node = node.parent; + } + let current = undefined; + for (let index = result.length - 1; index >= 0; index--) { + current = SelectionRange.create(result[index], current); + } + if (!current) { + current = SelectionRange.create(Range.create(position, position)); + } + return current; + } + function newRange(start, end) { + return Range.create(document.positionAt(start), document.positionAt(end)); + } + const scanner = createScanner(document.getText(), true); + function getOffsetAfterNextToken(offset, expectedToken) { + scanner.setPosition(offset); + let token = scanner.scan(); + if (token === expectedToken) { + return scanner.getTokenOffset() + scanner.getTokenLength(); + } + return -1; + } + return positions.map(getSelectionRange); +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonValidation.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonValidation.js" index b18816a0ced718e91bcce93c82bc83c3a845db33..8bbbdc2515ad1f7502952cda8a6eea5e2c05fdfe 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonValidation.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/services/jsonValidation.js" @@ -1,3 +1,150 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f8e6f5e58880184a36fc3e342c1adec8139733b88f95eef2d859bea411a23fa9 -size 7096 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import { ErrorCode, Diagnostic, DiagnosticSeverity, Range } from '../jsonLanguageTypes'; +import * as l10n from '@vscode/l10n'; +import { isBoolean } from '../utils/objects'; +export class JSONValidation { + constructor(jsonSchemaService, promiseConstructor) { + this.jsonSchemaService = jsonSchemaService; + this.promise = promiseConstructor; + this.validationEnabled = true; + } + configure(raw) { + if (raw) { + this.validationEnabled = raw.validate !== false; + this.commentSeverity = raw.allowComments ? undefined : DiagnosticSeverity.Error; + } + } + doValidation(textDocument, jsonDocument, documentSettings, schema) { + if (!this.validationEnabled) { + return this.promise.resolve([]); + } + const diagnostics = []; + const added = {}; + const addProblem = (problem) => { + // remove duplicated messages + const signature = problem.range.start.line + ' ' + problem.range.start.character + ' ' + problem.message; + if (!added[signature]) { + added[signature] = true; + diagnostics.push(problem); + } + }; + const getDiagnostics = (schema) => { + let trailingCommaSeverity = documentSettings?.trailingCommas ? toDiagnosticSeverity(documentSettings.trailingCommas) : DiagnosticSeverity.Error; + let commentSeverity = documentSettings?.comments ? toDiagnosticSeverity(documentSettings.comments) : this.commentSeverity; + let schemaValidation = documentSettings?.schemaValidation ? toDiagnosticSeverity(documentSettings.schemaValidation) : DiagnosticSeverity.Warning; + let schemaRequest = documentSettings?.schemaRequest ? toDiagnosticSeverity(documentSettings.schemaRequest) : DiagnosticSeverity.Warning; + if (schema) { + const addSchemaProblem = (errorMessage, errorCode) => { + if (jsonDocument.root && schemaRequest) { + const astRoot = jsonDocument.root; + const property = astRoot.type === 'object' ? astRoot.properties[0] : undefined; + if (property && property.keyNode.value === '$schema') { + const node = property.valueNode || property; + const range = Range.create(textDocument.positionAt(node.offset), textDocument.positionAt(node.offset + node.length)); + addProblem(Diagnostic.create(range, errorMessage, schemaRequest, errorCode)); + } + else { + const range = Range.create(textDocument.positionAt(astRoot.offset), textDocument.positionAt(astRoot.offset + 1)); + addProblem(Diagnostic.create(range, errorMessage, schemaRequest, errorCode)); + } + } + }; + if (schema.errors.length) { + addSchemaProblem(schema.errors[0], ErrorCode.SchemaResolveError); + } + else if (schemaValidation) { + for (const warning of schema.warnings) { + addSchemaProblem(warning, ErrorCode.SchemaUnsupportedFeature); + } + const semanticErrors = jsonDocument.validate(textDocument, schema.schema, schemaValidation, documentSettings?.schemaDraft); + if (semanticErrors) { + semanticErrors.forEach(addProblem); + } + } + if (schemaAllowsComments(schema.schema)) { + commentSeverity = undefined; + } + if (schemaAllowsTrailingCommas(schema.schema)) { + trailingCommaSeverity = undefined; + } + } + for (const p of jsonDocument.syntaxErrors) { + if (p.code === ErrorCode.TrailingComma) { + if (typeof trailingCommaSeverity !== 'number') { + continue; + } + p.severity = trailingCommaSeverity; + } + addProblem(p); + } + if (typeof commentSeverity === 'number') { + const message = l10n.t('Comments are not permitted in JSON.'); + jsonDocument.comments.forEach(c => { + addProblem(Diagnostic.create(c, message, commentSeverity, ErrorCode.CommentNotPermitted)); + }); + } + return diagnostics; + }; + if (schema) { + const uri = schema.id || ('schemaservice://untitled/' + idCounter++); + const handle = this.jsonSchemaService.registerExternalSchema({ uri, schema }); + return handle.getResolvedSchema().then(resolvedSchema => { + return getDiagnostics(resolvedSchema); + }); + } + return this.jsonSchemaService.getSchemaForResource(textDocument.uri, jsonDocument).then(schema => { + return getDiagnostics(schema); + }); + } + getLanguageStatus(textDocument, jsonDocument) { + return { schemas: this.jsonSchemaService.getSchemaURIsForResource(textDocument.uri, jsonDocument) }; + } +} +let idCounter = 0; +function schemaAllowsComments(schemaRef) { + if (schemaRef && typeof schemaRef === 'object') { + if (isBoolean(schemaRef.allowComments)) { + return schemaRef.allowComments; + } + if (schemaRef.allOf) { + for (const schema of schemaRef.allOf) { + const allow = schemaAllowsComments(schema); + if (isBoolean(allow)) { + return allow; + } + } + } + } + return undefined; +} +function schemaAllowsTrailingCommas(schemaRef) { + if (schemaRef && typeof schemaRef === 'object') { + if (isBoolean(schemaRef.allowTrailingCommas)) { + return schemaRef.allowTrailingCommas; + } + const deprSchemaRef = schemaRef; + if (isBoolean(deprSchemaRef['allowsTrailingCommas'])) { // deprecated + return deprSchemaRef['allowsTrailingCommas']; + } + if (schemaRef.allOf) { + for (const schema of schemaRef.allOf) { + const allow = schemaAllowsTrailingCommas(schema); + if (isBoolean(allow)) { + return allow; + } + } + } + } + return undefined; +} +function toDiagnosticSeverity(severityLevel) { + switch (severityLevel) { + case 'error': return DiagnosticSeverity.Error; + case 'warning': return DiagnosticSeverity.Warning; + case 'ignore': return undefined; + } + return undefined; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/colors.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/colors.js" index b822c365a86a03ca012a75b1fd87762d743065d1..291657bbe17ac6530558670695d20eaa13f3e6e0 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/colors.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/colors.js" @@ -1,3 +1,68 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5cc4d7f88f54f85d76d9d9f2dfa88fa3af65bcec30540d4c0486304b67bf37fa -size 2530 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +const Digit0 = 48; +const Digit9 = 57; +const A = 65; +const a = 97; +const f = 102; +export function hexDigit(charCode) { + if (charCode < Digit0) { + return 0; + } + if (charCode <= Digit9) { + return charCode - Digit0; + } + if (charCode < a) { + charCode += (a - A); + } + if (charCode >= a && charCode <= f) { + return charCode - a + 10; + } + return 0; +} +export function colorFromHex(text) { + if (text[0] !== '#') { + return undefined; + } + switch (text.length) { + case 4: + return { + red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0, + green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0, + blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0, + alpha: 1 + }; + case 5: + return { + red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0, + green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0, + blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0, + alpha: (hexDigit(text.charCodeAt(4)) * 0x11) / 255.0, + }; + case 7: + return { + red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0, + green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0, + blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0, + alpha: 1 + }; + case 9: + return { + red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0, + green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0, + blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0, + alpha: (hexDigit(text.charCodeAt(7)) * 0x10 + hexDigit(text.charCodeAt(8))) / 255.0 + }; + } + return undefined; +} +export function colorFrom256RGB(red, green, blue, alpha = 1.0) { + return { + red: red / 255.0, + green: green / 255.0, + blue: blue / 255.0, + alpha + }; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/format.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/format.js" index ee76ca39ab1fb231b8dba30df0ec03d0c3088e86..ed8bc209edeb51dbaecab4e6718a43cac9be2dfa 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/format.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/format.js" @@ -1,3 +1,20 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:61218be5f060c9a31db4421a21a884ca4f926ed09bd1c11e8794248f3f57a5e9 -size 999 +import { format as formatJSON } from 'jsonc-parser'; +import { Range, TextEdit } from '../jsonLanguageTypes'; +export function format(documentToFormat, formattingOptions, formattingRange) { + let range = undefined; + if (formattingRange) { + const offset = documentToFormat.offsetAt(formattingRange.start); + const length = documentToFormat.offsetAt(formattingRange.end) - offset; + range = { offset, length }; + } + const options = { + tabSize: formattingOptions ? formattingOptions.tabSize : 4, + insertSpaces: formattingOptions?.insertSpaces === true, + insertFinalNewline: formattingOptions?.insertFinalNewline === true, + eol: '\n', + keepLines: formattingOptions?.keepLines === true + }; + return formatJSON(documentToFormat.getText(), range, options).map(edit => { + return TextEdit.replace(Range.create(documentToFormat.positionAt(edit.offset), documentToFormat.positionAt(edit.offset + edit.length)), edit.content); + }); +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/glob.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/glob.js" index a7e1769c124329a8f6914d50a2385dd181a92050..ac718c635d667bf560fd1805b2bc28832516a1ae 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/glob.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/glob.js" @@ -1,3 +1,124 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c19a583dfc83bed60496beb5915f97b96690f7ee78deba17e328df13fb2029e7 -size 5026 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Copyright (c) 2013, Nick Fitzgerald + * Licensed under the MIT License. See LICENCE.md in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +export function createRegex(glob, opts) { + if (typeof glob !== 'string') { + throw new TypeError('Expected a string'); + } + const str = String(glob); + // The regexp we are building, as a string. + let reStr = ""; + // Whether we are matching so called "extended" globs (like bash) and should + // support single character matching, matching ranges of characters, group + // matching, etc. + const extended = opts ? !!opts.extended : false; + // When globstar is _false_ (default), '/foo/*' is translated a regexp like + // '^\/foo\/.*$' which will match any string beginning with '/foo/' + // When globstar is _true_, '/foo/*' is translated to regexp like + // '^\/foo\/[^/]*$' which will match any string beginning with '/foo/' BUT + // which does not have a '/' to the right of it. + // E.g. with '/foo/*' these will match: '/foo/bar', '/foo/bar.txt' but + // these will not '/foo/bar/baz', '/foo/bar/baz.txt' + // Lastely, when globstar is _true_, '/foo/**' is equivelant to '/foo/*' when + // globstar is _false_ + const globstar = opts ? !!opts.globstar : false; + // If we are doing extended matching, this boolean is true when we are inside + // a group (eg {*.html,*.js}), and false otherwise. + let inGroup = false; + // RegExp flags (eg "i" ) to pass in to RegExp constructor. + const flags = opts && typeof (opts.flags) === "string" ? opts.flags : ""; + let c; + for (let i = 0, len = str.length; i < len; i++) { + c = str[i]; + switch (c) { + case "/": + case "$": + case "^": + case "+": + case ".": + case "(": + case ")": + case "=": + case "!": + case "|": + reStr += "\\" + c; + break; + case "?": + if (extended) { + reStr += "."; + break; + } + case "[": + case "]": + if (extended) { + reStr += c; + break; + } + case "{": + if (extended) { + inGroup = true; + reStr += "("; + break; + } + case "}": + if (extended) { + inGroup = false; + reStr += ")"; + break; + } + case ",": + if (inGroup) { + reStr += "|"; + break; + } + reStr += "\\" + c; + break; + case "*": + // Move over all consecutive "*"'s. + // Also store the previous and next characters + const prevChar = str[i - 1]; + let starCount = 1; + while (str[i + 1] === "*") { + starCount++; + i++; + } + const nextChar = str[i + 1]; + if (!globstar) { + // globstar is disabled, so treat any number of "*" as one + reStr += ".*"; + } + else { + // globstar is enabled, so determine if this is a globstar segment + const isGlobstar = starCount > 1 // multiple "*"'s + && (prevChar === "/" || prevChar === undefined || prevChar === '{' || prevChar === ',') // from the start of the segment + && (nextChar === "/" || nextChar === undefined || nextChar === ',' || nextChar === '}'); // to the end of the segment + if (isGlobstar) { + if (nextChar === "/") { + i++; // move over the "/" + } + else if (prevChar === '/' && reStr.endsWith('\\/')) { + reStr = reStr.substr(0, reStr.length - 2); + } + // it's a globstar, so match zero or more path segments + reStr += "((?:[^/]*(?:\/|$))*)"; + } + else { + // it's not a globstar, so only match one path segment + reStr += "([^/]*)"; + } + } + break; + default: + reStr += c; + } + } + // When regexp 'g' flag is specified don't + // constrain the regular expression with ^ & $ + if (!flags || !~flags.indexOf('g')) { + reStr = "^" + reStr + "$"; + } + return new RegExp(reStr, flags); +} +; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/json.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/json.js" index e1a74efb1449282933b4caf352341b06e07d981a..3e777dabe21a5761c5d08334f2c21f11485cad9d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/json.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/json.js" @@ -1,3 +1,42 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8682fb86f525524bee5c5b7c5fc27b96fe972a5fede0e6da7d1219dba761cf58 -size 1647 +/*--------------------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +* Licensed under the MIT License. See License.txt in the project root for license information. +*--------------------------------------------------------------------------------------------*/ +export function stringifyObject(obj, indent, stringifyLiteral) { + if (obj !== null && typeof obj === 'object') { + const newIndent = indent + '\t'; + if (Array.isArray(obj)) { + if (obj.length === 0) { + return '[]'; + } + let result = '[\n'; + for (let i = 0; i < obj.length; i++) { + result += newIndent + stringifyObject(obj[i], newIndent, stringifyLiteral); + if (i < obj.length - 1) { + result += ','; + } + result += '\n'; + } + result += indent + ']'; + return result; + } + else { + const keys = Object.keys(obj); + if (keys.length === 0) { + return '{}'; + } + let result = '{\n'; + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + result += newIndent + JSON.stringify(key) + ': ' + stringifyObject(obj[key], newIndent, stringifyLiteral); + if (i < keys.length - 1) { + result += ','; + } + result += '\n'; + } + result += indent + '}'; + return result; + } + } + return stringifyLiteral(obj); +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/objects.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/objects.js" index 4c787af47f56cd6ef0080a551182f47fe6b7fd00..fb7f432ddeb1253bce3bd4a284b989be94ba7ab2 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/objects.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/objects.js" @@ -1,3 +1,68 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9190e80d7d537122c5ce1fef48de3f7fde5d061f60b953da0ab39a0bf8b835bf -size 1964 +/*--------------------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +* Licensed under the MIT License. See License.txt in the project root for license information. +*--------------------------------------------------------------------------------------------*/ +export function equals(one, other) { + if (one === other) { + return true; + } + if (one === null || one === undefined || other === null || other === undefined) { + return false; + } + if (typeof one !== typeof other) { + return false; + } + if (typeof one !== 'object') { + return false; + } + if ((Array.isArray(one)) !== (Array.isArray(other))) { + return false; + } + let i, key; + if (Array.isArray(one)) { + if (one.length !== other.length) { + return false; + } + for (i = 0; i < one.length; i++) { + if (!equals(one[i], other[i])) { + return false; + } + } + } + else { + const oneKeys = []; + for (key in one) { + oneKeys.push(key); + } + oneKeys.sort(); + const otherKeys = []; + for (key in other) { + otherKeys.push(key); + } + otherKeys.sort(); + if (!equals(oneKeys, otherKeys)) { + return false; + } + for (i = 0; i < oneKeys.length; i++) { + if (!equals(one[oneKeys[i]], other[oneKeys[i]])) { + return false; + } + } + } + return true; +} +export function isNumber(val) { + return typeof val === 'number'; +} +export function isDefined(val) { + return typeof val !== 'undefined'; +} +export function isBoolean(val) { + return typeof val === 'boolean'; +} +export function isString(val) { + return typeof val === 'string'; +} +export function isObject(val) { + return typeof val === 'object' && val !== null && !Array.isArray(val); +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/propertyTree.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/propertyTree.js" index 13e22240eefcb3cb211f0016f5f66af835278314..a82bb7fdbeb57c879b5c51ec36115d38785cef00 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/propertyTree.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/propertyTree.js" @@ -1,3 +1,76 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:be3373e1dc8e49ea0ed9ba1f3252bc0b1d999750c6a25d1b525547195e1b6eda -size 2815 +/*--------------------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +* Licensed under the MIT License. See License.txt in the project root for license information. +*--------------------------------------------------------------------------------------------*/ +export var Container; +(function (Container) { + Container[Container["Object"] = 0] = "Object"; + Container[Container["Array"] = 1] = "Array"; +})(Container || (Container = {})); +export class PropertyTree { + constructor(propertyName, beginningLineNumber) { + this.propertyName = propertyName ?? ''; + this.beginningLineNumber = beginningLineNumber; + this.childrenProperties = []; + this.lastProperty = false; + this.noKeyName = false; + } + addChildProperty(childProperty) { + childProperty.parent = this; + if (this.childrenProperties.length > 0) { + let insertionIndex = 0; + if (childProperty.noKeyName) { + insertionIndex = this.childrenProperties.length; + } + else { + insertionIndex = binarySearchOnPropertyArray(this.childrenProperties, childProperty, compareProperties); + } + if (insertionIndex < 0) { + insertionIndex = (insertionIndex * -1) - 1; + } + this.childrenProperties.splice(insertionIndex, 0, childProperty); + } + else { + this.childrenProperties.push(childProperty); + } + return childProperty; + } +} +function compareProperties(propertyTree1, propertyTree2) { + const propertyName1 = propertyTree1.propertyName.toLowerCase(); + const propertyName2 = propertyTree2.propertyName.toLowerCase(); + if (propertyName1 < propertyName2) { + return -1; + } + else if (propertyName1 > propertyName2) { + return 1; + } + return 0; +} +function binarySearchOnPropertyArray(propertyTreeArray, propertyTree, compare_fn) { + const propertyName = propertyTree.propertyName.toLowerCase(); + const firstPropertyInArrayName = propertyTreeArray[0].propertyName.toLowerCase(); + const lastPropertyInArrayName = propertyTreeArray[propertyTreeArray.length - 1].propertyName.toLowerCase(); + if (propertyName < firstPropertyInArrayName) { + return 0; + } + if (propertyName > lastPropertyInArrayName) { + return propertyTreeArray.length; + } + let m = 0; + let n = propertyTreeArray.length - 1; + while (m <= n) { + let k = (n + m) >> 1; + let cmp = compare_fn(propertyTree, propertyTreeArray[k]); + if (cmp > 0) { + m = k + 1; + } + else if (cmp < 0) { + n = k - 1; + } + else { + return k; + } + } + return -m - 1; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/sort.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/sort.js" index c92209db2fc3fa9d93887cd21313446b4f933699..1e1f2131a36e95a9c054ee3537a23805d0066ef1 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/sort.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/sort.js" @@ -1,3 +1,368 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3d86be431a710180f55d93851044b92acbf4c4c04051d5c61e387c360fe4d332 -size 23799 +/*--------------------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +* Licensed under the MIT License. See License.txt in the project root for license information. +*--------------------------------------------------------------------------------------------*/ +// import { TextEdit} from 'vscode-languageserver-textdocument'; +import { createScanner } from 'jsonc-parser'; +import { TextDocument, TextEdit, Position, Range } from '../jsonLanguageTypes'; +import { format } from './format'; +import { PropertyTree, Container } from './propertyTree'; +export function sort(documentToSort, formattingOptions) { + const options = { + ...formattingOptions, + keepLines: false, // keepLines must be false so that the properties are on separate lines for the sorting + }; + const formattedJsonString = TextDocument.applyEdits(documentToSort, format(documentToSort, options, undefined)); + const formattedJsonDocument = TextDocument.create('test://test.json', 'json', 0, formattedJsonString); + const jsonPropertyTree = findJsoncPropertyTree(formattedJsonDocument); + const sortedJsonDocument = sortJsoncDocument(formattedJsonDocument, jsonPropertyTree); + const edits = format(sortedJsonDocument, options, undefined); + const sortedAndFormattedJsonDocument = TextDocument.applyEdits(sortedJsonDocument, edits); + return [TextEdit.replace(Range.create(Position.create(0, 0), documentToSort.positionAt(documentToSort.getText().length)), sortedAndFormattedJsonDocument)]; +} +function findJsoncPropertyTree(formattedDocument) { + const formattedString = formattedDocument.getText(); + const scanner = createScanner(formattedString, false); + // The tree that will be returned + let rootTree = new PropertyTree(); + // The tree where the current properties can be added as children + let currentTree = rootTree; + // The tree representing the current property analyzed + let currentProperty = rootTree; + // The tree representing the previous property analyzed + let lastProperty = rootTree; + // The current scanned token + let token = undefined; + // Line number of the last token found + let lastTokenLine = 0; + // Total number of characters on the lines prior to current line + let numberOfCharactersOnPreviousLines = 0; + // The last token scanned that is not trivial, nor a comment + let lastNonTriviaNonCommentToken = undefined; + // The second to last token scanned that is not trivial, nor a comment + let secondToLastNonTriviaNonCommentToken = undefined; + // Line number of last token that is not trivial, nor a comment + let lineOfLastNonTriviaNonCommentToken = -1; + // End index on its line of last token that is not trivial, nor a comment + let endIndexOfLastNonTriviaNonCommentToken = -1; + // Line number of the start of the range of current/next property + let beginningLineNumber = 0; + // Line number of the end of the range of current/next property + let endLineNumber = 0; + // Stack indicating whether we are inside of an object or an array + let currentContainerStack = []; + // Boolean indicating that the current property end line number needs to be updated. Used only when block comments are encountered. + let updateLastPropertyEndLineNumber = false; + // Boolean indicating that the beginning line number should be updated. Used only when block comments are encountered. + let updateBeginningLineNumber = false; + while ((token = scanner.scan()) !== 17 /* SyntaxKind.EOF */) { + // In the case when a block comment has been encountered that starts on the same line as the comma ending a property, update the end line of that + // property so that it covers the block comment. For example, if we have: + // 1. "key" : {}, /* some block + // 2. comment */ + // Then, the end line of the property "key" should be line 2 not line 1 + if (updateLastPropertyEndLineNumber === true + && token !== 14 /* SyntaxKind.LineBreakTrivia */ + && token !== 15 /* SyntaxKind.Trivia */ + && token !== 12 /* SyntaxKind.LineCommentTrivia */ + && token !== 13 /* SyntaxKind.BlockCommentTrivia */ + && currentProperty.endLineNumber === undefined) { + let endLineNumber = scanner.getTokenStartLine(); + // Update the end line number in the case when the last property visited is a container (object or array) + if (secondToLastNonTriviaNonCommentToken === 2 /* SyntaxKind.CloseBraceToken */ + || secondToLastNonTriviaNonCommentToken === 4 /* SyntaxKind.CloseBracketToken */) { + lastProperty.endLineNumber = endLineNumber - 1; + } + // Update the end line number in the case when the last property visited is a simple property + else { + currentProperty.endLineNumber = endLineNumber - 1; + } + beginningLineNumber = endLineNumber; + updateLastPropertyEndLineNumber = false; + } + // When a block comment follows an open brace or an open bracket, that block comment should be associated to that brace or bracket, not the property below it. For example, for: + // 1. { /* + // 2. ... */ + // 3. "key" : {} + // 4. } + // Instead of associating the block comment to the property on line 3, it is associate to the property on line 1 + if (updateBeginningLineNumber === true + && token !== 14 /* SyntaxKind.LineBreakTrivia */ + && token !== 15 /* SyntaxKind.Trivia */ + && token !== 12 /* SyntaxKind.LineCommentTrivia */ + && token !== 13 /* SyntaxKind.BlockCommentTrivia */) { + beginningLineNumber = scanner.getTokenStartLine(); + updateBeginningLineNumber = false; + } + // Update the number of characters on all the previous lines each time the new token is on a different line to the previous token + if (scanner.getTokenStartLine() !== lastTokenLine) { + for (let i = lastTokenLine; i < scanner.getTokenStartLine(); i++) { + const lengthOfLine = formattedDocument.getText(Range.create(Position.create(i, 0), Position.create(i + 1, 0))).length; + numberOfCharactersOnPreviousLines = numberOfCharactersOnPreviousLines + lengthOfLine; + } + lastTokenLine = scanner.getTokenStartLine(); + } + switch (token) { + // When a string is found, if it follows an open brace or a comma token and it is within an object, then it corresponds to a key name, not a simple string + case 10 /* SyntaxKind.StringLiteral */: { + if ((lastNonTriviaNonCommentToken === undefined + || lastNonTriviaNonCommentToken === 1 /* SyntaxKind.OpenBraceToken */ + || (lastNonTriviaNonCommentToken === 5 /* SyntaxKind.CommaToken */ + && currentContainerStack[currentContainerStack.length - 1] === Container.Object))) { + // In that case create the child property which starts at beginningLineNumber, add it to the current tree + const childProperty = new PropertyTree(scanner.getTokenValue(), beginningLineNumber); + lastProperty = currentProperty; + currentProperty = currentTree.addChildProperty(childProperty); + } + break; + } + // When the token is an open bracket, then we enter into an array + case 3 /* SyntaxKind.OpenBracketToken */: { + // If the root tree beginning line number is not defined, then this open bracket is the first open bracket in the document + if (rootTree.beginningLineNumber === undefined) { + rootTree.beginningLineNumber = scanner.getTokenStartLine(); + } + // Suppose we are inside of an object, then the current array is associated to a key, and has already been created + // We have the following configuration: {"a": "val", "array": [...], "b": "val"} + // In that case navigate down to the child property + if (currentContainerStack[currentContainerStack.length - 1] === Container.Object) { + currentTree = currentProperty; + } + // Suppose we are inside of an array, then since the current array is not associated to a key, it has not been created yet + // We have the following configuration: ["a", [...], "b"] + // In that case create the property and navigate down + else if (currentContainerStack[currentContainerStack.length - 1] === Container.Array) { + const childProperty = new PropertyTree(scanner.getTokenValue(), beginningLineNumber); + childProperty.noKeyName = true; + lastProperty = currentProperty; + currentProperty = currentTree.addChildProperty(childProperty); + currentTree = currentProperty; + } + currentContainerStack.push(Container.Array); + currentProperty.type = Container.Array; + beginningLineNumber = scanner.getTokenStartLine(); + beginningLineNumber++; + break; + } + // When the token is an open brace, then we enter into an object + case 1 /* SyntaxKind.OpenBraceToken */: { + // If the root tree beginning line number is not defined, then this open brace is the first open brace in the document + if (rootTree.beginningLineNumber === undefined) { + rootTree.beginningLineNumber = scanner.getTokenStartLine(); + } + // 1. If we are inside of an objet, the current object is associated to a key and has already been created + // We have the following configuration: {"a": "val", "object": {...}, "b": "val"} + // 2. Otherwise the current object property is inside of an array, not associated to a key name and the property has not yet been created + // We have the following configuration: ["a", {...}, "b"] + else if (currentContainerStack[currentContainerStack.length - 1] === Container.Array) { + const childProperty = new PropertyTree(scanner.getTokenValue(), beginningLineNumber); + childProperty.noKeyName = true; + lastProperty = currentProperty; + currentProperty = currentTree.addChildProperty(childProperty); + } + currentProperty.type = Container.Object; + currentContainerStack.push(Container.Object); + currentTree = currentProperty; + beginningLineNumber = scanner.getTokenStartLine(); + beginningLineNumber++; + break; + } + case 4 /* SyntaxKind.CloseBracketToken */: { + endLineNumber = scanner.getTokenStartLine(); + currentContainerStack.pop(); + // If the last non-trivial non-comment token is a closing brace or bracket, then the currentProperty end line number has not been set yet so set it + // The configuration considered is: [..., {}] or [..., []] + if (currentProperty.endLineNumber === undefined + && (lastNonTriviaNonCommentToken === 2 /* SyntaxKind.CloseBraceToken */ + || lastNonTriviaNonCommentToken === 4 /* SyntaxKind.CloseBracketToken */)) { + currentProperty.endLineNumber = endLineNumber - 1; + currentProperty.lastProperty = true; + currentProperty.lineWhereToAddComma = lineOfLastNonTriviaNonCommentToken; + currentProperty.indexWhereToAddComa = endIndexOfLastNonTriviaNonCommentToken; + lastProperty = currentProperty; + currentProperty = currentProperty ? currentProperty.parent : undefined; + currentTree = currentProperty; + } + rootTree.endLineNumber = endLineNumber; + beginningLineNumber = endLineNumber + 1; + break; + } + case 2 /* SyntaxKind.CloseBraceToken */: { + endLineNumber = scanner.getTokenStartLine(); + currentContainerStack.pop(); + // If we are not inside of an empty object + if (lastNonTriviaNonCommentToken !== 1 /* SyntaxKind.OpenBraceToken */) { + // If current property end line number has not yet been defined, define it + if (currentProperty.endLineNumber === undefined) { + currentProperty.endLineNumber = endLineNumber - 1; + // The current property is also the last property + currentProperty.lastProperty = true; + // The last property of an object is associated with the line and index of where to add the comma, in case after sorting, it is no longer the last property + currentProperty.lineWhereToAddComma = lineOfLastNonTriviaNonCommentToken; + currentProperty.indexWhereToAddComa = endIndexOfLastNonTriviaNonCommentToken; + } + lastProperty = currentProperty; + currentProperty = currentProperty ? currentProperty.parent : undefined; + currentTree = currentProperty; + } + rootTree.endLineNumber = scanner.getTokenStartLine(); + beginningLineNumber = endLineNumber + 1; + break; + } + case 5 /* SyntaxKind.CommaToken */: { + endLineNumber = scanner.getTokenStartLine(); + // If the current container is an object or the current container is an array and the last non-trivia non-comment token is a closing brace or a closing bracket + // Then update the end line number of the current property + if (currentProperty.endLineNumber === undefined + && (currentContainerStack[currentContainerStack.length - 1] === Container.Object + || (currentContainerStack[currentContainerStack.length - 1] === Container.Array + && (lastNonTriviaNonCommentToken === 2 /* SyntaxKind.CloseBraceToken */ + || lastNonTriviaNonCommentToken === 4 /* SyntaxKind.CloseBracketToken */)))) { + currentProperty.endLineNumber = endLineNumber; + // Store the line and the index of the comma in case it needs to be removed during the sorting + currentProperty.commaIndex = scanner.getTokenOffset() - numberOfCharactersOnPreviousLines; + currentProperty.commaLine = endLineNumber; + } + if (lastNonTriviaNonCommentToken === 2 /* SyntaxKind.CloseBraceToken */ + || lastNonTriviaNonCommentToken === 4 /* SyntaxKind.CloseBracketToken */) { + lastProperty = currentProperty; + currentProperty = currentProperty ? currentProperty.parent : undefined; + currentTree = currentProperty; + } + beginningLineNumber = endLineNumber + 1; + break; + } + case 13 /* SyntaxKind.BlockCommentTrivia */: { + // If the last non trivia non-comment token is a comma and the block comment starts on the same line as the comma, then update the end line number of the current property. For example if: + // 1. {}, /* ... + // 2. ..*/ + // The the property on line 1 shoud end on line 2, not line 1 + // In the case we are in an array we update the end line number only if the second to last non-trivia non-comment token is a closing brace or bracket + if (lastNonTriviaNonCommentToken === 5 /* SyntaxKind.CommaToken */ + && lineOfLastNonTriviaNonCommentToken === scanner.getTokenStartLine() + && (currentContainerStack[currentContainerStack.length - 1] === Container.Array + && (secondToLastNonTriviaNonCommentToken === 2 /* SyntaxKind.CloseBraceToken */ + || secondToLastNonTriviaNonCommentToken === 4 /* SyntaxKind.CloseBracketToken */) + || currentContainerStack[currentContainerStack.length - 1] === Container.Object)) { + if (currentContainerStack[currentContainerStack.length - 1] === Container.Array && (secondToLastNonTriviaNonCommentToken === 2 /* SyntaxKind.CloseBraceToken */ || secondToLastNonTriviaNonCommentToken === 4 /* SyntaxKind.CloseBracketToken */) || currentContainerStack[currentContainerStack.length - 1] === Container.Object) { + currentProperty.endLineNumber = undefined; + updateLastPropertyEndLineNumber = true; + } + } + // When the block comment follows an open brace or an open token, we have the following scenario: + // { /** + // ../ + // } + // The block comment should be assigned to the open brace not the first property below it + if ((lastNonTriviaNonCommentToken === 1 /* SyntaxKind.OpenBraceToken */ + || lastNonTriviaNonCommentToken === 3 /* SyntaxKind.OpenBracketToken */) + && lineOfLastNonTriviaNonCommentToken === scanner.getTokenStartLine()) { + updateBeginningLineNumber = true; + } + break; + } + } + // Update the last and second to last non-trivia non-comment tokens + if (token !== 14 /* SyntaxKind.LineBreakTrivia */ + && token !== 13 /* SyntaxKind.BlockCommentTrivia */ + && token !== 12 /* SyntaxKind.LineCommentTrivia */ + && token !== 15 /* SyntaxKind.Trivia */) { + secondToLastNonTriviaNonCommentToken = lastNonTriviaNonCommentToken; + lastNonTriviaNonCommentToken = token; + lineOfLastNonTriviaNonCommentToken = scanner.getTokenStartLine(); + endIndexOfLastNonTriviaNonCommentToken = scanner.getTokenOffset() + scanner.getTokenLength() - numberOfCharactersOnPreviousLines; + } + } + return rootTree; +} +function sortJsoncDocument(jsonDocument, propertyTree) { + if (propertyTree.childrenProperties.length === 0) { + return jsonDocument; + } + const sortedJsonDocument = TextDocument.create('test://test.json', 'json', 0, jsonDocument.getText()); + const queueToSort = []; + updateSortingQueue(queueToSort, propertyTree, propertyTree.beginningLineNumber); + while (queueToSort.length > 0) { + const dataToSort = queueToSort.shift(); + const propertyTreeArray = dataToSort.propertyTreeArray; + let beginningLineNumber = dataToSort.beginningLineNumber; + for (let i = 0; i < propertyTreeArray.length; i++) { + const propertyTree = propertyTreeArray[i]; + const range = Range.create(Position.create(propertyTree.beginningLineNumber, 0), Position.create(propertyTree.endLineNumber + 1, 0)); + const jsonContentToReplace = jsonDocument.getText(range); + const jsonDocumentToReplace = TextDocument.create('test://test.json', 'json', 0, jsonContentToReplace); + if (propertyTree.lastProperty === true && i !== propertyTreeArray.length - 1) { + const lineWhereToAddComma = propertyTree.lineWhereToAddComma - propertyTree.beginningLineNumber; + const indexWhereToAddComma = propertyTree.indexWhereToAddComa; + const edit = { + range: Range.create(Position.create(lineWhereToAddComma, indexWhereToAddComma), Position.create(lineWhereToAddComma, indexWhereToAddComma)), + text: ',' + }; + TextDocument.update(jsonDocumentToReplace, [edit], 1); + } + else if (propertyTree.lastProperty === false && i === propertyTreeArray.length - 1) { + const commaIndex = propertyTree.commaIndex; + const commaLine = propertyTree.commaLine; + const lineWhereToRemoveComma = commaLine - propertyTree.beginningLineNumber; + const edit = { + range: Range.create(Position.create(lineWhereToRemoveComma, commaIndex), Position.create(lineWhereToRemoveComma, commaIndex + 1)), + text: '' + }; + TextDocument.update(jsonDocumentToReplace, [edit], 1); + } + const length = propertyTree.endLineNumber - propertyTree.beginningLineNumber + 1; + const edit = { + range: Range.create(Position.create(beginningLineNumber, 0), Position.create(beginningLineNumber + length, 0)), + text: jsonDocumentToReplace.getText() + }; + TextDocument.update(sortedJsonDocument, [edit], 1); + updateSortingQueue(queueToSort, propertyTree, beginningLineNumber); + beginningLineNumber = beginningLineNumber + length; + } + } + return sortedJsonDocument; +} +function updateSortingQueue(queue, propertyTree, beginningLineNumber) { + if (propertyTree.childrenProperties.length === 0) { + return; + } + if (propertyTree.type === Container.Object) { + let minimumBeginningLineNumber = Infinity; + for (const childProperty of propertyTree.childrenProperties) { + if (childProperty.beginningLineNumber < minimumBeginningLineNumber) { + minimumBeginningLineNumber = childProperty.beginningLineNumber; + } + } + const diff = minimumBeginningLineNumber - propertyTree.beginningLineNumber; + beginningLineNumber = beginningLineNumber + diff; + queue.push(new SortingRange(beginningLineNumber, propertyTree.childrenProperties)); + } + else if (propertyTree.type === Container.Array) { + updateSortingQueueForArrayProperties(queue, propertyTree, beginningLineNumber); + } +} +function updateSortingQueueForArrayProperties(queue, propertyTree, beginningLineNumber) { + for (const subObject of propertyTree.childrenProperties) { + // If the child property of the array is an object, then you can sort the properties within this object + if (subObject.type === Container.Object) { + let minimumBeginningLineNumber = Infinity; + for (const childProperty of subObject.childrenProperties) { + if (childProperty.beginningLineNumber < minimumBeginningLineNumber) { + minimumBeginningLineNumber = childProperty.beginningLineNumber; + } + } + const diff = minimumBeginningLineNumber - subObject.beginningLineNumber; + queue.push(new SortingRange(beginningLineNumber + subObject.beginningLineNumber - propertyTree.beginningLineNumber + diff, subObject.childrenProperties)); + } + // If the child property of the array is an array, then you need to recurse on the children properties, until you find an object to sort + if (subObject.type === Container.Array) { + updateSortingQueueForArrayProperties(queue, subObject, beginningLineNumber + subObject.beginningLineNumber - propertyTree.beginningLineNumber); + } + } +} +class SortingRange { + constructor(beginningLineNumber, propertyTreeArray) { + this.beginningLineNumber = beginningLineNumber; + this.propertyTreeArray = propertyTreeArray; + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/strings.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/strings.js" index ea11fd20901c73d666690c13cf282a07d7b60899..c9a78f3a55faec3d3b137c835891b0d28c47f854 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/strings.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/esm/utils/strings.js" @@ -1,3 +1,79 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2e03ef613a6b7faae0ebedd0cb140a2c6f9337f3012f8444780853609b128011 -size 2302 +/*--------------------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +* Licensed under the MIT License. See License.txt in the project root for license information. +*--------------------------------------------------------------------------------------------*/ +export function startsWith(haystack, needle) { + if (haystack.length < needle.length) { + return false; + } + for (let i = 0; i < needle.length; i++) { + if (haystack[i] !== needle[i]) { + return false; + } + } + return true; +} +/** + * Determines if haystack ends with needle. + */ +export function endsWith(haystack, needle) { + const diff = haystack.length - needle.length; + if (diff > 0) { + return haystack.lastIndexOf(needle) === diff; + } + else if (diff === 0) { + return haystack === needle; + } + else { + return false; + } +} +export function convertSimple2RegExpPattern(pattern) { + return pattern.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, '\\$&').replace(/[\*]/g, '.*'); +} +export function repeat(value, count) { + let s = ''; + while (count > 0) { + if ((count & 1) === 1) { + s += value; + } + value += value; + count = count >>> 1; + } + return s; +} +export function extendedRegExp(pattern) { + let flags = ''; + if (startsWith(pattern, '(?i)')) { + pattern = pattern.substring(4); + flags = 'i'; + } + try { + return new RegExp(pattern, flags + 'u'); + } + catch (e) { + // could be an exception due to the 'u ' flag + try { + return new RegExp(pattern, flags); + } + catch (e) { + // invalid pattern + return undefined; + } + } +} +// from https://tanishiking.github.io/posts/count-unicode-codepoint/#work-hard-with-for-statements +export function stringLength(str) { + let count = 0; + for (let i = 0; i < str.length; i++) { + count++; + // obtain the i-th 16-bit + const code = str.charCodeAt(i); + if (0xD800 <= code && code <= 0xDBFF) { + // if the i-th 16bit is an upper surrogate + // skip the next 16 bits (lower surrogate) + i++; + } + } + return count; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonContributions.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonContributions.d.ts" index 9fdefd0e1c73fd9421666dd08abf0caaa811aa11..447835cd38f53c69ceb009da31c41aeafe65084d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonContributions.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonContributions.d.ts" @@ -1,3 +1,21 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d1eaa6456434da5abcc2211f1ba8ac16205e06aaa64bb6ff92cb32987f46e89a -size 1042 +import { Thenable, MarkedString, CompletionItem } from './jsonLanguageService'; +export interface JSONWorkerContribution { + getInfoContribution(uri: string, location: JSONPath): Thenable; + collectPropertyCompletions(uri: string, location: JSONPath, currentWord: string, addValue: boolean, isLast: boolean, result: CompletionsCollector): Thenable; + collectValueCompletions(uri: string, location: JSONPath, propertyKey: string, result: CompletionsCollector): Thenable; + collectDefaultCompletions(uri: string, result: CompletionsCollector): Thenable; + resolveCompletion?(item: CompletionItem): Thenable; +} +export type Segment = string | number; +export type JSONPath = Segment[]; +export type JSONCompletionItem = CompletionItem & { + insertText: string; +}; +export interface CompletionsCollector { + add(suggestion: JSONCompletionItem & { + insertText: string; + }): void; + error(message: string): void; + setAsIncomplete(): void; + getNumberOfProposals(): number; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonContributions.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonContributions.js" index 5a28595e328da6630501223339a21e1a264d2356..273e12fe0382ec22ef2ad39686c339994dc341e7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonContributions.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonContributions.js" @@ -1,3 +1,12 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:61b26653537c0151337cb087ccf9b7c77dfc0826b24d159d73474bc09d060720 -size 432 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonLanguageService.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonLanguageService.d.ts" index fa7ae2ea880109b2bb883b0f308b0a5c6d0b3292..8ad6c412c257db083fa814ca333a1621cddd7f89 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonLanguageService.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonLanguageService.d.ts" @@ -1,3 +1,30 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:079dd814fa01d224b99ea794eba05e8a4debc0a70c60550fd46d6754183f47cc -size 2835 +import { Thenable, ASTNode, Color, ColorInformation, ColorPresentation, LanguageServiceParams, LanguageSettings, DocumentLanguageSettings, FoldingRange, JSONSchema, SelectionRange, FoldingRangesContext, DocumentSymbolsContext, ColorInformationContext as DocumentColorsContext, TextDocument, Position, CompletionItem, CompletionList, Hover, Range, SymbolInformation, Diagnostic, TextEdit, FormattingOptions, DocumentSymbol, DefinitionLink, MatchingSchema, JSONLanguageStatus, SortOptions } from './jsonLanguageTypes'; +import { DocumentLink } from 'vscode-languageserver-types'; +export type JSONDocument = { + root: ASTNode | undefined; + getNodeFromOffset(offset: number, includeRightBound?: boolean): ASTNode | undefined; +}; +export * from './jsonLanguageTypes'; +export interface LanguageService { + configure(settings: LanguageSettings): void; + doValidation(document: TextDocument, jsonDocument: JSONDocument, documentSettings?: DocumentLanguageSettings, schema?: JSONSchema): Thenable; + parseJSONDocument(document: TextDocument): JSONDocument; + newJSONDocument(rootNode: ASTNode, syntaxDiagnostics?: Diagnostic[]): JSONDocument; + resetSchema(uri: string): boolean; + getMatchingSchemas(document: TextDocument, jsonDocument: JSONDocument, schema?: JSONSchema): Thenable; + getLanguageStatus(document: TextDocument, jsonDocument: JSONDocument): JSONLanguageStatus; + doResolve(item: CompletionItem): Thenable; + doComplete(document: TextDocument, position: Position, doc: JSONDocument): Thenable; + findDocumentSymbols(document: TextDocument, doc: JSONDocument, context?: DocumentSymbolsContext): SymbolInformation[]; + findDocumentSymbols2(document: TextDocument, doc: JSONDocument, context?: DocumentSymbolsContext): DocumentSymbol[]; + findDocumentColors(document: TextDocument, doc: JSONDocument, context?: DocumentColorsContext): Thenable; + getColorPresentations(document: TextDocument, doc: JSONDocument, color: Color, range: Range): ColorPresentation[]; + doHover(document: TextDocument, position: Position, doc: JSONDocument): Thenable; + getFoldingRanges(document: TextDocument, context?: FoldingRangesContext): FoldingRange[]; + getSelectionRanges(document: TextDocument, positions: Position[], doc: JSONDocument): SelectionRange[]; + findDefinition(document: TextDocument, position: Position, doc: JSONDocument): Thenable; + findLinks(document: TextDocument, doc: JSONDocument): Thenable; + format(document: TextDocument, range: Range, options: FormattingOptions): TextEdit[]; + sort(document: TextDocument, options: SortOptions): TextEdit[]; +} +export declare function getLanguageService(params: LanguageServiceParams): LanguageService; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonLanguageService.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonLanguageService.js" index eee024ca71ad8b860010165a7622a68997092a57..4aeeb17f8ed0bc8d41bc9422567c6c314cd14cad 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonLanguageService.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonLanguageService.js" @@ -1,3 +1,80 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:43cb7405216acb4db04cefabb2bcfef6a905267f948fd9a05ae6ed4102bb59ea -size 5349 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./services/jsonCompletion", "./services/jsonHover", "./services/jsonValidation", "./services/jsonDocumentSymbols", "./parser/jsonParser", "./services/configuration", "./services/jsonSchemaService", "./services/jsonFolding", "./services/jsonSelectionRanges", "./utils/sort", "./utils/format", "./services/jsonLinks", "./jsonLanguageTypes"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getLanguageService = void 0; + const jsonCompletion_1 = require("./services/jsonCompletion"); + const jsonHover_1 = require("./services/jsonHover"); + const jsonValidation_1 = require("./services/jsonValidation"); + const jsonDocumentSymbols_1 = require("./services/jsonDocumentSymbols"); + const jsonParser_1 = require("./parser/jsonParser"); + const configuration_1 = require("./services/configuration"); + const jsonSchemaService_1 = require("./services/jsonSchemaService"); + const jsonFolding_1 = require("./services/jsonFolding"); + const jsonSelectionRanges_1 = require("./services/jsonSelectionRanges"); + const sort_1 = require("./utils/sort"); + const format_1 = require("./utils/format"); + const jsonLinks_1 = require("./services/jsonLinks"); + __exportStar(require("./jsonLanguageTypes"), exports); + function getLanguageService(params) { + const promise = params.promiseConstructor || Promise; + const jsonSchemaService = new jsonSchemaService_1.JSONSchemaService(params.schemaRequestService, params.workspaceContext, promise); + jsonSchemaService.setSchemaContributions(configuration_1.schemaContributions); + const jsonCompletion = new jsonCompletion_1.JSONCompletion(jsonSchemaService, params.contributions, promise, params.clientCapabilities); + const jsonHover = new jsonHover_1.JSONHover(jsonSchemaService, params.contributions, promise); + const jsonDocumentSymbols = new jsonDocumentSymbols_1.JSONDocumentSymbols(jsonSchemaService); + const jsonValidation = new jsonValidation_1.JSONValidation(jsonSchemaService, promise); + return { + configure: (settings) => { + jsonSchemaService.clearExternalSchemas(); + settings.schemas?.forEach(jsonSchemaService.registerExternalSchema.bind(jsonSchemaService)); + jsonValidation.configure(settings); + }, + resetSchema: (uri) => jsonSchemaService.onResourceChange(uri), + doValidation: jsonValidation.doValidation.bind(jsonValidation), + getLanguageStatus: jsonValidation.getLanguageStatus.bind(jsonValidation), + parseJSONDocument: (document) => (0, jsonParser_1.parse)(document, { collectComments: true }), + newJSONDocument: (root, diagnostics) => (0, jsonParser_1.newJSONDocument)(root, diagnostics), + getMatchingSchemas: jsonSchemaService.getMatchingSchemas.bind(jsonSchemaService), + doResolve: jsonCompletion.doResolve.bind(jsonCompletion), + doComplete: jsonCompletion.doComplete.bind(jsonCompletion), + findDocumentSymbols: jsonDocumentSymbols.findDocumentSymbols.bind(jsonDocumentSymbols), + findDocumentSymbols2: jsonDocumentSymbols.findDocumentSymbols2.bind(jsonDocumentSymbols), + findDocumentColors: jsonDocumentSymbols.findDocumentColors.bind(jsonDocumentSymbols), + getColorPresentations: jsonDocumentSymbols.getColorPresentations.bind(jsonDocumentSymbols), + doHover: jsonHover.doHover.bind(jsonHover), + getFoldingRanges: jsonFolding_1.getFoldingRanges, + getSelectionRanges: jsonSelectionRanges_1.getSelectionRanges, + findDefinition: () => Promise.resolve([]), + findLinks: jsonLinks_1.findLinks, + format: (document, range, options) => (0, format_1.format)(document, options, range), + sort: (document, options) => (0, sort_1.sort)(document, options) + }; + } + exports.getLanguageService = getLanguageService; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonLanguageTypes.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonLanguageTypes.d.ts" index f8525e5dc882351765ddab9b11ae9daac73fdbcf..d0a6d849d52973e914a60e8e32565534d09fbe80 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonLanguageTypes.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonLanguageTypes.d.ts" @@ -1,3 +1,306 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:687fe26725f3716645ea6d861af80c49c19b37685696b3b191cbc6ce762a6466 -size 12193 +import { JSONWorkerContribution, JSONPath, Segment, CompletionsCollector } from './jsonContributions'; +import { JSONSchema } from './jsonSchema'; +import { Range, Position, DocumentUri, MarkupContent, MarkupKind, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, CompletionItemTag, InsertTextFormat, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString, FormattingOptions as LSPFormattingOptions, DefinitionLink, CodeActionContext, Command, CodeAction, DocumentHighlight, DocumentLink, WorkspaceEdit, TextEdit, CodeActionKind, TextDocumentEdit, VersionedTextDocumentIdentifier, DocumentHighlightKind } from 'vscode-languageserver-types'; +import { TextDocument, TextDocumentContentChangeEvent } from 'vscode-languageserver-textdocument'; +export { TextDocument, TextDocumentContentChangeEvent, Range, Position, DocumentUri, MarkupContent, MarkupKind, JSONSchema, JSONWorkerContribution, JSONPath, Segment, CompletionsCollector, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, CompletionItemTag, InsertTextFormat, DefinitionLink, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString, CodeActionContext, Command, CodeAction, DocumentHighlight, DocumentLink, WorkspaceEdit, TextEdit, CodeActionKind, TextDocumentEdit, VersionedTextDocumentIdentifier, DocumentHighlightKind }; +/** + * Error codes used by diagnostics + */ +export declare enum ErrorCode { + Undefined = 0, + EnumValueMismatch = 1, + Deprecated = 2, + UnexpectedEndOfComment = 257, + UnexpectedEndOfString = 258, + UnexpectedEndOfNumber = 259, + InvalidUnicode = 260, + InvalidEscapeCharacter = 261, + InvalidCharacter = 262, + PropertyExpected = 513, + CommaExpected = 514, + ColonExpected = 515, + ValueExpected = 516, + CommaOrCloseBacketExpected = 517, + CommaOrCloseBraceExpected = 518, + TrailingComma = 519, + DuplicateKey = 520, + CommentNotPermitted = 521, + PropertyKeysMustBeDoublequoted = 528, + SchemaResolveError = 768, + SchemaUnsupportedFeature = 769 +} +export type ASTNode = ObjectASTNode | PropertyASTNode | ArrayASTNode | StringASTNode | NumberASTNode | BooleanASTNode | NullASTNode; +export interface BaseASTNode { + readonly type: 'object' | 'array' | 'property' | 'string' | 'number' | 'boolean' | 'null'; + readonly parent?: ASTNode; + readonly offset: number; + readonly length: number; + readonly children?: ASTNode[]; + readonly value?: string | boolean | number | null; +} +export interface ObjectASTNode extends BaseASTNode { + readonly type: 'object'; + readonly properties: PropertyASTNode[]; + readonly children: ASTNode[]; +} +export interface PropertyASTNode extends BaseASTNode { + readonly type: 'property'; + readonly keyNode: StringASTNode; + readonly valueNode?: ASTNode; + readonly colonOffset?: number; + readonly children: ASTNode[]; +} +export interface ArrayASTNode extends BaseASTNode { + readonly type: 'array'; + readonly items: ASTNode[]; + readonly children: ASTNode[]; +} +export interface StringASTNode extends BaseASTNode { + readonly type: 'string'; + readonly value: string; +} +export interface NumberASTNode extends BaseASTNode { + readonly type: 'number'; + readonly value: number; + readonly isInteger: boolean; +} +export interface BooleanASTNode extends BaseASTNode { + readonly type: 'boolean'; + readonly value: boolean; +} +export interface NullASTNode extends BaseASTNode { + readonly type: 'null'; + readonly value: null; +} +export interface MatchingSchema { + node: ASTNode; + schema: JSONSchema; +} +export interface JSONLanguageStatus { + schemas: string[]; +} +export interface LanguageSettings { + /** + * If set, the validator will return syntax and semantic errors. + */ + validate?: boolean; + /** + * Defines whether comments are allowed or not. If set to false, comments will be reported as errors. + * DocumentLanguageSettings.allowComments will override this setting. + */ + allowComments?: boolean; + /** + * A list of known schemas and/or associations of schemas to file names. + */ + schemas?: SchemaConfiguration[]; +} +export type SeverityLevel = 'error' | 'warning' | 'ignore'; +export declare enum SchemaDraft { + v3 = 3, + v4 = 4, + v6 = 6, + v7 = 7, + v2019_09 = 19, + v2020_12 = 20 +} +export interface DocumentLanguageSettings { + /** + * The severity of reported comments. If not set, 'LanguageSettings.allowComments' defines whether comments are ignored or reported as errors. + */ + comments?: SeverityLevel; + /** + * The severity of reported trailing commas. If not set, trailing commas will be reported as errors. + */ + trailingCommas?: SeverityLevel; + /** + * The severity of problems from schema validation. If set to 'ignore', schema validation will be skipped. If not set, 'warning' is used. + */ + schemaValidation?: SeverityLevel; + /** + * The severity of problems that occurred when resolving and loading schemas. If set to 'ignore', schema resolving problems are not reported. If not set, 'warning' is used. + */ + schemaRequest?: SeverityLevel; + /** + * The draft version of schema to use if the schema doesn't specify one at $schema + */ + schemaDraft?: SchemaDraft; +} +export interface SchemaConfiguration { + /** + * The URI of the schema, which is also the identifier of the schema. + */ + uri: string; + /** + * A list of glob patterns that describe for which file URIs the JSON schema will be used. + * '*' and '**' wildcards are supported. Exclusion patterns start with '!'. + * For example '*.schema.json', 'package.json', '!foo*.schema.json', 'foo/**\/BADRESP.json'. + * A match succeeds when there is at least one pattern matching and last matching pattern does not start with '!'. + */ + fileMatch?: string[]; + /** + * The schema for the given URI. + * If no schema is provided, the schema will be fetched with the schema request service (if available). + */ + schema?: JSONSchema; + /** + * A parent folder for folder specifc associations. An association that has a folder URI set is only used + * if the document that is validated has the folderUri as parent + */ + folderUri?: string; +} +export interface WorkspaceContextService { + resolveRelativePath(relativePath: string, resource: string): string; +} +/** + * The schema request service is used to fetch schemas. If successful, returns a resolved promise with the content of the schema. + * In case of an error, returns a rejected promise with a displayable error string. + */ +export interface SchemaRequestService { + (uri: string): Thenable; +} +export interface PromiseConstructor { + /** + * Creates a new Promise. + * @param executor A callback used to initialize the promise. This callback is passed two arguments: + * a resolve callback used resolve the promise with a value or the result of another promise, + * and a reject callback used to reject the promise with a provided reason or error. + */ + new (executor: (resolve: (value?: T | Thenable) => void, reject: (reason?: any) => void) => void): Thenable; + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: Array>): Thenable; + /** + * Creates a new rejected promise for the provided reason. + * @param reason The reason the promise was rejected. + * @returns A new rejected Promise. + */ + reject(reason: any): Thenable; + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T | Thenable): Thenable; +} +export interface Thenable { + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: (value: R) => TResult | Thenable, onrejected?: (reason: any) => TResult | Thenable): Thenable; + then(onfulfilled?: (value: R) => TResult | Thenable, onrejected?: (reason: any) => void): Thenable; +} +export interface LanguageServiceParams { + /** + * The schema request service is used to fetch schemas from a URI. The provider returns the schema file content, or, + * in case of an error, a displayable error string + */ + schemaRequestService?: SchemaRequestService; + /** + * The workspace context is used to resolve relative paths for relative schema references. + */ + workspaceContext?: WorkspaceContextService; + /** + * An optional set of completion and hover participants. + */ + contributions?: JSONWorkerContribution[]; + /** + * A promise constructor. If not set, the ES5 Promise will be used. + */ + promiseConstructor?: PromiseConstructor; + /** + * Describes the LSP capabilities the client supports. + */ + clientCapabilities?: ClientCapabilities; +} +/** + * Describes what LSP capabilities the client supports + */ +export interface ClientCapabilities { + /** + * The text document client capabilities + */ + textDocument?: { + /** + * Capabilities specific to completions. + */ + completion?: { + /** + * The client supports the following `CompletionItem` specific + * capabilities. + */ + completionItem?: { + /** + * Client supports the follow content formats for the documentation + * property. The order describes the preferred format of the client. + */ + documentationFormat?: MarkupKind[]; + /** + * The client supports commit characters on a completion item. + */ + commitCharactersSupport?: boolean; + /** + * The client has support for completion item label + * details (see also `CompletionItemLabelDetails`). + */ + labelDetailsSupport?: boolean; + }; + }; + /** + * Capabilities specific to hovers. + */ + hover?: { + /** + * Client supports the follow content formats for the content + * property. The order describes the preferred format of the client. + */ + contentFormat?: MarkupKind[]; + }; + }; +} +export declare namespace ClientCapabilities { + const LATEST: ClientCapabilities; +} +export interface FoldingRangesContext { + /** + * The maximal number of ranges returned. + */ + rangeLimit?: number; + /** + * Called when the result was cropped. + */ + onRangeLimitExceeded?: (uri: string) => void; +} +export interface DocumentSymbolsContext { + /** + * The maximal number of document symbols returned. + */ + resultLimit?: number; + /** + * Called when the result was cropped. + */ + onResultLimitExceeded?: (uri: string) => void; +} +export interface ColorInformationContext { + /** + * The maximal number of color informations returned. + */ + resultLimit?: number; + /** + * Called when the result was cropped. + */ + onResultLimitExceeded?: (uri: string) => void; +} +export interface FormattingOptions extends LSPFormattingOptions { + insertFinalNewline?: boolean; + keepLines?: boolean; +} +export interface SortOptions extends LSPFormattingOptions { + insertFinalNewline?: boolean; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonLanguageTypes.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonLanguageTypes.js" index 7a5d0cd07c7a5bc7d10e7a25f180a37a267a592f..bb703f970a10c78dc93fb2e77196d362f502646d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonLanguageTypes.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonLanguageTypes.js" @@ -1,3 +1,105 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b3334baf519944221f06885b186d087e5fee7b1a40910165131fc46d02a269b5 -size 10280 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "vscode-languageserver-types", "vscode-languageserver-textdocument"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ClientCapabilities = exports.SchemaDraft = exports.ErrorCode = exports.DocumentHighlightKind = exports.VersionedTextDocumentIdentifier = exports.TextDocumentEdit = exports.CodeActionKind = exports.TextEdit = exports.WorkspaceEdit = exports.DocumentLink = exports.DocumentHighlight = exports.CodeAction = exports.Command = exports.CodeActionContext = exports.MarkedString = exports.Hover = exports.Location = exports.DocumentSymbol = exports.SymbolKind = exports.SymbolInformation = exports.InsertTextFormat = exports.CompletionItemTag = exports.CompletionList = exports.CompletionItemKind = exports.CompletionItem = exports.DiagnosticSeverity = exports.Diagnostic = exports.SelectionRange = exports.FoldingRangeKind = exports.FoldingRange = exports.ColorPresentation = exports.ColorInformation = exports.Color = exports.MarkupKind = exports.MarkupContent = exports.DocumentUri = exports.Position = exports.Range = exports.TextDocument = void 0; + const vscode_languageserver_types_1 = require("vscode-languageserver-types"); + Object.defineProperty(exports, "Range", { enumerable: true, get: function () { return vscode_languageserver_types_1.Range; } }); + Object.defineProperty(exports, "Position", { enumerable: true, get: function () { return vscode_languageserver_types_1.Position; } }); + Object.defineProperty(exports, "DocumentUri", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentUri; } }); + Object.defineProperty(exports, "MarkupContent", { enumerable: true, get: function () { return vscode_languageserver_types_1.MarkupContent; } }); + Object.defineProperty(exports, "MarkupKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.MarkupKind; } }); + Object.defineProperty(exports, "Color", { enumerable: true, get: function () { return vscode_languageserver_types_1.Color; } }); + Object.defineProperty(exports, "ColorInformation", { enumerable: true, get: function () { return vscode_languageserver_types_1.ColorInformation; } }); + Object.defineProperty(exports, "ColorPresentation", { enumerable: true, get: function () { return vscode_languageserver_types_1.ColorPresentation; } }); + Object.defineProperty(exports, "FoldingRange", { enumerable: true, get: function () { return vscode_languageserver_types_1.FoldingRange; } }); + Object.defineProperty(exports, "FoldingRangeKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.FoldingRangeKind; } }); + Object.defineProperty(exports, "SelectionRange", { enumerable: true, get: function () { return vscode_languageserver_types_1.SelectionRange; } }); + Object.defineProperty(exports, "Diagnostic", { enumerable: true, get: function () { return vscode_languageserver_types_1.Diagnostic; } }); + Object.defineProperty(exports, "DiagnosticSeverity", { enumerable: true, get: function () { return vscode_languageserver_types_1.DiagnosticSeverity; } }); + Object.defineProperty(exports, "CompletionItem", { enumerable: true, get: function () { return vscode_languageserver_types_1.CompletionItem; } }); + Object.defineProperty(exports, "CompletionItemKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.CompletionItemKind; } }); + Object.defineProperty(exports, "CompletionList", { enumerable: true, get: function () { return vscode_languageserver_types_1.CompletionList; } }); + Object.defineProperty(exports, "CompletionItemTag", { enumerable: true, get: function () { return vscode_languageserver_types_1.CompletionItemTag; } }); + Object.defineProperty(exports, "InsertTextFormat", { enumerable: true, get: function () { return vscode_languageserver_types_1.InsertTextFormat; } }); + Object.defineProperty(exports, "SymbolInformation", { enumerable: true, get: function () { return vscode_languageserver_types_1.SymbolInformation; } }); + Object.defineProperty(exports, "SymbolKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.SymbolKind; } }); + Object.defineProperty(exports, "DocumentSymbol", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentSymbol; } }); + Object.defineProperty(exports, "Location", { enumerable: true, get: function () { return vscode_languageserver_types_1.Location; } }); + Object.defineProperty(exports, "Hover", { enumerable: true, get: function () { return vscode_languageserver_types_1.Hover; } }); + Object.defineProperty(exports, "MarkedString", { enumerable: true, get: function () { return vscode_languageserver_types_1.MarkedString; } }); + Object.defineProperty(exports, "CodeActionContext", { enumerable: true, get: function () { return vscode_languageserver_types_1.CodeActionContext; } }); + Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return vscode_languageserver_types_1.Command; } }); + Object.defineProperty(exports, "CodeAction", { enumerable: true, get: function () { return vscode_languageserver_types_1.CodeAction; } }); + Object.defineProperty(exports, "DocumentHighlight", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentHighlight; } }); + Object.defineProperty(exports, "DocumentLink", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentLink; } }); + Object.defineProperty(exports, "WorkspaceEdit", { enumerable: true, get: function () { return vscode_languageserver_types_1.WorkspaceEdit; } }); + Object.defineProperty(exports, "TextEdit", { enumerable: true, get: function () { return vscode_languageserver_types_1.TextEdit; } }); + Object.defineProperty(exports, "CodeActionKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.CodeActionKind; } }); + Object.defineProperty(exports, "TextDocumentEdit", { enumerable: true, get: function () { return vscode_languageserver_types_1.TextDocumentEdit; } }); + Object.defineProperty(exports, "VersionedTextDocumentIdentifier", { enumerable: true, get: function () { return vscode_languageserver_types_1.VersionedTextDocumentIdentifier; } }); + Object.defineProperty(exports, "DocumentHighlightKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentHighlightKind; } }); + const vscode_languageserver_textdocument_1 = require("vscode-languageserver-textdocument"); + Object.defineProperty(exports, "TextDocument", { enumerable: true, get: function () { return vscode_languageserver_textdocument_1.TextDocument; } }); + /** + * Error codes used by diagnostics + */ + var ErrorCode; + (function (ErrorCode) { + ErrorCode[ErrorCode["Undefined"] = 0] = "Undefined"; + ErrorCode[ErrorCode["EnumValueMismatch"] = 1] = "EnumValueMismatch"; + ErrorCode[ErrorCode["Deprecated"] = 2] = "Deprecated"; + ErrorCode[ErrorCode["UnexpectedEndOfComment"] = 257] = "UnexpectedEndOfComment"; + ErrorCode[ErrorCode["UnexpectedEndOfString"] = 258] = "UnexpectedEndOfString"; + ErrorCode[ErrorCode["UnexpectedEndOfNumber"] = 259] = "UnexpectedEndOfNumber"; + ErrorCode[ErrorCode["InvalidUnicode"] = 260] = "InvalidUnicode"; + ErrorCode[ErrorCode["InvalidEscapeCharacter"] = 261] = "InvalidEscapeCharacter"; + ErrorCode[ErrorCode["InvalidCharacter"] = 262] = "InvalidCharacter"; + ErrorCode[ErrorCode["PropertyExpected"] = 513] = "PropertyExpected"; + ErrorCode[ErrorCode["CommaExpected"] = 514] = "CommaExpected"; + ErrorCode[ErrorCode["ColonExpected"] = 515] = "ColonExpected"; + ErrorCode[ErrorCode["ValueExpected"] = 516] = "ValueExpected"; + ErrorCode[ErrorCode["CommaOrCloseBacketExpected"] = 517] = "CommaOrCloseBacketExpected"; + ErrorCode[ErrorCode["CommaOrCloseBraceExpected"] = 518] = "CommaOrCloseBraceExpected"; + ErrorCode[ErrorCode["TrailingComma"] = 519] = "TrailingComma"; + ErrorCode[ErrorCode["DuplicateKey"] = 520] = "DuplicateKey"; + ErrorCode[ErrorCode["CommentNotPermitted"] = 521] = "CommentNotPermitted"; + ErrorCode[ErrorCode["PropertyKeysMustBeDoublequoted"] = 528] = "PropertyKeysMustBeDoublequoted"; + ErrorCode[ErrorCode["SchemaResolveError"] = 768] = "SchemaResolveError"; + ErrorCode[ErrorCode["SchemaUnsupportedFeature"] = 769] = "SchemaUnsupportedFeature"; + })(ErrorCode || (exports.ErrorCode = ErrorCode = {})); + var SchemaDraft; + (function (SchemaDraft) { + SchemaDraft[SchemaDraft["v3"] = 3] = "v3"; + SchemaDraft[SchemaDraft["v4"] = 4] = "v4"; + SchemaDraft[SchemaDraft["v6"] = 6] = "v6"; + SchemaDraft[SchemaDraft["v7"] = 7] = "v7"; + SchemaDraft[SchemaDraft["v2019_09"] = 19] = "v2019_09"; + SchemaDraft[SchemaDraft["v2020_12"] = 20] = "v2020_12"; + })(SchemaDraft || (exports.SchemaDraft = SchemaDraft = {})); + var ClientCapabilities; + (function (ClientCapabilities) { + ClientCapabilities.LATEST = { + textDocument: { + completion: { + completionItem: { + documentationFormat: [vscode_languageserver_types_1.MarkupKind.Markdown, vscode_languageserver_types_1.MarkupKind.PlainText], + commitCharactersSupport: true, + labelDetailsSupport: true + } + } + } + }; + })(ClientCapabilities || (exports.ClientCapabilities = ClientCapabilities = {})); +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonSchema.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonSchema.d.ts" index 65dbe99be044b7c9e39dde75e03748024af3200e..f5ea51cbf51398d01791309f984dc314a2dd7129 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonSchema.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonSchema.d.ts" @@ -1,3 +1,89 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9a346f9804b713c20a9ab9f95460fb2f20e4281849893f4c892a55809874a5a4 -size 2419 +export type JSONSchemaRef = JSONSchema | boolean; +export interface JSONSchema { + id?: string; + $id?: string; + $schema?: string; + type?: string | string[]; + title?: string; + default?: any; + definitions?: { + [name: string]: JSONSchema; + }; + description?: string; + properties?: JSONSchemaMap; + patternProperties?: JSONSchemaMap; + additionalProperties?: JSONSchemaRef; + minProperties?: number; + maxProperties?: number; + dependencies?: JSONSchemaMap | { + [prop: string]: string[]; + }; + items?: JSONSchemaRef | JSONSchemaRef[]; + minItems?: number; + maxItems?: number; + uniqueItems?: boolean; + additionalItems?: JSONSchemaRef; + pattern?: string; + minLength?: number; + maxLength?: number; + minimum?: number; + maximum?: number; + exclusiveMinimum?: boolean | number; + exclusiveMaximum?: boolean | number; + multipleOf?: number; + required?: string[]; + $ref?: string; + anyOf?: JSONSchemaRef[]; + allOf?: JSONSchemaRef[]; + oneOf?: JSONSchemaRef[]; + not?: JSONSchemaRef; + enum?: any[]; + format?: string; + const?: any; + contains?: JSONSchemaRef; + propertyNames?: JSONSchemaRef; + examples?: any[]; + $comment?: string; + if?: JSONSchemaRef; + then?: JSONSchemaRef; + else?: JSONSchemaRef; + unevaluatedProperties?: boolean | JSONSchemaRef; + unevaluatedItems?: boolean | JSONSchemaRef; + minContains?: number; + maxContains?: number; + deprecated?: boolean; + dependentRequired?: { + [prop: string]: string[]; + }; + dependentSchemas?: JSONSchemaMap; + $defs?: { + [name: string]: JSONSchema; + }; + $anchor?: string; + $recursiveRef?: string; + $recursiveAnchor?: string; + $vocabulary?: any; + prefixItems?: JSONSchemaRef[]; + $dynamicRef?: string; + $dynamicAnchor?: string; + defaultSnippets?: { + label?: string; + description?: string; + markdownDescription?: string; + body?: any; + bodyText?: string; + }[]; + errorMessage?: string; + patternErrorMessage?: string; + deprecationMessage?: string; + enumDescriptions?: string[]; + markdownEnumDescriptions?: string[]; + markdownDescription?: string; + doNotSuggest?: boolean; + suggestSortText?: string; + allowComments?: boolean; + allowTrailingCommas?: boolean; +} +export interface JSONSchemaMap { + [name: string]: JSONSchemaRef; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonSchema.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonSchema.js" index 5a28595e328da6630501223339a21e1a264d2356..273e12fe0382ec22ef2ad39686c339994dc341e7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonSchema.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/jsonSchema.js" @@ -1,3 +1,12 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:61b26653537c0151337cb087ccf9b7c77dfc0826b24d159d73474bc09d060720 -size 432 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/parser/jsonParser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/parser/jsonParser.js" index 2bca0050e72dff999914e6d85616431edace9a49..928a029618d72bba7abc804db46b7d4e8463fa20 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/parser/jsonParser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/parser/jsonParser.js" @@ -1,3 +1,1273 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:19c209eee789df07a5365734d82be9019a99cddb5b97f01503ec67031ff75dcc -size 66676 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "jsonc-parser", "../utils/objects", "../utils/strings", "../jsonLanguageTypes", "@vscode/l10n"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.parse = exports.JSONDocument = exports.contains = exports.getNodePath = exports.getNodeValue = exports.newJSONDocument = exports.ValidationResult = exports.EnumMatch = exports.asSchema = exports.ObjectASTNodeImpl = exports.PropertyASTNodeImpl = exports.StringASTNodeImpl = exports.NumberASTNodeImpl = exports.ArrayASTNodeImpl = exports.BooleanASTNodeImpl = exports.NullASTNodeImpl = exports.ASTNodeImpl = void 0; + const Json = require("jsonc-parser"); + const objects_1 = require("../utils/objects"); + const strings_1 = require("../utils/strings"); + const jsonLanguageTypes_1 = require("../jsonLanguageTypes"); + const l10n = require("@vscode/l10n"); + const formats = { + 'color-hex': { errorMessage: l10n.t('Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.'), pattern: /^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/ }, + 'date-time': { errorMessage: l10n.t('String is not a RFC3339 date-time.'), pattern: /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i }, + 'date': { errorMessage: l10n.t('String is not a RFC3339 date.'), pattern: /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i }, + 'time': { errorMessage: l10n.t('String is not a RFC3339 time.'), pattern: /^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i }, + 'email': { errorMessage: l10n.t('String is not an e-mail address.'), pattern: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/ }, + 'hostname': { errorMessage: l10n.t('String is not a hostname.'), pattern: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i }, + 'ipv4': { errorMessage: l10n.t('String is not an IPv4 address.'), pattern: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/ }, + 'ipv6': { errorMessage: l10n.t('String is not an IPv6 address.'), pattern: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i }, + }; + class ASTNodeImpl { + constructor(parent, offset, length = 0) { + this.offset = offset; + this.length = length; + this.parent = parent; + } + get children() { + return []; + } + toString() { + return 'type: ' + this.type + ' (' + this.offset + '/' + this.length + ')' + (this.parent ? ' parent: {' + this.parent.toString() + '}' : ''); + } + } + exports.ASTNodeImpl = ASTNodeImpl; + class NullASTNodeImpl extends ASTNodeImpl { + constructor(parent, offset) { + super(parent, offset); + this.type = 'null'; + this.value = null; + } + } + exports.NullASTNodeImpl = NullASTNodeImpl; + class BooleanASTNodeImpl extends ASTNodeImpl { + constructor(parent, boolValue, offset) { + super(parent, offset); + this.type = 'boolean'; + this.value = boolValue; + } + } + exports.BooleanASTNodeImpl = BooleanASTNodeImpl; + class ArrayASTNodeImpl extends ASTNodeImpl { + constructor(parent, offset) { + super(parent, offset); + this.type = 'array'; + this.items = []; + } + get children() { + return this.items; + } + } + exports.ArrayASTNodeImpl = ArrayASTNodeImpl; + class NumberASTNodeImpl extends ASTNodeImpl { + constructor(parent, offset) { + super(parent, offset); + this.type = 'number'; + this.isInteger = true; + this.value = Number.NaN; + } + } + exports.NumberASTNodeImpl = NumberASTNodeImpl; + class StringASTNodeImpl extends ASTNodeImpl { + constructor(parent, offset, length) { + super(parent, offset, length); + this.type = 'string'; + this.value = ''; + } + } + exports.StringASTNodeImpl = StringASTNodeImpl; + class PropertyASTNodeImpl extends ASTNodeImpl { + constructor(parent, offset, keyNode) { + super(parent, offset); + this.type = 'property'; + this.colonOffset = -1; + this.keyNode = keyNode; + } + get children() { + return this.valueNode ? [this.keyNode, this.valueNode] : [this.keyNode]; + } + } + exports.PropertyASTNodeImpl = PropertyASTNodeImpl; + class ObjectASTNodeImpl extends ASTNodeImpl { + constructor(parent, offset) { + super(parent, offset); + this.type = 'object'; + this.properties = []; + } + get children() { + return this.properties; + } + } + exports.ObjectASTNodeImpl = ObjectASTNodeImpl; + function asSchema(schema) { + if ((0, objects_1.isBoolean)(schema)) { + return schema ? {} : { "not": {} }; + } + return schema; + } + exports.asSchema = asSchema; + var EnumMatch; + (function (EnumMatch) { + EnumMatch[EnumMatch["Key"] = 0] = "Key"; + EnumMatch[EnumMatch["Enum"] = 1] = "Enum"; + })(EnumMatch || (exports.EnumMatch = EnumMatch = {})); + const schemaDraftFromId = { + 'http://json-schema.org/draft-03/schema#': jsonLanguageTypes_1.SchemaDraft.v3, + 'http://json-schema.org/draft-04/schema#': jsonLanguageTypes_1.SchemaDraft.v4, + 'http://json-schema.org/draft-06/schema#': jsonLanguageTypes_1.SchemaDraft.v6, + 'http://json-schema.org/draft-07/schema#': jsonLanguageTypes_1.SchemaDraft.v7, + 'https://json-schema.org/draft/2019-09/schema': jsonLanguageTypes_1.SchemaDraft.v2019_09, + 'https://json-schema.org/draft/2020-12/schema': jsonLanguageTypes_1.SchemaDraft.v2020_12 + }; + class EvaluationContext { + constructor(schemaDraft) { + this.schemaDraft = schemaDraft; + } + } + class SchemaCollector { + constructor(focusOffset = -1, exclude) { + this.focusOffset = focusOffset; + this.exclude = exclude; + this.schemas = []; + } + add(schema) { + this.schemas.push(schema); + } + merge(other) { + Array.prototype.push.apply(this.schemas, other.schemas); + } + include(node) { + return (this.focusOffset === -1 || contains(node, this.focusOffset)) && (node !== this.exclude); + } + newSub() { + return new SchemaCollector(-1, this.exclude); + } + } + class NoOpSchemaCollector { + constructor() { } + get schemas() { return []; } + add(_schema) { } + merge(_other) { } + include(_node) { return true; } + newSub() { return this; } + } + NoOpSchemaCollector.instance = new NoOpSchemaCollector(); + class ValidationResult { + constructor() { + this.problems = []; + this.propertiesMatches = 0; + this.processedProperties = new Set(); + this.propertiesValueMatches = 0; + this.primaryValueMatches = 0; + this.enumValueMatch = false; + this.enumValues = undefined; + } + hasProblems() { + return !!this.problems.length; + } + merge(validationResult) { + this.problems = this.problems.concat(validationResult.problems); + this.propertiesMatches += validationResult.propertiesMatches; + this.propertiesValueMatches += validationResult.propertiesValueMatches; + this.mergeProcessedProperties(validationResult); + } + mergeEnumValues(validationResult) { + if (!this.enumValueMatch && !validationResult.enumValueMatch && this.enumValues && validationResult.enumValues) { + this.enumValues = this.enumValues.concat(validationResult.enumValues); + for (const error of this.problems) { + if (error.code === jsonLanguageTypes_1.ErrorCode.EnumValueMismatch) { + error.message = l10n.t('Value is not accepted. Valid values: {0}.', this.enumValues.map(v => JSON.stringify(v)).join(', ')); + } + } + } + } + mergePropertyMatch(propertyValidationResult) { + this.problems = this.problems.concat(propertyValidationResult.problems); + this.propertiesMatches++; + if (propertyValidationResult.enumValueMatch || !propertyValidationResult.hasProblems() && propertyValidationResult.propertiesMatches) { + this.propertiesValueMatches++; + } + if (propertyValidationResult.enumValueMatch && propertyValidationResult.enumValues && propertyValidationResult.enumValues.length === 1) { + this.primaryValueMatches++; + } + } + mergeProcessedProperties(validationResult) { + validationResult.processedProperties.forEach(p => this.processedProperties.add(p)); + } + compare(other) { + const hasProblems = this.hasProblems(); + if (hasProblems !== other.hasProblems()) { + return hasProblems ? -1 : 1; + } + if (this.enumValueMatch !== other.enumValueMatch) { + return other.enumValueMatch ? -1 : 1; + } + if (this.primaryValueMatches !== other.primaryValueMatches) { + return this.primaryValueMatches - other.primaryValueMatches; + } + if (this.propertiesValueMatches !== other.propertiesValueMatches) { + return this.propertiesValueMatches - other.propertiesValueMatches; + } + return this.propertiesMatches - other.propertiesMatches; + } + } + exports.ValidationResult = ValidationResult; + function newJSONDocument(root, diagnostics = []) { + return new JSONDocument(root, diagnostics, []); + } + exports.newJSONDocument = newJSONDocument; + function getNodeValue(node) { + return Json.getNodeValue(node); + } + exports.getNodeValue = getNodeValue; + function getNodePath(node) { + return Json.getNodePath(node); + } + exports.getNodePath = getNodePath; + function contains(node, offset, includeRightBound = false) { + return offset >= node.offset && offset < (node.offset + node.length) || includeRightBound && offset === (node.offset + node.length); + } + exports.contains = contains; + class JSONDocument { + constructor(root, syntaxErrors = [], comments = []) { + this.root = root; + this.syntaxErrors = syntaxErrors; + this.comments = comments; + } + getNodeFromOffset(offset, includeRightBound = false) { + if (this.root) { + return Json.findNodeAtOffset(this.root, offset, includeRightBound); + } + return undefined; + } + visit(visitor) { + if (this.root) { + const doVisit = (node) => { + let ctn = visitor(node); + const children = node.children; + if (Array.isArray(children)) { + for (let i = 0; i < children.length && ctn; i++) { + ctn = doVisit(children[i]); + } + } + return ctn; + }; + doVisit(this.root); + } + } + validate(textDocument, schema, severity = jsonLanguageTypes_1.DiagnosticSeverity.Warning, schemaDraft) { + if (this.root && schema) { + const validationResult = new ValidationResult(); + validate(this.root, schema, validationResult, NoOpSchemaCollector.instance, new EvaluationContext(schemaDraft ?? getSchemaDraft(schema))); + return validationResult.problems.map(p => { + const range = jsonLanguageTypes_1.Range.create(textDocument.positionAt(p.location.offset), textDocument.positionAt(p.location.offset + p.location.length)); + return jsonLanguageTypes_1.Diagnostic.create(range, p.message, p.severity ?? severity, p.code); + }); + } + return undefined; + } + getMatchingSchemas(schema, focusOffset = -1, exclude) { + if (this.root && schema) { + const matchingSchemas = new SchemaCollector(focusOffset, exclude); + const schemaDraft = getSchemaDraft(schema); + const context = new EvaluationContext(schemaDraft); + validate(this.root, schema, new ValidationResult(), matchingSchemas, context); + return matchingSchemas.schemas; + } + return []; + } + } + exports.JSONDocument = JSONDocument; + function getSchemaDraft(schema, fallBack = jsonLanguageTypes_1.SchemaDraft.v2020_12) { + let schemaId = schema.$schema; + if (schemaId) { + return schemaDraftFromId[schemaId] ?? fallBack; + } + return fallBack; + } + function validate(n, schema, validationResult, matchingSchemas, context) { + if (!n || !matchingSchemas.include(n)) { + return; + } + if (n.type === 'property') { + return validate(n.valueNode, schema, validationResult, matchingSchemas, context); + } + const node = n; + _validateNode(); + switch (node.type) { + case 'object': + _validateObjectNode(node); + break; + case 'array': + _validateArrayNode(node); + break; + case 'string': + _validateStringNode(node); + break; + case 'number': + _validateNumberNode(node); + break; + } + matchingSchemas.add({ node: node, schema: schema }); + function _validateNode() { + function matchesType(type) { + return node.type === type || (type === 'integer' && node.type === 'number' && node.isInteger); + } + if (Array.isArray(schema.type)) { + if (!schema.type.some(matchesType)) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.errorMessage || l10n.t('Incorrect type. Expected one of {0}.', schema.type.join(', ')) + }); + } + } + else if (schema.type) { + if (!matchesType(schema.type)) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.errorMessage || l10n.t('Incorrect type. Expected "{0}".', schema.type) + }); + } + } + if (Array.isArray(schema.allOf)) { + for (const subSchemaRef of schema.allOf) { + const subValidationResult = new ValidationResult(); + const subMatchingSchemas = matchingSchemas.newSub(); + validate(node, asSchema(subSchemaRef), subValidationResult, subMatchingSchemas, context); + validationResult.merge(subValidationResult); + matchingSchemas.merge(subMatchingSchemas); + } + } + const notSchema = asSchema(schema.not); + if (notSchema) { + const subValidationResult = new ValidationResult(); + const subMatchingSchemas = matchingSchemas.newSub(); + validate(node, notSchema, subValidationResult, subMatchingSchemas, context); + if (!subValidationResult.hasProblems()) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.errorMessage || l10n.t("Matches a schema that is not allowed.") + }); + } + for (const ms of subMatchingSchemas.schemas) { + ms.inverted = !ms.inverted; + matchingSchemas.add(ms); + } + } + const testAlternatives = (alternatives, maxOneMatch) => { + const matches = []; + // remember the best match that is used for error messages + let bestMatch = undefined; + for (const subSchemaRef of alternatives) { + const subSchema = asSchema(subSchemaRef); + const subValidationResult = new ValidationResult(); + const subMatchingSchemas = matchingSchemas.newSub(); + validate(node, subSchema, subValidationResult, subMatchingSchemas, context); + if (!subValidationResult.hasProblems()) { + matches.push(subSchema); + } + if (!bestMatch) { + bestMatch = { schema: subSchema, validationResult: subValidationResult, matchingSchemas: subMatchingSchemas }; + } + else { + if (!maxOneMatch && !subValidationResult.hasProblems() && !bestMatch.validationResult.hasProblems()) { + // no errors, both are equally good matches + bestMatch.matchingSchemas.merge(subMatchingSchemas); + bestMatch.validationResult.propertiesMatches += subValidationResult.propertiesMatches; + bestMatch.validationResult.propertiesValueMatches += subValidationResult.propertiesValueMatches; + bestMatch.validationResult.mergeProcessedProperties(subValidationResult); + } + else { + const compareResult = subValidationResult.compare(bestMatch.validationResult); + if (compareResult > 0) { + // our node is the best matching so far + bestMatch = { schema: subSchema, validationResult: subValidationResult, matchingSchemas: subMatchingSchemas }; + } + else if (compareResult === 0) { + // there's already a best matching but we are as good + bestMatch.matchingSchemas.merge(subMatchingSchemas); + bestMatch.validationResult.mergeEnumValues(subValidationResult); + } + } + } + } + if (matches.length > 1 && maxOneMatch) { + validationResult.problems.push({ + location: { offset: node.offset, length: 1 }, + message: l10n.t("Matches multiple schemas when only one must validate.") + }); + } + if (bestMatch) { + validationResult.merge(bestMatch.validationResult); + matchingSchemas.merge(bestMatch.matchingSchemas); + } + return matches.length; + }; + if (Array.isArray(schema.anyOf)) { + testAlternatives(schema.anyOf, false); + } + if (Array.isArray(schema.oneOf)) { + testAlternatives(schema.oneOf, true); + } + const testBranch = (schema) => { + const subValidationResult = new ValidationResult(); + const subMatchingSchemas = matchingSchemas.newSub(); + validate(node, asSchema(schema), subValidationResult, subMatchingSchemas, context); + validationResult.merge(subValidationResult); + matchingSchemas.merge(subMatchingSchemas); + }; + const testCondition = (ifSchema, thenSchema, elseSchema) => { + const subSchema = asSchema(ifSchema); + const subValidationResult = new ValidationResult(); + const subMatchingSchemas = matchingSchemas.newSub(); + validate(node, subSchema, subValidationResult, subMatchingSchemas, context); + matchingSchemas.merge(subMatchingSchemas); + validationResult.mergeProcessedProperties(subValidationResult); + if (!subValidationResult.hasProblems()) { + if (thenSchema) { + testBranch(thenSchema); + } + } + else if (elseSchema) { + testBranch(elseSchema); + } + }; + const ifSchema = asSchema(schema.if); + if (ifSchema) { + testCondition(ifSchema, asSchema(schema.then), asSchema(schema.else)); + } + if (Array.isArray(schema.enum)) { + const val = getNodeValue(node); + let enumValueMatch = false; + for (const e of schema.enum) { + if ((0, objects_1.equals)(val, e)) { + enumValueMatch = true; + break; + } + } + validationResult.enumValues = schema.enum; + validationResult.enumValueMatch = enumValueMatch; + if (!enumValueMatch) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + code: jsonLanguageTypes_1.ErrorCode.EnumValueMismatch, + message: schema.errorMessage || l10n.t('Value is not accepted. Valid values: {0}.', schema.enum.map(v => JSON.stringify(v)).join(', ')) + }); + } + } + if ((0, objects_1.isDefined)(schema.const)) { + const val = getNodeValue(node); + if (!(0, objects_1.equals)(val, schema.const)) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + code: jsonLanguageTypes_1.ErrorCode.EnumValueMismatch, + message: schema.errorMessage || l10n.t('Value must be {0}.', JSON.stringify(schema.const)) + }); + validationResult.enumValueMatch = false; + } + else { + validationResult.enumValueMatch = true; + } + validationResult.enumValues = [schema.const]; + } + let deprecationMessage = schema.deprecationMessage; + if (deprecationMessage || schema.deprecated) { + deprecationMessage = deprecationMessage || l10n.t('Value is deprecated'); + let targetNode = node.parent?.type === 'property' ? node.parent : node; + validationResult.problems.push({ + location: { offset: targetNode.offset, length: targetNode.length }, + severity: jsonLanguageTypes_1.DiagnosticSeverity.Warning, + message: deprecationMessage, + code: jsonLanguageTypes_1.ErrorCode.Deprecated + }); + } + } + function _validateNumberNode(node) { + const val = node.value; + function normalizeFloats(float) { + const parts = /^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(float.toString()); + return parts && { + value: Number(parts[1] + (parts[2] || '')), + multiplier: (parts[2]?.length || 0) - (parseInt(parts[3]) || 0) + }; + } + ; + if ((0, objects_1.isNumber)(schema.multipleOf)) { + let remainder = -1; + if (Number.isInteger(schema.multipleOf)) { + remainder = val % schema.multipleOf; + } + else { + let normMultipleOf = normalizeFloats(schema.multipleOf); + let normValue = normalizeFloats(val); + if (normMultipleOf && normValue) { + const multiplier = 10 ** Math.abs(normValue.multiplier - normMultipleOf.multiplier); + if (normValue.multiplier < normMultipleOf.multiplier) { + normValue.value *= multiplier; + } + else { + normMultipleOf.value *= multiplier; + } + remainder = normValue.value % normMultipleOf.value; + } + } + if (remainder !== 0) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Value is not divisible by {0}.', schema.multipleOf) + }); + } + } + function getExclusiveLimit(limit, exclusive) { + if ((0, objects_1.isNumber)(exclusive)) { + return exclusive; + } + if ((0, objects_1.isBoolean)(exclusive) && exclusive) { + return limit; + } + return undefined; + } + function getLimit(limit, exclusive) { + if (!(0, objects_1.isBoolean)(exclusive) || !exclusive) { + return limit; + } + return undefined; + } + const exclusiveMinimum = getExclusiveLimit(schema.minimum, schema.exclusiveMinimum); + if ((0, objects_1.isNumber)(exclusiveMinimum) && val <= exclusiveMinimum) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Value is below the exclusive minimum of {0}.', exclusiveMinimum) + }); + } + const exclusiveMaximum = getExclusiveLimit(schema.maximum, schema.exclusiveMaximum); + if ((0, objects_1.isNumber)(exclusiveMaximum) && val >= exclusiveMaximum) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Value is above the exclusive maximum of {0}.', exclusiveMaximum) + }); + } + const minimum = getLimit(schema.minimum, schema.exclusiveMinimum); + if ((0, objects_1.isNumber)(minimum) && val < minimum) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Value is below the minimum of {0}.', minimum) + }); + } + const maximum = getLimit(schema.maximum, schema.exclusiveMaximum); + if ((0, objects_1.isNumber)(maximum) && val > maximum) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Value is above the maximum of {0}.', maximum) + }); + } + } + function _validateStringNode(node) { + if ((0, objects_1.isNumber)(schema.minLength) && (0, strings_1.stringLength)(node.value) < schema.minLength) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('String is shorter than the minimum length of {0}.', schema.minLength) + }); + } + if ((0, objects_1.isNumber)(schema.maxLength) && (0, strings_1.stringLength)(node.value) > schema.maxLength) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('String is longer than the maximum length of {0}.', schema.maxLength) + }); + } + if ((0, objects_1.isString)(schema.pattern)) { + const regex = (0, strings_1.extendedRegExp)(schema.pattern); + if (!(regex?.test(node.value))) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.patternErrorMessage || schema.errorMessage || l10n.t('String does not match the pattern of "{0}".', schema.pattern) + }); + } + } + if (schema.format) { + switch (schema.format) { + case 'uri': + case 'uri-reference': + { + let errorMessage; + if (!node.value) { + errorMessage = l10n.t('URI expected.'); + } + else { + const match = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(node.value); + if (!match) { + errorMessage = l10n.t('URI is expected.'); + } + else if (!match[2] && schema.format === 'uri') { + errorMessage = l10n.t('URI with a scheme is expected.'); + } + } + if (errorMessage) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.patternErrorMessage || schema.errorMessage || l10n.t('String is not a URI: {0}', errorMessage) + }); + } + } + break; + case 'color-hex': + case 'date-time': + case 'date': + case 'time': + case 'email': + case 'hostname': + case 'ipv4': + case 'ipv6': + const format = formats[schema.format]; + if (!node.value || !format.pattern.exec(node.value)) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.patternErrorMessage || schema.errorMessage || format.errorMessage + }); + } + default: + } + } + } + function _validateArrayNode(node) { + let prefixItemsSchemas; + let additionalItemSchema; + if (context.schemaDraft >= jsonLanguageTypes_1.SchemaDraft.v2020_12) { + prefixItemsSchemas = schema.prefixItems; + additionalItemSchema = !Array.isArray(schema.items) ? schema.items : undefined; + } + else { + prefixItemsSchemas = Array.isArray(schema.items) ? schema.items : undefined; + additionalItemSchema = !Array.isArray(schema.items) ? schema.items : schema.additionalItems; + } + let index = 0; + if (prefixItemsSchemas !== undefined) { + const max = Math.min(prefixItemsSchemas.length, node.items.length); + for (; index < max; index++) { + const subSchemaRef = prefixItemsSchemas[index]; + const subSchema = asSchema(subSchemaRef); + const itemValidationResult = new ValidationResult(); + const item = node.items[index]; + if (item) { + validate(item, subSchema, itemValidationResult, matchingSchemas, context); + validationResult.mergePropertyMatch(itemValidationResult); + } + validationResult.processedProperties.add(String(index)); + } + } + if (additionalItemSchema !== undefined && index < node.items.length) { + if (typeof additionalItemSchema === 'boolean') { + if (additionalItemSchema === false) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Array has too many items according to schema. Expected {0} or fewer.', index) + }); + } + for (; index < node.items.length; index++) { + validationResult.processedProperties.add(String(index)); + validationResult.propertiesValueMatches++; + } + } + else { + for (; index < node.items.length; index++) { + const itemValidationResult = new ValidationResult(); + validate(node.items[index], additionalItemSchema, itemValidationResult, matchingSchemas, context); + validationResult.mergePropertyMatch(itemValidationResult); + validationResult.processedProperties.add(String(index)); + } + } + } + const containsSchema = asSchema(schema.contains); + if (containsSchema) { + let containsCount = 0; + for (let index = 0; index < node.items.length; index++) { + const item = node.items[index]; + const itemValidationResult = new ValidationResult(); + validate(item, containsSchema, itemValidationResult, NoOpSchemaCollector.instance, context); + if (!itemValidationResult.hasProblems()) { + containsCount++; + if (context.schemaDraft >= jsonLanguageTypes_1.SchemaDraft.v2020_12) { + validationResult.processedProperties.add(String(index)); + } + } + } + if (containsCount === 0 && !(0, objects_1.isNumber)(schema.minContains)) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.errorMessage || l10n.t('Array does not contain required item.') + }); + } + if ((0, objects_1.isNumber)(schema.minContains) && containsCount < schema.minContains) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.errorMessage || l10n.t('Array has too few items that match the contains contraint. Expected {0} or more.', schema.minContains) + }); + } + if ((0, objects_1.isNumber)(schema.maxContains) && containsCount > schema.maxContains) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: schema.errorMessage || l10n.t('Array has too many items that match the contains contraint. Expected {0} or less.', schema.maxContains) + }); + } + } + const unevaluatedItems = schema.unevaluatedItems; + if (unevaluatedItems !== undefined) { + for (let i = 0; i < node.items.length; i++) { + if (!validationResult.processedProperties.has(String(i))) { + if (unevaluatedItems === false) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Item does not match any validation rule from the array.') + }); + } + else { + const itemValidationResult = new ValidationResult(); + validate(node.items[i], schema.unevaluatedItems, itemValidationResult, matchingSchemas, context); + validationResult.mergePropertyMatch(itemValidationResult); + } + } + validationResult.processedProperties.add(String(i)); + validationResult.propertiesValueMatches++; + } + } + if ((0, objects_1.isNumber)(schema.minItems) && node.items.length < schema.minItems) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Array has too few items. Expected {0} or more.', schema.minItems) + }); + } + if ((0, objects_1.isNumber)(schema.maxItems) && node.items.length > schema.maxItems) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Array has too many items. Expected {0} or fewer.', schema.maxItems) + }); + } + if (schema.uniqueItems === true) { + const values = getNodeValue(node); + function hasDuplicates() { + for (let i = 0; i < values.length - 1; i++) { + const value = values[i]; + for (let j = i + 1; j < values.length; j++) { + if ((0, objects_1.equals)(value, values[j])) { + return true; + } + } + } + return false; + } + if (hasDuplicates()) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Array has duplicate items.') + }); + } + } + } + function _validateObjectNode(node) { + const seenKeys = Object.create(null); + const unprocessedProperties = new Set(); + for (const propertyNode of node.properties) { + const key = propertyNode.keyNode.value; + seenKeys[key] = propertyNode.valueNode; + unprocessedProperties.add(key); + } + if (Array.isArray(schema.required)) { + for (const propertyName of schema.required) { + if (!seenKeys[propertyName]) { + const keyNode = node.parent && node.parent.type === 'property' && node.parent.keyNode; + const location = keyNode ? { offset: keyNode.offset, length: keyNode.length } : { offset: node.offset, length: 1 }; + validationResult.problems.push({ + location: location, + message: l10n.t('Missing property "{0}".', propertyName) + }); + } + } + } + const propertyProcessed = (prop) => { + unprocessedProperties.delete(prop); + validationResult.processedProperties.add(prop); + }; + if (schema.properties) { + for (const propertyName of Object.keys(schema.properties)) { + propertyProcessed(propertyName); + const propertySchema = schema.properties[propertyName]; + const child = seenKeys[propertyName]; + if (child) { + if ((0, objects_1.isBoolean)(propertySchema)) { + if (!propertySchema) { + const propertyNode = child.parent; + validationResult.problems.push({ + location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length }, + message: schema.errorMessage || l10n.t('Property {0} is not allowed.', propertyName) + }); + } + else { + validationResult.propertiesMatches++; + validationResult.propertiesValueMatches++; + } + } + else { + const propertyValidationResult = new ValidationResult(); + validate(child, propertySchema, propertyValidationResult, matchingSchemas, context); + validationResult.mergePropertyMatch(propertyValidationResult); + } + } + } + } + if (schema.patternProperties) { + for (const propertyPattern of Object.keys(schema.patternProperties)) { + const regex = (0, strings_1.extendedRegExp)(propertyPattern); + if (regex) { + const processed = []; + for (const propertyName of unprocessedProperties) { + if (regex.test(propertyName)) { + processed.push(propertyName); + const child = seenKeys[propertyName]; + if (child) { + const propertySchema = schema.patternProperties[propertyPattern]; + if ((0, objects_1.isBoolean)(propertySchema)) { + if (!propertySchema) { + const propertyNode = child.parent; + validationResult.problems.push({ + location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length }, + message: schema.errorMessage || l10n.t('Property {0} is not allowed.', propertyName) + }); + } + else { + validationResult.propertiesMatches++; + validationResult.propertiesValueMatches++; + } + } + else { + const propertyValidationResult = new ValidationResult(); + validate(child, propertySchema, propertyValidationResult, matchingSchemas, context); + validationResult.mergePropertyMatch(propertyValidationResult); + } + } + } + } + processed.forEach(propertyProcessed); + } + } + } + const additionalProperties = schema.additionalProperties; + if (additionalProperties !== undefined) { + for (const propertyName of unprocessedProperties) { + propertyProcessed(propertyName); + const child = seenKeys[propertyName]; + if (child) { + if (additionalProperties === false) { + const propertyNode = child.parent; + validationResult.problems.push({ + location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length }, + message: schema.errorMessage || l10n.t('Property {0} is not allowed.', propertyName) + }); + } + else if (additionalProperties !== true) { + const propertyValidationResult = new ValidationResult(); + validate(child, additionalProperties, propertyValidationResult, matchingSchemas, context); + validationResult.mergePropertyMatch(propertyValidationResult); + } + } + } + } + const unevaluatedProperties = schema.unevaluatedProperties; + if (unevaluatedProperties !== undefined) { + const processed = []; + for (const propertyName of unprocessedProperties) { + if (!validationResult.processedProperties.has(propertyName)) { + processed.push(propertyName); + const child = seenKeys[propertyName]; + if (child) { + if (unevaluatedProperties === false) { + const propertyNode = child.parent; + validationResult.problems.push({ + location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length }, + message: schema.errorMessage || l10n.t('Property {0} is not allowed.', propertyName) + }); + } + else if (unevaluatedProperties !== true) { + const propertyValidationResult = new ValidationResult(); + validate(child, unevaluatedProperties, propertyValidationResult, matchingSchemas, context); + validationResult.mergePropertyMatch(propertyValidationResult); + } + } + } + } + processed.forEach(propertyProcessed); + } + if ((0, objects_1.isNumber)(schema.maxProperties)) { + if (node.properties.length > schema.maxProperties) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Object has more properties than limit of {0}.', schema.maxProperties) + }); + } + } + if ((0, objects_1.isNumber)(schema.minProperties)) { + if (node.properties.length < schema.minProperties) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Object has fewer properties than the required number of {0}', schema.minProperties) + }); + } + } + if (schema.dependentRequired) { + for (const key in schema.dependentRequired) { + const prop = seenKeys[key]; + const propertyDeps = schema.dependentRequired[key]; + if (prop && Array.isArray(propertyDeps)) { + _validatePropertyDependencies(key, propertyDeps); + } + } + } + if (schema.dependentSchemas) { + for (const key in schema.dependentSchemas) { + const prop = seenKeys[key]; + const propertyDeps = schema.dependentSchemas[key]; + if (prop && (0, objects_1.isObject)(propertyDeps)) { + _validatePropertyDependencies(key, propertyDeps); + } + } + } + if (schema.dependencies) { + for (const key in schema.dependencies) { + const prop = seenKeys[key]; + if (prop) { + _validatePropertyDependencies(key, schema.dependencies[key]); + } + } + } + const propertyNames = asSchema(schema.propertyNames); + if (propertyNames) { + for (const f of node.properties) { + const key = f.keyNode; + if (key) { + validate(key, propertyNames, validationResult, NoOpSchemaCollector.instance, context); + } + } + } + function _validatePropertyDependencies(key, propertyDep) { + if (Array.isArray(propertyDep)) { + for (const requiredProp of propertyDep) { + if (!seenKeys[requiredProp]) { + validationResult.problems.push({ + location: { offset: node.offset, length: node.length }, + message: l10n.t('Object is missing property {0} required by property {1}.', requiredProp, key) + }); + } + else { + validationResult.propertiesValueMatches++; + } + } + } + else { + const propertySchema = asSchema(propertyDep); + if (propertySchema) { + const propertyValidationResult = new ValidationResult(); + validate(node, propertySchema, propertyValidationResult, matchingSchemas, context); + validationResult.mergePropertyMatch(propertyValidationResult); + } + } + } + } + } + function parse(textDocument, config) { + const problems = []; + let lastProblemOffset = -1; + const text = textDocument.getText(); + const scanner = Json.createScanner(text, false); + const commentRanges = config && config.collectComments ? [] : undefined; + function _scanNext() { + while (true) { + const token = scanner.scan(); + _checkScanError(); + switch (token) { + case 12 /* Json.SyntaxKind.LineCommentTrivia */: + case 13 /* Json.SyntaxKind.BlockCommentTrivia */: + if (Array.isArray(commentRanges)) { + commentRanges.push(jsonLanguageTypes_1.Range.create(textDocument.positionAt(scanner.getTokenOffset()), textDocument.positionAt(scanner.getTokenOffset() + scanner.getTokenLength()))); + } + break; + case 15 /* Json.SyntaxKind.Trivia */: + case 14 /* Json.SyntaxKind.LineBreakTrivia */: + break; + default: + return token; + } + } + } + function _accept(token) { + if (scanner.getToken() === token) { + _scanNext(); + return true; + } + return false; + } + function _errorAtRange(message, code, startOffset, endOffset, severity = jsonLanguageTypes_1.DiagnosticSeverity.Error) { + if (problems.length === 0 || startOffset !== lastProblemOffset) { + const range = jsonLanguageTypes_1.Range.create(textDocument.positionAt(startOffset), textDocument.positionAt(endOffset)); + problems.push(jsonLanguageTypes_1.Diagnostic.create(range, message, severity, code, textDocument.languageId)); + lastProblemOffset = startOffset; + } + } + function _error(message, code, node = undefined, skipUntilAfter = [], skipUntil = []) { + let start = scanner.getTokenOffset(); + let end = scanner.getTokenOffset() + scanner.getTokenLength(); + if (start === end && start > 0) { + start--; + while (start > 0 && /\s/.test(text.charAt(start))) { + start--; + } + end = start + 1; + } + _errorAtRange(message, code, start, end); + if (node) { + _finalize(node, false); + } + if (skipUntilAfter.length + skipUntil.length > 0) { + let token = scanner.getToken(); + while (token !== 17 /* Json.SyntaxKind.EOF */) { + if (skipUntilAfter.indexOf(token) !== -1) { + _scanNext(); + break; + } + else if (skipUntil.indexOf(token) !== -1) { + break; + } + token = _scanNext(); + } + } + return node; + } + function _checkScanError() { + switch (scanner.getTokenError()) { + case 4 /* Json.ScanError.InvalidUnicode */: + _error(l10n.t('Invalid unicode sequence in string.'), jsonLanguageTypes_1.ErrorCode.InvalidUnicode); + return true; + case 5 /* Json.ScanError.InvalidEscapeCharacter */: + _error(l10n.t('Invalid escape character in string.'), jsonLanguageTypes_1.ErrorCode.InvalidEscapeCharacter); + return true; + case 3 /* Json.ScanError.UnexpectedEndOfNumber */: + _error(l10n.t('Unexpected end of number.'), jsonLanguageTypes_1.ErrorCode.UnexpectedEndOfNumber); + return true; + case 1 /* Json.ScanError.UnexpectedEndOfComment */: + _error(l10n.t('Unexpected end of comment.'), jsonLanguageTypes_1.ErrorCode.UnexpectedEndOfComment); + return true; + case 2 /* Json.ScanError.UnexpectedEndOfString */: + _error(l10n.t('Unexpected end of string.'), jsonLanguageTypes_1.ErrorCode.UnexpectedEndOfString); + return true; + case 6 /* Json.ScanError.InvalidCharacter */: + _error(l10n.t('Invalid characters in string. Control characters must be escaped.'), jsonLanguageTypes_1.ErrorCode.InvalidCharacter); + return true; + } + return false; + } + function _finalize(node, scanNext) { + node.length = scanner.getTokenOffset() + scanner.getTokenLength() - node.offset; + if (scanNext) { + _scanNext(); + } + return node; + } + function _parseArray(parent) { + if (scanner.getToken() !== 3 /* Json.SyntaxKind.OpenBracketToken */) { + return undefined; + } + const node = new ArrayASTNodeImpl(parent, scanner.getTokenOffset()); + _scanNext(); // consume OpenBracketToken + const count = 0; + let needsComma = false; + while (scanner.getToken() !== 4 /* Json.SyntaxKind.CloseBracketToken */ && scanner.getToken() !== 17 /* Json.SyntaxKind.EOF */) { + if (scanner.getToken() === 5 /* Json.SyntaxKind.CommaToken */) { + if (!needsComma) { + _error(l10n.t('Value expected'), jsonLanguageTypes_1.ErrorCode.ValueExpected); + } + const commaOffset = scanner.getTokenOffset(); + _scanNext(); // consume comma + if (scanner.getToken() === 4 /* Json.SyntaxKind.CloseBracketToken */) { + if (needsComma) { + _errorAtRange(l10n.t('Trailing comma'), jsonLanguageTypes_1.ErrorCode.TrailingComma, commaOffset, commaOffset + 1); + } + continue; + } + } + else if (needsComma) { + _error(l10n.t('Expected comma'), jsonLanguageTypes_1.ErrorCode.CommaExpected); + } + const item = _parseValue(node); + if (!item) { + _error(l10n.t('Value expected'), jsonLanguageTypes_1.ErrorCode.ValueExpected, undefined, [], [4 /* Json.SyntaxKind.CloseBracketToken */, 5 /* Json.SyntaxKind.CommaToken */]); + } + else { + node.items.push(item); + } + needsComma = true; + } + if (scanner.getToken() !== 4 /* Json.SyntaxKind.CloseBracketToken */) { + return _error(l10n.t('Expected comma or closing bracket'), jsonLanguageTypes_1.ErrorCode.CommaOrCloseBacketExpected, node); + } + return _finalize(node, true); + } + const keyPlaceholder = new StringASTNodeImpl(undefined, 0, 0); + function _parseProperty(parent, keysSeen) { + const node = new PropertyASTNodeImpl(parent, scanner.getTokenOffset(), keyPlaceholder); + let key = _parseString(node); + if (!key) { + if (scanner.getToken() === 16 /* Json.SyntaxKind.Unknown */) { + // give a more helpful error message + _error(l10n.t('Property keys must be doublequoted'), jsonLanguageTypes_1.ErrorCode.PropertyKeysMustBeDoublequoted); + const keyNode = new StringASTNodeImpl(node, scanner.getTokenOffset(), scanner.getTokenLength()); + keyNode.value = scanner.getTokenValue(); + key = keyNode; + _scanNext(); // consume Unknown + } + else { + return undefined; + } + } + node.keyNode = key; + // For JSON files that forbid code comments, there is a convention to use the key name "//" to add comments. + // Multiple instances of "//" are okay. + if (key.value !== "//") { + const seen = keysSeen[key.value]; + if (seen) { + _errorAtRange(l10n.t("Duplicate object key"), jsonLanguageTypes_1.ErrorCode.DuplicateKey, node.keyNode.offset, node.keyNode.offset + node.keyNode.length, jsonLanguageTypes_1.DiagnosticSeverity.Warning); + if ((0, objects_1.isObject)(seen)) { + _errorAtRange(l10n.t("Duplicate object key"), jsonLanguageTypes_1.ErrorCode.DuplicateKey, seen.keyNode.offset, seen.keyNode.offset + seen.keyNode.length, jsonLanguageTypes_1.DiagnosticSeverity.Warning); + } + keysSeen[key.value] = true; // if the same key is duplicate again, avoid duplicate error reporting + } + else { + keysSeen[key.value] = node; + } + } + if (scanner.getToken() === 6 /* Json.SyntaxKind.ColonToken */) { + node.colonOffset = scanner.getTokenOffset(); + _scanNext(); // consume ColonToken + } + else { + _error(l10n.t('Colon expected'), jsonLanguageTypes_1.ErrorCode.ColonExpected); + if (scanner.getToken() === 10 /* Json.SyntaxKind.StringLiteral */ && textDocument.positionAt(key.offset + key.length).line < textDocument.positionAt(scanner.getTokenOffset()).line) { + node.length = key.length; + return node; + } + } + const value = _parseValue(node); + if (!value) { + return _error(l10n.t('Value expected'), jsonLanguageTypes_1.ErrorCode.ValueExpected, node, [], [2 /* Json.SyntaxKind.CloseBraceToken */, 5 /* Json.SyntaxKind.CommaToken */]); + } + node.valueNode = value; + node.length = value.offset + value.length - node.offset; + return node; + } + function _parseObject(parent) { + if (scanner.getToken() !== 1 /* Json.SyntaxKind.OpenBraceToken */) { + return undefined; + } + const node = new ObjectASTNodeImpl(parent, scanner.getTokenOffset()); + const keysSeen = Object.create(null); + _scanNext(); // consume OpenBraceToken + let needsComma = false; + while (scanner.getToken() !== 2 /* Json.SyntaxKind.CloseBraceToken */ && scanner.getToken() !== 17 /* Json.SyntaxKind.EOF */) { + if (scanner.getToken() === 5 /* Json.SyntaxKind.CommaToken */) { + if (!needsComma) { + _error(l10n.t('Property expected'), jsonLanguageTypes_1.ErrorCode.PropertyExpected); + } + const commaOffset = scanner.getTokenOffset(); + _scanNext(); // consume comma + if (scanner.getToken() === 2 /* Json.SyntaxKind.CloseBraceToken */) { + if (needsComma) { + _errorAtRange(l10n.t('Trailing comma'), jsonLanguageTypes_1.ErrorCode.TrailingComma, commaOffset, commaOffset + 1); + } + continue; + } + } + else if (needsComma) { + _error(l10n.t('Expected comma'), jsonLanguageTypes_1.ErrorCode.CommaExpected); + } + const property = _parseProperty(node, keysSeen); + if (!property) { + _error(l10n.t('Property expected'), jsonLanguageTypes_1.ErrorCode.PropertyExpected, undefined, [], [2 /* Json.SyntaxKind.CloseBraceToken */, 5 /* Json.SyntaxKind.CommaToken */]); + } + else { + node.properties.push(property); + } + needsComma = true; + } + if (scanner.getToken() !== 2 /* Json.SyntaxKind.CloseBraceToken */) { + return _error(l10n.t('Expected comma or closing brace'), jsonLanguageTypes_1.ErrorCode.CommaOrCloseBraceExpected, node); + } + return _finalize(node, true); + } + function _parseString(parent) { + if (scanner.getToken() !== 10 /* Json.SyntaxKind.StringLiteral */) { + return undefined; + } + const node = new StringASTNodeImpl(parent, scanner.getTokenOffset()); + node.value = scanner.getTokenValue(); + return _finalize(node, true); + } + function _parseNumber(parent) { + if (scanner.getToken() !== 11 /* Json.SyntaxKind.NumericLiteral */) { + return undefined; + } + const node = new NumberASTNodeImpl(parent, scanner.getTokenOffset()); + if (scanner.getTokenError() === 0 /* Json.ScanError.None */) { + const tokenValue = scanner.getTokenValue(); + try { + const numberValue = JSON.parse(tokenValue); + if (!(0, objects_1.isNumber)(numberValue)) { + return _error(l10n.t('Invalid number format.'), jsonLanguageTypes_1.ErrorCode.Undefined, node); + } + node.value = numberValue; + } + catch (e) { + return _error(l10n.t('Invalid number format.'), jsonLanguageTypes_1.ErrorCode.Undefined, node); + } + node.isInteger = tokenValue.indexOf('.') === -1; + } + return _finalize(node, true); + } + function _parseLiteral(parent) { + let node; + switch (scanner.getToken()) { + case 7 /* Json.SyntaxKind.NullKeyword */: + return _finalize(new NullASTNodeImpl(parent, scanner.getTokenOffset()), true); + case 8 /* Json.SyntaxKind.TrueKeyword */: + return _finalize(new BooleanASTNodeImpl(parent, true, scanner.getTokenOffset()), true); + case 9 /* Json.SyntaxKind.FalseKeyword */: + return _finalize(new BooleanASTNodeImpl(parent, false, scanner.getTokenOffset()), true); + default: + return undefined; + } + } + function _parseValue(parent) { + return _parseArray(parent) || _parseObject(parent) || _parseString(parent) || _parseNumber(parent) || _parseLiteral(parent); + } + let _root = undefined; + const token = _scanNext(); + if (token !== 17 /* Json.SyntaxKind.EOF */) { + _root = _parseValue(_root); + if (!_root) { + _error(l10n.t('Expected a JSON object, array or literal.'), jsonLanguageTypes_1.ErrorCode.Undefined); + } + else if (scanner.getToken() !== 17 /* Json.SyntaxKind.EOF */) { + _error(l10n.t('End of file expected.'), jsonLanguageTypes_1.ErrorCode.Undefined); + } + } + return new JSONDocument(_root, problems, commentRanges); + } + exports.parse = parse; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/configuration.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/configuration.js" index e0bc031c126498d4eb06bec2964e343e9fddcd53..2ea49cba96d111151b94afbafa13c8946478131f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/configuration.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/configuration.js" @@ -1,3 +1,533 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:53b48e7fd55edba99904575f0eabe97ee71649b2c4954686437a4043109427c4 -size 23736 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "@vscode/l10n"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.schemaContributions = void 0; + const l10n = require("@vscode/l10n"); + exports.schemaContributions = { + schemaAssociations: [], + schemas: { + // bundle the schema-schema to include (localized) descriptions + 'http://json-schema.org/draft-04/schema#': { + '$schema': 'http://json-schema.org/draft-04/schema#', + 'definitions': { + 'schemaArray': { + 'type': 'array', + 'minItems': 1, + 'items': { + '$ref': '#' + } + }, + 'positiveInteger': { + 'type': 'integer', + 'minimum': 0 + }, + 'positiveIntegerDefault0': { + 'allOf': [ + { + '$ref': '#/definitions/positiveInteger' + }, + { + 'default': 0 + } + ] + }, + 'simpleTypes': { + 'type': 'string', + 'enum': [ + 'array', + 'boolean', + 'integer', + 'null', + 'number', + 'object', + 'string' + ] + }, + 'stringArray': { + 'type': 'array', + 'items': { + 'type': 'string' + }, + 'minItems': 1, + 'uniqueItems': true + } + }, + 'type': 'object', + 'properties': { + 'id': { + 'type': 'string', + 'format': 'uri' + }, + '$schema': { + 'type': 'string', + 'format': 'uri' + }, + 'title': { + 'type': 'string' + }, + 'description': { + 'type': 'string' + }, + 'default': {}, + 'multipleOf': { + 'type': 'number', + 'minimum': 0, + 'exclusiveMinimum': true + }, + 'maximum': { + 'type': 'number' + }, + 'exclusiveMaximum': { + 'type': 'boolean', + 'default': false + }, + 'minimum': { + 'type': 'number' + }, + 'exclusiveMinimum': { + 'type': 'boolean', + 'default': false + }, + 'maxLength': { + 'allOf': [ + { + '$ref': '#/definitions/positiveInteger' + } + ] + }, + 'minLength': { + 'allOf': [ + { + '$ref': '#/definitions/positiveIntegerDefault0' + } + ] + }, + 'pattern': { + 'type': 'string', + 'format': 'regex' + }, + 'additionalItems': { + 'anyOf': [ + { + 'type': 'boolean' + }, + { + '$ref': '#' + } + ], + 'default': {} + }, + 'items': { + 'anyOf': [ + { + '$ref': '#' + }, + { + '$ref': '#/definitions/schemaArray' + } + ], + 'default': {} + }, + 'maxItems': { + 'allOf': [ + { + '$ref': '#/definitions/positiveInteger' + } + ] + }, + 'minItems': { + 'allOf': [ + { + '$ref': '#/definitions/positiveIntegerDefault0' + } + ] + }, + 'uniqueItems': { + 'type': 'boolean', + 'default': false + }, + 'maxProperties': { + 'allOf': [ + { + '$ref': '#/definitions/positiveInteger' + } + ] + }, + 'minProperties': { + 'allOf': [ + { + '$ref': '#/definitions/positiveIntegerDefault0' + } + ] + }, + 'required': { + 'allOf': [ + { + '$ref': '#/definitions/stringArray' + } + ] + }, + 'additionalProperties': { + 'anyOf': [ + { + 'type': 'boolean' + }, + { + '$ref': '#' + } + ], + 'default': {} + }, + 'definitions': { + 'type': 'object', + 'additionalProperties': { + '$ref': '#' + }, + 'default': {} + }, + 'properties': { + 'type': 'object', + 'additionalProperties': { + '$ref': '#' + }, + 'default': {} + }, + 'patternProperties': { + 'type': 'object', + 'additionalProperties': { + '$ref': '#' + }, + 'default': {} + }, + 'dependencies': { + 'type': 'object', + 'additionalProperties': { + 'anyOf': [ + { + '$ref': '#' + }, + { + '$ref': '#/definitions/stringArray' + } + ] + } + }, + 'enum': { + 'type': 'array', + 'minItems': 1, + 'uniqueItems': true + }, + 'type': { + 'anyOf': [ + { + '$ref': '#/definitions/simpleTypes' + }, + { + 'type': 'array', + 'items': { + '$ref': '#/definitions/simpleTypes' + }, + 'minItems': 1, + 'uniqueItems': true + } + ] + }, + 'format': { + 'anyOf': [ + { + 'type': 'string', + 'enum': [ + 'date-time', + 'uri', + 'email', + 'hostname', + 'ipv4', + 'ipv6', + 'regex' + ] + }, + { + 'type': 'string' + } + ] + }, + 'allOf': { + 'allOf': [ + { + '$ref': '#/definitions/schemaArray' + } + ] + }, + 'anyOf': { + 'allOf': [ + { + '$ref': '#/definitions/schemaArray' + } + ] + }, + 'oneOf': { + 'allOf': [ + { + '$ref': '#/definitions/schemaArray' + } + ] + }, + 'not': { + 'allOf': [ + { + '$ref': '#' + } + ] + } + }, + 'dependencies': { + 'exclusiveMaximum': [ + 'maximum' + ], + 'exclusiveMinimum': [ + 'minimum' + ] + }, + 'default': {} + }, + 'http://json-schema.org/draft-07/schema#': { + 'definitions': { + 'schemaArray': { + 'type': 'array', + 'minItems': 1, + 'items': { '$ref': '#' } + }, + 'nonNegativeInteger': { + 'type': 'integer', + 'minimum': 0 + }, + 'nonNegativeIntegerDefault0': { + 'allOf': [ + { '$ref': '#/definitions/nonNegativeInteger' }, + { 'default': 0 } + ] + }, + 'simpleTypes': { + 'enum': [ + 'array', + 'boolean', + 'integer', + 'null', + 'number', + 'object', + 'string' + ] + }, + 'stringArray': { + 'type': 'array', + 'items': { 'type': 'string' }, + 'uniqueItems': true, + 'default': [] + } + }, + 'type': ['object', 'boolean'], + 'properties': { + '$id': { + 'type': 'string', + 'format': 'uri-reference' + }, + '$schema': { + 'type': 'string', + 'format': 'uri' + }, + '$ref': { + 'type': 'string', + 'format': 'uri-reference' + }, + '$comment': { + 'type': 'string' + }, + 'title': { + 'type': 'string' + }, + 'description': { + 'type': 'string' + }, + 'default': true, + 'readOnly': { + 'type': 'boolean', + 'default': false + }, + 'examples': { + 'type': 'array', + 'items': true + }, + 'multipleOf': { + 'type': 'number', + 'exclusiveMinimum': 0 + }, + 'maximum': { + 'type': 'number' + }, + 'exclusiveMaximum': { + 'type': 'number' + }, + 'minimum': { + 'type': 'number' + }, + 'exclusiveMinimum': { + 'type': 'number' + }, + 'maxLength': { '$ref': '#/definitions/nonNegativeInteger' }, + 'minLength': { '$ref': '#/definitions/nonNegativeIntegerDefault0' }, + 'pattern': { + 'type': 'string', + 'format': 'regex' + }, + 'additionalItems': { '$ref': '#' }, + 'items': { + 'anyOf': [ + { '$ref': '#' }, + { '$ref': '#/definitions/schemaArray' } + ], + 'default': true + }, + 'maxItems': { '$ref': '#/definitions/nonNegativeInteger' }, + 'minItems': { '$ref': '#/definitions/nonNegativeIntegerDefault0' }, + 'uniqueItems': { + 'type': 'boolean', + 'default': false + }, + 'contains': { '$ref': '#' }, + 'maxProperties': { '$ref': '#/definitions/nonNegativeInteger' }, + 'minProperties': { '$ref': '#/definitions/nonNegativeIntegerDefault0' }, + 'required': { '$ref': '#/definitions/stringArray' }, + 'additionalProperties': { '$ref': '#' }, + 'definitions': { + 'type': 'object', + 'additionalProperties': { '$ref': '#' }, + 'default': {} + }, + 'properties': { + 'type': 'object', + 'additionalProperties': { '$ref': '#' }, + 'default': {} + }, + 'patternProperties': { + 'type': 'object', + 'additionalProperties': { '$ref': '#' }, + 'propertyNames': { 'format': 'regex' }, + 'default': {} + }, + 'dependencies': { + 'type': 'object', + 'additionalProperties': { + 'anyOf': [ + { '$ref': '#' }, + { '$ref': '#/definitions/stringArray' } + ] + } + }, + 'propertyNames': { '$ref': '#' }, + 'const': true, + 'enum': { + 'type': 'array', + 'items': true, + 'minItems': 1, + 'uniqueItems': true + }, + 'type': { + 'anyOf': [ + { '$ref': '#/definitions/simpleTypes' }, + { + 'type': 'array', + 'items': { '$ref': '#/definitions/simpleTypes' }, + 'minItems': 1, + 'uniqueItems': true + } + ] + }, + 'format': { 'type': 'string' }, + 'contentMediaType': { 'type': 'string' }, + 'contentEncoding': { 'type': 'string' }, + 'if': { '$ref': '#' }, + 'then': { '$ref': '#' }, + 'else': { '$ref': '#' }, + 'allOf': { '$ref': '#/definitions/schemaArray' }, + 'anyOf': { '$ref': '#/definitions/schemaArray' }, + 'oneOf': { '$ref': '#/definitions/schemaArray' }, + 'not': { '$ref': '#' } + }, + 'default': true + } + } + }; + const descriptions = { + id: l10n.t("A unique identifier for the schema."), + $schema: l10n.t("The schema to verify this document against."), + title: l10n.t("A descriptive title of the element."), + description: l10n.t("A long description of the element. Used in hover menus and suggestions."), + default: l10n.t("A default value. Used by suggestions."), + multipleOf: l10n.t("A number that should cleanly divide the current value (i.e. have no remainder)."), + maximum: l10n.t("The maximum numerical value, inclusive by default."), + exclusiveMaximum: l10n.t("Makes the maximum property exclusive."), + minimum: l10n.t("The minimum numerical value, inclusive by default."), + exclusiveMinimum: l10n.t("Makes the minimum property exclusive."), + maxLength: l10n.t("The maximum length of a string."), + minLength: l10n.t("The minimum length of a string."), + pattern: l10n.t("A regular expression to match the string against. It is not implicitly anchored."), + additionalItems: l10n.t("For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."), + items: l10n.t("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."), + maxItems: l10n.t("The maximum number of items that can be inside an array. Inclusive."), + minItems: l10n.t("The minimum number of items that can be inside an array. Inclusive."), + uniqueItems: l10n.t("If all of the items in the array must be unique. Defaults to false."), + maxProperties: l10n.t("The maximum number of properties an object can have. Inclusive."), + minProperties: l10n.t("The minimum number of properties an object can have. Inclusive."), + required: l10n.t("An array of strings that lists the names of all properties required on this object."), + additionalProperties: l10n.t("Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."), + definitions: l10n.t("Not used for validation. Place subschemas here that you wish to reference inline with $ref."), + properties: l10n.t("A map of property names to schemas for each property."), + patternProperties: l10n.t("A map of regular expressions on property names to schemas for matching properties."), + dependencies: l10n.t("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."), + enum: l10n.t("The set of literal values that are valid."), + type: l10n.t("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."), + format: l10n.t("Describes the format expected for the value."), + allOf: l10n.t("An array of schemas, all of which must match."), + anyOf: l10n.t("An array of schemas, where at least one must match."), + oneOf: l10n.t("An array of schemas, exactly one of which must match."), + not: l10n.t("A schema which must not match."), + $id: l10n.t("A unique identifier for the schema."), + $ref: l10n.t("Reference a definition hosted on any location."), + $comment: l10n.t("Comments from schema authors to readers or maintainers of the schema."), + readOnly: l10n.t("Indicates that the value of the instance is managed exclusively by the owning authority."), + examples: l10n.t("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."), + contains: l10n.t("An array instance is valid against \"contains\" if at least one of its elements is valid against the given schema."), + propertyNames: l10n.t("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."), + const: l10n.t("An instance validates successfully against this keyword if its value is equal to the value of the keyword."), + contentMediaType: l10n.t("Describes the media type of a string property."), + contentEncoding: l10n.t("Describes the content encoding of a string property."), + if: l10n.t("The validation outcome of the \"if\" subschema controls which of the \"then\" or \"else\" keywords are evaluated."), + then: l10n.t("The \"if\" subschema is used for validation when the \"if\" subschema succeeds."), + else: l10n.t("The \"else\" subschema is used for validation when the \"if\" subschema fails.") + }; + for (const schemaName in exports.schemaContributions.schemas) { + const schema = exports.schemaContributions.schemas[schemaName]; + for (const property in schema.properties) { + let propertyObject = schema.properties[property]; + if (typeof propertyObject === 'boolean') { + propertyObject = schema.properties[property] = {}; + } + const description = descriptions[property]; + if (description) { + propertyObject['description'] = description; + } + } + } +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonCompletion.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonCompletion.js" index 0758f9882464b95bc4cc3d807e12245f7b9fcd35..3506b54cacee905cd4a2228ef8afd91ececdd8a1 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonCompletion.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonCompletion.js" @@ -1,3 +1,971 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:91dcd1fa040454fe50a1e743014e655a81f9dfe7fc0e525f1d2cd16286be0d0e -size 49938 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "../parser/jsonParser", "jsonc-parser", "../utils/json", "../utils/strings", "../utils/objects", "../jsonLanguageTypes", "@vscode/l10n"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.JSONCompletion = void 0; + const Parser = require("../parser/jsonParser"); + const Json = require("jsonc-parser"); + const json_1 = require("../utils/json"); + const strings_1 = require("../utils/strings"); + const objects_1 = require("../utils/objects"); + const jsonLanguageTypes_1 = require("../jsonLanguageTypes"); + const l10n = require("@vscode/l10n"); + const valueCommitCharacters = [',', '}', ']']; + const propertyCommitCharacters = [':']; + class JSONCompletion { + constructor(schemaService, contributions = [], promiseConstructor = Promise, clientCapabilities = {}) { + this.schemaService = schemaService; + this.contributions = contributions; + this.promiseConstructor = promiseConstructor; + this.clientCapabilities = clientCapabilities; + } + doResolve(item) { + for (let i = this.contributions.length - 1; i >= 0; i--) { + const resolveCompletion = this.contributions[i].resolveCompletion; + if (resolveCompletion) { + const resolver = resolveCompletion(item); + if (resolver) { + return resolver; + } + } + } + return this.promiseConstructor.resolve(item); + } + doComplete(document, position, doc) { + const result = { + items: [], + isIncomplete: false + }; + const text = document.getText(); + const offset = document.offsetAt(position); + let node = doc.getNodeFromOffset(offset, true); + if (this.isInComment(document, node ? node.offset : 0, offset)) { + return Promise.resolve(result); + } + if (node && (offset === node.offset + node.length) && offset > 0) { + const ch = text[offset - 1]; + if (node.type === 'object' && ch === '}' || node.type === 'array' && ch === ']') { + // after ] or } + node = node.parent; + } + } + const currentWord = this.getCurrentWord(document, offset); + let overwriteRange; + if (node && (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null')) { + overwriteRange = jsonLanguageTypes_1.Range.create(document.positionAt(node.offset), document.positionAt(node.offset + node.length)); + } + else { + let overwriteStart = offset - currentWord.length; + if (overwriteStart > 0 && text[overwriteStart - 1] === '"') { + overwriteStart--; + } + overwriteRange = jsonLanguageTypes_1.Range.create(document.positionAt(overwriteStart), position); + } + const supportsCommitCharacters = false; //this.doesSupportsCommitCharacters(); disabled for now, waiting for new API: https://github.com/microsoft/vscode/issues/42544 + const proposed = new Map(); + const collector = { + add: (suggestion) => { + let label = suggestion.label; + const existing = proposed.get(label); + if (!existing) { + label = label.replace(/[\n]/g, '↵'); + if (label.length > 60) { + const shortendedLabel = label.substr(0, 57).trim() + '...'; + if (!proposed.has(shortendedLabel)) { + label = shortendedLabel; + } + } + suggestion.textEdit = jsonLanguageTypes_1.TextEdit.replace(overwriteRange, suggestion.insertText); + if (supportsCommitCharacters) { + suggestion.commitCharacters = suggestion.kind === jsonLanguageTypes_1.CompletionItemKind.Property ? propertyCommitCharacters : valueCommitCharacters; + } + suggestion.label = label; + proposed.set(label, suggestion); + result.items.push(suggestion); + } + else { + if (!existing.documentation) { + existing.documentation = suggestion.documentation; + } + if (!existing.detail) { + existing.detail = suggestion.detail; + } + if (!existing.labelDetails) { + existing.labelDetails = suggestion.labelDetails; + } + } + }, + setAsIncomplete: () => { + result.isIncomplete = true; + }, + error: (message) => { + console.error(message); + }, + getNumberOfProposals: () => { + return result.items.length; + } + }; + return this.schemaService.getSchemaForResource(document.uri, doc).then((schema) => { + const collectionPromises = []; + let addValue = true; + let currentKey = ''; + let currentProperty = undefined; + if (node) { + if (node.type === 'string') { + const parent = node.parent; + if (parent && parent.type === 'property' && parent.keyNode === node) { + addValue = !parent.valueNode; + currentProperty = parent; + currentKey = text.substr(node.offset + 1, node.length - 2); + if (parent) { + node = parent.parent; + } + } + } + } + // proposals for properties + if (node && node.type === 'object') { + // don't suggest keys when the cursor is just before the opening curly brace + if (node.offset === offset) { + return result; + } + // don't suggest properties that are already present + const properties = node.properties; + properties.forEach(p => { + if (!currentProperty || currentProperty !== p) { + proposed.set(p.keyNode.value, jsonLanguageTypes_1.CompletionItem.create('__')); + } + }); + let separatorAfter = ''; + if (addValue) { + separatorAfter = this.evaluateSeparatorAfter(document, document.offsetAt(overwriteRange.end)); + } + if (schema) { + // property proposals with schema + this.getPropertyCompletions(schema, doc, node, addValue, separatorAfter, collector); + } + else { + // property proposals without schema + this.getSchemaLessPropertyCompletions(doc, node, currentKey, collector); + } + const location = Parser.getNodePath(node); + this.contributions.forEach((contribution) => { + const collectPromise = contribution.collectPropertyCompletions(document.uri, location, currentWord, addValue, separatorAfter === '', collector); + if (collectPromise) { + collectionPromises.push(collectPromise); + } + }); + if ((!schema && currentWord.length > 0 && text.charAt(offset - currentWord.length - 1) !== '"')) { + collector.add({ + kind: jsonLanguageTypes_1.CompletionItemKind.Property, + label: this.getLabelForValue(currentWord), + insertText: this.getInsertTextForProperty(currentWord, undefined, false, separatorAfter), + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet, documentation: '', + }); + collector.setAsIncomplete(); + } + } + // proposals for values + const types = {}; + if (schema) { + // value proposals with schema + this.getValueCompletions(schema, doc, node, offset, document, collector, types); + } + else { + // value proposals without schema + this.getSchemaLessValueCompletions(doc, node, offset, document, collector); + } + if (this.contributions.length > 0) { + this.getContributedValueCompletions(doc, node, offset, document, collector, collectionPromises); + } + return this.promiseConstructor.all(collectionPromises).then(() => { + if (collector.getNumberOfProposals() === 0) { + let offsetForSeparator = offset; + if (node && (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null')) { + offsetForSeparator = node.offset + node.length; + } + const separatorAfter = this.evaluateSeparatorAfter(document, offsetForSeparator); + this.addFillerValueCompletions(types, separatorAfter, collector); + } + return result; + }); + }); + } + getPropertyCompletions(schema, doc, node, addValue, separatorAfter, collector) { + const matchingSchemas = doc.getMatchingSchemas(schema.schema, node.offset); + matchingSchemas.forEach((s) => { + if (s.node === node && !s.inverted) { + const schemaProperties = s.schema.properties; + if (schemaProperties) { + Object.keys(schemaProperties).forEach((key) => { + const propertySchema = schemaProperties[key]; + if (typeof propertySchema === 'object' && !propertySchema.deprecationMessage && !propertySchema.doNotSuggest) { + const proposal = { + kind: jsonLanguageTypes_1.CompletionItemKind.Property, + label: key, + insertText: this.getInsertTextForProperty(key, propertySchema, addValue, separatorAfter), + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet, + filterText: this.getFilterTextForValue(key), + documentation: this.fromMarkup(propertySchema.markdownDescription) || propertySchema.description || '', + }; + if (propertySchema.suggestSortText !== undefined) { + proposal.sortText = propertySchema.suggestSortText; + } + if (proposal.insertText && (0, strings_1.endsWith)(proposal.insertText, `$1${separatorAfter}`)) { + proposal.command = { + title: 'Suggest', + command: 'editor.action.triggerSuggest' + }; + } + collector.add(proposal); + } + }); + } + const schemaPropertyNames = s.schema.propertyNames; + if (typeof schemaPropertyNames === 'object' && !schemaPropertyNames.deprecationMessage && !schemaPropertyNames.doNotSuggest) { + const propertyNameCompletionItem = (name, enumDescription = undefined) => { + const proposal = { + kind: jsonLanguageTypes_1.CompletionItemKind.Property, + label: name, + insertText: this.getInsertTextForProperty(name, undefined, addValue, separatorAfter), + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet, + filterText: this.getFilterTextForValue(name), + documentation: enumDescription || this.fromMarkup(schemaPropertyNames.markdownDescription) || schemaPropertyNames.description || '', + }; + if (schemaPropertyNames.suggestSortText !== undefined) { + proposal.sortText = schemaPropertyNames.suggestSortText; + } + if (proposal.insertText && (0, strings_1.endsWith)(proposal.insertText, `$1${separatorAfter}`)) { + proposal.command = { + title: 'Suggest', + command: 'editor.action.triggerSuggest' + }; + } + collector.add(proposal); + }; + if (schemaPropertyNames.enum) { + for (let i = 0; i < schemaPropertyNames.enum.length; i++) { + let enumDescription = undefined; + if (schemaPropertyNames.markdownEnumDescriptions && i < schemaPropertyNames.markdownEnumDescriptions.length) { + enumDescription = this.fromMarkup(schemaPropertyNames.markdownEnumDescriptions[i]); + } + else if (schemaPropertyNames.enumDescriptions && i < schemaPropertyNames.enumDescriptions.length) { + enumDescription = schemaPropertyNames.enumDescriptions[i]; + } + propertyNameCompletionItem(schemaPropertyNames.enum[i], enumDescription); + } + } + if (schemaPropertyNames.const) { + propertyNameCompletionItem(schemaPropertyNames.const); + } + } + } + }); + } + getSchemaLessPropertyCompletions(doc, node, currentKey, collector) { + const collectCompletionsForSimilarObject = (obj) => { + obj.properties.forEach((p) => { + const key = p.keyNode.value; + collector.add({ + kind: jsonLanguageTypes_1.CompletionItemKind.Property, + label: key, + insertText: this.getInsertTextForValue(key, ''), + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet, + filterText: this.getFilterTextForValue(key), + documentation: '' + }); + }); + }; + if (node.parent) { + if (node.parent.type === 'property') { + // if the object is a property value, check the tree for other objects that hang under a property of the same name + const parentKey = node.parent.keyNode.value; + doc.visit(n => { + if (n.type === 'property' && n !== node.parent && n.keyNode.value === parentKey && n.valueNode && n.valueNode.type === 'object') { + collectCompletionsForSimilarObject(n.valueNode); + } + return true; + }); + } + else if (node.parent.type === 'array') { + // if the object is in an array, use all other array elements as similar objects + node.parent.items.forEach(n => { + if (n.type === 'object' && n !== node) { + collectCompletionsForSimilarObject(n); + } + }); + } + } + else if (node.type === 'object') { + collector.add({ + kind: jsonLanguageTypes_1.CompletionItemKind.Property, + label: '$schema', + insertText: this.getInsertTextForProperty('$schema', undefined, true, ''), + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet, documentation: '', + filterText: this.getFilterTextForValue("$schema") + }); + } + } + getSchemaLessValueCompletions(doc, node, offset, document, collector) { + let offsetForSeparator = offset; + if (node && (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null')) { + offsetForSeparator = node.offset + node.length; + node = node.parent; + } + if (!node) { + collector.add({ + kind: this.getSuggestionKind('object'), + label: 'Empty object', + insertText: this.getInsertTextForValue({}, ''), + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet, + documentation: '' + }); + collector.add({ + kind: this.getSuggestionKind('array'), + label: 'Empty array', + insertText: this.getInsertTextForValue([], ''), + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet, + documentation: '' + }); + return; + } + const separatorAfter = this.evaluateSeparatorAfter(document, offsetForSeparator); + const collectSuggestionsForValues = (value) => { + if (value.parent && !Parser.contains(value.parent, offset, true)) { + collector.add({ + kind: this.getSuggestionKind(value.type), + label: this.getLabelTextForMatchingNode(value, document), + insertText: this.getInsertTextForMatchingNode(value, document, separatorAfter), + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet, documentation: '' + }); + } + if (value.type === 'boolean') { + this.addBooleanValueCompletion(!value.value, separatorAfter, collector); + } + }; + if (node.type === 'property') { + if (offset > (node.colonOffset || 0)) { + const valueNode = node.valueNode; + if (valueNode && (offset > (valueNode.offset + valueNode.length) || valueNode.type === 'object' || valueNode.type === 'array')) { + return; + } + // suggest values at the same key + const parentKey = node.keyNode.value; + doc.visit(n => { + if (n.type === 'property' && n.keyNode.value === parentKey && n.valueNode) { + collectSuggestionsForValues(n.valueNode); + } + return true; + }); + if (parentKey === '$schema' && node.parent && !node.parent.parent) { + this.addDollarSchemaCompletions(separatorAfter, collector); + } + } + } + if (node.type === 'array') { + if (node.parent && node.parent.type === 'property') { + // suggest items of an array at the same key + const parentKey = node.parent.keyNode.value; + doc.visit((n) => { + if (n.type === 'property' && n.keyNode.value === parentKey && n.valueNode && n.valueNode.type === 'array') { + n.valueNode.items.forEach(collectSuggestionsForValues); + } + return true; + }); + } + else { + // suggest items in the same array + node.items.forEach(collectSuggestionsForValues); + } + } + } + getValueCompletions(schema, doc, node, offset, document, collector, types) { + let offsetForSeparator = offset; + let parentKey = undefined; + let valueNode = undefined; + if (node && (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null')) { + offsetForSeparator = node.offset + node.length; + valueNode = node; + node = node.parent; + } + if (!node) { + this.addSchemaValueCompletions(schema.schema, '', collector, types); + return; + } + if ((node.type === 'property') && offset > (node.colonOffset || 0)) { + const valueNode = node.valueNode; + if (valueNode && offset > (valueNode.offset + valueNode.length)) { + return; // we are past the value node + } + parentKey = node.keyNode.value; + node = node.parent; + } + if (node && (parentKey !== undefined || node.type === 'array')) { + const separatorAfter = this.evaluateSeparatorAfter(document, offsetForSeparator); + const matchingSchemas = doc.getMatchingSchemas(schema.schema, node.offset, valueNode); + for (const s of matchingSchemas) { + if (s.node === node && !s.inverted && s.schema) { + if (node.type === 'array' && s.schema.items) { + let c = collector; + if (s.schema.uniqueItems) { + const existingValues = new Set(); + node.children.forEach(n => { + if (n.type !== 'array' && n.type !== 'object') { + existingValues.add(this.getLabelForValue(Parser.getNodeValue(n))); + } + }); + c = { + ...collector, + add(suggestion) { + if (!existingValues.has(suggestion.label)) { + collector.add(suggestion); + } + } + }; + } + if (Array.isArray(s.schema.items)) { + const index = this.findItemAtOffset(node, document, offset); + if (index < s.schema.items.length) { + this.addSchemaValueCompletions(s.schema.items[index], separatorAfter, c, types); + } + } + else { + this.addSchemaValueCompletions(s.schema.items, separatorAfter, c, types); + } + } + if (parentKey !== undefined) { + let propertyMatched = false; + if (s.schema.properties) { + const propertySchema = s.schema.properties[parentKey]; + if (propertySchema) { + propertyMatched = true; + this.addSchemaValueCompletions(propertySchema, separatorAfter, collector, types); + } + } + if (s.schema.patternProperties && !propertyMatched) { + for (const pattern of Object.keys(s.schema.patternProperties)) { + const regex = (0, strings_1.extendedRegExp)(pattern); + if (regex?.test(parentKey)) { + propertyMatched = true; + const propertySchema = s.schema.patternProperties[pattern]; + this.addSchemaValueCompletions(propertySchema, separatorAfter, collector, types); + } + } + } + if (s.schema.additionalProperties && !propertyMatched) { + const propertySchema = s.schema.additionalProperties; + this.addSchemaValueCompletions(propertySchema, separatorAfter, collector, types); + } + } + } + } + if (parentKey === '$schema' && !node.parent) { + this.addDollarSchemaCompletions(separatorAfter, collector); + } + if (types['boolean']) { + this.addBooleanValueCompletion(true, separatorAfter, collector); + this.addBooleanValueCompletion(false, separatorAfter, collector); + } + if (types['null']) { + this.addNullValueCompletion(separatorAfter, collector); + } + } + } + getContributedValueCompletions(doc, node, offset, document, collector, collectionPromises) { + if (!node) { + this.contributions.forEach((contribution) => { + const collectPromise = contribution.collectDefaultCompletions(document.uri, collector); + if (collectPromise) { + collectionPromises.push(collectPromise); + } + }); + } + else { + if (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null') { + node = node.parent; + } + if (node && (node.type === 'property') && offset > (node.colonOffset || 0)) { + const parentKey = node.keyNode.value; + const valueNode = node.valueNode; + if ((!valueNode || offset <= (valueNode.offset + valueNode.length)) && node.parent) { + const location = Parser.getNodePath(node.parent); + this.contributions.forEach((contribution) => { + const collectPromise = contribution.collectValueCompletions(document.uri, location, parentKey, collector); + if (collectPromise) { + collectionPromises.push(collectPromise); + } + }); + } + } + } + } + addSchemaValueCompletions(schema, separatorAfter, collector, types) { + if (typeof schema === 'object') { + this.addEnumValueCompletions(schema, separatorAfter, collector); + this.addDefaultValueCompletions(schema, separatorAfter, collector); + this.collectTypes(schema, types); + if (Array.isArray(schema.allOf)) { + schema.allOf.forEach(s => this.addSchemaValueCompletions(s, separatorAfter, collector, types)); + } + if (Array.isArray(schema.anyOf)) { + schema.anyOf.forEach(s => this.addSchemaValueCompletions(s, separatorAfter, collector, types)); + } + if (Array.isArray(schema.oneOf)) { + schema.oneOf.forEach(s => this.addSchemaValueCompletions(s, separatorAfter, collector, types)); + } + } + } + addDefaultValueCompletions(schema, separatorAfter, collector, arrayDepth = 0) { + let hasProposals = false; + if ((0, objects_1.isDefined)(schema.default)) { + let type = schema.type; + let value = schema.default; + for (let i = arrayDepth; i > 0; i--) { + value = [value]; + type = 'array'; + } + const completionItem = { + kind: this.getSuggestionKind(type), + label: this.getLabelForValue(value), + insertText: this.getInsertTextForValue(value, separatorAfter), + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet + }; + if (this.doesSupportsLabelDetails()) { + completionItem.labelDetails = { description: l10n.t('Default value') }; + } + else { + completionItem.detail = l10n.t('Default value'); + } + collector.add(completionItem); + hasProposals = true; + } + if (Array.isArray(schema.examples)) { + schema.examples.forEach(example => { + let type = schema.type; + let value = example; + for (let i = arrayDepth; i > 0; i--) { + value = [value]; + type = 'array'; + } + collector.add({ + kind: this.getSuggestionKind(type), + label: this.getLabelForValue(value), + insertText: this.getInsertTextForValue(value, separatorAfter), + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet + }); + hasProposals = true; + }); + } + if (Array.isArray(schema.defaultSnippets)) { + schema.defaultSnippets.forEach(s => { + let type = schema.type; + let value = s.body; + let label = s.label; + let insertText; + let filterText; + if ((0, objects_1.isDefined)(value)) { + let type = schema.type; + for (let i = arrayDepth; i > 0; i--) { + value = [value]; + type = 'array'; + } + insertText = this.getInsertTextForSnippetValue(value, separatorAfter); + filterText = this.getFilterTextForSnippetValue(value); + label = label || this.getLabelForSnippetValue(value); + } + else if (typeof s.bodyText === 'string') { + let prefix = '', suffix = '', indent = ''; + for (let i = arrayDepth; i > 0; i--) { + prefix = prefix + indent + '[\n'; + suffix = suffix + '\n' + indent + ']'; + indent += '\t'; + type = 'array'; + } + insertText = prefix + indent + s.bodyText.split('\n').join('\n' + indent) + suffix + separatorAfter; + label = label || insertText, + filterText = insertText.replace(/[\n]/g, ''); // remove new lines + } + else { + return; + } + collector.add({ + kind: this.getSuggestionKind(type), + label, + documentation: this.fromMarkup(s.markdownDescription) || s.description, + insertText, + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet, + filterText + }); + hasProposals = true; + }); + } + if (!hasProposals && typeof schema.items === 'object' && !Array.isArray(schema.items) && arrayDepth < 5 /* beware of recursion */) { + this.addDefaultValueCompletions(schema.items, separatorAfter, collector, arrayDepth + 1); + } + } + addEnumValueCompletions(schema, separatorAfter, collector) { + if ((0, objects_1.isDefined)(schema.const)) { + collector.add({ + kind: this.getSuggestionKind(schema.type), + label: this.getLabelForValue(schema.const), + insertText: this.getInsertTextForValue(schema.const, separatorAfter), + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet, + documentation: this.fromMarkup(schema.markdownDescription) || schema.description + }); + } + if (Array.isArray(schema.enum)) { + for (let i = 0, length = schema.enum.length; i < length; i++) { + const enm = schema.enum[i]; + let documentation = this.fromMarkup(schema.markdownDescription) || schema.description; + if (schema.markdownEnumDescriptions && i < schema.markdownEnumDescriptions.length && this.doesSupportMarkdown()) { + documentation = this.fromMarkup(schema.markdownEnumDescriptions[i]); + } + else if (schema.enumDescriptions && i < schema.enumDescriptions.length) { + documentation = schema.enumDescriptions[i]; + } + collector.add({ + kind: this.getSuggestionKind(schema.type), + label: this.getLabelForValue(enm), + insertText: this.getInsertTextForValue(enm, separatorAfter), + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet, + documentation + }); + } + } + } + collectTypes(schema, types) { + if (Array.isArray(schema.enum) || (0, objects_1.isDefined)(schema.const)) { + return; + } + const type = schema.type; + if (Array.isArray(type)) { + type.forEach(t => types[t] = true); + } + else if (type) { + types[type] = true; + } + } + addFillerValueCompletions(types, separatorAfter, collector) { + if (types['object']) { + collector.add({ + kind: this.getSuggestionKind('object'), + label: '{}', + insertText: this.getInsertTextForGuessedValue({}, separatorAfter), + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet, + detail: l10n.t('New object'), + documentation: '' + }); + } + if (types['array']) { + collector.add({ + kind: this.getSuggestionKind('array'), + label: '[]', + insertText: this.getInsertTextForGuessedValue([], separatorAfter), + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet, + detail: l10n.t('New array'), + documentation: '' + }); + } + } + addBooleanValueCompletion(value, separatorAfter, collector) { + collector.add({ + kind: this.getSuggestionKind('boolean'), + label: value ? 'true' : 'false', + insertText: this.getInsertTextForValue(value, separatorAfter), + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet, + documentation: '' + }); + } + addNullValueCompletion(separatorAfter, collector) { + collector.add({ + kind: this.getSuggestionKind('null'), + label: 'null', + insertText: 'null' + separatorAfter, + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet, + documentation: '' + }); + } + addDollarSchemaCompletions(separatorAfter, collector) { + const schemaIds = this.schemaService.getRegisteredSchemaIds(schema => schema === 'http' || schema === 'https'); + schemaIds.forEach(schemaId => { + if (schemaId.startsWith('http://json-schema.org/draft-')) { + schemaId = schemaId + '#'; + } + collector.add({ + kind: jsonLanguageTypes_1.CompletionItemKind.Module, + label: this.getLabelForValue(schemaId), + filterText: this.getFilterTextForValue(schemaId), + insertText: this.getInsertTextForValue(schemaId, separatorAfter), + insertTextFormat: jsonLanguageTypes_1.InsertTextFormat.Snippet, documentation: '' + }); + }); + } + getLabelForValue(value) { + return JSON.stringify(value); + } + getValueFromLabel(value) { + return JSON.parse(value); + } + getFilterTextForValue(value) { + return JSON.stringify(value); + } + getFilterTextForSnippetValue(value) { + return JSON.stringify(value).replace(/\$\{\d+:([^}]+)\}|\$\d+/g, '$1'); + } + getLabelForSnippetValue(value) { + const label = JSON.stringify(value); + return label.replace(/\$\{\d+:([^}]+)\}|\$\d+/g, '$1'); + } + getInsertTextForPlainText(text) { + return text.replace(/[\\\$\}]/g, '\\$&'); // escape $, \ and } + } + getInsertTextForValue(value, separatorAfter) { + const text = JSON.stringify(value, null, '\t'); + if (text === '{}') { + return '{$1}' + separatorAfter; + } + else if (text === '[]') { + return '[$1]' + separatorAfter; + } + return this.getInsertTextForPlainText(text + separatorAfter); + } + getInsertTextForSnippetValue(value, separatorAfter) { + const replacer = (value) => { + if (typeof value === 'string') { + if (value[0] === '^') { + return value.substr(1); + } + } + return JSON.stringify(value); + }; + return (0, json_1.stringifyObject)(value, '', replacer) + separatorAfter; + } + getInsertTextForGuessedValue(value, separatorAfter) { + switch (typeof value) { + case 'object': + if (value === null) { + return '${1:null}' + separatorAfter; + } + return this.getInsertTextForValue(value, separatorAfter); + case 'string': + let snippetValue = JSON.stringify(value); + snippetValue = snippetValue.substr(1, snippetValue.length - 2); // remove quotes + snippetValue = this.getInsertTextForPlainText(snippetValue); // escape \ and } + return '"${1:' + snippetValue + '}"' + separatorAfter; + case 'number': + case 'boolean': + return '${1:' + JSON.stringify(value) + '}' + separatorAfter; + } + return this.getInsertTextForValue(value, separatorAfter); + } + getSuggestionKind(type) { + if (Array.isArray(type)) { + const array = type; + type = array.length > 0 ? array[0] : undefined; + } + if (!type) { + return jsonLanguageTypes_1.CompletionItemKind.Value; + } + switch (type) { + case 'string': return jsonLanguageTypes_1.CompletionItemKind.Value; + case 'object': return jsonLanguageTypes_1.CompletionItemKind.Module; + case 'property': return jsonLanguageTypes_1.CompletionItemKind.Property; + default: return jsonLanguageTypes_1.CompletionItemKind.Value; + } + } + getLabelTextForMatchingNode(node, document) { + switch (node.type) { + case 'array': + return '[]'; + case 'object': + return '{}'; + default: + const content = document.getText().substr(node.offset, node.length); + return content; + } + } + getInsertTextForMatchingNode(node, document, separatorAfter) { + switch (node.type) { + case 'array': + return this.getInsertTextForValue([], separatorAfter); + case 'object': + return this.getInsertTextForValue({}, separatorAfter); + default: + const content = document.getText().substr(node.offset, node.length) + separatorAfter; + return this.getInsertTextForPlainText(content); + } + } + getInsertTextForProperty(key, propertySchema, addValue, separatorAfter) { + const propertyText = this.getInsertTextForValue(key, ''); + if (!addValue) { + return propertyText; + } + const resultText = propertyText + ': '; + let value; + let nValueProposals = 0; + if (propertySchema) { + if (Array.isArray(propertySchema.defaultSnippets)) { + if (propertySchema.defaultSnippets.length === 1) { + const body = propertySchema.defaultSnippets[0].body; + if ((0, objects_1.isDefined)(body)) { + value = this.getInsertTextForSnippetValue(body, ''); + } + } + nValueProposals += propertySchema.defaultSnippets.length; + } + if (propertySchema.enum) { + if (!value && propertySchema.enum.length === 1) { + value = this.getInsertTextForGuessedValue(propertySchema.enum[0], ''); + } + nValueProposals += propertySchema.enum.length; + } + if ((0, objects_1.isDefined)(propertySchema.const)) { + if (!value) { + value = this.getInsertTextForGuessedValue(propertySchema.const, ''); + } + nValueProposals++; + } + if ((0, objects_1.isDefined)(propertySchema.default)) { + if (!value) { + value = this.getInsertTextForGuessedValue(propertySchema.default, ''); + } + nValueProposals++; + } + if (Array.isArray(propertySchema.examples) && propertySchema.examples.length) { + if (!value) { + value = this.getInsertTextForGuessedValue(propertySchema.examples[0], ''); + } + nValueProposals += propertySchema.examples.length; + } + if (nValueProposals === 0) { + let type = Array.isArray(propertySchema.type) ? propertySchema.type[0] : propertySchema.type; + if (!type) { + if (propertySchema.properties) { + type = 'object'; + } + else if (propertySchema.items) { + type = 'array'; + } + } + switch (type) { + case 'boolean': + value = '$1'; + break; + case 'string': + value = '"$1"'; + break; + case 'object': + value = '{$1}'; + break; + case 'array': + value = '[$1]'; + break; + case 'number': + case 'integer': + value = '${1:0}'; + break; + case 'null': + value = '${1:null}'; + break; + default: + return propertyText; + } + } + } + if (!value || nValueProposals > 1) { + value = '$1'; + } + return resultText + value + separatorAfter; + } + getCurrentWord(document, offset) { + let i = offset - 1; + const text = document.getText(); + while (i >= 0 && ' \t\n\r\v":{[,]}'.indexOf(text.charAt(i)) === -1) { + i--; + } + return text.substring(i + 1, offset); + } + evaluateSeparatorAfter(document, offset) { + const scanner = Json.createScanner(document.getText(), true); + scanner.setPosition(offset); + const token = scanner.scan(); + switch (token) { + case 5 /* Json.SyntaxKind.CommaToken */: + case 2 /* Json.SyntaxKind.CloseBraceToken */: + case 4 /* Json.SyntaxKind.CloseBracketToken */: + case 17 /* Json.SyntaxKind.EOF */: + return ''; + default: + return ','; + } + } + findItemAtOffset(node, document, offset) { + const scanner = Json.createScanner(document.getText(), true); + const children = node.items; + for (let i = children.length - 1; i >= 0; i--) { + const child = children[i]; + if (offset > child.offset + child.length) { + scanner.setPosition(child.offset + child.length); + const token = scanner.scan(); + if (token === 5 /* Json.SyntaxKind.CommaToken */ && offset >= scanner.getTokenOffset() + scanner.getTokenLength()) { + return i + 1; + } + return i; + } + else if (offset >= child.offset) { + return i; + } + } + return 0; + } + isInComment(document, start, offset) { + const scanner = Json.createScanner(document.getText(), false); + scanner.setPosition(start); + let token = scanner.scan(); + while (token !== 17 /* Json.SyntaxKind.EOF */ && (scanner.getTokenOffset() + scanner.getTokenLength() < offset)) { + token = scanner.scan(); + } + return (token === 12 /* Json.SyntaxKind.LineCommentTrivia */ || token === 13 /* Json.SyntaxKind.BlockCommentTrivia */) && scanner.getTokenOffset() <= offset; + } + fromMarkup(markupString) { + if (markupString && this.doesSupportMarkdown()) { + return { + kind: jsonLanguageTypes_1.MarkupKind.Markdown, + value: markupString + }; + } + return undefined; + } + doesSupportMarkdown() { + if (!(0, objects_1.isDefined)(this.supportsMarkdown)) { + const documentationFormat = this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat; + this.supportsMarkdown = Array.isArray(documentationFormat) && documentationFormat.indexOf(jsonLanguageTypes_1.MarkupKind.Markdown) !== -1; + } + return this.supportsMarkdown; + } + doesSupportsCommitCharacters() { + if (!(0, objects_1.isDefined)(this.supportsCommitCharacters)) { + this.labelDetailsSupport = this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport; + } + return this.supportsCommitCharacters; + } + doesSupportsLabelDetails() { + if (!(0, objects_1.isDefined)(this.labelDetailsSupport)) { + this.labelDetailsSupport = this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport; + } + return this.labelDetailsSupport; + } + } + exports.JSONCompletion = JSONCompletion; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonDocumentSymbols.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonDocumentSymbols.js" index 67717cc99dac5cff0ffc9e218a8becb088716e0f..e14f50067f0e55d415c66b8b92d256f86f0ec122 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonDocumentSymbols.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonDocumentSymbols.js" @@ -1,3 +1,285 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:459062720e3b2af90b22aefdcf7f8ee1439e3c9ff5c2e6d26acea715720cb3ca -size 14082 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "../parser/jsonParser", "../utils/strings", "../utils/colors", "@vscode/l10n", "../jsonLanguageTypes"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.JSONDocumentSymbols = void 0; + const Parser = require("../parser/jsonParser"); + const Strings = require("../utils/strings"); + const colors_1 = require("../utils/colors"); + const l10n = require("@vscode/l10n"); + const jsonLanguageTypes_1 = require("../jsonLanguageTypes"); + class JSONDocumentSymbols { + constructor(schemaService) { + this.schemaService = schemaService; + } + findDocumentSymbols(document, doc, context = { resultLimit: Number.MAX_VALUE }) { + const root = doc.root; + if (!root) { + return []; + } + let limit = context.resultLimit || Number.MAX_VALUE; + // special handling for key bindings + const resourceString = document.uri; + if ((resourceString === 'vscode://defaultsettings/keybindings.json') || Strings.endsWith(resourceString.toLowerCase(), '/user/keybindings.json')) { + if (root.type === 'array') { + const result = []; + for (const item of root.items) { + if (item.type === 'object') { + for (const property of item.properties) { + if (property.keyNode.value === 'key' && property.valueNode) { + const location = jsonLanguageTypes_1.Location.create(document.uri, getRange(document, item)); + result.push({ name: getName(property.valueNode), kind: jsonLanguageTypes_1.SymbolKind.Function, location: location }); + limit--; + if (limit <= 0) { + if (context && context.onResultLimitExceeded) { + context.onResultLimitExceeded(resourceString); + } + return result; + } + } + } + } + } + return result; + } + } + const toVisit = [ + { node: root, containerName: '' } + ]; + let nextToVisit = 0; + let limitExceeded = false; + const result = []; + const collectOutlineEntries = (node, containerName) => { + if (node.type === 'array') { + node.items.forEach(node => { + if (node) { + toVisit.push({ node, containerName }); + } + }); + } + else if (node.type === 'object') { + node.properties.forEach((property) => { + const valueNode = property.valueNode; + if (valueNode) { + if (limit > 0) { + limit--; + const location = jsonLanguageTypes_1.Location.create(document.uri, getRange(document, property)); + const childContainerName = containerName ? containerName + '.' + property.keyNode.value : property.keyNode.value; + result.push({ name: this.getKeyLabel(property), kind: this.getSymbolKind(valueNode.type), location: location, containerName: containerName }); + toVisit.push({ node: valueNode, containerName: childContainerName }); + } + else { + limitExceeded = true; + } + } + }); + } + }; + // breath first traversal + while (nextToVisit < toVisit.length) { + const next = toVisit[nextToVisit++]; + collectOutlineEntries(next.node, next.containerName); + } + if (limitExceeded && context && context.onResultLimitExceeded) { + context.onResultLimitExceeded(resourceString); + } + return result; + } + findDocumentSymbols2(document, doc, context = { resultLimit: Number.MAX_VALUE }) { + const root = doc.root; + if (!root) { + return []; + } + let limit = context.resultLimit || Number.MAX_VALUE; + // special handling for key bindings + const resourceString = document.uri; + if ((resourceString === 'vscode://defaultsettings/keybindings.json') || Strings.endsWith(resourceString.toLowerCase(), '/user/keybindings.json')) { + if (root.type === 'array') { + const result = []; + for (const item of root.items) { + if (item.type === 'object') { + for (const property of item.properties) { + if (property.keyNode.value === 'key' && property.valueNode) { + const range = getRange(document, item); + const selectionRange = getRange(document, property.keyNode); + result.push({ name: getName(property.valueNode), kind: jsonLanguageTypes_1.SymbolKind.Function, range, selectionRange }); + limit--; + if (limit <= 0) { + if (context && context.onResultLimitExceeded) { + context.onResultLimitExceeded(resourceString); + } + return result; + } + } + } + } + } + return result; + } + } + const result = []; + const toVisit = [ + { node: root, result } + ]; + let nextToVisit = 0; + let limitExceeded = false; + const collectOutlineEntries = (node, result) => { + if (node.type === 'array') { + node.items.forEach((node, index) => { + if (node) { + if (limit > 0) { + limit--; + const range = getRange(document, node); + const selectionRange = range; + const name = String(index); + const symbol = { name, kind: this.getSymbolKind(node.type), range, selectionRange, children: [] }; + result.push(symbol); + toVisit.push({ result: symbol.children, node }); + } + else { + limitExceeded = true; + } + } + }); + } + else if (node.type === 'object') { + node.properties.forEach((property) => { + const valueNode = property.valueNode; + if (valueNode) { + if (limit > 0) { + limit--; + const range = getRange(document, property); + const selectionRange = getRange(document, property.keyNode); + const children = []; + const symbol = { name: this.getKeyLabel(property), kind: this.getSymbolKind(valueNode.type), range, selectionRange, children, detail: this.getDetail(valueNode) }; + result.push(symbol); + toVisit.push({ result: children, node: valueNode }); + } + else { + limitExceeded = true; + } + } + }); + } + }; + // breath first traversal + while (nextToVisit < toVisit.length) { + const next = toVisit[nextToVisit++]; + collectOutlineEntries(next.node, next.result); + } + if (limitExceeded && context && context.onResultLimitExceeded) { + context.onResultLimitExceeded(resourceString); + } + return result; + } + getSymbolKind(nodeType) { + switch (nodeType) { + case 'object': + return jsonLanguageTypes_1.SymbolKind.Module; + case 'string': + return jsonLanguageTypes_1.SymbolKind.String; + case 'number': + return jsonLanguageTypes_1.SymbolKind.Number; + case 'array': + return jsonLanguageTypes_1.SymbolKind.Array; + case 'boolean': + return jsonLanguageTypes_1.SymbolKind.Boolean; + default: // 'null' + return jsonLanguageTypes_1.SymbolKind.Variable; + } + } + getKeyLabel(property) { + let name = property.keyNode.value; + if (name) { + name = name.replace(/[\n]/g, '↵'); + } + if (name && name.trim()) { + return name; + } + return `"${name}"`; + } + getDetail(node) { + if (!node) { + return undefined; + } + if (node.type === 'boolean' || node.type === 'number' || node.type === 'null' || node.type === 'string') { + return String(node.value); + } + else { + if (node.type === 'array') { + return node.children.length ? undefined : '[]'; + } + else if (node.type === 'object') { + return node.children.length ? undefined : '{}'; + } + } + return undefined; + } + findDocumentColors(document, doc, context) { + return this.schemaService.getSchemaForResource(document.uri, doc).then(schema => { + const result = []; + if (schema) { + let limit = context && typeof context.resultLimit === 'number' ? context.resultLimit : Number.MAX_VALUE; + const matchingSchemas = doc.getMatchingSchemas(schema.schema); + const visitedNode = {}; + for (const s of matchingSchemas) { + if (!s.inverted && s.schema && (s.schema.format === 'color' || s.schema.format === 'color-hex') && s.node && s.node.type === 'string') { + const nodeId = String(s.node.offset); + if (!visitedNode[nodeId]) { + const color = (0, colors_1.colorFromHex)(Parser.getNodeValue(s.node)); + if (color) { + const range = getRange(document, s.node); + result.push({ color, range }); + } + visitedNode[nodeId] = true; + limit--; + if (limit <= 0) { + if (context && context.onResultLimitExceeded) { + context.onResultLimitExceeded(document.uri); + } + return result; + } + } + } + } + } + return result; + }); + } + getColorPresentations(document, doc, color, range) { + const result = []; + const red256 = Math.round(color.red * 255), green256 = Math.round(color.green * 255), blue256 = Math.round(color.blue * 255); + function toTwoDigitHex(n) { + const r = n.toString(16); + return r.length !== 2 ? '0' + r : r; + } + let label; + if (color.alpha === 1) { + label = `#${toTwoDigitHex(red256)}${toTwoDigitHex(green256)}${toTwoDigitHex(blue256)}`; + } + else { + label = `#${toTwoDigitHex(red256)}${toTwoDigitHex(green256)}${toTwoDigitHex(blue256)}${toTwoDigitHex(Math.round(color.alpha * 255))}`; + } + result.push({ label: label, textEdit: jsonLanguageTypes_1.TextEdit.replace(range, JSON.stringify(label)) }); + return result; + } + } + exports.JSONDocumentSymbols = JSONDocumentSymbols; + function getRange(document, node) { + return jsonLanguageTypes_1.Range.create(document.positionAt(node.offset), document.positionAt(node.offset + node.length)); + } + function getName(node) { + return Parser.getNodeValue(node) || l10n.t(''); + } +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonFolding.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonFolding.js" index f7f81bc755fefe52d579c9d27ffd159c2b905c94..477f58f13cf4fd1268b17e42dc4e04abdb661372 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonFolding.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonFolding.js" @@ -1,3 +1,134 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:250274ecbe76813d16419b8f664dbec73ce6bb5c907d89f46730d75a6245a35e -size 6335 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "jsonc-parser", "../jsonLanguageTypes"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getFoldingRanges = void 0; + const jsonc_parser_1 = require("jsonc-parser"); + const jsonLanguageTypes_1 = require("../jsonLanguageTypes"); + function getFoldingRanges(document, context) { + const ranges = []; + const nestingLevels = []; + const stack = []; + let prevStart = -1; + const scanner = (0, jsonc_parser_1.createScanner)(document.getText(), false); + let token = scanner.scan(); + function addRange(range) { + ranges.push(range); + nestingLevels.push(stack.length); + } + while (token !== 17 /* SyntaxKind.EOF */) { + switch (token) { + case 1 /* SyntaxKind.OpenBraceToken */: + case 3 /* SyntaxKind.OpenBracketToken */: { + const startLine = document.positionAt(scanner.getTokenOffset()).line; + const range = { startLine, endLine: startLine, kind: token === 1 /* SyntaxKind.OpenBraceToken */ ? 'object' : 'array' }; + stack.push(range); + break; + } + case 2 /* SyntaxKind.CloseBraceToken */: + case 4 /* SyntaxKind.CloseBracketToken */: { + const kind = token === 2 /* SyntaxKind.CloseBraceToken */ ? 'object' : 'array'; + if (stack.length > 0 && stack[stack.length - 1].kind === kind) { + const range = stack.pop(); + const line = document.positionAt(scanner.getTokenOffset()).line; + if (range && line > range.startLine + 1 && prevStart !== range.startLine) { + range.endLine = line - 1; + addRange(range); + prevStart = range.startLine; + } + } + break; + } + case 13 /* SyntaxKind.BlockCommentTrivia */: { + const startLine = document.positionAt(scanner.getTokenOffset()).line; + const endLine = document.positionAt(scanner.getTokenOffset() + scanner.getTokenLength()).line; + if (scanner.getTokenError() === 1 /* ScanError.UnexpectedEndOfComment */ && startLine + 1 < document.lineCount) { + scanner.setPosition(document.offsetAt(jsonLanguageTypes_1.Position.create(startLine + 1, 0))); + } + else { + if (startLine < endLine) { + addRange({ startLine, endLine, kind: jsonLanguageTypes_1.FoldingRangeKind.Comment }); + prevStart = startLine; + } + } + break; + } + case 12 /* SyntaxKind.LineCommentTrivia */: { + const text = document.getText().substr(scanner.getTokenOffset(), scanner.getTokenLength()); + const m = text.match(/^\/\/\s*#(region\b)|(endregion\b)/); + if (m) { + const line = document.positionAt(scanner.getTokenOffset()).line; + if (m[1]) { // start pattern match + const range = { startLine: line, endLine: line, kind: jsonLanguageTypes_1.FoldingRangeKind.Region }; + stack.push(range); + } + else { + let i = stack.length - 1; + while (i >= 0 && stack[i].kind !== jsonLanguageTypes_1.FoldingRangeKind.Region) { + i--; + } + if (i >= 0) { + const range = stack[i]; + stack.length = i; + if (line > range.startLine && prevStart !== range.startLine) { + range.endLine = line; + addRange(range); + prevStart = range.startLine; + } + } + } + } + break; + } + } + token = scanner.scan(); + } + const rangeLimit = context && context.rangeLimit; + if (typeof rangeLimit !== 'number' || ranges.length <= rangeLimit) { + return ranges; + } + if (context && context.onRangeLimitExceeded) { + context.onRangeLimitExceeded(document.uri); + } + const counts = []; + for (let level of nestingLevels) { + if (level < 30) { + counts[level] = (counts[level] || 0) + 1; + } + } + let entries = 0; + let maxLevel = 0; + for (let i = 0; i < counts.length; i++) { + const n = counts[i]; + if (n) { + if (n + entries > rangeLimit) { + maxLevel = i; + break; + } + entries += n; + } + } + const result = []; + for (let i = 0; i < ranges.length; i++) { + const level = nestingLevels[i]; + if (typeof level === 'number') { + if (level < maxLevel || (level === maxLevel && entries++ < rangeLimit)) { + result.push(ranges[i]); + } + } + } + return result; + } + exports.getFoldingRanges = getFoldingRanges; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonHover.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonHover.js" index 8f68e408b5ec3ebee134582b10cf59f786165e75..cd389a143a81076bcc24d3270f8cf4f9abe00028 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonHover.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonHover.js" @@ -1,3 +1,123 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:03fbd04afaacafc8491a3cd4e7150c57994efe2bef17d75873c863157f4e46d9 -size 6201 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "../parser/jsonParser", "../jsonLanguageTypes"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.JSONHover = void 0; + const Parser = require("../parser/jsonParser"); + const jsonLanguageTypes_1 = require("../jsonLanguageTypes"); + class JSONHover { + constructor(schemaService, contributions = [], promiseConstructor) { + this.schemaService = schemaService; + this.contributions = contributions; + this.promise = promiseConstructor || Promise; + } + doHover(document, position, doc) { + const offset = document.offsetAt(position); + let node = doc.getNodeFromOffset(offset); + if (!node || (node.type === 'object' || node.type === 'array') && offset > node.offset + 1 && offset < node.offset + node.length - 1) { + return this.promise.resolve(null); + } + const hoverRangeNode = node; + // use the property description when hovering over an object key + if (node.type === 'string') { + const parent = node.parent; + if (parent && parent.type === 'property' && parent.keyNode === node) { + node = parent.valueNode; + if (!node) { + return this.promise.resolve(null); + } + } + } + const hoverRange = jsonLanguageTypes_1.Range.create(document.positionAt(hoverRangeNode.offset), document.positionAt(hoverRangeNode.offset + hoverRangeNode.length)); + const createHover = (contents) => { + const result = { + contents: contents, + range: hoverRange + }; + return result; + }; + const location = Parser.getNodePath(node); + for (let i = this.contributions.length - 1; i >= 0; i--) { + const contribution = this.contributions[i]; + const promise = contribution.getInfoContribution(document.uri, location); + if (promise) { + return promise.then(htmlContent => createHover(htmlContent)); + } + } + return this.schemaService.getSchemaForResource(document.uri, doc).then((schema) => { + if (schema && node) { + const matchingSchemas = doc.getMatchingSchemas(schema.schema, node.offset); + let title = undefined; + let markdownDescription = undefined; + let markdownEnumValueDescription = undefined, enumValue = undefined; + matchingSchemas.every((s) => { + if (s.node === node && !s.inverted && s.schema) { + title = title || s.schema.title; + markdownDescription = markdownDescription || s.schema.markdownDescription || toMarkdown(s.schema.description); + if (s.schema.enum) { + const idx = s.schema.enum.indexOf(Parser.getNodeValue(node)); + if (s.schema.markdownEnumDescriptions) { + markdownEnumValueDescription = s.schema.markdownEnumDescriptions[idx]; + } + else if (s.schema.enumDescriptions) { + markdownEnumValueDescription = toMarkdown(s.schema.enumDescriptions[idx]); + } + if (markdownEnumValueDescription) { + enumValue = s.schema.enum[idx]; + if (typeof enumValue !== 'string') { + enumValue = JSON.stringify(enumValue); + } + } + } + } + return true; + }); + let result = ''; + if (title) { + result = toMarkdown(title); + } + if (markdownDescription) { + if (result.length > 0) { + result += "\n\n"; + } + result += markdownDescription; + } + if (markdownEnumValueDescription) { + if (result.length > 0) { + result += "\n\n"; + } + result += `\`${toMarkdownCodeBlock(enumValue)}\`: ${markdownEnumValueDescription}`; + } + return createHover([result]); + } + return null; + }); + } + } + exports.JSONHover = JSONHover; + function toMarkdown(plain) { + if (plain) { + const res = plain.replace(/([^\n\r])(\r?\n)([^\n\r])/gm, '$1\n\n$3'); // single new lines to \n\n (Markdown paragraph) + return res.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash + } + return undefined; + } + function toMarkdownCodeBlock(content) { + // see https://daringfireball.net/projects/markdown/syntax#precode + if (content.indexOf('`') !== -1) { + return '`` ' + content + ' ``'; + } + return content; + } +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonLinks.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonLinks.js" index 13e50b9a556484bddd31cb753bc5b2a4172acdd7..45d5d2cb3a72c09c3bcb736413a64eb0e2381470 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonLinks.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonLinks.js" @@ -1,3 +1,86 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:85791273a9929ccf21f19b88f7e57ce1f4a59864f79b591fe12e0ff10d82ebda -size 3349 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "../jsonLanguageTypes"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.findLinks = void 0; + const jsonLanguageTypes_1 = require("../jsonLanguageTypes"); + function findLinks(document, doc) { + const links = []; + doc.visit(node => { + if (node.type === "property" && node.keyNode.value === "$ref" && node.valueNode?.type === 'string') { + const path = node.valueNode.value; + const targetNode = findTargetNode(doc, path); + if (targetNode) { + const targetPos = document.positionAt(targetNode.offset); + links.push({ + target: `${document.uri}#${targetPos.line + 1},${targetPos.character + 1}`, + range: createRange(document, node.valueNode) + }); + } + } + return true; + }); + return Promise.resolve(links); + } + exports.findLinks = findLinks; + function createRange(document, node) { + return jsonLanguageTypes_1.Range.create(document.positionAt(node.offset + 1), document.positionAt(node.offset + node.length - 1)); + } + function findTargetNode(doc, path) { + const tokens = parseJSONPointer(path); + if (!tokens) { + return null; + } + return findNode(tokens, doc.root); + } + function findNode(pointer, node) { + if (!node) { + return null; + } + if (pointer.length === 0) { + return node; + } + const token = pointer.shift(); + if (node && node.type === 'object') { + const propertyNode = node.properties.find((propertyNode) => propertyNode.keyNode.value === token); + if (!propertyNode) { + return null; + } + return findNode(pointer, propertyNode.valueNode); + } + else if (node && node.type === 'array') { + if (token.match(/^(0|[1-9][0-9]*)$/)) { + const index = Number.parseInt(token); + const arrayItem = node.items[index]; + if (!arrayItem) { + return null; + } + return findNode(pointer, arrayItem); + } + } + return null; + } + function parseJSONPointer(path) { + if (path === "#") { + return []; + } + if (path[0] !== '#' || path[1] !== '/') { + return null; + } + return path.substring(2).split(/\//).map(unescape); + } + function unescape(str) { + return str.replace(/~1/g, '/').replace(/~0/g, '~'); + } +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonSchemaService.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonSchemaService.js" index d3795f5e42f4e6268bc80762354dcb01dc4b3515..8d4e207fd56dbb1532d2b511f8974282fda219b2 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonSchemaService.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonSchemaService.js" @@ -1,3 +1,622 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:07722524cbd0defb70b9b368cef90d4c1295047248be12622dba33e97bd9a623 -size 28031 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "jsonc-parser", "vscode-uri", "../utils/strings", "../parser/jsonParser", "@vscode/l10n", "../utils/glob", "../utils/objects"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.JSONSchemaService = exports.ResolvedSchema = exports.UnresolvedSchema = void 0; + const Json = require("jsonc-parser"); + const vscode_uri_1 = require("vscode-uri"); + const Strings = require("../utils/strings"); + const Parser = require("../parser/jsonParser"); + const l10n = require("@vscode/l10n"); + const glob_1 = require("../utils/glob"); + const objects_1 = require("../utils/objects"); + const BANG = '!'; + const PATH_SEP = '/'; + class FilePatternAssociation { + constructor(pattern, folderUri, uris) { + this.folderUri = folderUri; + this.uris = uris; + this.globWrappers = []; + try { + for (let patternString of pattern) { + const include = patternString[0] !== BANG; + if (!include) { + patternString = patternString.substring(1); + } + if (patternString.length > 0) { + if (patternString[0] === PATH_SEP) { + patternString = patternString.substring(1); + } + this.globWrappers.push({ + regexp: (0, glob_1.createRegex)('**/' + patternString, { extended: true, globstar: true }), + include: include, + }); + } + } + ; + if (folderUri) { + folderUri = normalizeResourceForMatching(folderUri); + if (!folderUri.endsWith('/')) { + folderUri = folderUri + '/'; + } + this.folderUri = folderUri; + } + } + catch (e) { + this.globWrappers.length = 0; + this.uris = []; + } + } + matchesPattern(fileName) { + if (this.folderUri && !fileName.startsWith(this.folderUri)) { + return false; + } + let match = false; + for (const { regexp, include } of this.globWrappers) { + if (regexp.test(fileName)) { + match = include; + } + } + return match; + } + getURIs() { + return this.uris; + } + } + class SchemaHandle { + constructor(service, uri, unresolvedSchemaContent) { + this.service = service; + this.uri = uri; + this.dependencies = new Set(); + this.anchors = undefined; + if (unresolvedSchemaContent) { + this.unresolvedSchema = this.service.promise.resolve(new UnresolvedSchema(unresolvedSchemaContent)); + } + } + getUnresolvedSchema() { + if (!this.unresolvedSchema) { + this.unresolvedSchema = this.service.loadSchema(this.uri); + } + return this.unresolvedSchema; + } + getResolvedSchema() { + if (!this.resolvedSchema) { + this.resolvedSchema = this.getUnresolvedSchema().then(unresolved => { + return this.service.resolveSchemaContent(unresolved, this); + }); + } + return this.resolvedSchema; + } + clearSchema() { + const hasChanges = !!this.unresolvedSchema; + this.resolvedSchema = undefined; + this.unresolvedSchema = undefined; + this.dependencies.clear(); + this.anchors = undefined; + return hasChanges; + } + } + class UnresolvedSchema { + constructor(schema, errors = []) { + this.schema = schema; + this.errors = errors; + } + } + exports.UnresolvedSchema = UnresolvedSchema; + class ResolvedSchema { + constructor(schema, errors = [], warnings = [], schemaDraft) { + this.schema = schema; + this.errors = errors; + this.warnings = warnings; + this.schemaDraft = schemaDraft; + } + getSection(path) { + const schemaRef = this.getSectionRecursive(path, this.schema); + if (schemaRef) { + return Parser.asSchema(schemaRef); + } + return undefined; + } + getSectionRecursive(path, schema) { + if (!schema || typeof schema === 'boolean' || path.length === 0) { + return schema; + } + const next = path.shift(); + if (schema.properties && typeof schema.properties[next]) { + return this.getSectionRecursive(path, schema.properties[next]); + } + else if (schema.patternProperties) { + for (const pattern of Object.keys(schema.patternProperties)) { + const regex = Strings.extendedRegExp(pattern); + if (regex?.test(next)) { + return this.getSectionRecursive(path, schema.patternProperties[pattern]); + } + } + } + else if (typeof schema.additionalProperties === 'object') { + return this.getSectionRecursive(path, schema.additionalProperties); + } + else if (next.match('[0-9]+')) { + if (Array.isArray(schema.items)) { + const index = parseInt(next, 10); + if (!isNaN(index) && schema.items[index]) { + return this.getSectionRecursive(path, schema.items[index]); + } + } + else if (schema.items) { + return this.getSectionRecursive(path, schema.items); + } + } + return undefined; + } + } + exports.ResolvedSchema = ResolvedSchema; + class JSONSchemaService { + constructor(requestService, contextService, promiseConstructor) { + this.contextService = contextService; + this.requestService = requestService; + this.promiseConstructor = promiseConstructor || Promise; + this.callOnDispose = []; + this.contributionSchemas = {}; + this.contributionAssociations = []; + this.schemasById = {}; + this.filePatternAssociations = []; + this.registeredSchemasIds = {}; + } + getRegisteredSchemaIds(filter) { + return Object.keys(this.registeredSchemasIds).filter(id => { + const scheme = vscode_uri_1.URI.parse(id).scheme; + return scheme !== 'schemaservice' && (!filter || filter(scheme)); + }); + } + get promise() { + return this.promiseConstructor; + } + dispose() { + while (this.callOnDispose.length > 0) { + this.callOnDispose.pop()(); + } + } + onResourceChange(uri) { + // always clear this local cache when a resource changes + this.cachedSchemaForResource = undefined; + let hasChanges = false; + uri = normalizeId(uri); + const toWalk = [uri]; + const all = Object.keys(this.schemasById).map(key => this.schemasById[key]); + while (toWalk.length) { + const curr = toWalk.pop(); + for (let i = 0; i < all.length; i++) { + const handle = all[i]; + if (handle && (handle.uri === curr || handle.dependencies.has(curr))) { + if (handle.uri !== curr) { + toWalk.push(handle.uri); + } + if (handle.clearSchema()) { + hasChanges = true; + } + all[i] = undefined; + } + } + } + return hasChanges; + } + setSchemaContributions(schemaContributions) { + if (schemaContributions.schemas) { + const schemas = schemaContributions.schemas; + for (const id in schemas) { + const normalizedId = normalizeId(id); + this.contributionSchemas[normalizedId] = this.addSchemaHandle(normalizedId, schemas[id]); + } + } + if (Array.isArray(schemaContributions.schemaAssociations)) { + const schemaAssociations = schemaContributions.schemaAssociations; + for (let schemaAssociation of schemaAssociations) { + const uris = schemaAssociation.uris.map(normalizeId); + const association = this.addFilePatternAssociation(schemaAssociation.pattern, schemaAssociation.folderUri, uris); + this.contributionAssociations.push(association); + } + } + } + addSchemaHandle(id, unresolvedSchemaContent) { + const schemaHandle = new SchemaHandle(this, id, unresolvedSchemaContent); + this.schemasById[id] = schemaHandle; + return schemaHandle; + } + getOrAddSchemaHandle(id, unresolvedSchemaContent) { + return this.schemasById[id] || this.addSchemaHandle(id, unresolvedSchemaContent); + } + addFilePatternAssociation(pattern, folderUri, uris) { + const fpa = new FilePatternAssociation(pattern, folderUri, uris); + this.filePatternAssociations.push(fpa); + return fpa; + } + registerExternalSchema(config) { + const id = normalizeId(config.uri); + this.registeredSchemasIds[id] = true; + this.cachedSchemaForResource = undefined; + if (config.fileMatch && config.fileMatch.length) { + this.addFilePatternAssociation(config.fileMatch, config.folderUri, [id]); + } + return config.schema ? this.addSchemaHandle(id, config.schema) : this.getOrAddSchemaHandle(id); + } + clearExternalSchemas() { + this.schemasById = {}; + this.filePatternAssociations = []; + this.registeredSchemasIds = {}; + this.cachedSchemaForResource = undefined; + for (const id in this.contributionSchemas) { + this.schemasById[id] = this.contributionSchemas[id]; + this.registeredSchemasIds[id] = true; + } + for (const contributionAssociation of this.contributionAssociations) { + this.filePatternAssociations.push(contributionAssociation); + } + } + getResolvedSchema(schemaId) { + const id = normalizeId(schemaId); + const schemaHandle = this.schemasById[id]; + if (schemaHandle) { + return schemaHandle.getResolvedSchema(); + } + return this.promise.resolve(undefined); + } + loadSchema(url) { + if (!this.requestService) { + const errorMessage = l10n.t('Unable to load schema from \'{0}\'. No schema request service available', toDisplayString(url)); + return this.promise.resolve(new UnresolvedSchema({}, [errorMessage])); + } + if (url.startsWith('http://json-schema.org/')) { + url = 'https' + url.substring(4); // always access json-schema.org with https. See https://github.com/microsoft/vscode/issues/195189 + } + return this.requestService(url).then(content => { + if (!content) { + const errorMessage = l10n.t('Unable to load schema from \'{0}\': No content.', toDisplayString(url)); + return new UnresolvedSchema({}, [errorMessage]); + } + const errors = []; + if (content.charCodeAt(0) === 65279) { + errors.push(l10n.t('Problem reading content from \'{0}\': UTF-8 with BOM detected, only UTF 8 is allowed.', toDisplayString(url))); + content = content.trimStart(); + } + let schemaContent = {}; + const jsonErrors = []; + schemaContent = Json.parse(content, jsonErrors); + if (jsonErrors.length) { + errors.push(l10n.t('Unable to parse content from \'{0}\': Parse error at offset {1}.', toDisplayString(url), jsonErrors[0].offset)); + } + return new UnresolvedSchema(schemaContent, errors); + }, (error) => { + let errorMessage = error.toString(); + const errorSplit = error.toString().split('Error: '); + if (errorSplit.length > 1) { + // more concise error message, URL and context are attached by caller anyways + errorMessage = errorSplit[1]; + } + if (Strings.endsWith(errorMessage, '.')) { + errorMessage = errorMessage.substr(0, errorMessage.length - 1); + } + return new UnresolvedSchema({}, [l10n.t('Unable to load schema from \'{0}\': {1}.', toDisplayString(url), errorMessage)]); + }); + } + resolveSchemaContent(schemaToResolve, handle) { + const resolveErrors = schemaToResolve.errors.slice(0); + const schema = schemaToResolve.schema; + let schemaDraft = schema.$schema ? normalizeId(schema.$schema) : undefined; + if (schemaDraft === 'http://json-schema.org/draft-03/schema') { + return this.promise.resolve(new ResolvedSchema({}, [l10n.t("Draft-03 schemas are not supported.")], [], schemaDraft)); + } + let usesUnsupportedFeatures = new Set(); + const contextService = this.contextService; + const findSectionByJSONPointer = (schema, path) => { + path = decodeURIComponent(path); + let current = schema; + if (path[0] === '/') { + path = path.substring(1); + } + path.split('/').some((part) => { + part = part.replace(/~1/g, '/').replace(/~0/g, '~'); + current = current[part]; + return !current; + }); + return current; + }; + const findSchemaById = (schema, handle, id) => { + if (!handle.anchors) { + handle.anchors = collectAnchors(schema); + } + return handle.anchors.get(id); + }; + const merge = (target, section) => { + for (const key in section) { + if (section.hasOwnProperty(key) && key !== 'id' && key !== '$id') { + target[key] = section[key]; + } + } + }; + const mergeRef = (target, sourceRoot, sourceHandle, refSegment) => { + let section; + if (refSegment === undefined || refSegment.length === 0) { + section = sourceRoot; + } + else if (refSegment.charAt(0) === '/') { + // A $ref to a JSON Pointer (i.e #/definitions/foo) + section = findSectionByJSONPointer(sourceRoot, refSegment); + } + else { + // A $ref to a sub-schema with an $id (i.e #hello) + section = findSchemaById(sourceRoot, sourceHandle, refSegment); + } + if (section) { + merge(target, section); + } + else { + resolveErrors.push(l10n.t('$ref \'{0}\' in \'{1}\' can not be resolved.', refSegment || '', sourceHandle.uri)); + } + }; + const resolveExternalLink = (node, uri, refSegment, parentHandle) => { + if (contextService && !/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(uri)) { + uri = contextService.resolveRelativePath(uri, parentHandle.uri); + } + uri = normalizeId(uri); + const referencedHandle = this.getOrAddSchemaHandle(uri); + return referencedHandle.getUnresolvedSchema().then(unresolvedSchema => { + parentHandle.dependencies.add(uri); + if (unresolvedSchema.errors.length) { + const loc = refSegment ? uri + '#' + refSegment : uri; + resolveErrors.push(l10n.t('Problems loading reference \'{0}\': {1}', loc, unresolvedSchema.errors[0])); + } + mergeRef(node, unresolvedSchema.schema, referencedHandle, refSegment); + return resolveRefs(node, unresolvedSchema.schema, referencedHandle); + }); + }; + const resolveRefs = (node, parentSchema, parentHandle) => { + const openPromises = []; + this.traverseNodes(node, next => { + const seenRefs = new Set(); + while (next.$ref) { + const ref = next.$ref; + const segments = ref.split('#', 2); + delete next.$ref; + if (segments[0].length > 0) { + // This is a reference to an external schema + openPromises.push(resolveExternalLink(next, segments[0], segments[1], parentHandle)); + return; + } + else { + // This is a reference inside the current schema + if (!seenRefs.has(ref)) { + const id = segments[1]; + mergeRef(next, parentSchema, parentHandle, id); + seenRefs.add(ref); + } + } + } + if (next.$recursiveRef) { + usesUnsupportedFeatures.add('$recursiveRef'); + } + if (next.$dynamicRef) { + usesUnsupportedFeatures.add('$dynamicRef'); + } + }); + return this.promise.all(openPromises); + }; + const collectAnchors = (root) => { + const result = new Map(); + this.traverseNodes(root, next => { + const id = next.$id || next.id; + const anchor = (0, objects_1.isString)(id) && id.charAt(0) === '#' ? id.substring(1) : next.$anchor; + if (anchor) { + if (result.has(anchor)) { + resolveErrors.push(l10n.t('Duplicate anchor declaration: \'{0}\'', anchor)); + } + else { + result.set(anchor, next); + } + } + if (next.$recursiveAnchor) { + usesUnsupportedFeatures.add('$recursiveAnchor'); + } + if (next.$dynamicAnchor) { + usesUnsupportedFeatures.add('$dynamicAnchor'); + } + }); + return result; + }; + return resolveRefs(schema, schema, handle).then(_ => { + let resolveWarnings = []; + if (usesUnsupportedFeatures.size) { + resolveWarnings.push(l10n.t('The schema uses meta-schema features ({0}) that are not yet supported by the validator.', Array.from(usesUnsupportedFeatures.keys()).join(', '))); + } + return new ResolvedSchema(schema, resolveErrors, resolveWarnings, schemaDraft); + }); + } + traverseNodes(root, handle) { + if (!root || typeof root !== 'object') { + return Promise.resolve(null); + } + const seen = new Set(); + const collectEntries = (...entries) => { + for (const entry of entries) { + if ((0, objects_1.isObject)(entry)) { + toWalk.push(entry); + } + } + }; + const collectMapEntries = (...maps) => { + for (const map of maps) { + if ((0, objects_1.isObject)(map)) { + for (const k in map) { + const key = k; + const entry = map[key]; + if ((0, objects_1.isObject)(entry)) { + toWalk.push(entry); + } + } + } + } + }; + const collectArrayEntries = (...arrays) => { + for (const array of arrays) { + if (Array.isArray(array)) { + for (const entry of array) { + if ((0, objects_1.isObject)(entry)) { + toWalk.push(entry); + } + } + } + } + }; + const collectEntryOrArrayEntries = (items) => { + if (Array.isArray(items)) { + for (const entry of items) { + if ((0, objects_1.isObject)(entry)) { + toWalk.push(entry); + } + } + } + else if ((0, objects_1.isObject)(items)) { + toWalk.push(items); + } + }; + const toWalk = [root]; + let next = toWalk.pop(); + while (next) { + if (!seen.has(next)) { + seen.add(next); + handle(next); + collectEntries(next.additionalItems, next.additionalProperties, next.not, next.contains, next.propertyNames, next.if, next.then, next.else, next.unevaluatedItems, next.unevaluatedProperties); + collectMapEntries(next.definitions, next.$defs, next.properties, next.patternProperties, next.dependencies, next.dependentSchemas); + collectArrayEntries(next.anyOf, next.allOf, next.oneOf, next.prefixItems); + collectEntryOrArrayEntries(next.items); + } + next = toWalk.pop(); + } + } + ; + getSchemaFromProperty(resource, document) { + if (document.root?.type === 'object') { + for (const p of document.root.properties) { + if (p.keyNode.value === '$schema' && p.valueNode?.type === 'string') { + let schemaId = p.valueNode.value; + if (this.contextService && !/^\w[\w\d+.-]*:/.test(schemaId)) { // has scheme + schemaId = this.contextService.resolveRelativePath(schemaId, resource); + } + return schemaId; + } + } + } + return undefined; + } + getAssociatedSchemas(resource) { + const seen = Object.create(null); + const schemas = []; + const normalizedResource = normalizeResourceForMatching(resource); + for (const entry of this.filePatternAssociations) { + if (entry.matchesPattern(normalizedResource)) { + for (const schemaId of entry.getURIs()) { + if (!seen[schemaId]) { + schemas.push(schemaId); + seen[schemaId] = true; + } + } + } + } + return schemas; + } + getSchemaURIsForResource(resource, document) { + let schemeId = document && this.getSchemaFromProperty(resource, document); + if (schemeId) { + return [schemeId]; + } + return this.getAssociatedSchemas(resource); + } + getSchemaForResource(resource, document) { + if (document) { + // first use $schema if present + let schemeId = this.getSchemaFromProperty(resource, document); + if (schemeId) { + const id = normalizeId(schemeId); + return this.getOrAddSchemaHandle(id).getResolvedSchema(); + } + } + if (this.cachedSchemaForResource && this.cachedSchemaForResource.resource === resource) { + return this.cachedSchemaForResource.resolvedSchema; + } + const schemas = this.getAssociatedSchemas(resource); + const resolvedSchema = schemas.length > 0 ? this.createCombinedSchema(resource, schemas).getResolvedSchema() : this.promise.resolve(undefined); + this.cachedSchemaForResource = { resource, resolvedSchema }; + return resolvedSchema; + } + createCombinedSchema(resource, schemaIds) { + if (schemaIds.length === 1) { + return this.getOrAddSchemaHandle(schemaIds[0]); + } + else { + const combinedSchemaId = 'schemaservice://combinedSchema/' + encodeURIComponent(resource); + const combinedSchema = { + allOf: schemaIds.map(schemaId => ({ $ref: schemaId })) + }; + return this.addSchemaHandle(combinedSchemaId, combinedSchema); + } + } + getMatchingSchemas(document, jsonDocument, schema) { + if (schema) { + const id = schema.id || ('schemaservice://untitled/matchingSchemas/' + idCounter++); + const handle = this.addSchemaHandle(id, schema); + return handle.getResolvedSchema().then(resolvedSchema => { + return jsonDocument.getMatchingSchemas(resolvedSchema.schema).filter(s => !s.inverted); + }); + } + return this.getSchemaForResource(document.uri, jsonDocument).then(schema => { + if (schema) { + return jsonDocument.getMatchingSchemas(schema.schema).filter(s => !s.inverted); + } + return []; + }); + } + } + exports.JSONSchemaService = JSONSchemaService; + let idCounter = 0; + function normalizeId(id) { + // remove trailing '#', normalize drive capitalization + try { + return vscode_uri_1.URI.parse(id).toString(true); + } + catch (e) { + return id; + } + } + function normalizeResourceForMatching(resource) { + // remove queries and fragments, normalize drive capitalization + try { + return vscode_uri_1.URI.parse(resource).with({ fragment: null, query: null }).toString(true); + } + catch (e) { + return resource; + } + } + function toDisplayString(url) { + try { + const uri = vscode_uri_1.URI.parse(url); + if (uri.scheme === 'file') { + return uri.fsPath; + } + } + catch (e) { + // ignore + } + return url; + } +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonSelectionRanges.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonSelectionRanges.js" index a0fc0c34a147089ab0e9ea3bc9a473e5f2aeb66f..7078888120a685ad80a8b8624ab62d2f1e5acf02 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonSelectionRanges.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonSelectionRanges.js" @@ -1,3 +1,75 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d659add28f78fa2a8310493378d0f244187da4b8e6cbccd0d9de618eb3cc088b -size 3639 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "../jsonLanguageTypes", "jsonc-parser"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getSelectionRanges = void 0; + const jsonLanguageTypes_1 = require("../jsonLanguageTypes"); + const jsonc_parser_1 = require("jsonc-parser"); + function getSelectionRanges(document, positions, doc) { + function getSelectionRange(position) { + let offset = document.offsetAt(position); + let node = doc.getNodeFromOffset(offset, true); + const result = []; + while (node) { + switch (node.type) { + case 'string': + case 'object': + case 'array': + // range without ", [ or { + const cStart = node.offset + 1, cEnd = node.offset + node.length - 1; + if (cStart < cEnd && offset >= cStart && offset <= cEnd) { + result.push(newRange(cStart, cEnd)); + } + result.push(newRange(node.offset, node.offset + node.length)); + break; + case 'number': + case 'boolean': + case 'null': + case 'property': + result.push(newRange(node.offset, node.offset + node.length)); + break; + } + if (node.type === 'property' || node.parent && node.parent.type === 'array') { + const afterCommaOffset = getOffsetAfterNextToken(node.offset + node.length, 5 /* SyntaxKind.CommaToken */); + if (afterCommaOffset !== -1) { + result.push(newRange(node.offset, afterCommaOffset)); + } + } + node = node.parent; + } + let current = undefined; + for (let index = result.length - 1; index >= 0; index--) { + current = jsonLanguageTypes_1.SelectionRange.create(result[index], current); + } + if (!current) { + current = jsonLanguageTypes_1.SelectionRange.create(jsonLanguageTypes_1.Range.create(position, position)); + } + return current; + } + function newRange(start, end) { + return jsonLanguageTypes_1.Range.create(document.positionAt(start), document.positionAt(end)); + } + const scanner = (0, jsonc_parser_1.createScanner)(document.getText(), true); + function getOffsetAfterNextToken(offset, expectedToken) { + scanner.setPosition(offset); + let token = scanner.scan(); + if (token === expectedToken) { + return scanner.getTokenOffset() + scanner.getTokenLength(); + } + return -1; + } + return positions.map(getSelectionRange); + } + exports.getSelectionRanges = getSelectionRanges; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonValidation.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonValidation.js" index 106b80a188e7162766905b306105c2174740dd01..a4acabda2d662606637c78e1c9fb15a52f9dba51 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonValidation.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/services/jsonValidation.js" @@ -1,3 +1,164 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ad68f6a6ffe336aa8785cad19b9a44a15dde3d3c7a23767aa27172738fb6a73d -size 8595 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "../jsonLanguageTypes", "@vscode/l10n", "../utils/objects"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.JSONValidation = void 0; + const jsonLanguageTypes_1 = require("../jsonLanguageTypes"); + const l10n = require("@vscode/l10n"); + const objects_1 = require("../utils/objects"); + class JSONValidation { + constructor(jsonSchemaService, promiseConstructor) { + this.jsonSchemaService = jsonSchemaService; + this.promise = promiseConstructor; + this.validationEnabled = true; + } + configure(raw) { + if (raw) { + this.validationEnabled = raw.validate !== false; + this.commentSeverity = raw.allowComments ? undefined : jsonLanguageTypes_1.DiagnosticSeverity.Error; + } + } + doValidation(textDocument, jsonDocument, documentSettings, schema) { + if (!this.validationEnabled) { + return this.promise.resolve([]); + } + const diagnostics = []; + const added = {}; + const addProblem = (problem) => { + // remove duplicated messages + const signature = problem.range.start.line + ' ' + problem.range.start.character + ' ' + problem.message; + if (!added[signature]) { + added[signature] = true; + diagnostics.push(problem); + } + }; + const getDiagnostics = (schema) => { + let trailingCommaSeverity = documentSettings?.trailingCommas ? toDiagnosticSeverity(documentSettings.trailingCommas) : jsonLanguageTypes_1.DiagnosticSeverity.Error; + let commentSeverity = documentSettings?.comments ? toDiagnosticSeverity(documentSettings.comments) : this.commentSeverity; + let schemaValidation = documentSettings?.schemaValidation ? toDiagnosticSeverity(documentSettings.schemaValidation) : jsonLanguageTypes_1.DiagnosticSeverity.Warning; + let schemaRequest = documentSettings?.schemaRequest ? toDiagnosticSeverity(documentSettings.schemaRequest) : jsonLanguageTypes_1.DiagnosticSeverity.Warning; + if (schema) { + const addSchemaProblem = (errorMessage, errorCode) => { + if (jsonDocument.root && schemaRequest) { + const astRoot = jsonDocument.root; + const property = astRoot.type === 'object' ? astRoot.properties[0] : undefined; + if (property && property.keyNode.value === '$schema') { + const node = property.valueNode || property; + const range = jsonLanguageTypes_1.Range.create(textDocument.positionAt(node.offset), textDocument.positionAt(node.offset + node.length)); + addProblem(jsonLanguageTypes_1.Diagnostic.create(range, errorMessage, schemaRequest, errorCode)); + } + else { + const range = jsonLanguageTypes_1.Range.create(textDocument.positionAt(astRoot.offset), textDocument.positionAt(astRoot.offset + 1)); + addProblem(jsonLanguageTypes_1.Diagnostic.create(range, errorMessage, schemaRequest, errorCode)); + } + } + }; + if (schema.errors.length) { + addSchemaProblem(schema.errors[0], jsonLanguageTypes_1.ErrorCode.SchemaResolveError); + } + else if (schemaValidation) { + for (const warning of schema.warnings) { + addSchemaProblem(warning, jsonLanguageTypes_1.ErrorCode.SchemaUnsupportedFeature); + } + const semanticErrors = jsonDocument.validate(textDocument, schema.schema, schemaValidation, documentSettings?.schemaDraft); + if (semanticErrors) { + semanticErrors.forEach(addProblem); + } + } + if (schemaAllowsComments(schema.schema)) { + commentSeverity = undefined; + } + if (schemaAllowsTrailingCommas(schema.schema)) { + trailingCommaSeverity = undefined; + } + } + for (const p of jsonDocument.syntaxErrors) { + if (p.code === jsonLanguageTypes_1.ErrorCode.TrailingComma) { + if (typeof trailingCommaSeverity !== 'number') { + continue; + } + p.severity = trailingCommaSeverity; + } + addProblem(p); + } + if (typeof commentSeverity === 'number') { + const message = l10n.t('Comments are not permitted in JSON.'); + jsonDocument.comments.forEach(c => { + addProblem(jsonLanguageTypes_1.Diagnostic.create(c, message, commentSeverity, jsonLanguageTypes_1.ErrorCode.CommentNotPermitted)); + }); + } + return diagnostics; + }; + if (schema) { + const uri = schema.id || ('schemaservice://untitled/' + idCounter++); + const handle = this.jsonSchemaService.registerExternalSchema({ uri, schema }); + return handle.getResolvedSchema().then(resolvedSchema => { + return getDiagnostics(resolvedSchema); + }); + } + return this.jsonSchemaService.getSchemaForResource(textDocument.uri, jsonDocument).then(schema => { + return getDiagnostics(schema); + }); + } + getLanguageStatus(textDocument, jsonDocument) { + return { schemas: this.jsonSchemaService.getSchemaURIsForResource(textDocument.uri, jsonDocument) }; + } + } + exports.JSONValidation = JSONValidation; + let idCounter = 0; + function schemaAllowsComments(schemaRef) { + if (schemaRef && typeof schemaRef === 'object') { + if ((0, objects_1.isBoolean)(schemaRef.allowComments)) { + return schemaRef.allowComments; + } + if (schemaRef.allOf) { + for (const schema of schemaRef.allOf) { + const allow = schemaAllowsComments(schema); + if ((0, objects_1.isBoolean)(allow)) { + return allow; + } + } + } + } + return undefined; + } + function schemaAllowsTrailingCommas(schemaRef) { + if (schemaRef && typeof schemaRef === 'object') { + if ((0, objects_1.isBoolean)(schemaRef.allowTrailingCommas)) { + return schemaRef.allowTrailingCommas; + } + const deprSchemaRef = schemaRef; + if ((0, objects_1.isBoolean)(deprSchemaRef['allowsTrailingCommas'])) { // deprecated + return deprSchemaRef['allowsTrailingCommas']; + } + if (schemaRef.allOf) { + for (const schema of schemaRef.allOf) { + const allow = schemaAllowsTrailingCommas(schema); + if ((0, objects_1.isBoolean)(allow)) { + return allow; + } + } + } + } + return undefined; + } + function toDiagnosticSeverity(severityLevel) { + switch (severityLevel) { + case 'error': return jsonLanguageTypes_1.DiagnosticSeverity.Error; + case 'warning': return jsonLanguageTypes_1.DiagnosticSeverity.Warning; + case 'ignore': return undefined; + } + return undefined; + } +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/colors.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/colors.js" index 467f1e97478532240301f719b740d17711df6721..ae8f7fa72058fd2f0e6ca996a15fb10bed64406c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/colors.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/colors.js" @@ -1,3 +1,84 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4e4e32e7b55cc0c068945dc071af69e1f987470427941b5acdcd1f9fa910e19f -size 3398 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.colorFrom256RGB = exports.colorFromHex = exports.hexDigit = void 0; + const Digit0 = 48; + const Digit9 = 57; + const A = 65; + const a = 97; + const f = 102; + function hexDigit(charCode) { + if (charCode < Digit0) { + return 0; + } + if (charCode <= Digit9) { + return charCode - Digit0; + } + if (charCode < a) { + charCode += (a - A); + } + if (charCode >= a && charCode <= f) { + return charCode - a + 10; + } + return 0; + } + exports.hexDigit = hexDigit; + function colorFromHex(text) { + if (text[0] !== '#') { + return undefined; + } + switch (text.length) { + case 4: + return { + red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0, + green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0, + blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0, + alpha: 1 + }; + case 5: + return { + red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0, + green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0, + blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0, + alpha: (hexDigit(text.charCodeAt(4)) * 0x11) / 255.0, + }; + case 7: + return { + red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0, + green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0, + blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0, + alpha: 1 + }; + case 9: + return { + red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0, + green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0, + blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0, + alpha: (hexDigit(text.charCodeAt(7)) * 0x10 + hexDigit(text.charCodeAt(8))) / 255.0 + }; + } + return undefined; + } + exports.colorFromHex = colorFromHex; + function colorFrom256RGB(red, green, blue, alpha = 1.0) { + return { + red: red / 255.0, + green: green / 255.0, + blue: blue / 255.0, + alpha + }; + } + exports.colorFrom256RGB = colorFrom256RGB; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/format.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/format.js" index 58dbc58dfb45b782a5b1991160c0a75605eb1f8b..d18e9e1438f39554a61a46ae8955411315cd1507 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/format.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/format.js" @@ -1,3 +1,34 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4a772531a8571c3f4991e518e9da57c83de4e46c7155cd63fd232d3dcca1e991 -size 1658 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "jsonc-parser", "../jsonLanguageTypes"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.format = void 0; + const jsonc_parser_1 = require("jsonc-parser"); + const jsonLanguageTypes_1 = require("../jsonLanguageTypes"); + function format(documentToFormat, formattingOptions, formattingRange) { + let range = undefined; + if (formattingRange) { + const offset = documentToFormat.offsetAt(formattingRange.start); + const length = documentToFormat.offsetAt(formattingRange.end) - offset; + range = { offset, length }; + } + const options = { + tabSize: formattingOptions ? formattingOptions.tabSize : 4, + insertSpaces: formattingOptions?.insertSpaces === true, + insertFinalNewline: formattingOptions?.insertFinalNewline === true, + eol: '\n', + keepLines: formattingOptions?.keepLines === true + }; + return (0, jsonc_parser_1.format)(documentToFormat.getText(), range, options).map(edit => { + return jsonLanguageTypes_1.TextEdit.replace(jsonLanguageTypes_1.Range.create(documentToFormat.positionAt(edit.offset), documentToFormat.positionAt(edit.offset + edit.length)), edit.content); + }); + } + exports.format = format; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/glob.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/glob.js" index 829e20659dfa666457cefff02afae8f9f9709ce9..ed4c399f74b28bca4b83a23fef624de89dc64922 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/glob.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/glob.js" @@ -1,3 +1,138 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b25251aef692ff8f003d0e24e7bfb24aa5ad475c21e1ecbc14fe7233fcb99be9 -size 6020 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createRegex = void 0; + /*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Copyright (c) 2013, Nick Fitzgerald + * Licensed under the MIT License. See LICENCE.md in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + function createRegex(glob, opts) { + if (typeof glob !== 'string') { + throw new TypeError('Expected a string'); + } + const str = String(glob); + // The regexp we are building, as a string. + let reStr = ""; + // Whether we are matching so called "extended" globs (like bash) and should + // support single character matching, matching ranges of characters, group + // matching, etc. + const extended = opts ? !!opts.extended : false; + // When globstar is _false_ (default), '/foo/*' is translated a regexp like + // '^\/foo\/.*$' which will match any string beginning with '/foo/' + // When globstar is _true_, '/foo/*' is translated to regexp like + // '^\/foo\/[^/]*$' which will match any string beginning with '/foo/' BUT + // which does not have a '/' to the right of it. + // E.g. with '/foo/*' these will match: '/foo/bar', '/foo/bar.txt' but + // these will not '/foo/bar/baz', '/foo/bar/baz.txt' + // Lastely, when globstar is _true_, '/foo/**' is equivelant to '/foo/*' when + // globstar is _false_ + const globstar = opts ? !!opts.globstar : false; + // If we are doing extended matching, this boolean is true when we are inside + // a group (eg {*.html,*.js}), and false otherwise. + let inGroup = false; + // RegExp flags (eg "i" ) to pass in to RegExp constructor. + const flags = opts && typeof (opts.flags) === "string" ? opts.flags : ""; + let c; + for (let i = 0, len = str.length; i < len; i++) { + c = str[i]; + switch (c) { + case "/": + case "$": + case "^": + case "+": + case ".": + case "(": + case ")": + case "=": + case "!": + case "|": + reStr += "\\" + c; + break; + case "?": + if (extended) { + reStr += "."; + break; + } + case "[": + case "]": + if (extended) { + reStr += c; + break; + } + case "{": + if (extended) { + inGroup = true; + reStr += "("; + break; + } + case "}": + if (extended) { + inGroup = false; + reStr += ")"; + break; + } + case ",": + if (inGroup) { + reStr += "|"; + break; + } + reStr += "\\" + c; + break; + case "*": + // Move over all consecutive "*"'s. + // Also store the previous and next characters + const prevChar = str[i - 1]; + let starCount = 1; + while (str[i + 1] === "*") { + starCount++; + i++; + } + const nextChar = str[i + 1]; + if (!globstar) { + // globstar is disabled, so treat any number of "*" as one + reStr += ".*"; + } + else { + // globstar is enabled, so determine if this is a globstar segment + const isGlobstar = starCount > 1 // multiple "*"'s + && (prevChar === "/" || prevChar === undefined || prevChar === '{' || prevChar === ',') // from the start of the segment + && (nextChar === "/" || nextChar === undefined || nextChar === ',' || nextChar === '}'); // to the end of the segment + if (isGlobstar) { + if (nextChar === "/") { + i++; // move over the "/" + } + else if (prevChar === '/' && reStr.endsWith('\\/')) { + reStr = reStr.substr(0, reStr.length - 2); + } + // it's a globstar, so match zero or more path segments + reStr += "((?:[^/]*(?:\/|$))*)"; + } + else { + // it's not a globstar, so only match one path segment + reStr += "([^/]*)"; + } + } + break; + default: + reStr += c; + } + } + // When regexp 'g' flag is specified don't + // constrain the regular expression with ^ & $ + if (!flags || !~flags.indexOf('g')) { + reStr = "^" + reStr + "$"; + } + return new RegExp(reStr, flags); + } + exports.createRegex = createRegex; + ; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/json.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/json.js" index e1be7093a47215c6e6b921e17ab14e726c2ded55..671d2bd4fcfd452b04066af87173c49134ce12e5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/json.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/json.js" @@ -1,3 +1,56 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:419e5866ad2c3fd783318c1203e1e2be188d9067616f2c464fde27050c77cf79 -size 2309 +/*--------------------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +* Licensed under the MIT License. See License.txt in the project root for license information. +*--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.stringifyObject = void 0; + function stringifyObject(obj, indent, stringifyLiteral) { + if (obj !== null && typeof obj === 'object') { + const newIndent = indent + '\t'; + if (Array.isArray(obj)) { + if (obj.length === 0) { + return '[]'; + } + let result = '[\n'; + for (let i = 0; i < obj.length; i++) { + result += newIndent + stringifyObject(obj[i], newIndent, stringifyLiteral); + if (i < obj.length - 1) { + result += ','; + } + result += '\n'; + } + result += indent + ']'; + return result; + } + else { + const keys = Object.keys(obj); + if (keys.length === 0) { + return '{}'; + } + let result = '{\n'; + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + result += newIndent + JSON.stringify(key) + ': ' + stringifyObject(obj[key], newIndent, stringifyLiteral); + if (i < keys.length - 1) { + result += ','; + } + result += '\n'; + } + result += indent + '}'; + return result; + } + } + return stringifyLiteral(obj); + } + exports.stringifyObject = stringifyObject; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/objects.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/objects.js" index 6dbc80563629eae1834fe6d6b23caf91eca55207..79030d41c715bd6aa576cd9366c4d522bc7bec92 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/objects.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/objects.js" @@ -1,3 +1,87 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:afee92bec5158b338d9b31bc1036d9cf6eb4176d7e5bf9461ff1c452c2fb28d2 -size 2934 +/*--------------------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +* Licensed under the MIT License. See License.txt in the project root for license information. +*--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isObject = exports.isString = exports.isBoolean = exports.isDefined = exports.isNumber = exports.equals = void 0; + function equals(one, other) { + if (one === other) { + return true; + } + if (one === null || one === undefined || other === null || other === undefined) { + return false; + } + if (typeof one !== typeof other) { + return false; + } + if (typeof one !== 'object') { + return false; + } + if ((Array.isArray(one)) !== (Array.isArray(other))) { + return false; + } + let i, key; + if (Array.isArray(one)) { + if (one.length !== other.length) { + return false; + } + for (i = 0; i < one.length; i++) { + if (!equals(one[i], other[i])) { + return false; + } + } + } + else { + const oneKeys = []; + for (key in one) { + oneKeys.push(key); + } + oneKeys.sort(); + const otherKeys = []; + for (key in other) { + otherKeys.push(key); + } + otherKeys.sort(); + if (!equals(oneKeys, otherKeys)) { + return false; + } + for (i = 0; i < oneKeys.length; i++) { + if (!equals(one[oneKeys[i]], other[oneKeys[i]])) { + return false; + } + } + } + return true; + } + exports.equals = equals; + function isNumber(val) { + return typeof val === 'number'; + } + exports.isNumber = isNumber; + function isDefined(val) { + return typeof val !== 'undefined'; + } + exports.isDefined = isDefined; + function isBoolean(val) { + return typeof val === 'boolean'; + } + exports.isBoolean = isBoolean; + function isString(val) { + return typeof val === 'string'; + } + exports.isString = isString; + function isObject(val) { + return typeof val === 'object' && val !== null && !Array.isArray(val); + } + exports.isObject = isObject; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/propertyTree.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/propertyTree.js" index ee08d878c9f4f7a6252f580c3c4280924c183ea0..1d5fa31af835c39ca1b59a7abf07c8c25d7d7011 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/propertyTree.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/propertyTree.js" @@ -1,3 +1,90 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:16934f8209041417790db2c67e28d8eca628a0410319909312f27c494c40a7ca -size 3637 +/*--------------------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +* Licensed under the MIT License. See License.txt in the project root for license information. +*--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.PropertyTree = exports.Container = void 0; + var Container; + (function (Container) { + Container[Container["Object"] = 0] = "Object"; + Container[Container["Array"] = 1] = "Array"; + })(Container || (exports.Container = Container = {})); + class PropertyTree { + constructor(propertyName, beginningLineNumber) { + this.propertyName = propertyName ?? ''; + this.beginningLineNumber = beginningLineNumber; + this.childrenProperties = []; + this.lastProperty = false; + this.noKeyName = false; + } + addChildProperty(childProperty) { + childProperty.parent = this; + if (this.childrenProperties.length > 0) { + let insertionIndex = 0; + if (childProperty.noKeyName) { + insertionIndex = this.childrenProperties.length; + } + else { + insertionIndex = binarySearchOnPropertyArray(this.childrenProperties, childProperty, compareProperties); + } + if (insertionIndex < 0) { + insertionIndex = (insertionIndex * -1) - 1; + } + this.childrenProperties.splice(insertionIndex, 0, childProperty); + } + else { + this.childrenProperties.push(childProperty); + } + return childProperty; + } + } + exports.PropertyTree = PropertyTree; + function compareProperties(propertyTree1, propertyTree2) { + const propertyName1 = propertyTree1.propertyName.toLowerCase(); + const propertyName2 = propertyTree2.propertyName.toLowerCase(); + if (propertyName1 < propertyName2) { + return -1; + } + else if (propertyName1 > propertyName2) { + return 1; + } + return 0; + } + function binarySearchOnPropertyArray(propertyTreeArray, propertyTree, compare_fn) { + const propertyName = propertyTree.propertyName.toLowerCase(); + const firstPropertyInArrayName = propertyTreeArray[0].propertyName.toLowerCase(); + const lastPropertyInArrayName = propertyTreeArray[propertyTreeArray.length - 1].propertyName.toLowerCase(); + if (propertyName < firstPropertyInArrayName) { + return 0; + } + if (propertyName > lastPropertyInArrayName) { + return propertyTreeArray.length; + } + let m = 0; + let n = propertyTreeArray.length - 1; + while (m <= n) { + let k = (n + m) >> 1; + let cmp = compare_fn(propertyTree, propertyTreeArray[k]); + if (cmp > 0) { + m = k + 1; + } + else if (cmp < 0) { + n = k - 1; + } + else { + return k; + } + } + return -m - 1; + } +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/sort.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/sort.js" index 397f262baab7cbb0509653483c6332964596dede..b3aabea955d4eeb3d9401dbcf67749bd68eda51e 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/sort.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/sort.js" @@ -1,3 +1,382 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:067d23ffef72d22e6b6e5bc7e88c14446ea38622318f82ab9c0fa2961ed6105b -size 26678 +/*--------------------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +* Licensed under the MIT License. See License.txt in the project root for license information. +*--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "jsonc-parser", "../jsonLanguageTypes", "./format", "./propertyTree"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.sort = void 0; + // import { TextEdit} from 'vscode-languageserver-textdocument'; + const jsonc_parser_1 = require("jsonc-parser"); + const jsonLanguageTypes_1 = require("../jsonLanguageTypes"); + const format_1 = require("./format"); + const propertyTree_1 = require("./propertyTree"); + function sort(documentToSort, formattingOptions) { + const options = { + ...formattingOptions, + keepLines: false, // keepLines must be false so that the properties are on separate lines for the sorting + }; + const formattedJsonString = jsonLanguageTypes_1.TextDocument.applyEdits(documentToSort, (0, format_1.format)(documentToSort, options, undefined)); + const formattedJsonDocument = jsonLanguageTypes_1.TextDocument.create('test://test.json', 'json', 0, formattedJsonString); + const jsonPropertyTree = findJsoncPropertyTree(formattedJsonDocument); + const sortedJsonDocument = sortJsoncDocument(formattedJsonDocument, jsonPropertyTree); + const edits = (0, format_1.format)(sortedJsonDocument, options, undefined); + const sortedAndFormattedJsonDocument = jsonLanguageTypes_1.TextDocument.applyEdits(sortedJsonDocument, edits); + return [jsonLanguageTypes_1.TextEdit.replace(jsonLanguageTypes_1.Range.create(jsonLanguageTypes_1.Position.create(0, 0), documentToSort.positionAt(documentToSort.getText().length)), sortedAndFormattedJsonDocument)]; + } + exports.sort = sort; + function findJsoncPropertyTree(formattedDocument) { + const formattedString = formattedDocument.getText(); + const scanner = (0, jsonc_parser_1.createScanner)(formattedString, false); + // The tree that will be returned + let rootTree = new propertyTree_1.PropertyTree(); + // The tree where the current properties can be added as children + let currentTree = rootTree; + // The tree representing the current property analyzed + let currentProperty = rootTree; + // The tree representing the previous property analyzed + let lastProperty = rootTree; + // The current scanned token + let token = undefined; + // Line number of the last token found + let lastTokenLine = 0; + // Total number of characters on the lines prior to current line + let numberOfCharactersOnPreviousLines = 0; + // The last token scanned that is not trivial, nor a comment + let lastNonTriviaNonCommentToken = undefined; + // The second to last token scanned that is not trivial, nor a comment + let secondToLastNonTriviaNonCommentToken = undefined; + // Line number of last token that is not trivial, nor a comment + let lineOfLastNonTriviaNonCommentToken = -1; + // End index on its line of last token that is not trivial, nor a comment + let endIndexOfLastNonTriviaNonCommentToken = -1; + // Line number of the start of the range of current/next property + let beginningLineNumber = 0; + // Line number of the end of the range of current/next property + let endLineNumber = 0; + // Stack indicating whether we are inside of an object or an array + let currentContainerStack = []; + // Boolean indicating that the current property end line number needs to be updated. Used only when block comments are encountered. + let updateLastPropertyEndLineNumber = false; + // Boolean indicating that the beginning line number should be updated. Used only when block comments are encountered. + let updateBeginningLineNumber = false; + while ((token = scanner.scan()) !== 17 /* SyntaxKind.EOF */) { + // In the case when a block comment has been encountered that starts on the same line as the comma ending a property, update the end line of that + // property so that it covers the block comment. For example, if we have: + // 1. "key" : {}, /* some block + // 2. comment */ + // Then, the end line of the property "key" should be line 2 not line 1 + if (updateLastPropertyEndLineNumber === true + && token !== 14 /* SyntaxKind.LineBreakTrivia */ + && token !== 15 /* SyntaxKind.Trivia */ + && token !== 12 /* SyntaxKind.LineCommentTrivia */ + && token !== 13 /* SyntaxKind.BlockCommentTrivia */ + && currentProperty.endLineNumber === undefined) { + let endLineNumber = scanner.getTokenStartLine(); + // Update the end line number in the case when the last property visited is a container (object or array) + if (secondToLastNonTriviaNonCommentToken === 2 /* SyntaxKind.CloseBraceToken */ + || secondToLastNonTriviaNonCommentToken === 4 /* SyntaxKind.CloseBracketToken */) { + lastProperty.endLineNumber = endLineNumber - 1; + } + // Update the end line number in the case when the last property visited is a simple property + else { + currentProperty.endLineNumber = endLineNumber - 1; + } + beginningLineNumber = endLineNumber; + updateLastPropertyEndLineNumber = false; + } + // When a block comment follows an open brace or an open bracket, that block comment should be associated to that brace or bracket, not the property below it. For example, for: + // 1. { /* + // 2. ... */ + // 3. "key" : {} + // 4. } + // Instead of associating the block comment to the property on line 3, it is associate to the property on line 1 + if (updateBeginningLineNumber === true + && token !== 14 /* SyntaxKind.LineBreakTrivia */ + && token !== 15 /* SyntaxKind.Trivia */ + && token !== 12 /* SyntaxKind.LineCommentTrivia */ + && token !== 13 /* SyntaxKind.BlockCommentTrivia */) { + beginningLineNumber = scanner.getTokenStartLine(); + updateBeginningLineNumber = false; + } + // Update the number of characters on all the previous lines each time the new token is on a different line to the previous token + if (scanner.getTokenStartLine() !== lastTokenLine) { + for (let i = lastTokenLine; i < scanner.getTokenStartLine(); i++) { + const lengthOfLine = formattedDocument.getText(jsonLanguageTypes_1.Range.create(jsonLanguageTypes_1.Position.create(i, 0), jsonLanguageTypes_1.Position.create(i + 1, 0))).length; + numberOfCharactersOnPreviousLines = numberOfCharactersOnPreviousLines + lengthOfLine; + } + lastTokenLine = scanner.getTokenStartLine(); + } + switch (token) { + // When a string is found, if it follows an open brace or a comma token and it is within an object, then it corresponds to a key name, not a simple string + case 10 /* SyntaxKind.StringLiteral */: { + if ((lastNonTriviaNonCommentToken === undefined + || lastNonTriviaNonCommentToken === 1 /* SyntaxKind.OpenBraceToken */ + || (lastNonTriviaNonCommentToken === 5 /* SyntaxKind.CommaToken */ + && currentContainerStack[currentContainerStack.length - 1] === propertyTree_1.Container.Object))) { + // In that case create the child property which starts at beginningLineNumber, add it to the current tree + const childProperty = new propertyTree_1.PropertyTree(scanner.getTokenValue(), beginningLineNumber); + lastProperty = currentProperty; + currentProperty = currentTree.addChildProperty(childProperty); + } + break; + } + // When the token is an open bracket, then we enter into an array + case 3 /* SyntaxKind.OpenBracketToken */: { + // If the root tree beginning line number is not defined, then this open bracket is the first open bracket in the document + if (rootTree.beginningLineNumber === undefined) { + rootTree.beginningLineNumber = scanner.getTokenStartLine(); + } + // Suppose we are inside of an object, then the current array is associated to a key, and has already been created + // We have the following configuration: {"a": "val", "array": [...], "b": "val"} + // In that case navigate down to the child property + if (currentContainerStack[currentContainerStack.length - 1] === propertyTree_1.Container.Object) { + currentTree = currentProperty; + } + // Suppose we are inside of an array, then since the current array is not associated to a key, it has not been created yet + // We have the following configuration: ["a", [...], "b"] + // In that case create the property and navigate down + else if (currentContainerStack[currentContainerStack.length - 1] === propertyTree_1.Container.Array) { + const childProperty = new propertyTree_1.PropertyTree(scanner.getTokenValue(), beginningLineNumber); + childProperty.noKeyName = true; + lastProperty = currentProperty; + currentProperty = currentTree.addChildProperty(childProperty); + currentTree = currentProperty; + } + currentContainerStack.push(propertyTree_1.Container.Array); + currentProperty.type = propertyTree_1.Container.Array; + beginningLineNumber = scanner.getTokenStartLine(); + beginningLineNumber++; + break; + } + // When the token is an open brace, then we enter into an object + case 1 /* SyntaxKind.OpenBraceToken */: { + // If the root tree beginning line number is not defined, then this open brace is the first open brace in the document + if (rootTree.beginningLineNumber === undefined) { + rootTree.beginningLineNumber = scanner.getTokenStartLine(); + } + // 1. If we are inside of an objet, the current object is associated to a key and has already been created + // We have the following configuration: {"a": "val", "object": {...}, "b": "val"} + // 2. Otherwise the current object property is inside of an array, not associated to a key name and the property has not yet been created + // We have the following configuration: ["a", {...}, "b"] + else if (currentContainerStack[currentContainerStack.length - 1] === propertyTree_1.Container.Array) { + const childProperty = new propertyTree_1.PropertyTree(scanner.getTokenValue(), beginningLineNumber); + childProperty.noKeyName = true; + lastProperty = currentProperty; + currentProperty = currentTree.addChildProperty(childProperty); + } + currentProperty.type = propertyTree_1.Container.Object; + currentContainerStack.push(propertyTree_1.Container.Object); + currentTree = currentProperty; + beginningLineNumber = scanner.getTokenStartLine(); + beginningLineNumber++; + break; + } + case 4 /* SyntaxKind.CloseBracketToken */: { + endLineNumber = scanner.getTokenStartLine(); + currentContainerStack.pop(); + // If the last non-trivial non-comment token is a closing brace or bracket, then the currentProperty end line number has not been set yet so set it + // The configuration considered is: [..., {}] or [..., []] + if (currentProperty.endLineNumber === undefined + && (lastNonTriviaNonCommentToken === 2 /* SyntaxKind.CloseBraceToken */ + || lastNonTriviaNonCommentToken === 4 /* SyntaxKind.CloseBracketToken */)) { + currentProperty.endLineNumber = endLineNumber - 1; + currentProperty.lastProperty = true; + currentProperty.lineWhereToAddComma = lineOfLastNonTriviaNonCommentToken; + currentProperty.indexWhereToAddComa = endIndexOfLastNonTriviaNonCommentToken; + lastProperty = currentProperty; + currentProperty = currentProperty ? currentProperty.parent : undefined; + currentTree = currentProperty; + } + rootTree.endLineNumber = endLineNumber; + beginningLineNumber = endLineNumber + 1; + break; + } + case 2 /* SyntaxKind.CloseBraceToken */: { + endLineNumber = scanner.getTokenStartLine(); + currentContainerStack.pop(); + // If we are not inside of an empty object + if (lastNonTriviaNonCommentToken !== 1 /* SyntaxKind.OpenBraceToken */) { + // If current property end line number has not yet been defined, define it + if (currentProperty.endLineNumber === undefined) { + currentProperty.endLineNumber = endLineNumber - 1; + // The current property is also the last property + currentProperty.lastProperty = true; + // The last property of an object is associated with the line and index of where to add the comma, in case after sorting, it is no longer the last property + currentProperty.lineWhereToAddComma = lineOfLastNonTriviaNonCommentToken; + currentProperty.indexWhereToAddComa = endIndexOfLastNonTriviaNonCommentToken; + } + lastProperty = currentProperty; + currentProperty = currentProperty ? currentProperty.parent : undefined; + currentTree = currentProperty; + } + rootTree.endLineNumber = scanner.getTokenStartLine(); + beginningLineNumber = endLineNumber + 1; + break; + } + case 5 /* SyntaxKind.CommaToken */: { + endLineNumber = scanner.getTokenStartLine(); + // If the current container is an object or the current container is an array and the last non-trivia non-comment token is a closing brace or a closing bracket + // Then update the end line number of the current property + if (currentProperty.endLineNumber === undefined + && (currentContainerStack[currentContainerStack.length - 1] === propertyTree_1.Container.Object + || (currentContainerStack[currentContainerStack.length - 1] === propertyTree_1.Container.Array + && (lastNonTriviaNonCommentToken === 2 /* SyntaxKind.CloseBraceToken */ + || lastNonTriviaNonCommentToken === 4 /* SyntaxKind.CloseBracketToken */)))) { + currentProperty.endLineNumber = endLineNumber; + // Store the line and the index of the comma in case it needs to be removed during the sorting + currentProperty.commaIndex = scanner.getTokenOffset() - numberOfCharactersOnPreviousLines; + currentProperty.commaLine = endLineNumber; + } + if (lastNonTriviaNonCommentToken === 2 /* SyntaxKind.CloseBraceToken */ + || lastNonTriviaNonCommentToken === 4 /* SyntaxKind.CloseBracketToken */) { + lastProperty = currentProperty; + currentProperty = currentProperty ? currentProperty.parent : undefined; + currentTree = currentProperty; + } + beginningLineNumber = endLineNumber + 1; + break; + } + case 13 /* SyntaxKind.BlockCommentTrivia */: { + // If the last non trivia non-comment token is a comma and the block comment starts on the same line as the comma, then update the end line number of the current property. For example if: + // 1. {}, /* ... + // 2. ..*/ + // The the property on line 1 shoud end on line 2, not line 1 + // In the case we are in an array we update the end line number only if the second to last non-trivia non-comment token is a closing brace or bracket + if (lastNonTriviaNonCommentToken === 5 /* SyntaxKind.CommaToken */ + && lineOfLastNonTriviaNonCommentToken === scanner.getTokenStartLine() + && (currentContainerStack[currentContainerStack.length - 1] === propertyTree_1.Container.Array + && (secondToLastNonTriviaNonCommentToken === 2 /* SyntaxKind.CloseBraceToken */ + || secondToLastNonTriviaNonCommentToken === 4 /* SyntaxKind.CloseBracketToken */) + || currentContainerStack[currentContainerStack.length - 1] === propertyTree_1.Container.Object)) { + if (currentContainerStack[currentContainerStack.length - 1] === propertyTree_1.Container.Array && (secondToLastNonTriviaNonCommentToken === 2 /* SyntaxKind.CloseBraceToken */ || secondToLastNonTriviaNonCommentToken === 4 /* SyntaxKind.CloseBracketToken */) || currentContainerStack[currentContainerStack.length - 1] === propertyTree_1.Container.Object) { + currentProperty.endLineNumber = undefined; + updateLastPropertyEndLineNumber = true; + } + } + // When the block comment follows an open brace or an open token, we have the following scenario: + // { /** + // ../ + // } + // The block comment should be assigned to the open brace not the first property below it + if ((lastNonTriviaNonCommentToken === 1 /* SyntaxKind.OpenBraceToken */ + || lastNonTriviaNonCommentToken === 3 /* SyntaxKind.OpenBracketToken */) + && lineOfLastNonTriviaNonCommentToken === scanner.getTokenStartLine()) { + updateBeginningLineNumber = true; + } + break; + } + } + // Update the last and second to last non-trivia non-comment tokens + if (token !== 14 /* SyntaxKind.LineBreakTrivia */ + && token !== 13 /* SyntaxKind.BlockCommentTrivia */ + && token !== 12 /* SyntaxKind.LineCommentTrivia */ + && token !== 15 /* SyntaxKind.Trivia */) { + secondToLastNonTriviaNonCommentToken = lastNonTriviaNonCommentToken; + lastNonTriviaNonCommentToken = token; + lineOfLastNonTriviaNonCommentToken = scanner.getTokenStartLine(); + endIndexOfLastNonTriviaNonCommentToken = scanner.getTokenOffset() + scanner.getTokenLength() - numberOfCharactersOnPreviousLines; + } + } + return rootTree; + } + function sortJsoncDocument(jsonDocument, propertyTree) { + if (propertyTree.childrenProperties.length === 0) { + return jsonDocument; + } + const sortedJsonDocument = jsonLanguageTypes_1.TextDocument.create('test://test.json', 'json', 0, jsonDocument.getText()); + const queueToSort = []; + updateSortingQueue(queueToSort, propertyTree, propertyTree.beginningLineNumber); + while (queueToSort.length > 0) { + const dataToSort = queueToSort.shift(); + const propertyTreeArray = dataToSort.propertyTreeArray; + let beginningLineNumber = dataToSort.beginningLineNumber; + for (let i = 0; i < propertyTreeArray.length; i++) { + const propertyTree = propertyTreeArray[i]; + const range = jsonLanguageTypes_1.Range.create(jsonLanguageTypes_1.Position.create(propertyTree.beginningLineNumber, 0), jsonLanguageTypes_1.Position.create(propertyTree.endLineNumber + 1, 0)); + const jsonContentToReplace = jsonDocument.getText(range); + const jsonDocumentToReplace = jsonLanguageTypes_1.TextDocument.create('test://test.json', 'json', 0, jsonContentToReplace); + if (propertyTree.lastProperty === true && i !== propertyTreeArray.length - 1) { + const lineWhereToAddComma = propertyTree.lineWhereToAddComma - propertyTree.beginningLineNumber; + const indexWhereToAddComma = propertyTree.indexWhereToAddComa; + const edit = { + range: jsonLanguageTypes_1.Range.create(jsonLanguageTypes_1.Position.create(lineWhereToAddComma, indexWhereToAddComma), jsonLanguageTypes_1.Position.create(lineWhereToAddComma, indexWhereToAddComma)), + text: ',' + }; + jsonLanguageTypes_1.TextDocument.update(jsonDocumentToReplace, [edit], 1); + } + else if (propertyTree.lastProperty === false && i === propertyTreeArray.length - 1) { + const commaIndex = propertyTree.commaIndex; + const commaLine = propertyTree.commaLine; + const lineWhereToRemoveComma = commaLine - propertyTree.beginningLineNumber; + const edit = { + range: jsonLanguageTypes_1.Range.create(jsonLanguageTypes_1.Position.create(lineWhereToRemoveComma, commaIndex), jsonLanguageTypes_1.Position.create(lineWhereToRemoveComma, commaIndex + 1)), + text: '' + }; + jsonLanguageTypes_1.TextDocument.update(jsonDocumentToReplace, [edit], 1); + } + const length = propertyTree.endLineNumber - propertyTree.beginningLineNumber + 1; + const edit = { + range: jsonLanguageTypes_1.Range.create(jsonLanguageTypes_1.Position.create(beginningLineNumber, 0), jsonLanguageTypes_1.Position.create(beginningLineNumber + length, 0)), + text: jsonDocumentToReplace.getText() + }; + jsonLanguageTypes_1.TextDocument.update(sortedJsonDocument, [edit], 1); + updateSortingQueue(queueToSort, propertyTree, beginningLineNumber); + beginningLineNumber = beginningLineNumber + length; + } + } + return sortedJsonDocument; + } + function updateSortingQueue(queue, propertyTree, beginningLineNumber) { + if (propertyTree.childrenProperties.length === 0) { + return; + } + if (propertyTree.type === propertyTree_1.Container.Object) { + let minimumBeginningLineNumber = Infinity; + for (const childProperty of propertyTree.childrenProperties) { + if (childProperty.beginningLineNumber < minimumBeginningLineNumber) { + minimumBeginningLineNumber = childProperty.beginningLineNumber; + } + } + const diff = minimumBeginningLineNumber - propertyTree.beginningLineNumber; + beginningLineNumber = beginningLineNumber + diff; + queue.push(new SortingRange(beginningLineNumber, propertyTree.childrenProperties)); + } + else if (propertyTree.type === propertyTree_1.Container.Array) { + updateSortingQueueForArrayProperties(queue, propertyTree, beginningLineNumber); + } + } + function updateSortingQueueForArrayProperties(queue, propertyTree, beginningLineNumber) { + for (const subObject of propertyTree.childrenProperties) { + // If the child property of the array is an object, then you can sort the properties within this object + if (subObject.type === propertyTree_1.Container.Object) { + let minimumBeginningLineNumber = Infinity; + for (const childProperty of subObject.childrenProperties) { + if (childProperty.beginningLineNumber < minimumBeginningLineNumber) { + minimumBeginningLineNumber = childProperty.beginningLineNumber; + } + } + const diff = minimumBeginningLineNumber - subObject.beginningLineNumber; + queue.push(new SortingRange(beginningLineNumber + subObject.beginningLineNumber - propertyTree.beginningLineNumber + diff, subObject.childrenProperties)); + } + // If the child property of the array is an array, then you need to recurse on the children properties, until you find an object to sort + if (subObject.type === propertyTree_1.Container.Array) { + updateSortingQueueForArrayProperties(queue, subObject, beginningLineNumber + subObject.beginningLineNumber - propertyTree.beginningLineNumber); + } + } + } + class SortingRange { + constructor(beginningLineNumber, propertyTreeArray) { + this.beginningLineNumber = beginningLineNumber; + this.propertyTreeArray = propertyTreeArray; + } + } +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/strings.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/strings.js" index 532fcbf086352f510ba7b82f0bed2e2eb389f0fe..74c92da9893ec63f9044bba4fe12b6a64c38bb8c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/strings.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/lib/umd/utils/strings.js" @@ -1,3 +1,98 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c218c9bcbadac5daa02e830a964c5a66c85cc6b2053099d918b440660093e35f -size 3403 +/*--------------------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +* Licensed under the MIT License. See License.txt in the project root for license information. +*--------------------------------------------------------------------------------------------*/ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.stringLength = exports.extendedRegExp = exports.repeat = exports.convertSimple2RegExpPattern = exports.endsWith = exports.startsWith = void 0; + function startsWith(haystack, needle) { + if (haystack.length < needle.length) { + return false; + } + for (let i = 0; i < needle.length; i++) { + if (haystack[i] !== needle[i]) { + return false; + } + } + return true; + } + exports.startsWith = startsWith; + /** + * Determines if haystack ends with needle. + */ + function endsWith(haystack, needle) { + const diff = haystack.length - needle.length; + if (diff > 0) { + return haystack.lastIndexOf(needle) === diff; + } + else if (diff === 0) { + return haystack === needle; + } + else { + return false; + } + } + exports.endsWith = endsWith; + function convertSimple2RegExpPattern(pattern) { + return pattern.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, '\\$&').replace(/[\*]/g, '.*'); + } + exports.convertSimple2RegExpPattern = convertSimple2RegExpPattern; + function repeat(value, count) { + let s = ''; + while (count > 0) { + if ((count & 1) === 1) { + s += value; + } + value += value; + count = count >>> 1; + } + return s; + } + exports.repeat = repeat; + function extendedRegExp(pattern) { + let flags = ''; + if (startsWith(pattern, '(?i)')) { + pattern = pattern.substring(4); + flags = 'i'; + } + try { + return new RegExp(pattern, flags + 'u'); + } + catch (e) { + // could be an exception due to the 'u ' flag + try { + return new RegExp(pattern, flags); + } + catch (e) { + // invalid pattern + return undefined; + } + } + } + exports.extendedRegExp = extendedRegExp; + // from https://tanishiking.github.io/posts/count-unicode-codepoint/#work-hard-with-for-statements + function stringLength(str) { + let count = 0; + for (let i = 0; i < str.length; i++) { + count++; + // obtain the i-th 16-bit + const code = str.charCodeAt(i); + if (0xD800 <= code && code <= 0xDBFF) { + // if the i-th 16bit is an upper surrogate + // skip the next 16 bits (lower surrogate) + i++; + } + } + return count; + } + exports.stringLength = stringLength; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/README.md" index 7bc804854c2f79a82e66fa03b2cdc6804b5ca3bf..acfc3fe495965e4905b96b7952f8c9de9252a35e 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/README.md" @@ -1,3 +1,42 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4aaa859447a3db374692b940cef70bb380160524db1203c26a969b2849e077f2 -size 1423 +# @vscode/l10n + +Library used for loading the translations into subprocesses of your extension. These usages also get picked up by [l10n-dev](https://github.com/microsoft/vscode-l10n/tree/main/l10n-dev) string extraction tooling. + +> **Note** +> +> You should _NOT_ use this library in your extension's main process. The translations are loaded into the main process by VS Code itself. + +## Usage + +```typescript +import * as l10n from '@vscode/l10n'; + +// Load the translations for the current locale +l10n.config({ + contents: JSON.parse(process.env.BUNDLE_FROM_EXTENSION) +}); +// or +l10n.config({ + fsPath: process.env.FSPATH_TO_BUNDLE_FROM_EXTENSION +}); +// or (warning, this is async) +await l10n.config({ + uri: JSON.parse(process.env.BUNDLE_URI_FROM_EXTENSION) +}); + +// returns the translated string or the original string if no translation is available +l10n.t('Hello World'); + +// supports arguments just like the vscode API +l10n.t('Hello {0}', 'John'); + +// supports comments for translators +l10n.t({ + message: 'Hello {0}', + args: ['John'], + comment: ['This is a comment'] +}); +``` + +The input for `l10n.config` pairs nicely with the `bundle` and `uri` properties on the `l10n` namespace that are provided by the [VS Code API](https://code.visualstudio.com/api/references/vscode-api#l10n). +You should send the value of one of these properties from your extension to your subprocess that is consuming `@vscode/l10n`. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/dist/browser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/dist/browser.js" index 1bb92e1ddd3d26c6b4a1274a37d67c3c62e7759f..ffe794e1c879dc1d24080661a19ef6357c0852fa 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/dist/browser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/dist/browser.js" @@ -1,3 +1,103 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7e74b4963b59a7c5e380699233d7aa7cc94fb095706fb34e8ad88bf825cc78d5 -size 2969 +// src/browser/reader.ts +async function readFileFromUri(uri) { + if (uri.protocol === "http:" || uri.protocol === "https:") { + const res = await fetch(uri); + return await res.text(); + } + throw new Error("Unsupported protocol"); +} +function readFileFromFsPath(_) { + throw new Error("Unsupported in browser"); +} + +// src/main.ts +var bundle; +function config(config2) { + if ("contents" in config2) { + if (typeof config2.contents === "string") { + bundle = JSON.parse(config2.contents); + } else { + bundle = config2.contents; + } + return; + } + if ("fsPath" in config2) { + const fileContent = readFileFromFsPath(config2.fsPath); + const content = JSON.parse(fileContent); + bundle = isBuiltinExtension(content) ? content.contents.bundle : content; + return; + } + if (config2.uri) { + let uri = config2.uri; + if (typeof config2.uri === "string") { + uri = new URL(config2.uri); + } + return new Promise((resolve, reject) => { + readFileFromUri(uri).then((uriContent) => { + try { + const content = JSON.parse(uriContent); + bundle = isBuiltinExtension(content) ? content.contents.bundle : content; + resolve(); + } catch (err) { + reject(err); + } + }).catch((err) => { + reject(err); + }); + }); + } +} +function t(...args) { + const firstArg = args[0]; + let key; + let message; + let formatArgs; + if (typeof firstArg === "string") { + key = firstArg; + message = firstArg; + args.splice(0, 1); + formatArgs = !args || typeof args[0] !== "object" ? args : args[0]; + } else if (firstArg instanceof Array) { + const replacements = args.slice(1); + if (firstArg.length !== replacements.length + 1) { + throw new Error("expected a string as the first argument to l10n.t"); + } + let str = firstArg[0]; + for (let i = 1; i < firstArg.length; i++) { + str += `{${i - 1}}` + firstArg[i]; + } + return t(str, ...replacements); + } else { + message = firstArg.message; + key = message; + if (firstArg.comment && firstArg.comment.length > 0) { + key += `/${Array.isArray(firstArg.comment) ? firstArg.comment.join("") : firstArg.comment}`; + } + formatArgs = firstArg.args ?? {}; + } + const messageFromBundle = bundle?.[key]; + if (!messageFromBundle) { + return format(message, formatArgs); + } + if (typeof messageFromBundle === "string") { + return format(messageFromBundle, formatArgs); + } + if (messageFromBundle.comment) { + return format(messageFromBundle.message, formatArgs); + } + return format(message, formatArgs); +} +var _format2Regexp = /{([^}]+)}/g; +function format(template, values) { + if (Object.keys(values).length === 0) { + return template; + } + return template.replace(_format2Regexp, (match, group) => values[group] ?? match); +} +function isBuiltinExtension(json) { + return !!(typeof json?.contents?.bundle === "object" && typeof json?.version === "string"); +} +export { + config, + t +}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/dist/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/dist/main.d.ts" index 0f858f59018a06d276f476986b00b705409d05d0..21651d5d7b729e219e3dc5939075b41bdbb3b1a4 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/dist/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/dist/main.d.ts" @@ -1,3 +1,130 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:026930c0ed50d369cfc92dac7cc62a46672d15856f5ede6f5437ac917669ff9d -size 5601 +/** + * @public + * Loads the bundle from the given contents. Must be run before the first call to any `l10n.t()` variant. + * **Note** The best way to set this is to pass the value of the VS Code API `vscode.l10n.contents` + * to the process that uses `@vscode/l10n`. + * @param config - An object that contains one property, contents, which should contain the contents of the bundle. + */ +export declare function config(config: { + contents: string | l10nJsonFormat; +}): void; + +/** + * @public + * Loads the bundle from the given fsPath. Must be run before the first call to any `l10n.t()` variant. + * **Warning** This is not implemented in the browser and will throw an Error. + * **Note** The best way to set this is to pass the value of the VS Code API `vscode.l10n.uri.fsPath` + * to the process that uses `@vscode/l10n`. + * @param config - An object that contains one property, fsPath, which should be a path to a file that contains the bundle. + */ +export declare function config(config: { + fsPath: string; +}): void; + +/** + * @public + * Loads the bundle from the given URI using an asynchronous fetch request. + * **Warning** Since this is an asynchronous API, you need to ensure that it resolves before + * the first call to any `l10n.t()` variant. + * **Note** The best way to set this is to pass the value of the VS Code API `vscode.l10n.uri.toString()` + * to the process that uses `@vscode/l10n`. + * @param config - An object that contains one property, uri, which should be a URL to the bundle. + */ +export declare function config(config: { + uri: string | URL; +}): Promise; + +/** + * @public + * The format of package.nls.json and l10n bundle files. + */ +export declare interface l10nJsonFormat { + [key: string]: l10nJsonMessageFormat; +} + +/** + * @public + * The format of a message in a bundle. + */ +export declare type l10nJsonMessageFormat = string | { + message: string; + comment: string[]; +}; + +/** + * @public + * Type that can be used as replacements in `l10n.t()` calls. + */ +export declare type L10nReplacement = string | number | boolean; + +/** + * @public + * Marks a string for localization. If the bundle has a localized value for this message, then that localized + * value will be returned (with injected `args` values for any templated values). + * @param message - The message to localize. Supports index templating where strings like `{0}` and `{1}` are + * replaced by the item at that index in the `args` array. + * @param args - The arguments to be used in the localized string. The index of the argument is used to + * match the template placeholder in the localized string. + * @returns localized string with injected arguments. + * @example `l10n.localize('hello', 'Hello {0}!', 'World');` + */ +export declare function t(message: string, ...args: Array): string; + +/** + * @public + * Marks a string for localization. If the bundle has a localized value for this message, then that localized + * value will be returned (with injected `args` values for any templated values). + * @param message - The message to localize. Supports named templating where strings like `{foo}` and `{bar}` are + * replaced by the value in the Record for that key (foo, bar, etc). + * @param args - The arguments to be used in the localized string. The name of the key in the record is used to + * match the template placeholder in the localized string. + * @returns localized string with injected arguments. + * @example `l10n.t('Hello {name}', { name: 'Erich' });` + */ +export declare function t(message: string, args: Record): string; + +/** + * @public + * Marks a string for localization. This function signature is made for usage + * with tagged template literals. + * + * The more verbose overload should still be used if comments are required. + * @example + * ``` + * l10n.t`Hello ${name}!` + * ``` + * @param message - String message components + * @param args - Replacement components in the string + * @returns localized string with injected arguments. + */ +export declare function t(strs: TemplateStringsArray, ...replacements: L10nReplacement[]): string; + +/** + * @public + * Marks a string for localization. If the bundle has a localized value for this message, then that localized + * value will be returned (with injected args values for any templated values). + * @param options - The options to use when localizing the message. + * @returns localized string with injected arguments. + * @example `l10n.t({ message: 'Hello {0}', args: ['Erich'], comment: 'This is a comment' } );` + */ +export declare function t(options: { + /** + * The message to localize. If `args` is an array, this message supports index templating where strings like + * `{0}` and `{1}` are replaced by the item at that index in the `args` array. If `args` is a `Record`, + * this supports named templating where strings like `{foo}` and `{bar}` are replaced by the value in + * the Record for that key (foo, bar, etc). + */ + message: string; + /** + * The arguments to be used in the localized string. As an array, the index of the argument is used to + * match the template placeholder in the localized string. As a Record, the key is used to match the template + * placeholder in the localized string. + */ + args?: Array | Record; + /** + * A comment to help translators understand the context of the message. + */ + comment: string | string[]; +}): string; + +export { } diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/dist/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/dist/main.js" index 0ec874db10d7202ac358b7dbfbf2f83c463bda8d..728a2d351c0677d8c1bba1c5cce4032336060736 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/dist/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/dist/main.js" @@ -1,3 +1,151 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:acb4bd2bcbfc029a6744f475151a9c188890cd0dca00c15b739d2371497909cb -size 4582 +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/main.ts +var main_exports = {}; +__export(main_exports, { + config: () => config, + t: () => t +}); +module.exports = __toCommonJS(main_exports); + +// src/node/reader.ts +var import_fs = require("fs"); +var import_promises = require("fs/promises"); +async function readFileFromUri(uri) { + if (uri.protocol === "file:") { + return await (0, import_promises.readFile)(uri, "utf8"); + } + if (uri.protocol === "http:" || uri.protocol === "https:") { + const res = await fetch(uri.toString(), { + headers: { + "Accept-Encoding": "gzip, deflate", + "Accept": "application/json" + }, + redirect: "follow" + }); + if (!res.ok) { + let error = `Unexpected ${res.status} response while trying to read ${uri}`; + try { + error += `: ${await res.text()}`; + } catch { + } + throw new Error(error); + } + const decoded = await res.text(); + return decoded; + } + throw new Error("Unsupported protocol"); +} +function readFileFromFsPath(fsPath) { + return (0, import_fs.readFileSync)(fsPath, "utf8"); +} + +// src/main.ts +var bundle; +function config(config2) { + if ("contents" in config2) { + if (typeof config2.contents === "string") { + bundle = JSON.parse(config2.contents); + } else { + bundle = config2.contents; + } + return; + } + if ("fsPath" in config2) { + const fileContent = readFileFromFsPath(config2.fsPath); + const content = JSON.parse(fileContent); + bundle = isBuiltinExtension(content) ? content.contents.bundle : content; + return; + } + if (config2.uri) { + let uri = config2.uri; + if (typeof config2.uri === "string") { + uri = new URL(config2.uri); + } + return new Promise((resolve, reject) => { + readFileFromUri(uri).then((uriContent) => { + try { + const content = JSON.parse(uriContent); + bundle = isBuiltinExtension(content) ? content.contents.bundle : content; + resolve(); + } catch (err) { + reject(err); + } + }).catch((err) => { + reject(err); + }); + }); + } +} +function t(...args) { + const firstArg = args[0]; + let key; + let message; + let formatArgs; + if (typeof firstArg === "string") { + key = firstArg; + message = firstArg; + args.splice(0, 1); + formatArgs = !args || typeof args[0] !== "object" ? args : args[0]; + } else if (firstArg instanceof Array) { + const replacements = args.slice(1); + if (firstArg.length !== replacements.length + 1) { + throw new Error("expected a string as the first argument to l10n.t"); + } + let str = firstArg[0]; + for (let i = 1; i < firstArg.length; i++) { + str += `{${i - 1}}` + firstArg[i]; + } + return t(str, ...replacements); + } else { + message = firstArg.message; + key = message; + if (firstArg.comment && firstArg.comment.length > 0) { + key += `/${Array.isArray(firstArg.comment) ? firstArg.comment.join("") : firstArg.comment}`; + } + formatArgs = firstArg.args ?? {}; + } + const messageFromBundle = bundle?.[key]; + if (!messageFromBundle) { + return format(message, formatArgs); + } + if (typeof messageFromBundle === "string") { + return format(messageFromBundle, formatArgs); + } + if (messageFromBundle.comment) { + return format(messageFromBundle.message, formatArgs); + } + return format(message, formatArgs); +} +var _format2Regexp = /{([^}]+)}/g; +function format(template, values) { + if (Object.keys(values).length === 0) { + return template; + } + return template.replace(_format2Regexp, (match, group) => values[group] ?? match); +} +function isBuiltinExtension(json) { + return !!(typeof json?.contents?.bundle === "object" && typeof json?.version === "string"); +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + config, + t +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/dist/tsdoc-metadata.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/dist/tsdoc-metadata.json" index 22f38e9653d436ddff54095c865d080ee8a2885b..2c82a4339c57f65f47ee979fd89994fd92e5aaaf 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/dist/tsdoc-metadata.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/dist/tsdoc-metadata.json" @@ -1,3 +1,11 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:edd0e881410dfe96bc8b53a2081f01f936318c850e502af3e3980fbbe2211501 -size 340 +// This file is read by tools that parse documentation comments conforming to the TSDoc standard. +// It should be published with your NPM package. It should not be tracked by Git. +{ + "tsdocVersion": "0.12", + "toolPackages": [ + { + "packageName": "@microsoft/api-extractor", + "packageVersion": "7.36.3" + } + ] +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/package.json" index 745bf23ce147de35fa130c36f16524a1a3f082ec..8ebb31b8d8635de35f382744b898c9579ee20a95 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/@vscode/l10n/package.json" @@ -1,3 +1,50 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:293375e8e1de0d54c2437079fdc47e6ee4f55a125ca346ac58e61cbd602e959a -size 1504 +{ + "name": "@vscode/l10n", + "version": "0.0.18", + "description": "A helper library to assist in localizing subprocesses spun up by VS Code extensions", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-l10n.git" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-l10n/issues" + }, + "main": "./dist/main.js", + "sideEffects": false, + "browser": { + "./dist/main.js": "./dist/browser.js", + "./src/node/reader": "./src/browser/reader" + }, + "types": "dist/main.d.ts", + "files": [ + "dist/*" + ], + "devDependencies": { + "@jest/globals": "^29.7.0", + "@microsoft/api-extractor": "^7.32.1", + "@types/mock-fs": "^4.13.1", + "@types/node": "^18", + "@typescript-eslint/eslint-plugin": "^6.13.2", + "@typescript-eslint/parser": "^6.13.2", + "esbuild": "^0.15.5", + "eslint": "^7.29.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", + "jest": "^29.7.0", + "jest-fetch-mock": "^3.0.3", + "mock-fs": "^5.1.4", + "rimraf": "^3.0.2", + "ts-jest": "^29.1.1", + "typescript": "^4.7.4" + }, + "scripts": { + "clean": "rimraf dist && rimraf lib", + "compile": "npm run clean && tsc --emitDeclarationOnly --outDir lib && node .esbuild.config.js", + "lint": "eslint src --ext ts", + "watch": "node .esbuild.config.js --watch", + "test": "jest --preset ts-jest", + "prepublishOnly": "npm run lint && npm run compile && npm run test" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/CHANGELOG.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/CHANGELOG.md" index 1dc335f337ea669c77b2527583bae59c21549986..b43a083a2f98daed446a16861955c79997ffa1d1 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/CHANGELOG.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/CHANGELOG.md" @@ -1,3 +1,72 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ce508d6b9a2e11c03f60aa3b9519e4b919ddbfe96e869dbe454dc483d26cd9fa -size 2723 + +3.2.0 2022-08-30 +================= +- update the version of the bundled Javascript files to `es2020`. +- include all `const enum` values in the bundled JavaScript files (`ScanError`, `SyntaxKind`, `ParseErrorCode`). + +3.1.0 2022-07-07 +================== + * added new API `FormattingOptions.keepLines` : It leaves the initial line positions in the formatting. + +3.0.0 2020-11-13 +================== + * fixed API spec for `parseTree`. Can return `undefine` for empty input. + * added new API `FormattingOptions.insertFinalNewline`. + + +2.3.0 2020-07-03 +================== + * new API `ModificationOptions.isArrayInsertion`: If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then `modify` will insert a new item at that location instead of overwriting its contents. + * `ModificationOptions.formattingOptions` is now optional. If not set, newly inserted content will not be formatted. + + +2.2.0 2019-10-25 +================== + * added `ParseOptions.allowEmptyContent`. Default is `false`. + * new API `getNodeType`: Returns the type of a value returned by parse. + * `parse`: Fix issue with empty property name + +2.1.0 2019-03-29 +================== + * `JSONScanner` and `JSONVisitor` return lineNumber / character. + +2.0.0 2018-04-12 +================== + * renamed `Node.columnOffset` to `Node.colonOffset` + * new API `getNodePath`: Gets the JSON path of the given JSON DOM node + * new API `findNodeAtOffset`: Finds the most inner node at the given offset. If `includeRightBound` is set, also finds nodes that end at the given offset. + +1.0.3 2018-03-07 +================== + * provide ems modules + +1.0.2 2018-03-05 +================== + * added the `visit.onComment` API, reported when comments are allowed. + * added the `ParseErrorCode.InvalidCommentToken` enum value, reported when comments are disallowed. + +1.0.1 +================== + * added the `format` API: computes edits to format a JSON document. + * added the `modify` API: computes edits to insert, remove or replace a property or value in a JSON document. + * added the `allyEdits` API: applies edits to a document + +1.0.0 +================== + * remove nls dependency (remove `getParseErrorMessage`) + +0.4.2 / 2017-05-05 +================== + * added `ParseError.offset` & `ParseError.length` + +0.4.1 / 2017-04-02 +================== + * added `ParseOptions.allowTrailingComma` + +0.4.0 / 2017-02-23 +================== + * fix for `getLocation`. Now `getLocation` inside an object will always return a property from inside that property. Can be empty string if the object has no properties or if the offset is before a actual property `{ "a": { | }} will return location ['a', ' ']` + +0.3.0 / 2017-01-17 +================== + * Updating to typescript 2.0 \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/LICENSE.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/LICENSE.md" index 28f77a90b0472b57e139eebdb907553e6a2b20ba..1c65de1db32e326f2bd84b036db911248779eaa7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/LICENSE.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/LICENSE.md" @@ -1,3 +1,21 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c3a24c02d678e5f0711623dcf3ab3f243b273c2633f638a1fa8e35fb7c7f8e4d -size 1092 +The MIT License (MIT) + +Copyright (c) Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/README.md" index 1e491c62ddf66d76f069c52419acec7239982b8a..5fd92d9e9310a6e4ed2309fea25b2be5063ad2e5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/README.md" @@ -1,3 +1,362 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7f3bbe33967c25f1974ac93a4c9c2c2bde59c79da517d27bb575dcbc10a259db -size 14129 +# jsonc-parser +Scanner and parser for JSON with comments. + +[![npm Package](https://img.shields.io/npm/v/jsonc-parser.svg?style=flat-square)](https://www.npmjs.org/package/jsonc-parser) +[![NPM Downloads](https://img.shields.io/npm/dm/jsonc-parser.svg)](https://npmjs.org/package/jsonc-parser) +[![Build Status](https://github.com/microsoft/node-jsonc-parser/workflows/Tests/badge.svg)](https://github.com/microsoft/node-jsonc-parser/workflows/Tests) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) + +Why? +---- +JSONC is JSON with JavaScript style comments. This node module provides a scanner and fault tolerant parser that can process JSONC but is also useful for standard JSON. + - the *scanner* tokenizes the input string into tokens and token offsets + - the *visit* function implements a 'SAX' style parser with callbacks for the encountered properties and values. + - the *parseTree* function computes a hierarchical DOM with offsets representing the encountered properties and values. + - the *parse* function evaluates the JavaScript object represented by JSON string in a fault tolerant fashion. + - the *getLocation* API returns a location object that describes the property or value located at a given offset in a JSON document. + - the *findNodeAtLocation* API finds the node at a given location path in a JSON DOM. + - the *format* API computes edits to format a JSON document. + - the *modify* API computes edits to insert, remove or replace a property or value in a JSON document. + - the *applyEdits* API applies edits to a document. + +Installation +------------ + +``` +npm install --save jsonc-parser +``` + +API +--- + +### Scanner: +```typescript + +/** + * Creates a JSON scanner on the given text. + * If ignoreTrivia is set, whitespaces or comments are ignored. + */ +export function createScanner(text: string, ignoreTrivia: boolean = false): JSONScanner; + +/** + * The scanner object, representing a JSON scanner at a position in the input string. + */ +export interface JSONScanner { + /** + * Sets the scan position to a new offset. A call to 'scan' is needed to get the first token. + */ + setPosition(pos: number): any; + /** + * Read the next token. Returns the token code. + */ + scan(): SyntaxKind; + /** + * Returns the zero-based current scan position, which is after the last read token. + */ + getPosition(): number; + /** + * Returns the last read token. + */ + getToken(): SyntaxKind; + /** + * Returns the last read token value. The value for strings is the decoded string content. For numbers it's of type number, for boolean it's true or false. + */ + getTokenValue(): string; + /** + * The zero-based start offset of the last read token. + */ + getTokenOffset(): number; + /** + * The length of the last read token. + */ + getTokenLength(): number; + /** + * The zero-based start line number of the last read token. + */ + getTokenStartLine(): number; + /** + * The zero-based start character (column) of the last read token. + */ + getTokenStartCharacter(): number; + /** + * An error code of the last scan. + */ + getTokenError(): ScanError; +} +``` + +### Parser: +```typescript + +export interface ParseOptions { + disallowComments?: boolean; + allowTrailingComma?: boolean; + allowEmptyContent?: boolean; +} +/** + * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + * Therefore always check the errors list to find out if the input was valid. + */ +export declare function parse(text: string, errors?: {error: ParseErrorCode;}[], options?: ParseOptions): any; + +/** + * Parses the given text and invokes the visitor functions for each object, array and literal reached. + */ +export declare function visit(text: string, visitor: JSONVisitor, options?: ParseOptions): any; + +/** + * Visitor called by {@linkcode visit} when parsing JSON. + * + * The visitor functions have the following common parameters: + * - `offset`: Global offset within the JSON document, starting at 0 + * - `startLine`: Line number, starting at 0 + * - `startCharacter`: Start character (column) within the current line, starting at 0 + * + * Additionally some functions have a `pathSupplier` parameter which can be used to obtain the + * current `JSONPath` within the document. + */ +export interface JSONVisitor { + /** + * Invoked when an open brace is encountered and an object is started. The offset and length represent the location of the open brace. + */ + onObjectBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + + /** + * Invoked when a property is encountered. The offset and length represent the location of the property name. + * The `JSONPath` created by the `pathSupplier` refers to the enclosing JSON object, it does not include the + * property name yet. + */ + onObjectProperty?: (property: string, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a closing brace is encountered and an object is completed. The offset and length represent the location of the closing brace. + */ + onObjectEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked when an open bracket is encountered. The offset and length represent the location of the open bracket. + */ + onArrayBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a closing bracket is encountered. The offset and length represent the location of the closing bracket. + */ + onArrayEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked when a literal value is encountered. The offset and length represent the location of the literal value. + */ + onLiteralValue?: (value: any, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a comma or colon separator is encountered. The offset and length represent the location of the separator. + */ + onSeparator?: (character: string, offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * When comments are allowed, invoked when a line or block comment is encountered. The offset and length represent the location of the comment. + */ + onComment?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked on an error. + */ + onError?: (error: ParseErrorCode, offset: number, length: number, startLine: number, startCharacter: number) => void; +} + +/** + * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + */ +export declare function parseTree(text: string, errors?: ParseError[], options?: ParseOptions): Node | undefined; + +export declare type NodeType = "object" | "array" | "property" | "string" | "number" | "boolean" | "null"; +export interface Node { + type: NodeType; + value?: any; + offset: number; + length: number; + colonOffset?: number; + parent?: Node; + children?: Node[]; +} + +``` + +### Utilities: +```typescript +/** + * Takes JSON with JavaScript-style comments and remove + * them. Optionally replaces every none-newline character + * of comments with a replaceCharacter + */ +export declare function stripComments(text: string, replaceCh?: string): string; + +/** + * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. + */ +export declare function getLocation(text: string, position: number): Location; + +/** + * A {@linkcode JSONPath} segment. Either a string representing an object property name + * or a number (starting at 0) for array indices. + */ +export declare type Segment = string | number; +export declare type JSONPath = Segment[]; +export interface Location { + /** + * The previous property key or literal value (string, number, boolean or null) or undefined. + */ + previousNode?: Node; + /** + * The path describing the location in the JSON document. The path consists of a sequence strings + * representing an object property or numbers for array indices. + */ + path: JSONPath; + /** + * Matches the locations path against a pattern consisting of strings (for properties) and numbers (for array indices). + * '*' will match a single segment, of any property name or index. + * '**' will match a sequence of segments or no segment, of any property name or index. + */ + matches: (patterns: JSONPath) => boolean; + /** + * If set, the location's offset is at a property key. + */ + isAtPropertyKey: boolean; +} + +/** + * Finds the node at the given path in a JSON DOM. + */ +export function findNodeAtLocation(root: Node, path: JSONPath): Node | undefined; + +/** + * Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. + */ +export function findNodeAtOffset(root: Node, offset: number, includeRightBound?: boolean) : Node | undefined; + +/** + * Gets the JSON path of the given JSON DOM node + */ +export function getNodePath(node: Node): JSONPath; + +/** + * Evaluates the JavaScript object of the given JSON DOM node + */ +export function getNodeValue(node: Node): any; + +/** + * Computes the edit operations needed to format a JSON document. + * + * @param documentText The input text + * @param range The range to format or `undefined` to format the full content + * @param options The formatting options + * @returns The edit operations describing the formatting changes to the original document following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export function format(documentText: string, range: Range, options: FormattingOptions): EditResult; + +/** + * Computes the edit operations needed to modify a value in the JSON document. + * + * @param documentText The input text + * @param path The path of the value to change. The path represents either to the document root, a property or an array item. + * If the path points to an non-existing property or item, it will be created. + * @param value The new value for the specified property or item. If the value is undefined, + * the property or item will be removed. + * @param options Options + * @returns The edit operations describing the changes to the original document, following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export function modify(text: string, path: JSONPath, value: any, options: ModificationOptions): EditResult; + +/** + * Applies edits to an input string. + * @param text The input text + * @param edits Edit operations following the format described in {@linkcode EditResult}. + * @returns The text with the applied edits. + * @throws An error if the edit operations are not well-formed as described in {@linkcode EditResult}. + */ +export function applyEdits(text: string, edits: EditResult): string; + +/** + * An edit result describes a textual edit operation. It is the result of a {@linkcode format} and {@linkcode modify} operation. + * It consist of one or more edits describing insertions, replacements or removals of text segments. + * * The offsets of the edits refer to the original state of the document. + * * No two edits change or remove the same range of text in the original document. + * * Multiple edits can have the same offset if they are multiple inserts, or an insert followed by a remove or replace. + * * The order in the array defines which edit is applied first. + * To apply an edit result use {@linkcode applyEdits}. + * In general multiple EditResults must not be concatenated because they might impact each other, producing incorrect or malformed JSON data. + */ +export type EditResult = Edit[]; + +/** + * Represents a text modification + */ +export interface Edit { + /** + * The start offset of the modification. + */ + offset: number; + /** + * The length of the modification. Must not be negative. Empty length represents an *insert*. + */ + length: number; + /** + * The new content. Empty content represents a *remove*. + */ + content: string; +} + +/** + * A text range in the document +*/ +export interface Range { + /** + * The start offset of the range. + */ + offset: number; + /** + * The length of the range. Must not be negative. + */ + length: number; +} + +/** + * Options used by {@linkcode format} when computing the formatting edit operations + */ +export interface FormattingOptions { + /** + * If indentation is based on spaces (`insertSpaces` = true), then what is the number of spaces that make an indent? + */ + tabSize: number; + /** + * Is indentation based on spaces? + */ + insertSpaces: boolean; + /** + * The default 'end of line' character + */ + eol: string; +} + +/** + * Options used by {@linkcode modify} when computing the modification edit operations + */ +export interface ModificationOptions { + /** + * Formatting options. If undefined, the newly inserted code will be inserted unformatted. + */ + formattingOptions?: FormattingOptions; + /** + * Default false. If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then + * {@linkcode modify} will insert a new item at that location instead of overwriting its contents. + */ + isArrayInsertion?: boolean; + /** + * Optional function to define the insertion index given an existing list of properties. + */ + getInsertionIndex?: (properties: string[]) => number; +} +``` + + +License +------- + +(MIT License) + +Copyright 2018, Microsoft diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/SECURITY.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/SECURITY.md" index f5f6a3f8ada07060363bde77a27e754b69f75b67..f7b89984f0fb5dd204028bc525e19eefc0859f4f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/SECURITY.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/SECURITY.md" @@ -1,3 +1,41 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:830e94b83c3b6f45ceee5609de6249b2125927f95532e68427f09c99eed5e663 -size 2780 + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). + + \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/edit.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/edit.js" index f3f4e9bcb10dd2e021843f78fe5a83c91c1e5311..4114d525b7fa2db6824ee4c3351c58aa4c6a4876 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/edit.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/edit.js" @@ -1,3 +1,185 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7e7bf98e740f560026df079056d3b0f5f34628124a8d34e2765fb101dde12911 -size 8613 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +import { format, isEOL } from './format'; +import { parseTree, findNodeAtLocation } from './parser'; +export function removeProperty(text, path, options) { + return setProperty(text, path, void 0, options); +} +export function setProperty(text, originalPath, value, options) { + const path = originalPath.slice(); + const errors = []; + const root = parseTree(text, errors); + let parent = void 0; + let lastSegment = void 0; + while (path.length > 0) { + lastSegment = path.pop(); + parent = findNodeAtLocation(root, path); + if (parent === void 0 && value !== void 0) { + if (typeof lastSegment === 'string') { + value = { [lastSegment]: value }; + } + else { + value = [value]; + } + } + else { + break; + } + } + if (!parent) { + // empty document + if (value === void 0) { // delete + throw new Error('Can not delete in empty document'); + } + return withFormatting(text, { offset: root ? root.offset : 0, length: root ? root.length : 0, content: JSON.stringify(value) }, options); + } + else if (parent.type === 'object' && typeof lastSegment === 'string' && Array.isArray(parent.children)) { + const existing = findNodeAtLocation(parent, [lastSegment]); + if (existing !== void 0) { + if (value === void 0) { // delete + if (!existing.parent) { + throw new Error('Malformed AST'); + } + const propertyIndex = parent.children.indexOf(existing.parent); + let removeBegin; + let removeEnd = existing.parent.offset + existing.parent.length; + if (propertyIndex > 0) { + // remove the comma of the previous node + let previous = parent.children[propertyIndex - 1]; + removeBegin = previous.offset + previous.length; + } + else { + removeBegin = parent.offset + 1; + if (parent.children.length > 1) { + // remove the comma of the next node + let next = parent.children[1]; + removeEnd = next.offset; + } + } + return withFormatting(text, { offset: removeBegin, length: removeEnd - removeBegin, content: '' }, options); + } + else { + // set value of existing property + return withFormatting(text, { offset: existing.offset, length: existing.length, content: JSON.stringify(value) }, options); + } + } + else { + if (value === void 0) { // delete + return []; // property does not exist, nothing to do + } + const newProperty = `${JSON.stringify(lastSegment)}: ${JSON.stringify(value)}`; + const index = options.getInsertionIndex ? options.getInsertionIndex(parent.children.map(p => p.children[0].value)) : parent.children.length; + let edit; + if (index > 0) { + let previous = parent.children[index - 1]; + edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty }; + } + else if (parent.children.length === 0) { + edit = { offset: parent.offset + 1, length: 0, content: newProperty }; + } + else { + edit = { offset: parent.offset + 1, length: 0, content: newProperty + ',' }; + } + return withFormatting(text, edit, options); + } + } + else if (parent.type === 'array' && typeof lastSegment === 'number' && Array.isArray(parent.children)) { + const insertIndex = lastSegment; + if (insertIndex === -1) { + // Insert + const newProperty = `${JSON.stringify(value)}`; + let edit; + if (parent.children.length === 0) { + edit = { offset: parent.offset + 1, length: 0, content: newProperty }; + } + else { + const previous = parent.children[parent.children.length - 1]; + edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty }; + } + return withFormatting(text, edit, options); + } + else if (value === void 0 && parent.children.length >= 0) { + // Removal + const removalIndex = lastSegment; + const toRemove = parent.children[removalIndex]; + let edit; + if (parent.children.length === 1) { + // only item + edit = { offset: parent.offset + 1, length: parent.length - 2, content: '' }; + } + else if (parent.children.length - 1 === removalIndex) { + // last item + let previous = parent.children[removalIndex - 1]; + let offset = previous.offset + previous.length; + let parentEndOffset = parent.offset + parent.length; + edit = { offset, length: parentEndOffset - 2 - offset, content: '' }; + } + else { + edit = { offset: toRemove.offset, length: parent.children[removalIndex + 1].offset - toRemove.offset, content: '' }; + } + return withFormatting(text, edit, options); + } + else if (value !== void 0) { + let edit; + const newProperty = `${JSON.stringify(value)}`; + if (!options.isArrayInsertion && parent.children.length > lastSegment) { + const toModify = parent.children[lastSegment]; + edit = { offset: toModify.offset, length: toModify.length, content: newProperty }; + } + else if (parent.children.length === 0 || lastSegment === 0) { + edit = { offset: parent.offset + 1, length: 0, content: parent.children.length === 0 ? newProperty : newProperty + ',' }; + } + else { + const index = lastSegment > parent.children.length ? parent.children.length : lastSegment; + const previous = parent.children[index - 1]; + edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty }; + } + return withFormatting(text, edit, options); + } + else { + throw new Error(`Can not ${value === void 0 ? 'remove' : (options.isArrayInsertion ? 'insert' : 'modify')} Array index ${insertIndex} as length is not sufficient`); + } + } + else { + throw new Error(`Can not add ${typeof lastSegment !== 'number' ? 'index' : 'property'} to parent of type ${parent.type}`); + } +} +function withFormatting(text, edit, options) { + if (!options.formattingOptions) { + return [edit]; + } + // apply the edit + let newText = applyEdit(text, edit); + // format the new text + let begin = edit.offset; + let end = edit.offset + edit.content.length; + if (edit.length === 0 || edit.content.length === 0) { // insert or remove + while (begin > 0 && !isEOL(newText, begin - 1)) { + begin--; + } + while (end < newText.length && !isEOL(newText, end)) { + end++; + } + } + const edits = format(newText, { offset: begin, length: end - begin }, { ...options.formattingOptions, keepLines: false }); + // apply the formatting edits and track the begin and end offsets of the changes + for (let i = edits.length - 1; i >= 0; i--) { + const edit = edits[i]; + newText = applyEdit(newText, edit); + begin = Math.min(begin, edit.offset); + end = Math.max(end, edit.offset + edit.length); + end += edit.content.length - edit.length; + } + // create a single edit with all changes + const editLength = text.length - (newText.length - end) - begin; + return [{ offset: begin, length: editLength, content: newText.substring(begin, end) }]; +} +export function applyEdit(text, edit) { + return text.substring(0, edit.offset) + edit.content + text.substring(edit.offset + edit.length); +} +export function isWS(text, offset) { + return '\r\n \t'.indexOf(text.charAt(offset)) !== -1; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/format.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/format.js" index bca40f2e9cd177c860c7fb84564dfae6d11c261a..8663a1f385b08ddb8d2cc32bd3fc793b6751737c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/format.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/format.js" @@ -1,3 +1,261 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e57dee56700a844b18dea11548f9ba42b17bc857bde5bcd39554af06ca95bb1f -size 11098 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +import { createScanner } from './scanner'; +import { cachedSpaces, cachedBreakLinesWithSpaces, supportedEols } from './string-intern'; +export function format(documentText, range, options) { + let initialIndentLevel; + let formatText; + let formatTextStart; + let rangeStart; + let rangeEnd; + if (range) { + rangeStart = range.offset; + rangeEnd = rangeStart + range.length; + formatTextStart = rangeStart; + while (formatTextStart > 0 && !isEOL(documentText, formatTextStart - 1)) { + formatTextStart--; + } + let endOffset = rangeEnd; + while (endOffset < documentText.length && !isEOL(documentText, endOffset)) { + endOffset++; + } + formatText = documentText.substring(formatTextStart, endOffset); + initialIndentLevel = computeIndentLevel(formatText, options); + } + else { + formatText = documentText; + initialIndentLevel = 0; + formatTextStart = 0; + rangeStart = 0; + rangeEnd = documentText.length; + } + const eol = getEOL(options, documentText); + const eolFastPathSupported = supportedEols.includes(eol); + let numberLineBreaks = 0; + let indentLevel = 0; + let indentValue; + if (options.insertSpaces) { + indentValue = cachedSpaces[options.tabSize || 4] ?? repeat(cachedSpaces[1], options.tabSize || 4); + } + else { + indentValue = '\t'; + } + const indentType = indentValue === '\t' ? '\t' : ' '; + let scanner = createScanner(formatText, false); + let hasError = false; + function newLinesAndIndent() { + if (numberLineBreaks > 1) { + return repeat(eol, numberLineBreaks) + repeat(indentValue, initialIndentLevel + indentLevel); + } + const amountOfSpaces = indentValue.length * (initialIndentLevel + indentLevel); + if (!eolFastPathSupported || amountOfSpaces > cachedBreakLinesWithSpaces[indentType][eol].length) { + return eol + repeat(indentValue, initialIndentLevel + indentLevel); + } + if (amountOfSpaces <= 0) { + return eol; + } + return cachedBreakLinesWithSpaces[indentType][eol][amountOfSpaces]; + } + function scanNext() { + let token = scanner.scan(); + numberLineBreaks = 0; + while (token === 15 /* SyntaxKind.Trivia */ || token === 14 /* SyntaxKind.LineBreakTrivia */) { + if (token === 14 /* SyntaxKind.LineBreakTrivia */ && options.keepLines) { + numberLineBreaks += 1; + } + else if (token === 14 /* SyntaxKind.LineBreakTrivia */) { + numberLineBreaks = 1; + } + token = scanner.scan(); + } + hasError = token === 16 /* SyntaxKind.Unknown */ || scanner.getTokenError() !== 0 /* ScanError.None */; + return token; + } + const editOperations = []; + function addEdit(text, startOffset, endOffset) { + if (!hasError && (!range || (startOffset < rangeEnd && endOffset > rangeStart)) && documentText.substring(startOffset, endOffset) !== text) { + editOperations.push({ offset: startOffset, length: endOffset - startOffset, content: text }); + } + } + let firstToken = scanNext(); + if (options.keepLines && numberLineBreaks > 0) { + addEdit(repeat(eol, numberLineBreaks), 0, 0); + } + if (firstToken !== 17 /* SyntaxKind.EOF */) { + let firstTokenStart = scanner.getTokenOffset() + formatTextStart; + let initialIndent = (indentValue.length * initialIndentLevel < 20) && options.insertSpaces + ? cachedSpaces[indentValue.length * initialIndentLevel] + : repeat(indentValue, initialIndentLevel); + addEdit(initialIndent, formatTextStart, firstTokenStart); + } + while (firstToken !== 17 /* SyntaxKind.EOF */) { + let firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart; + let secondToken = scanNext(); + let replaceContent = ''; + let needsLineBreak = false; + while (numberLineBreaks === 0 && (secondToken === 12 /* SyntaxKind.LineCommentTrivia */ || secondToken === 13 /* SyntaxKind.BlockCommentTrivia */)) { + let commentTokenStart = scanner.getTokenOffset() + formatTextStart; + addEdit(cachedSpaces[1], firstTokenEnd, commentTokenStart); + firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart; + needsLineBreak = secondToken === 12 /* SyntaxKind.LineCommentTrivia */; + replaceContent = needsLineBreak ? newLinesAndIndent() : ''; + secondToken = scanNext(); + } + if (secondToken === 2 /* SyntaxKind.CloseBraceToken */) { + if (firstToken !== 1 /* SyntaxKind.OpenBraceToken */) { + indentLevel--; + } + ; + if (options.keepLines && numberLineBreaks > 0 || !options.keepLines && firstToken !== 1 /* SyntaxKind.OpenBraceToken */) { + replaceContent = newLinesAndIndent(); + } + else if (options.keepLines) { + replaceContent = cachedSpaces[1]; + } + } + else if (secondToken === 4 /* SyntaxKind.CloseBracketToken */) { + if (firstToken !== 3 /* SyntaxKind.OpenBracketToken */) { + indentLevel--; + } + ; + if (options.keepLines && numberLineBreaks > 0 || !options.keepLines && firstToken !== 3 /* SyntaxKind.OpenBracketToken */) { + replaceContent = newLinesAndIndent(); + } + else if (options.keepLines) { + replaceContent = cachedSpaces[1]; + } + } + else { + switch (firstToken) { + case 3 /* SyntaxKind.OpenBracketToken */: + case 1 /* SyntaxKind.OpenBraceToken */: + indentLevel++; + if (options.keepLines && numberLineBreaks > 0 || !options.keepLines) { + replaceContent = newLinesAndIndent(); + } + else { + replaceContent = cachedSpaces[1]; + } + break; + case 5 /* SyntaxKind.CommaToken */: + if (options.keepLines && numberLineBreaks > 0 || !options.keepLines) { + replaceContent = newLinesAndIndent(); + } + else { + replaceContent = cachedSpaces[1]; + } + break; + case 12 /* SyntaxKind.LineCommentTrivia */: + replaceContent = newLinesAndIndent(); + break; + case 13 /* SyntaxKind.BlockCommentTrivia */: + if (numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else if (!needsLineBreak) { + replaceContent = cachedSpaces[1]; + } + break; + case 6 /* SyntaxKind.ColonToken */: + if (options.keepLines && numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else if (!needsLineBreak) { + replaceContent = cachedSpaces[1]; + } + break; + case 10 /* SyntaxKind.StringLiteral */: + if (options.keepLines && numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else if (secondToken === 6 /* SyntaxKind.ColonToken */ && !needsLineBreak) { + replaceContent = ''; + } + break; + case 7 /* SyntaxKind.NullKeyword */: + case 8 /* SyntaxKind.TrueKeyword */: + case 9 /* SyntaxKind.FalseKeyword */: + case 11 /* SyntaxKind.NumericLiteral */: + case 2 /* SyntaxKind.CloseBraceToken */: + case 4 /* SyntaxKind.CloseBracketToken */: + if (options.keepLines && numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else { + if ((secondToken === 12 /* SyntaxKind.LineCommentTrivia */ || secondToken === 13 /* SyntaxKind.BlockCommentTrivia */) && !needsLineBreak) { + replaceContent = cachedSpaces[1]; + } + else if (secondToken !== 5 /* SyntaxKind.CommaToken */ && secondToken !== 17 /* SyntaxKind.EOF */) { + hasError = true; + } + } + break; + case 16 /* SyntaxKind.Unknown */: + hasError = true; + break; + } + if (numberLineBreaks > 0 && (secondToken === 12 /* SyntaxKind.LineCommentTrivia */ || secondToken === 13 /* SyntaxKind.BlockCommentTrivia */)) { + replaceContent = newLinesAndIndent(); + } + } + if (secondToken === 17 /* SyntaxKind.EOF */) { + if (options.keepLines && numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else { + replaceContent = options.insertFinalNewline ? eol : ''; + } + } + const secondTokenStart = scanner.getTokenOffset() + formatTextStart; + addEdit(replaceContent, firstTokenEnd, secondTokenStart); + firstToken = secondToken; + } + return editOperations; +} +function repeat(s, count) { + let result = ''; + for (let i = 0; i < count; i++) { + result += s; + } + return result; +} +function computeIndentLevel(content, options) { + let i = 0; + let nChars = 0; + const tabSize = options.tabSize || 4; + while (i < content.length) { + let ch = content.charAt(i); + if (ch === cachedSpaces[1]) { + nChars++; + } + else if (ch === '\t') { + nChars += tabSize; + } + else { + break; + } + i++; + } + return Math.floor(nChars / tabSize); +} +function getEOL(options, text) { + for (let i = 0; i < text.length; i++) { + const ch = text.charAt(i); + if (ch === '\r') { + if (i + 1 < text.length && text.charAt(i + 1) === '\n') { + return '\r\n'; + } + return '\r'; + } + else if (ch === '\n') { + return '\n'; + } + } + return (options && options.eol) || '\n'; +} +export function isEOL(text, offset) { + return '\r\n'.indexOf(text.charAt(offset)) !== -1; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/parser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/parser.js" index a2e12bf8460a91fa1af7170f654333edfa340fd8..ea1ac2ed37bf0b4a90d9405066c0a9040a040dff 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/parser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/parser.js" @@ -1,3 +1,632 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cd3807c61549999adfec191a4131c71f628284e63c85e8dad2b642f283e64ba5 -size 24708 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +import { createScanner } from './scanner'; +var ParseOptions; +(function (ParseOptions) { + ParseOptions.DEFAULT = { + allowTrailingComma: false + }; +})(ParseOptions || (ParseOptions = {})); +/** + * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. + */ +export function getLocation(text, position) { + const segments = []; // strings or numbers + const earlyReturnException = new Object(); + let previousNode = undefined; + const previousNodeInst = { + value: {}, + offset: 0, + length: 0, + type: 'object', + parent: undefined + }; + let isAtPropertyKey = false; + function setPreviousNode(value, offset, length, type) { + previousNodeInst.value = value; + previousNodeInst.offset = offset; + previousNodeInst.length = length; + previousNodeInst.type = type; + previousNodeInst.colonOffset = undefined; + previousNode = previousNodeInst; + } + try { + visit(text, { + onObjectBegin: (offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + previousNode = undefined; + isAtPropertyKey = position > offset; + segments.push(''); // push a placeholder (will be replaced) + }, + onObjectProperty: (name, offset, length) => { + if (position < offset) { + throw earlyReturnException; + } + setPreviousNode(name, offset, length, 'property'); + segments[segments.length - 1] = name; + if (position <= offset + length) { + throw earlyReturnException; + } + }, + onObjectEnd: (offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + previousNode = undefined; + segments.pop(); + }, + onArrayBegin: (offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + previousNode = undefined; + segments.push(0); + }, + onArrayEnd: (offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + previousNode = undefined; + segments.pop(); + }, + onLiteralValue: (value, offset, length) => { + if (position < offset) { + throw earlyReturnException; + } + setPreviousNode(value, offset, length, getNodeType(value)); + if (position <= offset + length) { + throw earlyReturnException; + } + }, + onSeparator: (sep, offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + if (sep === ':' && previousNode && previousNode.type === 'property') { + previousNode.colonOffset = offset; + isAtPropertyKey = false; + previousNode = undefined; + } + else if (sep === ',') { + const last = segments[segments.length - 1]; + if (typeof last === 'number') { + segments[segments.length - 1] = last + 1; + } + else { + isAtPropertyKey = true; + segments[segments.length - 1] = ''; + } + previousNode = undefined; + } + } + }); + } + catch (e) { + if (e !== earlyReturnException) { + throw e; + } + } + return { + path: segments, + previousNode, + isAtPropertyKey, + matches: (pattern) => { + let k = 0; + for (let i = 0; k < pattern.length && i < segments.length; i++) { + if (pattern[k] === segments[i] || pattern[k] === '*') { + k++; + } + else if (pattern[k] !== '**') { + return false; + } + } + return k === pattern.length; + } + }; +} +/** + * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + * Therefore always check the errors list to find out if the input was valid. + */ +export function parse(text, errors = [], options = ParseOptions.DEFAULT) { + let currentProperty = null; + let currentParent = []; + const previousParents = []; + function onValue(value) { + if (Array.isArray(currentParent)) { + currentParent.push(value); + } + else if (currentProperty !== null) { + currentParent[currentProperty] = value; + } + } + const visitor = { + onObjectBegin: () => { + const object = {}; + onValue(object); + previousParents.push(currentParent); + currentParent = object; + currentProperty = null; + }, + onObjectProperty: (name) => { + currentProperty = name; + }, + onObjectEnd: () => { + currentParent = previousParents.pop(); + }, + onArrayBegin: () => { + const array = []; + onValue(array); + previousParents.push(currentParent); + currentParent = array; + currentProperty = null; + }, + onArrayEnd: () => { + currentParent = previousParents.pop(); + }, + onLiteralValue: onValue, + onError: (error, offset, length) => { + errors.push({ error, offset, length }); + } + }; + visit(text, visitor, options); + return currentParent[0]; +} +/** + * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + */ +export function parseTree(text, errors = [], options = ParseOptions.DEFAULT) { + let currentParent = { type: 'array', offset: -1, length: -1, children: [], parent: undefined }; // artificial root + function ensurePropertyComplete(endOffset) { + if (currentParent.type === 'property') { + currentParent.length = endOffset - currentParent.offset; + currentParent = currentParent.parent; + } + } + function onValue(valueNode) { + currentParent.children.push(valueNode); + return valueNode; + } + const visitor = { + onObjectBegin: (offset) => { + currentParent = onValue({ type: 'object', offset, length: -1, parent: currentParent, children: [] }); + }, + onObjectProperty: (name, offset, length) => { + currentParent = onValue({ type: 'property', offset, length: -1, parent: currentParent, children: [] }); + currentParent.children.push({ type: 'string', value: name, offset, length, parent: currentParent }); + }, + onObjectEnd: (offset, length) => { + ensurePropertyComplete(offset + length); // in case of a missing value for a property: make sure property is complete + currentParent.length = offset + length - currentParent.offset; + currentParent = currentParent.parent; + ensurePropertyComplete(offset + length); + }, + onArrayBegin: (offset, length) => { + currentParent = onValue({ type: 'array', offset, length: -1, parent: currentParent, children: [] }); + }, + onArrayEnd: (offset, length) => { + currentParent.length = offset + length - currentParent.offset; + currentParent = currentParent.parent; + ensurePropertyComplete(offset + length); + }, + onLiteralValue: (value, offset, length) => { + onValue({ type: getNodeType(value), offset, length, parent: currentParent, value }); + ensurePropertyComplete(offset + length); + }, + onSeparator: (sep, offset, length) => { + if (currentParent.type === 'property') { + if (sep === ':') { + currentParent.colonOffset = offset; + } + else if (sep === ',') { + ensurePropertyComplete(offset); + } + } + }, + onError: (error, offset, length) => { + errors.push({ error, offset, length }); + } + }; + visit(text, visitor, options); + const result = currentParent.children[0]; + if (result) { + delete result.parent; + } + return result; +} +/** + * Finds the node at the given path in a JSON DOM. + */ +export function findNodeAtLocation(root, path) { + if (!root) { + return undefined; + } + let node = root; + for (let segment of path) { + if (typeof segment === 'string') { + if (node.type !== 'object' || !Array.isArray(node.children)) { + return undefined; + } + let found = false; + for (const propertyNode of node.children) { + if (Array.isArray(propertyNode.children) && propertyNode.children[0].value === segment && propertyNode.children.length === 2) { + node = propertyNode.children[1]; + found = true; + break; + } + } + if (!found) { + return undefined; + } + } + else { + const index = segment; + if (node.type !== 'array' || index < 0 || !Array.isArray(node.children) || index >= node.children.length) { + return undefined; + } + node = node.children[index]; + } + } + return node; +} +/** + * Gets the JSON path of the given JSON DOM node + */ +export function getNodePath(node) { + if (!node.parent || !node.parent.children) { + return []; + } + const path = getNodePath(node.parent); + if (node.parent.type === 'property') { + const key = node.parent.children[0].value; + path.push(key); + } + else if (node.parent.type === 'array') { + const index = node.parent.children.indexOf(node); + if (index !== -1) { + path.push(index); + } + } + return path; +} +/** + * Evaluates the JavaScript object of the given JSON DOM node + */ +export function getNodeValue(node) { + switch (node.type) { + case 'array': + return node.children.map(getNodeValue); + case 'object': + const obj = Object.create(null); + for (let prop of node.children) { + const valueNode = prop.children[1]; + if (valueNode) { + obj[prop.children[0].value] = getNodeValue(valueNode); + } + } + return obj; + case 'null': + case 'string': + case 'number': + case 'boolean': + return node.value; + default: + return undefined; + } +} +export function contains(node, offset, includeRightBound = false) { + return (offset >= node.offset && offset < (node.offset + node.length)) || includeRightBound && (offset === (node.offset + node.length)); +} +/** + * Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. + */ +export function findNodeAtOffset(node, offset, includeRightBound = false) { + if (contains(node, offset, includeRightBound)) { + const children = node.children; + if (Array.isArray(children)) { + for (let i = 0; i < children.length && children[i].offset <= offset; i++) { + const item = findNodeAtOffset(children[i], offset, includeRightBound); + if (item) { + return item; + } + } + } + return node; + } + return undefined; +} +/** + * Parses the given text and invokes the visitor functions for each object, array and literal reached. + */ +export function visit(text, visitor, options = ParseOptions.DEFAULT) { + const _scanner = createScanner(text, false); + // Important: Only pass copies of this to visitor functions to prevent accidental modification, and + // to not affect visitor functions which stored a reference to a previous JSONPath + const _jsonPath = []; + function toNoArgVisit(visitFunction) { + return visitFunction ? () => visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true; + } + function toNoArgVisitWithPath(visitFunction) { + return visitFunction ? () => visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true; + } + function toOneArgVisit(visitFunction) { + return visitFunction ? (arg) => visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true; + } + function toOneArgVisitWithPath(visitFunction) { + return visitFunction ? (arg) => visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true; + } + const onObjectBegin = toNoArgVisitWithPath(visitor.onObjectBegin), onObjectProperty = toOneArgVisitWithPath(visitor.onObjectProperty), onObjectEnd = toNoArgVisit(visitor.onObjectEnd), onArrayBegin = toNoArgVisitWithPath(visitor.onArrayBegin), onArrayEnd = toNoArgVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisitWithPath(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError); + const disallowComments = options && options.disallowComments; + const allowTrailingComma = options && options.allowTrailingComma; + function scanNext() { + while (true) { + const token = _scanner.scan(); + switch (_scanner.getTokenError()) { + case 4 /* ScanError.InvalidUnicode */: + handleError(14 /* ParseErrorCode.InvalidUnicode */); + break; + case 5 /* ScanError.InvalidEscapeCharacter */: + handleError(15 /* ParseErrorCode.InvalidEscapeCharacter */); + break; + case 3 /* ScanError.UnexpectedEndOfNumber */: + handleError(13 /* ParseErrorCode.UnexpectedEndOfNumber */); + break; + case 1 /* ScanError.UnexpectedEndOfComment */: + if (!disallowComments) { + handleError(11 /* ParseErrorCode.UnexpectedEndOfComment */); + } + break; + case 2 /* ScanError.UnexpectedEndOfString */: + handleError(12 /* ParseErrorCode.UnexpectedEndOfString */); + break; + case 6 /* ScanError.InvalidCharacter */: + handleError(16 /* ParseErrorCode.InvalidCharacter */); + break; + } + switch (token) { + case 12 /* SyntaxKind.LineCommentTrivia */: + case 13 /* SyntaxKind.BlockCommentTrivia */: + if (disallowComments) { + handleError(10 /* ParseErrorCode.InvalidCommentToken */); + } + else { + onComment(); + } + break; + case 16 /* SyntaxKind.Unknown */: + handleError(1 /* ParseErrorCode.InvalidSymbol */); + break; + case 15 /* SyntaxKind.Trivia */: + case 14 /* SyntaxKind.LineBreakTrivia */: + break; + default: + return token; + } + } + } + function handleError(error, skipUntilAfter = [], skipUntil = []) { + onError(error); + if (skipUntilAfter.length + skipUntil.length > 0) { + let token = _scanner.getToken(); + while (token !== 17 /* SyntaxKind.EOF */) { + if (skipUntilAfter.indexOf(token) !== -1) { + scanNext(); + break; + } + else if (skipUntil.indexOf(token) !== -1) { + break; + } + token = scanNext(); + } + } + } + function parseString(isValue) { + const value = _scanner.getTokenValue(); + if (isValue) { + onLiteralValue(value); + } + else { + onObjectProperty(value); + // add property name afterwards + _jsonPath.push(value); + } + scanNext(); + return true; + } + function parseLiteral() { + switch (_scanner.getToken()) { + case 11 /* SyntaxKind.NumericLiteral */: + const tokenValue = _scanner.getTokenValue(); + let value = Number(tokenValue); + if (isNaN(value)) { + handleError(2 /* ParseErrorCode.InvalidNumberFormat */); + value = 0; + } + onLiteralValue(value); + break; + case 7 /* SyntaxKind.NullKeyword */: + onLiteralValue(null); + break; + case 8 /* SyntaxKind.TrueKeyword */: + onLiteralValue(true); + break; + case 9 /* SyntaxKind.FalseKeyword */: + onLiteralValue(false); + break; + default: + return false; + } + scanNext(); + return true; + } + function parseProperty() { + if (_scanner.getToken() !== 10 /* SyntaxKind.StringLiteral */) { + handleError(3 /* ParseErrorCode.PropertyNameExpected */, [], [2 /* SyntaxKind.CloseBraceToken */, 5 /* SyntaxKind.CommaToken */]); + return false; + } + parseString(false); + if (_scanner.getToken() === 6 /* SyntaxKind.ColonToken */) { + onSeparator(':'); + scanNext(); // consume colon + if (!parseValue()) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], [2 /* SyntaxKind.CloseBraceToken */, 5 /* SyntaxKind.CommaToken */]); + } + } + else { + handleError(5 /* ParseErrorCode.ColonExpected */, [], [2 /* SyntaxKind.CloseBraceToken */, 5 /* SyntaxKind.CommaToken */]); + } + _jsonPath.pop(); // remove processed property name + return true; + } + function parseObject() { + onObjectBegin(); + scanNext(); // consume open brace + let needsComma = false; + while (_scanner.getToken() !== 2 /* SyntaxKind.CloseBraceToken */ && _scanner.getToken() !== 17 /* SyntaxKind.EOF */) { + if (_scanner.getToken() === 5 /* SyntaxKind.CommaToken */) { + if (!needsComma) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], []); + } + onSeparator(','); + scanNext(); // consume comma + if (_scanner.getToken() === 2 /* SyntaxKind.CloseBraceToken */ && allowTrailingComma) { + break; + } + } + else if (needsComma) { + handleError(6 /* ParseErrorCode.CommaExpected */, [], []); + } + if (!parseProperty()) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], [2 /* SyntaxKind.CloseBraceToken */, 5 /* SyntaxKind.CommaToken */]); + } + needsComma = true; + } + onObjectEnd(); + if (_scanner.getToken() !== 2 /* SyntaxKind.CloseBraceToken */) { + handleError(7 /* ParseErrorCode.CloseBraceExpected */, [2 /* SyntaxKind.CloseBraceToken */], []); + } + else { + scanNext(); // consume close brace + } + return true; + } + function parseArray() { + onArrayBegin(); + scanNext(); // consume open bracket + let isFirstElement = true; + let needsComma = false; + while (_scanner.getToken() !== 4 /* SyntaxKind.CloseBracketToken */ && _scanner.getToken() !== 17 /* SyntaxKind.EOF */) { + if (_scanner.getToken() === 5 /* SyntaxKind.CommaToken */) { + if (!needsComma) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], []); + } + onSeparator(','); + scanNext(); // consume comma + if (_scanner.getToken() === 4 /* SyntaxKind.CloseBracketToken */ && allowTrailingComma) { + break; + } + } + else if (needsComma) { + handleError(6 /* ParseErrorCode.CommaExpected */, [], []); + } + if (isFirstElement) { + _jsonPath.push(0); + isFirstElement = false; + } + else { + _jsonPath[_jsonPath.length - 1]++; + } + if (!parseValue()) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], [4 /* SyntaxKind.CloseBracketToken */, 5 /* SyntaxKind.CommaToken */]); + } + needsComma = true; + } + onArrayEnd(); + if (!isFirstElement) { + _jsonPath.pop(); // remove array index + } + if (_scanner.getToken() !== 4 /* SyntaxKind.CloseBracketToken */) { + handleError(8 /* ParseErrorCode.CloseBracketExpected */, [4 /* SyntaxKind.CloseBracketToken */], []); + } + else { + scanNext(); // consume close bracket + } + return true; + } + function parseValue() { + switch (_scanner.getToken()) { + case 3 /* SyntaxKind.OpenBracketToken */: + return parseArray(); + case 1 /* SyntaxKind.OpenBraceToken */: + return parseObject(); + case 10 /* SyntaxKind.StringLiteral */: + return parseString(true); + default: + return parseLiteral(); + } + } + scanNext(); + if (_scanner.getToken() === 17 /* SyntaxKind.EOF */) { + if (options.allowEmptyContent) { + return true; + } + handleError(4 /* ParseErrorCode.ValueExpected */, [], []); + return false; + } + if (!parseValue()) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], []); + return false; + } + if (_scanner.getToken() !== 17 /* SyntaxKind.EOF */) { + handleError(9 /* ParseErrorCode.EndOfFileExpected */, [], []); + } + return true; +} +/** + * Takes JSON with JavaScript-style comments and remove + * them. Optionally replaces every none-newline character + * of comments with a replaceCharacter + */ +export function stripComments(text, replaceCh) { + let _scanner = createScanner(text), parts = [], kind, offset = 0, pos; + do { + pos = _scanner.getPosition(); + kind = _scanner.scan(); + switch (kind) { + case 12 /* SyntaxKind.LineCommentTrivia */: + case 13 /* SyntaxKind.BlockCommentTrivia */: + case 17 /* SyntaxKind.EOF */: + if (offset !== pos) { + parts.push(text.substring(offset, pos)); + } + if (replaceCh !== undefined) { + parts.push(_scanner.getTokenValue().replace(/[^\r\n]/g, replaceCh)); + } + offset = _scanner.getPosition(); + break; + } + } while (kind !== 17 /* SyntaxKind.EOF */); + return parts.join(''); +} +export function getNodeType(value) { + switch (typeof value) { + case 'boolean': return 'boolean'; + case 'number': return 'number'; + case 'string': return 'string'; + case 'object': { + if (!value) { + return 'null'; + } + else if (Array.isArray(value)) { + return 'array'; + } + return 'object'; + } + default: return 'null'; + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/scanner.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/scanner.js" index b78f2f3853661418a9ba60609997bfe30ffef9d8..e84942c122b7bca38dddd177a519d7a17ad4fcef 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/scanner.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/scanner.js" @@ -1,3 +1,443 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e737e1774f87ca88d85d73e3bafff688b78cac06b81c53b96c54da8b3ca86cd9 -size 19188 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +/** + * Creates a JSON scanner on the given text. + * If ignoreTrivia is set, whitespaces or comments are ignored. + */ +export function createScanner(text, ignoreTrivia = false) { + const len = text.length; + let pos = 0, value = '', tokenOffset = 0, token = 16 /* SyntaxKind.Unknown */, lineNumber = 0, lineStartOffset = 0, tokenLineStartOffset = 0, prevTokenLineStartOffset = 0, scanError = 0 /* ScanError.None */; + function scanHexDigits(count, exact) { + let digits = 0; + let value = 0; + while (digits < count || !exact) { + let ch = text.charCodeAt(pos); + if (ch >= 48 /* CharacterCodes._0 */ && ch <= 57 /* CharacterCodes._9 */) { + value = value * 16 + ch - 48 /* CharacterCodes._0 */; + } + else if (ch >= 65 /* CharacterCodes.A */ && ch <= 70 /* CharacterCodes.F */) { + value = value * 16 + ch - 65 /* CharacterCodes.A */ + 10; + } + else if (ch >= 97 /* CharacterCodes.a */ && ch <= 102 /* CharacterCodes.f */) { + value = value * 16 + ch - 97 /* CharacterCodes.a */ + 10; + } + else { + break; + } + pos++; + digits++; + } + if (digits < count) { + value = -1; + } + return value; + } + function setPosition(newPosition) { + pos = newPosition; + value = ''; + tokenOffset = 0; + token = 16 /* SyntaxKind.Unknown */; + scanError = 0 /* ScanError.None */; + } + function scanNumber() { + let start = pos; + if (text.charCodeAt(pos) === 48 /* CharacterCodes._0 */) { + pos++; + } + else { + pos++; + while (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + } + } + if (pos < text.length && text.charCodeAt(pos) === 46 /* CharacterCodes.dot */) { + pos++; + if (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + while (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + } + } + else { + scanError = 3 /* ScanError.UnexpectedEndOfNumber */; + return text.substring(start, pos); + } + } + let end = pos; + if (pos < text.length && (text.charCodeAt(pos) === 69 /* CharacterCodes.E */ || text.charCodeAt(pos) === 101 /* CharacterCodes.e */)) { + pos++; + if (pos < text.length && text.charCodeAt(pos) === 43 /* CharacterCodes.plus */ || text.charCodeAt(pos) === 45 /* CharacterCodes.minus */) { + pos++; + } + if (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + while (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + } + end = pos; + } + else { + scanError = 3 /* ScanError.UnexpectedEndOfNumber */; + } + } + return text.substring(start, end); + } + function scanString() { + let result = '', start = pos; + while (true) { + if (pos >= len) { + result += text.substring(start, pos); + scanError = 2 /* ScanError.UnexpectedEndOfString */; + break; + } + const ch = text.charCodeAt(pos); + if (ch === 34 /* CharacterCodes.doubleQuote */) { + result += text.substring(start, pos); + pos++; + break; + } + if (ch === 92 /* CharacterCodes.backslash */) { + result += text.substring(start, pos); + pos++; + if (pos >= len) { + scanError = 2 /* ScanError.UnexpectedEndOfString */; + break; + } + const ch2 = text.charCodeAt(pos++); + switch (ch2) { + case 34 /* CharacterCodes.doubleQuote */: + result += '\"'; + break; + case 92 /* CharacterCodes.backslash */: + result += '\\'; + break; + case 47 /* CharacterCodes.slash */: + result += '/'; + break; + case 98 /* CharacterCodes.b */: + result += '\b'; + break; + case 102 /* CharacterCodes.f */: + result += '\f'; + break; + case 110 /* CharacterCodes.n */: + result += '\n'; + break; + case 114 /* CharacterCodes.r */: + result += '\r'; + break; + case 116 /* CharacterCodes.t */: + result += '\t'; + break; + case 117 /* CharacterCodes.u */: + const ch3 = scanHexDigits(4, true); + if (ch3 >= 0) { + result += String.fromCharCode(ch3); + } + else { + scanError = 4 /* ScanError.InvalidUnicode */; + } + break; + default: + scanError = 5 /* ScanError.InvalidEscapeCharacter */; + } + start = pos; + continue; + } + if (ch >= 0 && ch <= 0x1f) { + if (isLineBreak(ch)) { + result += text.substring(start, pos); + scanError = 2 /* ScanError.UnexpectedEndOfString */; + break; + } + else { + scanError = 6 /* ScanError.InvalidCharacter */; + // mark as error but continue with string + } + } + pos++; + } + return result; + } + function scanNext() { + value = ''; + scanError = 0 /* ScanError.None */; + tokenOffset = pos; + lineStartOffset = lineNumber; + prevTokenLineStartOffset = tokenLineStartOffset; + if (pos >= len) { + // at the end + tokenOffset = len; + return token = 17 /* SyntaxKind.EOF */; + } + let code = text.charCodeAt(pos); + // trivia: whitespace + if (isWhiteSpace(code)) { + do { + pos++; + value += String.fromCharCode(code); + code = text.charCodeAt(pos); + } while (isWhiteSpace(code)); + return token = 15 /* SyntaxKind.Trivia */; + } + // trivia: newlines + if (isLineBreak(code)) { + pos++; + value += String.fromCharCode(code); + if (code === 13 /* CharacterCodes.carriageReturn */ && text.charCodeAt(pos) === 10 /* CharacterCodes.lineFeed */) { + pos++; + value += '\n'; + } + lineNumber++; + tokenLineStartOffset = pos; + return token = 14 /* SyntaxKind.LineBreakTrivia */; + } + switch (code) { + // tokens: []{}:, + case 123 /* CharacterCodes.openBrace */: + pos++; + return token = 1 /* SyntaxKind.OpenBraceToken */; + case 125 /* CharacterCodes.closeBrace */: + pos++; + return token = 2 /* SyntaxKind.CloseBraceToken */; + case 91 /* CharacterCodes.openBracket */: + pos++; + return token = 3 /* SyntaxKind.OpenBracketToken */; + case 93 /* CharacterCodes.closeBracket */: + pos++; + return token = 4 /* SyntaxKind.CloseBracketToken */; + case 58 /* CharacterCodes.colon */: + pos++; + return token = 6 /* SyntaxKind.ColonToken */; + case 44 /* CharacterCodes.comma */: + pos++; + return token = 5 /* SyntaxKind.CommaToken */; + // strings + case 34 /* CharacterCodes.doubleQuote */: + pos++; + value = scanString(); + return token = 10 /* SyntaxKind.StringLiteral */; + // comments + case 47 /* CharacterCodes.slash */: + const start = pos - 1; + // Single-line comment + if (text.charCodeAt(pos + 1) === 47 /* CharacterCodes.slash */) { + pos += 2; + while (pos < len) { + if (isLineBreak(text.charCodeAt(pos))) { + break; + } + pos++; + } + value = text.substring(start, pos); + return token = 12 /* SyntaxKind.LineCommentTrivia */; + } + // Multi-line comment + if (text.charCodeAt(pos + 1) === 42 /* CharacterCodes.asterisk */) { + pos += 2; + const safeLength = len - 1; // For lookahead. + let commentClosed = false; + while (pos < safeLength) { + const ch = text.charCodeAt(pos); + if (ch === 42 /* CharacterCodes.asterisk */ && text.charCodeAt(pos + 1) === 47 /* CharacterCodes.slash */) { + pos += 2; + commentClosed = true; + break; + } + pos++; + if (isLineBreak(ch)) { + if (ch === 13 /* CharacterCodes.carriageReturn */ && text.charCodeAt(pos) === 10 /* CharacterCodes.lineFeed */) { + pos++; + } + lineNumber++; + tokenLineStartOffset = pos; + } + } + if (!commentClosed) { + pos++; + scanError = 1 /* ScanError.UnexpectedEndOfComment */; + } + value = text.substring(start, pos); + return token = 13 /* SyntaxKind.BlockCommentTrivia */; + } + // just a single slash + value += String.fromCharCode(code); + pos++; + return token = 16 /* SyntaxKind.Unknown */; + // numbers + case 45 /* CharacterCodes.minus */: + value += String.fromCharCode(code); + pos++; + if (pos === len || !isDigit(text.charCodeAt(pos))) { + return token = 16 /* SyntaxKind.Unknown */; + } + // found a minus, followed by a number so + // we fall through to proceed with scanning + // numbers + case 48 /* CharacterCodes._0 */: + case 49 /* CharacterCodes._1 */: + case 50 /* CharacterCodes._2 */: + case 51 /* CharacterCodes._3 */: + case 52 /* CharacterCodes._4 */: + case 53 /* CharacterCodes._5 */: + case 54 /* CharacterCodes._6 */: + case 55 /* CharacterCodes._7 */: + case 56 /* CharacterCodes._8 */: + case 57 /* CharacterCodes._9 */: + value += scanNumber(); + return token = 11 /* SyntaxKind.NumericLiteral */; + // literals and unknown symbols + default: + // is a literal? Read the full word. + while (pos < len && isUnknownContentCharacter(code)) { + pos++; + code = text.charCodeAt(pos); + } + if (tokenOffset !== pos) { + value = text.substring(tokenOffset, pos); + // keywords: true, false, null + switch (value) { + case 'true': return token = 8 /* SyntaxKind.TrueKeyword */; + case 'false': return token = 9 /* SyntaxKind.FalseKeyword */; + case 'null': return token = 7 /* SyntaxKind.NullKeyword */; + } + return token = 16 /* SyntaxKind.Unknown */; + } + // some + value += String.fromCharCode(code); + pos++; + return token = 16 /* SyntaxKind.Unknown */; + } + } + function isUnknownContentCharacter(code) { + if (isWhiteSpace(code) || isLineBreak(code)) { + return false; + } + switch (code) { + case 125 /* CharacterCodes.closeBrace */: + case 93 /* CharacterCodes.closeBracket */: + case 123 /* CharacterCodes.openBrace */: + case 91 /* CharacterCodes.openBracket */: + case 34 /* CharacterCodes.doubleQuote */: + case 58 /* CharacterCodes.colon */: + case 44 /* CharacterCodes.comma */: + case 47 /* CharacterCodes.slash */: + return false; + } + return true; + } + function scanNextNonTrivia() { + let result; + do { + result = scanNext(); + } while (result >= 12 /* SyntaxKind.LineCommentTrivia */ && result <= 15 /* SyntaxKind.Trivia */); + return result; + } + return { + setPosition: setPosition, + getPosition: () => pos, + scan: ignoreTrivia ? scanNextNonTrivia : scanNext, + getToken: () => token, + getTokenValue: () => value, + getTokenOffset: () => tokenOffset, + getTokenLength: () => pos - tokenOffset, + getTokenStartLine: () => lineStartOffset, + getTokenStartCharacter: () => tokenOffset - prevTokenLineStartOffset, + getTokenError: () => scanError, + }; +} +function isWhiteSpace(ch) { + return ch === 32 /* CharacterCodes.space */ || ch === 9 /* CharacterCodes.tab */; +} +function isLineBreak(ch) { + return ch === 10 /* CharacterCodes.lineFeed */ || ch === 13 /* CharacterCodes.carriageReturn */; +} +function isDigit(ch) { + return ch >= 48 /* CharacterCodes._0 */ && ch <= 57 /* CharacterCodes._9 */; +} +var CharacterCodes; +(function (CharacterCodes) { + CharacterCodes[CharacterCodes["lineFeed"] = 10] = "lineFeed"; + CharacterCodes[CharacterCodes["carriageReturn"] = 13] = "carriageReturn"; + CharacterCodes[CharacterCodes["space"] = 32] = "space"; + CharacterCodes[CharacterCodes["_0"] = 48] = "_0"; + CharacterCodes[CharacterCodes["_1"] = 49] = "_1"; + CharacterCodes[CharacterCodes["_2"] = 50] = "_2"; + CharacterCodes[CharacterCodes["_3"] = 51] = "_3"; + CharacterCodes[CharacterCodes["_4"] = 52] = "_4"; + CharacterCodes[CharacterCodes["_5"] = 53] = "_5"; + CharacterCodes[CharacterCodes["_6"] = 54] = "_6"; + CharacterCodes[CharacterCodes["_7"] = 55] = "_7"; + CharacterCodes[CharacterCodes["_8"] = 56] = "_8"; + CharacterCodes[CharacterCodes["_9"] = 57] = "_9"; + CharacterCodes[CharacterCodes["a"] = 97] = "a"; + CharacterCodes[CharacterCodes["b"] = 98] = "b"; + CharacterCodes[CharacterCodes["c"] = 99] = "c"; + CharacterCodes[CharacterCodes["d"] = 100] = "d"; + CharacterCodes[CharacterCodes["e"] = 101] = "e"; + CharacterCodes[CharacterCodes["f"] = 102] = "f"; + CharacterCodes[CharacterCodes["g"] = 103] = "g"; + CharacterCodes[CharacterCodes["h"] = 104] = "h"; + CharacterCodes[CharacterCodes["i"] = 105] = "i"; + CharacterCodes[CharacterCodes["j"] = 106] = "j"; + CharacterCodes[CharacterCodes["k"] = 107] = "k"; + CharacterCodes[CharacterCodes["l"] = 108] = "l"; + CharacterCodes[CharacterCodes["m"] = 109] = "m"; + CharacterCodes[CharacterCodes["n"] = 110] = "n"; + CharacterCodes[CharacterCodes["o"] = 111] = "o"; + CharacterCodes[CharacterCodes["p"] = 112] = "p"; + CharacterCodes[CharacterCodes["q"] = 113] = "q"; + CharacterCodes[CharacterCodes["r"] = 114] = "r"; + CharacterCodes[CharacterCodes["s"] = 115] = "s"; + CharacterCodes[CharacterCodes["t"] = 116] = "t"; + CharacterCodes[CharacterCodes["u"] = 117] = "u"; + CharacterCodes[CharacterCodes["v"] = 118] = "v"; + CharacterCodes[CharacterCodes["w"] = 119] = "w"; + CharacterCodes[CharacterCodes["x"] = 120] = "x"; + CharacterCodes[CharacterCodes["y"] = 121] = "y"; + CharacterCodes[CharacterCodes["z"] = 122] = "z"; + CharacterCodes[CharacterCodes["A"] = 65] = "A"; + CharacterCodes[CharacterCodes["B"] = 66] = "B"; + CharacterCodes[CharacterCodes["C"] = 67] = "C"; + CharacterCodes[CharacterCodes["D"] = 68] = "D"; + CharacterCodes[CharacterCodes["E"] = 69] = "E"; + CharacterCodes[CharacterCodes["F"] = 70] = "F"; + CharacterCodes[CharacterCodes["G"] = 71] = "G"; + CharacterCodes[CharacterCodes["H"] = 72] = "H"; + CharacterCodes[CharacterCodes["I"] = 73] = "I"; + CharacterCodes[CharacterCodes["J"] = 74] = "J"; + CharacterCodes[CharacterCodes["K"] = 75] = "K"; + CharacterCodes[CharacterCodes["L"] = 76] = "L"; + CharacterCodes[CharacterCodes["M"] = 77] = "M"; + CharacterCodes[CharacterCodes["N"] = 78] = "N"; + CharacterCodes[CharacterCodes["O"] = 79] = "O"; + CharacterCodes[CharacterCodes["P"] = 80] = "P"; + CharacterCodes[CharacterCodes["Q"] = 81] = "Q"; + CharacterCodes[CharacterCodes["R"] = 82] = "R"; + CharacterCodes[CharacterCodes["S"] = 83] = "S"; + CharacterCodes[CharacterCodes["T"] = 84] = "T"; + CharacterCodes[CharacterCodes["U"] = 85] = "U"; + CharacterCodes[CharacterCodes["V"] = 86] = "V"; + CharacterCodes[CharacterCodes["W"] = 87] = "W"; + CharacterCodes[CharacterCodes["X"] = 88] = "X"; + CharacterCodes[CharacterCodes["Y"] = 89] = "Y"; + CharacterCodes[CharacterCodes["Z"] = 90] = "Z"; + CharacterCodes[CharacterCodes["asterisk"] = 42] = "asterisk"; + CharacterCodes[CharacterCodes["backslash"] = 92] = "backslash"; + CharacterCodes[CharacterCodes["closeBrace"] = 125] = "closeBrace"; + CharacterCodes[CharacterCodes["closeBracket"] = 93] = "closeBracket"; + CharacterCodes[CharacterCodes["colon"] = 58] = "colon"; + CharacterCodes[CharacterCodes["comma"] = 44] = "comma"; + CharacterCodes[CharacterCodes["dot"] = 46] = "dot"; + CharacterCodes[CharacterCodes["doubleQuote"] = 34] = "doubleQuote"; + CharacterCodes[CharacterCodes["minus"] = 45] = "minus"; + CharacterCodes[CharacterCodes["openBrace"] = 123] = "openBrace"; + CharacterCodes[CharacterCodes["openBracket"] = 91] = "openBracket"; + CharacterCodes[CharacterCodes["plus"] = 43] = "plus"; + CharacterCodes[CharacterCodes["slash"] = 47] = "slash"; + CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed"; + CharacterCodes[CharacterCodes["tab"] = 9] = "tab"; +})(CharacterCodes || (CharacterCodes = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/string-intern.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/string-intern.js" index 6e06bd79d5eb95196cba4cdd945aa6091b0212ba..2794e2b39325539833035e7a140de17df8b28e93 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/string-intern.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/impl/string-intern.js" @@ -1,3 +1,29 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3a0aad3f56c3e0728812c7584568c0ff200bce1ca58cf40e946f01fdb54c5752 -size 1034 +export const cachedSpaces = new Array(20).fill(0).map((_, index) => { + return ' '.repeat(index); +}); +const maxCachedValues = 200; +export const cachedBreakLinesWithSpaces = { + ' ': { + '\n': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\n' + ' '.repeat(index); + }), + '\r': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\r' + ' '.repeat(index); + }), + '\r\n': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\r\n' + ' '.repeat(index); + }), + }, + '\t': { + '\n': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\n' + '\t'.repeat(index); + }), + '\r': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\r' + '\t'.repeat(index); + }), + '\r\n': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\r\n' + '\t'.repeat(index); + }), + } +}; +export const supportedEols = ['\n', '\r', '\r\n']; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/main.d.ts" index 694be0bd6eeee1b89b92cc30b8110de6532fb4d9..7312a36d4f48d03e354ba9c4e45fc28947d33894 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/main.d.ts" @@ -1,3 +1,349 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4d82dad8d8a312706a9bc240c805088fef713bc71eaa622e55970e251b6c1a0f -size 14314 +/** + * Creates a JSON scanner on the given text. + * If ignoreTrivia is set, whitespaces or comments are ignored. + */ +export declare const createScanner: (text: string, ignoreTrivia?: boolean) => JSONScanner; +export declare const enum ScanError { + None = 0, + UnexpectedEndOfComment = 1, + UnexpectedEndOfString = 2, + UnexpectedEndOfNumber = 3, + InvalidUnicode = 4, + InvalidEscapeCharacter = 5, + InvalidCharacter = 6 +} +export declare const enum SyntaxKind { + OpenBraceToken = 1, + CloseBraceToken = 2, + OpenBracketToken = 3, + CloseBracketToken = 4, + CommaToken = 5, + ColonToken = 6, + NullKeyword = 7, + TrueKeyword = 8, + FalseKeyword = 9, + StringLiteral = 10, + NumericLiteral = 11, + LineCommentTrivia = 12, + BlockCommentTrivia = 13, + LineBreakTrivia = 14, + Trivia = 15, + Unknown = 16, + EOF = 17 +} +/** + * The scanner object, representing a JSON scanner at a position in the input string. + */ +export interface JSONScanner { + /** + * Sets the scan position to a new offset. A call to 'scan' is needed to get the first token. + */ + setPosition(pos: number): void; + /** + * Read the next token. Returns the token code. + */ + scan(): SyntaxKind; + /** + * Returns the zero-based current scan position, which is after the last read token. + */ + getPosition(): number; + /** + * Returns the last read token. + */ + getToken(): SyntaxKind; + /** + * Returns the last read token value. The value for strings is the decoded string content. For numbers it's of type number, for boolean it's true or false. + */ + getTokenValue(): string; + /** + * The zero-based start offset of the last read token. + */ + getTokenOffset(): number; + /** + * The length of the last read token. + */ + getTokenLength(): number; + /** + * The zero-based start line number of the last read token. + */ + getTokenStartLine(): number; + /** + * The zero-based start character (column) of the last read token. + */ + getTokenStartCharacter(): number; + /** + * An error code of the last scan. + */ + getTokenError(): ScanError; +} +/** + * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. + */ +export declare const getLocation: (text: string, position: number) => Location; +/** + * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + * Therefore, always check the errors list to find out if the input was valid. + */ +export declare const parse: (text: string, errors?: ParseError[], options?: ParseOptions) => any; +/** + * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + */ +export declare const parseTree: (text: string, errors?: ParseError[], options?: ParseOptions) => Node | undefined; +/** + * Finds the node at the given path in a JSON DOM. + */ +export declare const findNodeAtLocation: (root: Node, path: JSONPath) => Node | undefined; +/** + * Finds the innermost node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. + */ +export declare const findNodeAtOffset: (root: Node, offset: number, includeRightBound?: boolean) => Node | undefined; +/** + * Gets the JSON path of the given JSON DOM node + */ +export declare const getNodePath: (node: Node) => JSONPath; +/** + * Evaluates the JavaScript object of the given JSON DOM node + */ +export declare const getNodeValue: (node: Node) => any; +/** + * Parses the given text and invokes the visitor functions for each object, array and literal reached. + */ +export declare const visit: (text: string, visitor: JSONVisitor, options?: ParseOptions) => any; +/** + * Takes JSON with JavaScript-style comments and remove + * them. Optionally replaces every none-newline character + * of comments with a replaceCharacter + */ +export declare const stripComments: (text: string, replaceCh?: string) => string; +export interface ParseError { + error: ParseErrorCode; + offset: number; + length: number; +} +export declare const enum ParseErrorCode { + InvalidSymbol = 1, + InvalidNumberFormat = 2, + PropertyNameExpected = 3, + ValueExpected = 4, + ColonExpected = 5, + CommaExpected = 6, + CloseBraceExpected = 7, + CloseBracketExpected = 8, + EndOfFileExpected = 9, + InvalidCommentToken = 10, + UnexpectedEndOfComment = 11, + UnexpectedEndOfString = 12, + UnexpectedEndOfNumber = 13, + InvalidUnicode = 14, + InvalidEscapeCharacter = 15, + InvalidCharacter = 16 +} +export declare function printParseErrorCode(code: ParseErrorCode): "InvalidSymbol" | "InvalidNumberFormat" | "PropertyNameExpected" | "ValueExpected" | "ColonExpected" | "CommaExpected" | "CloseBraceExpected" | "CloseBracketExpected" | "EndOfFileExpected" | "InvalidCommentToken" | "UnexpectedEndOfComment" | "UnexpectedEndOfString" | "UnexpectedEndOfNumber" | "InvalidUnicode" | "InvalidEscapeCharacter" | "InvalidCharacter" | ""; +export type NodeType = 'object' | 'array' | 'property' | 'string' | 'number' | 'boolean' | 'null'; +export interface Node { + readonly type: NodeType; + readonly value?: any; + readonly offset: number; + readonly length: number; + readonly colonOffset?: number; + readonly parent?: Node; + readonly children?: Node[]; +} +/** + * A {@linkcode JSONPath} segment. Either a string representing an object property name + * or a number (starting at 0) for array indices. + */ +export type Segment = string | number; +export type JSONPath = Segment[]; +export interface Location { + /** + * The previous property key or literal value (string, number, boolean or null) or undefined. + */ + previousNode?: Node; + /** + * The path describing the location in the JSON document. The path consists of a sequence of strings + * representing an object property or numbers for array indices. + */ + path: JSONPath; + /** + * Matches the locations path against a pattern consisting of strings (for properties) and numbers (for array indices). + * '*' will match a single segment of any property name or index. + * '**' will match a sequence of segments of any property name or index, or no segment. + */ + matches: (patterns: JSONPath) => boolean; + /** + * If set, the location's offset is at a property key. + */ + isAtPropertyKey: boolean; +} +export interface ParseOptions { + disallowComments?: boolean; + allowTrailingComma?: boolean; + allowEmptyContent?: boolean; +} +/** + * Visitor called by {@linkcode visit} when parsing JSON. + * + * The visitor functions have the following common parameters: + * - `offset`: Global offset within the JSON document, starting at 0 + * - `startLine`: Line number, starting at 0 + * - `startCharacter`: Start character (column) within the current line, starting at 0 + * + * Additionally some functions have a `pathSupplier` parameter which can be used to obtain the + * current `JSONPath` within the document. + */ +export interface JSONVisitor { + /** + * Invoked when an open brace is encountered and an object is started. The offset and length represent the location of the open brace. + */ + onObjectBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a property is encountered. The offset and length represent the location of the property name. + * The `JSONPath` created by the `pathSupplier` refers to the enclosing JSON object, it does not include the + * property name yet. + */ + onObjectProperty?: (property: string, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a closing brace is encountered and an object is completed. The offset and length represent the location of the closing brace. + */ + onObjectEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked when an open bracket is encountered. The offset and length represent the location of the open bracket. + */ + onArrayBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a closing bracket is encountered. The offset and length represent the location of the closing bracket. + */ + onArrayEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked when a literal value is encountered. The offset and length represent the location of the literal value. + */ + onLiteralValue?: (value: any, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a comma or colon separator is encountered. The offset and length represent the location of the separator. + */ + onSeparator?: (character: string, offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * When comments are allowed, invoked when a line or block comment is encountered. The offset and length represent the location of the comment. + */ + onComment?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked on an error. + */ + onError?: (error: ParseErrorCode, offset: number, length: number, startLine: number, startCharacter: number) => void; +} +/** + * An edit result describes a textual edit operation. It is the result of a {@linkcode format} and {@linkcode modify} operation. + * It consist of one or more edits describing insertions, replacements or removals of text segments. + * * The offsets of the edits refer to the original state of the document. + * * No two edits change or remove the same range of text in the original document. + * * Multiple edits can have the same offset if they are multiple inserts, or an insert followed by a remove or replace. + * * The order in the array defines which edit is applied first. + * To apply an edit result use {@linkcode applyEdits}. + * In general multiple EditResults must not be concatenated because they might impact each other, producing incorrect or malformed JSON data. + */ +export type EditResult = Edit[]; +/** + * Represents a text modification + */ +export interface Edit { + /** + * The start offset of the modification. + */ + offset: number; + /** + * The length of the modification. Must not be negative. Empty length represents an *insert*. + */ + length: number; + /** + * The new content. Empty content represents a *remove*. + */ + content: string; +} +/** + * A text range in the document +*/ +export interface Range { + /** + * The start offset of the range. + */ + offset: number; + /** + * The length of the range. Must not be negative. + */ + length: number; +} +/** + * Options used by {@linkcode format} when computing the formatting edit operations + */ +export interface FormattingOptions { + /** + * If indentation is based on spaces (`insertSpaces` = true), the number of spaces that make an indent. + */ + tabSize?: number; + /** + * Is indentation based on spaces? + */ + insertSpaces?: boolean; + /** + * The default 'end of line' character. If not set, '\n' is used as default. + */ + eol?: string; + /** + * If set, will add a new line at the end of the document. + */ + insertFinalNewline?: boolean; + /** + * If true, will keep line positions as is in the formatting + */ + keepLines?: boolean; +} +/** + * Computes the edit operations needed to format a JSON document. + * + * @param documentText The input text + * @param range The range to format or `undefined` to format the full content + * @param options The formatting options + * @returns The edit operations describing the formatting changes to the original document following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export declare function format(documentText: string, range: Range | undefined, options: FormattingOptions): EditResult; +/** + * Options used by {@linkcode modify} when computing the modification edit operations + */ +export interface ModificationOptions { + /** + * Formatting options. If undefined, the newly inserted code will be inserted unformatted. + */ + formattingOptions?: FormattingOptions; + /** + * Default false. If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then + * {@linkcode modify} will insert a new item at that location instead of overwriting its contents. + */ + isArrayInsertion?: boolean; + /** + * Optional function to define the insertion index given an existing list of properties. + */ + getInsertionIndex?: (properties: string[]) => number; +} +/** + * Computes the edit operations needed to modify a value in the JSON document. + * + * @param documentText The input text + * @param path The path of the value to change. The path represents either to the document root, a property or an array item. + * If the path points to an non-existing property or item, it will be created. + * @param value The new value for the specified property or item. If the value is undefined, + * the property or item will be removed. + * @param options Options + * @returns The edit operations describing the changes to the original document, following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export declare function modify(text: string, path: JSONPath, value: any, options: ModificationOptions): EditResult; +/** + * Applies edits to an input string. + * @param text The input text + * @param edits Edit operations following the format described in {@linkcode EditResult}. + * @returns The text with the applied edits. + * @throws An error if the edit operations are not well-formed as described in {@linkcode EditResult}. + */ +export declare function applyEdits(text: string, edits: EditResult): string; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/main.js" index ce40a7adf761593eaad62916aba502af75574067..18e3cb7168b5cc4401a25bcace1f8af379c408d5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/esm/main.js" @@ -1,3 +1,178 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:72ff182105e158a1505ca3ecbf3f30359abb138a3980edaef1db7f4010ffb7dc -size 9363 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +import * as formatter from './impl/format'; +import * as edit from './impl/edit'; +import * as scanner from './impl/scanner'; +import * as parser from './impl/parser'; +/** + * Creates a JSON scanner on the given text. + * If ignoreTrivia is set, whitespaces or comments are ignored. + */ +export const createScanner = scanner.createScanner; +export var ScanError; +(function (ScanError) { + ScanError[ScanError["None"] = 0] = "None"; + ScanError[ScanError["UnexpectedEndOfComment"] = 1] = "UnexpectedEndOfComment"; + ScanError[ScanError["UnexpectedEndOfString"] = 2] = "UnexpectedEndOfString"; + ScanError[ScanError["UnexpectedEndOfNumber"] = 3] = "UnexpectedEndOfNumber"; + ScanError[ScanError["InvalidUnicode"] = 4] = "InvalidUnicode"; + ScanError[ScanError["InvalidEscapeCharacter"] = 5] = "InvalidEscapeCharacter"; + ScanError[ScanError["InvalidCharacter"] = 6] = "InvalidCharacter"; +})(ScanError || (ScanError = {})); +export var SyntaxKind; +(function (SyntaxKind) { + SyntaxKind[SyntaxKind["OpenBraceToken"] = 1] = "OpenBraceToken"; + SyntaxKind[SyntaxKind["CloseBraceToken"] = 2] = "CloseBraceToken"; + SyntaxKind[SyntaxKind["OpenBracketToken"] = 3] = "OpenBracketToken"; + SyntaxKind[SyntaxKind["CloseBracketToken"] = 4] = "CloseBracketToken"; + SyntaxKind[SyntaxKind["CommaToken"] = 5] = "CommaToken"; + SyntaxKind[SyntaxKind["ColonToken"] = 6] = "ColonToken"; + SyntaxKind[SyntaxKind["NullKeyword"] = 7] = "NullKeyword"; + SyntaxKind[SyntaxKind["TrueKeyword"] = 8] = "TrueKeyword"; + SyntaxKind[SyntaxKind["FalseKeyword"] = 9] = "FalseKeyword"; + SyntaxKind[SyntaxKind["StringLiteral"] = 10] = "StringLiteral"; + SyntaxKind[SyntaxKind["NumericLiteral"] = 11] = "NumericLiteral"; + SyntaxKind[SyntaxKind["LineCommentTrivia"] = 12] = "LineCommentTrivia"; + SyntaxKind[SyntaxKind["BlockCommentTrivia"] = 13] = "BlockCommentTrivia"; + SyntaxKind[SyntaxKind["LineBreakTrivia"] = 14] = "LineBreakTrivia"; + SyntaxKind[SyntaxKind["Trivia"] = 15] = "Trivia"; + SyntaxKind[SyntaxKind["Unknown"] = 16] = "Unknown"; + SyntaxKind[SyntaxKind["EOF"] = 17] = "EOF"; +})(SyntaxKind || (SyntaxKind = {})); +/** + * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. + */ +export const getLocation = parser.getLocation; +/** + * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + * Therefore, always check the errors list to find out if the input was valid. + */ +export const parse = parser.parse; +/** + * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + */ +export const parseTree = parser.parseTree; +/** + * Finds the node at the given path in a JSON DOM. + */ +export const findNodeAtLocation = parser.findNodeAtLocation; +/** + * Finds the innermost node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. + */ +export const findNodeAtOffset = parser.findNodeAtOffset; +/** + * Gets the JSON path of the given JSON DOM node + */ +export const getNodePath = parser.getNodePath; +/** + * Evaluates the JavaScript object of the given JSON DOM node + */ +export const getNodeValue = parser.getNodeValue; +/** + * Parses the given text and invokes the visitor functions for each object, array and literal reached. + */ +export const visit = parser.visit; +/** + * Takes JSON with JavaScript-style comments and remove + * them. Optionally replaces every none-newline character + * of comments with a replaceCharacter + */ +export const stripComments = parser.stripComments; +export var ParseErrorCode; +(function (ParseErrorCode) { + ParseErrorCode[ParseErrorCode["InvalidSymbol"] = 1] = "InvalidSymbol"; + ParseErrorCode[ParseErrorCode["InvalidNumberFormat"] = 2] = "InvalidNumberFormat"; + ParseErrorCode[ParseErrorCode["PropertyNameExpected"] = 3] = "PropertyNameExpected"; + ParseErrorCode[ParseErrorCode["ValueExpected"] = 4] = "ValueExpected"; + ParseErrorCode[ParseErrorCode["ColonExpected"] = 5] = "ColonExpected"; + ParseErrorCode[ParseErrorCode["CommaExpected"] = 6] = "CommaExpected"; + ParseErrorCode[ParseErrorCode["CloseBraceExpected"] = 7] = "CloseBraceExpected"; + ParseErrorCode[ParseErrorCode["CloseBracketExpected"] = 8] = "CloseBracketExpected"; + ParseErrorCode[ParseErrorCode["EndOfFileExpected"] = 9] = "EndOfFileExpected"; + ParseErrorCode[ParseErrorCode["InvalidCommentToken"] = 10] = "InvalidCommentToken"; + ParseErrorCode[ParseErrorCode["UnexpectedEndOfComment"] = 11] = "UnexpectedEndOfComment"; + ParseErrorCode[ParseErrorCode["UnexpectedEndOfString"] = 12] = "UnexpectedEndOfString"; + ParseErrorCode[ParseErrorCode["UnexpectedEndOfNumber"] = 13] = "UnexpectedEndOfNumber"; + ParseErrorCode[ParseErrorCode["InvalidUnicode"] = 14] = "InvalidUnicode"; + ParseErrorCode[ParseErrorCode["InvalidEscapeCharacter"] = 15] = "InvalidEscapeCharacter"; + ParseErrorCode[ParseErrorCode["InvalidCharacter"] = 16] = "InvalidCharacter"; +})(ParseErrorCode || (ParseErrorCode = {})); +export function printParseErrorCode(code) { + switch (code) { + case 1 /* ParseErrorCode.InvalidSymbol */: return 'InvalidSymbol'; + case 2 /* ParseErrorCode.InvalidNumberFormat */: return 'InvalidNumberFormat'; + case 3 /* ParseErrorCode.PropertyNameExpected */: return 'PropertyNameExpected'; + case 4 /* ParseErrorCode.ValueExpected */: return 'ValueExpected'; + case 5 /* ParseErrorCode.ColonExpected */: return 'ColonExpected'; + case 6 /* ParseErrorCode.CommaExpected */: return 'CommaExpected'; + case 7 /* ParseErrorCode.CloseBraceExpected */: return 'CloseBraceExpected'; + case 8 /* ParseErrorCode.CloseBracketExpected */: return 'CloseBracketExpected'; + case 9 /* ParseErrorCode.EndOfFileExpected */: return 'EndOfFileExpected'; + case 10 /* ParseErrorCode.InvalidCommentToken */: return 'InvalidCommentToken'; + case 11 /* ParseErrorCode.UnexpectedEndOfComment */: return 'UnexpectedEndOfComment'; + case 12 /* ParseErrorCode.UnexpectedEndOfString */: return 'UnexpectedEndOfString'; + case 13 /* ParseErrorCode.UnexpectedEndOfNumber */: return 'UnexpectedEndOfNumber'; + case 14 /* ParseErrorCode.InvalidUnicode */: return 'InvalidUnicode'; + case 15 /* ParseErrorCode.InvalidEscapeCharacter */: return 'InvalidEscapeCharacter'; + case 16 /* ParseErrorCode.InvalidCharacter */: return 'InvalidCharacter'; + } + return ''; +} +/** + * Computes the edit operations needed to format a JSON document. + * + * @param documentText The input text + * @param range The range to format or `undefined` to format the full content + * @param options The formatting options + * @returns The edit operations describing the formatting changes to the original document following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export function format(documentText, range, options) { + return formatter.format(documentText, range, options); +} +/** + * Computes the edit operations needed to modify a value in the JSON document. + * + * @param documentText The input text + * @param path The path of the value to change. The path represents either to the document root, a property or an array item. + * If the path points to an non-existing property or item, it will be created. + * @param value The new value for the specified property or item. If the value is undefined, + * the property or item will be removed. + * @param options Options + * @returns The edit operations describing the changes to the original document, following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export function modify(text, path, value, options) { + return edit.setProperty(text, path, value, options); +} +/** + * Applies edits to an input string. + * @param text The input text + * @param edits Edit operations following the format described in {@linkcode EditResult}. + * @returns The text with the applied edits. + * @throws An error if the edit operations are not well-formed as described in {@linkcode EditResult}. + */ +export function applyEdits(text, edits) { + let sortedEdits = edits.slice(0).sort((a, b) => { + const diff = a.offset - b.offset; + if (diff === 0) { + return a.length - b.length; + } + return diff; + }); + let lastModifiedOffset = text.length; + for (let i = sortedEdits.length - 1; i >= 0; i--) { + let e = sortedEdits[i]; + if (e.offset + e.length <= lastModifiedOffset) { + text = edit.applyEdit(text, e); + } + else { + throw new Error('Overlapping edit'); + } + lastModifiedOffset = e.offset; + } + return text; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/edit.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/edit.js" index 90bb5ec12296eddad590023d9d177066bdd7afa6..f9aeefef667d8a725dba6954d5831bdc5ff145f8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/edit.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/edit.js" @@ -1,3 +1,201 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9ecd115039cf7a478f223e4a9649170c7f5e8fd8016df1b267723b57553f9483 -size 10061 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./format", "./parser"], factory); + } +})(function (require, exports) { + /*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + 'use strict'; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isWS = exports.applyEdit = exports.setProperty = exports.removeProperty = void 0; + const format_1 = require("./format"); + const parser_1 = require("./parser"); + function removeProperty(text, path, options) { + return setProperty(text, path, void 0, options); + } + exports.removeProperty = removeProperty; + function setProperty(text, originalPath, value, options) { + const path = originalPath.slice(); + const errors = []; + const root = (0, parser_1.parseTree)(text, errors); + let parent = void 0; + let lastSegment = void 0; + while (path.length > 0) { + lastSegment = path.pop(); + parent = (0, parser_1.findNodeAtLocation)(root, path); + if (parent === void 0 && value !== void 0) { + if (typeof lastSegment === 'string') { + value = { [lastSegment]: value }; + } + else { + value = [value]; + } + } + else { + break; + } + } + if (!parent) { + // empty document + if (value === void 0) { // delete + throw new Error('Can not delete in empty document'); + } + return withFormatting(text, { offset: root ? root.offset : 0, length: root ? root.length : 0, content: JSON.stringify(value) }, options); + } + else if (parent.type === 'object' && typeof lastSegment === 'string' && Array.isArray(parent.children)) { + const existing = (0, parser_1.findNodeAtLocation)(parent, [lastSegment]); + if (existing !== void 0) { + if (value === void 0) { // delete + if (!existing.parent) { + throw new Error('Malformed AST'); + } + const propertyIndex = parent.children.indexOf(existing.parent); + let removeBegin; + let removeEnd = existing.parent.offset + existing.parent.length; + if (propertyIndex > 0) { + // remove the comma of the previous node + let previous = parent.children[propertyIndex - 1]; + removeBegin = previous.offset + previous.length; + } + else { + removeBegin = parent.offset + 1; + if (parent.children.length > 1) { + // remove the comma of the next node + let next = parent.children[1]; + removeEnd = next.offset; + } + } + return withFormatting(text, { offset: removeBegin, length: removeEnd - removeBegin, content: '' }, options); + } + else { + // set value of existing property + return withFormatting(text, { offset: existing.offset, length: existing.length, content: JSON.stringify(value) }, options); + } + } + else { + if (value === void 0) { // delete + return []; // property does not exist, nothing to do + } + const newProperty = `${JSON.stringify(lastSegment)}: ${JSON.stringify(value)}`; + const index = options.getInsertionIndex ? options.getInsertionIndex(parent.children.map(p => p.children[0].value)) : parent.children.length; + let edit; + if (index > 0) { + let previous = parent.children[index - 1]; + edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty }; + } + else if (parent.children.length === 0) { + edit = { offset: parent.offset + 1, length: 0, content: newProperty }; + } + else { + edit = { offset: parent.offset + 1, length: 0, content: newProperty + ',' }; + } + return withFormatting(text, edit, options); + } + } + else if (parent.type === 'array' && typeof lastSegment === 'number' && Array.isArray(parent.children)) { + const insertIndex = lastSegment; + if (insertIndex === -1) { + // Insert + const newProperty = `${JSON.stringify(value)}`; + let edit; + if (parent.children.length === 0) { + edit = { offset: parent.offset + 1, length: 0, content: newProperty }; + } + else { + const previous = parent.children[parent.children.length - 1]; + edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty }; + } + return withFormatting(text, edit, options); + } + else if (value === void 0 && parent.children.length >= 0) { + // Removal + const removalIndex = lastSegment; + const toRemove = parent.children[removalIndex]; + let edit; + if (parent.children.length === 1) { + // only item + edit = { offset: parent.offset + 1, length: parent.length - 2, content: '' }; + } + else if (parent.children.length - 1 === removalIndex) { + // last item + let previous = parent.children[removalIndex - 1]; + let offset = previous.offset + previous.length; + let parentEndOffset = parent.offset + parent.length; + edit = { offset, length: parentEndOffset - 2 - offset, content: '' }; + } + else { + edit = { offset: toRemove.offset, length: parent.children[removalIndex + 1].offset - toRemove.offset, content: '' }; + } + return withFormatting(text, edit, options); + } + else if (value !== void 0) { + let edit; + const newProperty = `${JSON.stringify(value)}`; + if (!options.isArrayInsertion && parent.children.length > lastSegment) { + const toModify = parent.children[lastSegment]; + edit = { offset: toModify.offset, length: toModify.length, content: newProperty }; + } + else if (parent.children.length === 0 || lastSegment === 0) { + edit = { offset: parent.offset + 1, length: 0, content: parent.children.length === 0 ? newProperty : newProperty + ',' }; + } + else { + const index = lastSegment > parent.children.length ? parent.children.length : lastSegment; + const previous = parent.children[index - 1]; + edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty }; + } + return withFormatting(text, edit, options); + } + else { + throw new Error(`Can not ${value === void 0 ? 'remove' : (options.isArrayInsertion ? 'insert' : 'modify')} Array index ${insertIndex} as length is not sufficient`); + } + } + else { + throw new Error(`Can not add ${typeof lastSegment !== 'number' ? 'index' : 'property'} to parent of type ${parent.type}`); + } + } + exports.setProperty = setProperty; + function withFormatting(text, edit, options) { + if (!options.formattingOptions) { + return [edit]; + } + // apply the edit + let newText = applyEdit(text, edit); + // format the new text + let begin = edit.offset; + let end = edit.offset + edit.content.length; + if (edit.length === 0 || edit.content.length === 0) { // insert or remove + while (begin > 0 && !(0, format_1.isEOL)(newText, begin - 1)) { + begin--; + } + while (end < newText.length && !(0, format_1.isEOL)(newText, end)) { + end++; + } + } + const edits = (0, format_1.format)(newText, { offset: begin, length: end - begin }, { ...options.formattingOptions, keepLines: false }); + // apply the formatting edits and track the begin and end offsets of the changes + for (let i = edits.length - 1; i >= 0; i--) { + const edit = edits[i]; + newText = applyEdit(newText, edit); + begin = Math.min(begin, edit.offset); + end = Math.max(end, edit.offset + edit.length); + end += edit.content.length - edit.length; + } + // create a single edit with all changes + const editLength = text.length - (newText.length - end) - begin; + return [{ offset: begin, length: editLength, content: newText.substring(begin, end) }]; + } + function applyEdit(text, edit) { + return text.substring(0, edit.offset) + edit.content + text.substring(edit.offset + edit.length); + } + exports.applyEdit = applyEdit; + function isWS(text, offset) { + return '\r\n \t'.indexOf(text.charAt(offset)) !== -1; + } + exports.isWS = isWS; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/format.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/format.js" index 7671aa9b5e75e3efe70b4d3a7c78b5c50db8fbdb..2b9f2bc54a9ad4ad38a99bbaab4da57f89d40f3d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/format.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/format.js" @@ -1,3 +1,275 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f9e468e436bf1014a4395b1ac70374edb918739ba90b19e6e6a22ca0214564a9 -size 12888 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./scanner", "./string-intern"], factory); + } +})(function (require, exports) { + /*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + 'use strict'; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isEOL = exports.format = void 0; + const scanner_1 = require("./scanner"); + const string_intern_1 = require("./string-intern"); + function format(documentText, range, options) { + let initialIndentLevel; + let formatText; + let formatTextStart; + let rangeStart; + let rangeEnd; + if (range) { + rangeStart = range.offset; + rangeEnd = rangeStart + range.length; + formatTextStart = rangeStart; + while (formatTextStart > 0 && !isEOL(documentText, formatTextStart - 1)) { + formatTextStart--; + } + let endOffset = rangeEnd; + while (endOffset < documentText.length && !isEOL(documentText, endOffset)) { + endOffset++; + } + formatText = documentText.substring(formatTextStart, endOffset); + initialIndentLevel = computeIndentLevel(formatText, options); + } + else { + formatText = documentText; + initialIndentLevel = 0; + formatTextStart = 0; + rangeStart = 0; + rangeEnd = documentText.length; + } + const eol = getEOL(options, documentText); + const eolFastPathSupported = string_intern_1.supportedEols.includes(eol); + let numberLineBreaks = 0; + let indentLevel = 0; + let indentValue; + if (options.insertSpaces) { + indentValue = string_intern_1.cachedSpaces[options.tabSize || 4] ?? repeat(string_intern_1.cachedSpaces[1], options.tabSize || 4); + } + else { + indentValue = '\t'; + } + const indentType = indentValue === '\t' ? '\t' : ' '; + let scanner = (0, scanner_1.createScanner)(formatText, false); + let hasError = false; + function newLinesAndIndent() { + if (numberLineBreaks > 1) { + return repeat(eol, numberLineBreaks) + repeat(indentValue, initialIndentLevel + indentLevel); + } + const amountOfSpaces = indentValue.length * (initialIndentLevel + indentLevel); + if (!eolFastPathSupported || amountOfSpaces > string_intern_1.cachedBreakLinesWithSpaces[indentType][eol].length) { + return eol + repeat(indentValue, initialIndentLevel + indentLevel); + } + if (amountOfSpaces <= 0) { + return eol; + } + return string_intern_1.cachedBreakLinesWithSpaces[indentType][eol][amountOfSpaces]; + } + function scanNext() { + let token = scanner.scan(); + numberLineBreaks = 0; + while (token === 15 /* SyntaxKind.Trivia */ || token === 14 /* SyntaxKind.LineBreakTrivia */) { + if (token === 14 /* SyntaxKind.LineBreakTrivia */ && options.keepLines) { + numberLineBreaks += 1; + } + else if (token === 14 /* SyntaxKind.LineBreakTrivia */) { + numberLineBreaks = 1; + } + token = scanner.scan(); + } + hasError = token === 16 /* SyntaxKind.Unknown */ || scanner.getTokenError() !== 0 /* ScanError.None */; + return token; + } + const editOperations = []; + function addEdit(text, startOffset, endOffset) { + if (!hasError && (!range || (startOffset < rangeEnd && endOffset > rangeStart)) && documentText.substring(startOffset, endOffset) !== text) { + editOperations.push({ offset: startOffset, length: endOffset - startOffset, content: text }); + } + } + let firstToken = scanNext(); + if (options.keepLines && numberLineBreaks > 0) { + addEdit(repeat(eol, numberLineBreaks), 0, 0); + } + if (firstToken !== 17 /* SyntaxKind.EOF */) { + let firstTokenStart = scanner.getTokenOffset() + formatTextStart; + let initialIndent = (indentValue.length * initialIndentLevel < 20) && options.insertSpaces + ? string_intern_1.cachedSpaces[indentValue.length * initialIndentLevel] + : repeat(indentValue, initialIndentLevel); + addEdit(initialIndent, formatTextStart, firstTokenStart); + } + while (firstToken !== 17 /* SyntaxKind.EOF */) { + let firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart; + let secondToken = scanNext(); + let replaceContent = ''; + let needsLineBreak = false; + while (numberLineBreaks === 0 && (secondToken === 12 /* SyntaxKind.LineCommentTrivia */ || secondToken === 13 /* SyntaxKind.BlockCommentTrivia */)) { + let commentTokenStart = scanner.getTokenOffset() + formatTextStart; + addEdit(string_intern_1.cachedSpaces[1], firstTokenEnd, commentTokenStart); + firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart; + needsLineBreak = secondToken === 12 /* SyntaxKind.LineCommentTrivia */; + replaceContent = needsLineBreak ? newLinesAndIndent() : ''; + secondToken = scanNext(); + } + if (secondToken === 2 /* SyntaxKind.CloseBraceToken */) { + if (firstToken !== 1 /* SyntaxKind.OpenBraceToken */) { + indentLevel--; + } + ; + if (options.keepLines && numberLineBreaks > 0 || !options.keepLines && firstToken !== 1 /* SyntaxKind.OpenBraceToken */) { + replaceContent = newLinesAndIndent(); + } + else if (options.keepLines) { + replaceContent = string_intern_1.cachedSpaces[1]; + } + } + else if (secondToken === 4 /* SyntaxKind.CloseBracketToken */) { + if (firstToken !== 3 /* SyntaxKind.OpenBracketToken */) { + indentLevel--; + } + ; + if (options.keepLines && numberLineBreaks > 0 || !options.keepLines && firstToken !== 3 /* SyntaxKind.OpenBracketToken */) { + replaceContent = newLinesAndIndent(); + } + else if (options.keepLines) { + replaceContent = string_intern_1.cachedSpaces[1]; + } + } + else { + switch (firstToken) { + case 3 /* SyntaxKind.OpenBracketToken */: + case 1 /* SyntaxKind.OpenBraceToken */: + indentLevel++; + if (options.keepLines && numberLineBreaks > 0 || !options.keepLines) { + replaceContent = newLinesAndIndent(); + } + else { + replaceContent = string_intern_1.cachedSpaces[1]; + } + break; + case 5 /* SyntaxKind.CommaToken */: + if (options.keepLines && numberLineBreaks > 0 || !options.keepLines) { + replaceContent = newLinesAndIndent(); + } + else { + replaceContent = string_intern_1.cachedSpaces[1]; + } + break; + case 12 /* SyntaxKind.LineCommentTrivia */: + replaceContent = newLinesAndIndent(); + break; + case 13 /* SyntaxKind.BlockCommentTrivia */: + if (numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else if (!needsLineBreak) { + replaceContent = string_intern_1.cachedSpaces[1]; + } + break; + case 6 /* SyntaxKind.ColonToken */: + if (options.keepLines && numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else if (!needsLineBreak) { + replaceContent = string_intern_1.cachedSpaces[1]; + } + break; + case 10 /* SyntaxKind.StringLiteral */: + if (options.keepLines && numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else if (secondToken === 6 /* SyntaxKind.ColonToken */ && !needsLineBreak) { + replaceContent = ''; + } + break; + case 7 /* SyntaxKind.NullKeyword */: + case 8 /* SyntaxKind.TrueKeyword */: + case 9 /* SyntaxKind.FalseKeyword */: + case 11 /* SyntaxKind.NumericLiteral */: + case 2 /* SyntaxKind.CloseBraceToken */: + case 4 /* SyntaxKind.CloseBracketToken */: + if (options.keepLines && numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else { + if ((secondToken === 12 /* SyntaxKind.LineCommentTrivia */ || secondToken === 13 /* SyntaxKind.BlockCommentTrivia */) && !needsLineBreak) { + replaceContent = string_intern_1.cachedSpaces[1]; + } + else if (secondToken !== 5 /* SyntaxKind.CommaToken */ && secondToken !== 17 /* SyntaxKind.EOF */) { + hasError = true; + } + } + break; + case 16 /* SyntaxKind.Unknown */: + hasError = true; + break; + } + if (numberLineBreaks > 0 && (secondToken === 12 /* SyntaxKind.LineCommentTrivia */ || secondToken === 13 /* SyntaxKind.BlockCommentTrivia */)) { + replaceContent = newLinesAndIndent(); + } + } + if (secondToken === 17 /* SyntaxKind.EOF */) { + if (options.keepLines && numberLineBreaks > 0) { + replaceContent = newLinesAndIndent(); + } + else { + replaceContent = options.insertFinalNewline ? eol : ''; + } + } + const secondTokenStart = scanner.getTokenOffset() + formatTextStart; + addEdit(replaceContent, firstTokenEnd, secondTokenStart); + firstToken = secondToken; + } + return editOperations; + } + exports.format = format; + function repeat(s, count) { + let result = ''; + for (let i = 0; i < count; i++) { + result += s; + } + return result; + } + function computeIndentLevel(content, options) { + let i = 0; + let nChars = 0; + const tabSize = options.tabSize || 4; + while (i < content.length) { + let ch = content.charAt(i); + if (ch === string_intern_1.cachedSpaces[1]) { + nChars++; + } + else if (ch === '\t') { + nChars += tabSize; + } + else { + break; + } + i++; + } + return Math.floor(nChars / tabSize); + } + function getEOL(options, text) { + for (let i = 0; i < text.length; i++) { + const ch = text.charAt(i); + if (ch === '\r') { + if (i + 1 < text.length && text.charAt(i + 1) === '\n') { + return '\r\n'; + } + return '\r'; + } + else if (ch === '\n') { + return '\n'; + } + } + return (options && options.eol) || '\n'; + } + function isEOL(text, offset) { + return '\r\n'.indexOf(text.charAt(offset)) !== -1; + } + exports.isEOL = isEOL; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/parser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/parser.js" index 5019fb7434dcd5565d7d41968c29e20229863462..211e1d1c14885aedc6fd3b966d5a24790beaf908 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/parser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/parser.js" @@ -1,3 +1,655 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c75be447c5ebcd16b212ae7089b1d2438f037c709c6b1784d22c25b8a35fde48 -size 28290 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./scanner"], factory); + } +})(function (require, exports) { + /*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + 'use strict'; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getNodeType = exports.stripComments = exports.visit = exports.findNodeAtOffset = exports.contains = exports.getNodeValue = exports.getNodePath = exports.findNodeAtLocation = exports.parseTree = exports.parse = exports.getLocation = void 0; + const scanner_1 = require("./scanner"); + var ParseOptions; + (function (ParseOptions) { + ParseOptions.DEFAULT = { + allowTrailingComma: false + }; + })(ParseOptions || (ParseOptions = {})); + /** + * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. + */ + function getLocation(text, position) { + const segments = []; // strings or numbers + const earlyReturnException = new Object(); + let previousNode = undefined; + const previousNodeInst = { + value: {}, + offset: 0, + length: 0, + type: 'object', + parent: undefined + }; + let isAtPropertyKey = false; + function setPreviousNode(value, offset, length, type) { + previousNodeInst.value = value; + previousNodeInst.offset = offset; + previousNodeInst.length = length; + previousNodeInst.type = type; + previousNodeInst.colonOffset = undefined; + previousNode = previousNodeInst; + } + try { + visit(text, { + onObjectBegin: (offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + previousNode = undefined; + isAtPropertyKey = position > offset; + segments.push(''); // push a placeholder (will be replaced) + }, + onObjectProperty: (name, offset, length) => { + if (position < offset) { + throw earlyReturnException; + } + setPreviousNode(name, offset, length, 'property'); + segments[segments.length - 1] = name; + if (position <= offset + length) { + throw earlyReturnException; + } + }, + onObjectEnd: (offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + previousNode = undefined; + segments.pop(); + }, + onArrayBegin: (offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + previousNode = undefined; + segments.push(0); + }, + onArrayEnd: (offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + previousNode = undefined; + segments.pop(); + }, + onLiteralValue: (value, offset, length) => { + if (position < offset) { + throw earlyReturnException; + } + setPreviousNode(value, offset, length, getNodeType(value)); + if (position <= offset + length) { + throw earlyReturnException; + } + }, + onSeparator: (sep, offset, length) => { + if (position <= offset) { + throw earlyReturnException; + } + if (sep === ':' && previousNode && previousNode.type === 'property') { + previousNode.colonOffset = offset; + isAtPropertyKey = false; + previousNode = undefined; + } + else if (sep === ',') { + const last = segments[segments.length - 1]; + if (typeof last === 'number') { + segments[segments.length - 1] = last + 1; + } + else { + isAtPropertyKey = true; + segments[segments.length - 1] = ''; + } + previousNode = undefined; + } + } + }); + } + catch (e) { + if (e !== earlyReturnException) { + throw e; + } + } + return { + path: segments, + previousNode, + isAtPropertyKey, + matches: (pattern) => { + let k = 0; + for (let i = 0; k < pattern.length && i < segments.length; i++) { + if (pattern[k] === segments[i] || pattern[k] === '*') { + k++; + } + else if (pattern[k] !== '**') { + return false; + } + } + return k === pattern.length; + } + }; + } + exports.getLocation = getLocation; + /** + * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + * Therefore always check the errors list to find out if the input was valid. + */ + function parse(text, errors = [], options = ParseOptions.DEFAULT) { + let currentProperty = null; + let currentParent = []; + const previousParents = []; + function onValue(value) { + if (Array.isArray(currentParent)) { + currentParent.push(value); + } + else if (currentProperty !== null) { + currentParent[currentProperty] = value; + } + } + const visitor = { + onObjectBegin: () => { + const object = {}; + onValue(object); + previousParents.push(currentParent); + currentParent = object; + currentProperty = null; + }, + onObjectProperty: (name) => { + currentProperty = name; + }, + onObjectEnd: () => { + currentParent = previousParents.pop(); + }, + onArrayBegin: () => { + const array = []; + onValue(array); + previousParents.push(currentParent); + currentParent = array; + currentProperty = null; + }, + onArrayEnd: () => { + currentParent = previousParents.pop(); + }, + onLiteralValue: onValue, + onError: (error, offset, length) => { + errors.push({ error, offset, length }); + } + }; + visit(text, visitor, options); + return currentParent[0]; + } + exports.parse = parse; + /** + * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + */ + function parseTree(text, errors = [], options = ParseOptions.DEFAULT) { + let currentParent = { type: 'array', offset: -1, length: -1, children: [], parent: undefined }; // artificial root + function ensurePropertyComplete(endOffset) { + if (currentParent.type === 'property') { + currentParent.length = endOffset - currentParent.offset; + currentParent = currentParent.parent; + } + } + function onValue(valueNode) { + currentParent.children.push(valueNode); + return valueNode; + } + const visitor = { + onObjectBegin: (offset) => { + currentParent = onValue({ type: 'object', offset, length: -1, parent: currentParent, children: [] }); + }, + onObjectProperty: (name, offset, length) => { + currentParent = onValue({ type: 'property', offset, length: -1, parent: currentParent, children: [] }); + currentParent.children.push({ type: 'string', value: name, offset, length, parent: currentParent }); + }, + onObjectEnd: (offset, length) => { + ensurePropertyComplete(offset + length); // in case of a missing value for a property: make sure property is complete + currentParent.length = offset + length - currentParent.offset; + currentParent = currentParent.parent; + ensurePropertyComplete(offset + length); + }, + onArrayBegin: (offset, length) => { + currentParent = onValue({ type: 'array', offset, length: -1, parent: currentParent, children: [] }); + }, + onArrayEnd: (offset, length) => { + currentParent.length = offset + length - currentParent.offset; + currentParent = currentParent.parent; + ensurePropertyComplete(offset + length); + }, + onLiteralValue: (value, offset, length) => { + onValue({ type: getNodeType(value), offset, length, parent: currentParent, value }); + ensurePropertyComplete(offset + length); + }, + onSeparator: (sep, offset, length) => { + if (currentParent.type === 'property') { + if (sep === ':') { + currentParent.colonOffset = offset; + } + else if (sep === ',') { + ensurePropertyComplete(offset); + } + } + }, + onError: (error, offset, length) => { + errors.push({ error, offset, length }); + } + }; + visit(text, visitor, options); + const result = currentParent.children[0]; + if (result) { + delete result.parent; + } + return result; + } + exports.parseTree = parseTree; + /** + * Finds the node at the given path in a JSON DOM. + */ + function findNodeAtLocation(root, path) { + if (!root) { + return undefined; + } + let node = root; + for (let segment of path) { + if (typeof segment === 'string') { + if (node.type !== 'object' || !Array.isArray(node.children)) { + return undefined; + } + let found = false; + for (const propertyNode of node.children) { + if (Array.isArray(propertyNode.children) && propertyNode.children[0].value === segment && propertyNode.children.length === 2) { + node = propertyNode.children[1]; + found = true; + break; + } + } + if (!found) { + return undefined; + } + } + else { + const index = segment; + if (node.type !== 'array' || index < 0 || !Array.isArray(node.children) || index >= node.children.length) { + return undefined; + } + node = node.children[index]; + } + } + return node; + } + exports.findNodeAtLocation = findNodeAtLocation; + /** + * Gets the JSON path of the given JSON DOM node + */ + function getNodePath(node) { + if (!node.parent || !node.parent.children) { + return []; + } + const path = getNodePath(node.parent); + if (node.parent.type === 'property') { + const key = node.parent.children[0].value; + path.push(key); + } + else if (node.parent.type === 'array') { + const index = node.parent.children.indexOf(node); + if (index !== -1) { + path.push(index); + } + } + return path; + } + exports.getNodePath = getNodePath; + /** + * Evaluates the JavaScript object of the given JSON DOM node + */ + function getNodeValue(node) { + switch (node.type) { + case 'array': + return node.children.map(getNodeValue); + case 'object': + const obj = Object.create(null); + for (let prop of node.children) { + const valueNode = prop.children[1]; + if (valueNode) { + obj[prop.children[0].value] = getNodeValue(valueNode); + } + } + return obj; + case 'null': + case 'string': + case 'number': + case 'boolean': + return node.value; + default: + return undefined; + } + } + exports.getNodeValue = getNodeValue; + function contains(node, offset, includeRightBound = false) { + return (offset >= node.offset && offset < (node.offset + node.length)) || includeRightBound && (offset === (node.offset + node.length)); + } + exports.contains = contains; + /** + * Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. + */ + function findNodeAtOffset(node, offset, includeRightBound = false) { + if (contains(node, offset, includeRightBound)) { + const children = node.children; + if (Array.isArray(children)) { + for (let i = 0; i < children.length && children[i].offset <= offset; i++) { + const item = findNodeAtOffset(children[i], offset, includeRightBound); + if (item) { + return item; + } + } + } + return node; + } + return undefined; + } + exports.findNodeAtOffset = findNodeAtOffset; + /** + * Parses the given text and invokes the visitor functions for each object, array and literal reached. + */ + function visit(text, visitor, options = ParseOptions.DEFAULT) { + const _scanner = (0, scanner_1.createScanner)(text, false); + // Important: Only pass copies of this to visitor functions to prevent accidental modification, and + // to not affect visitor functions which stored a reference to a previous JSONPath + const _jsonPath = []; + function toNoArgVisit(visitFunction) { + return visitFunction ? () => visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true; + } + function toNoArgVisitWithPath(visitFunction) { + return visitFunction ? () => visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true; + } + function toOneArgVisit(visitFunction) { + return visitFunction ? (arg) => visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true; + } + function toOneArgVisitWithPath(visitFunction) { + return visitFunction ? (arg) => visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true; + } + const onObjectBegin = toNoArgVisitWithPath(visitor.onObjectBegin), onObjectProperty = toOneArgVisitWithPath(visitor.onObjectProperty), onObjectEnd = toNoArgVisit(visitor.onObjectEnd), onArrayBegin = toNoArgVisitWithPath(visitor.onArrayBegin), onArrayEnd = toNoArgVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisitWithPath(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError); + const disallowComments = options && options.disallowComments; + const allowTrailingComma = options && options.allowTrailingComma; + function scanNext() { + while (true) { + const token = _scanner.scan(); + switch (_scanner.getTokenError()) { + case 4 /* ScanError.InvalidUnicode */: + handleError(14 /* ParseErrorCode.InvalidUnicode */); + break; + case 5 /* ScanError.InvalidEscapeCharacter */: + handleError(15 /* ParseErrorCode.InvalidEscapeCharacter */); + break; + case 3 /* ScanError.UnexpectedEndOfNumber */: + handleError(13 /* ParseErrorCode.UnexpectedEndOfNumber */); + break; + case 1 /* ScanError.UnexpectedEndOfComment */: + if (!disallowComments) { + handleError(11 /* ParseErrorCode.UnexpectedEndOfComment */); + } + break; + case 2 /* ScanError.UnexpectedEndOfString */: + handleError(12 /* ParseErrorCode.UnexpectedEndOfString */); + break; + case 6 /* ScanError.InvalidCharacter */: + handleError(16 /* ParseErrorCode.InvalidCharacter */); + break; + } + switch (token) { + case 12 /* SyntaxKind.LineCommentTrivia */: + case 13 /* SyntaxKind.BlockCommentTrivia */: + if (disallowComments) { + handleError(10 /* ParseErrorCode.InvalidCommentToken */); + } + else { + onComment(); + } + break; + case 16 /* SyntaxKind.Unknown */: + handleError(1 /* ParseErrorCode.InvalidSymbol */); + break; + case 15 /* SyntaxKind.Trivia */: + case 14 /* SyntaxKind.LineBreakTrivia */: + break; + default: + return token; + } + } + } + function handleError(error, skipUntilAfter = [], skipUntil = []) { + onError(error); + if (skipUntilAfter.length + skipUntil.length > 0) { + let token = _scanner.getToken(); + while (token !== 17 /* SyntaxKind.EOF */) { + if (skipUntilAfter.indexOf(token) !== -1) { + scanNext(); + break; + } + else if (skipUntil.indexOf(token) !== -1) { + break; + } + token = scanNext(); + } + } + } + function parseString(isValue) { + const value = _scanner.getTokenValue(); + if (isValue) { + onLiteralValue(value); + } + else { + onObjectProperty(value); + // add property name afterwards + _jsonPath.push(value); + } + scanNext(); + return true; + } + function parseLiteral() { + switch (_scanner.getToken()) { + case 11 /* SyntaxKind.NumericLiteral */: + const tokenValue = _scanner.getTokenValue(); + let value = Number(tokenValue); + if (isNaN(value)) { + handleError(2 /* ParseErrorCode.InvalidNumberFormat */); + value = 0; + } + onLiteralValue(value); + break; + case 7 /* SyntaxKind.NullKeyword */: + onLiteralValue(null); + break; + case 8 /* SyntaxKind.TrueKeyword */: + onLiteralValue(true); + break; + case 9 /* SyntaxKind.FalseKeyword */: + onLiteralValue(false); + break; + default: + return false; + } + scanNext(); + return true; + } + function parseProperty() { + if (_scanner.getToken() !== 10 /* SyntaxKind.StringLiteral */) { + handleError(3 /* ParseErrorCode.PropertyNameExpected */, [], [2 /* SyntaxKind.CloseBraceToken */, 5 /* SyntaxKind.CommaToken */]); + return false; + } + parseString(false); + if (_scanner.getToken() === 6 /* SyntaxKind.ColonToken */) { + onSeparator(':'); + scanNext(); // consume colon + if (!parseValue()) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], [2 /* SyntaxKind.CloseBraceToken */, 5 /* SyntaxKind.CommaToken */]); + } + } + else { + handleError(5 /* ParseErrorCode.ColonExpected */, [], [2 /* SyntaxKind.CloseBraceToken */, 5 /* SyntaxKind.CommaToken */]); + } + _jsonPath.pop(); // remove processed property name + return true; + } + function parseObject() { + onObjectBegin(); + scanNext(); // consume open brace + let needsComma = false; + while (_scanner.getToken() !== 2 /* SyntaxKind.CloseBraceToken */ && _scanner.getToken() !== 17 /* SyntaxKind.EOF */) { + if (_scanner.getToken() === 5 /* SyntaxKind.CommaToken */) { + if (!needsComma) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], []); + } + onSeparator(','); + scanNext(); // consume comma + if (_scanner.getToken() === 2 /* SyntaxKind.CloseBraceToken */ && allowTrailingComma) { + break; + } + } + else if (needsComma) { + handleError(6 /* ParseErrorCode.CommaExpected */, [], []); + } + if (!parseProperty()) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], [2 /* SyntaxKind.CloseBraceToken */, 5 /* SyntaxKind.CommaToken */]); + } + needsComma = true; + } + onObjectEnd(); + if (_scanner.getToken() !== 2 /* SyntaxKind.CloseBraceToken */) { + handleError(7 /* ParseErrorCode.CloseBraceExpected */, [2 /* SyntaxKind.CloseBraceToken */], []); + } + else { + scanNext(); // consume close brace + } + return true; + } + function parseArray() { + onArrayBegin(); + scanNext(); // consume open bracket + let isFirstElement = true; + let needsComma = false; + while (_scanner.getToken() !== 4 /* SyntaxKind.CloseBracketToken */ && _scanner.getToken() !== 17 /* SyntaxKind.EOF */) { + if (_scanner.getToken() === 5 /* SyntaxKind.CommaToken */) { + if (!needsComma) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], []); + } + onSeparator(','); + scanNext(); // consume comma + if (_scanner.getToken() === 4 /* SyntaxKind.CloseBracketToken */ && allowTrailingComma) { + break; + } + } + else if (needsComma) { + handleError(6 /* ParseErrorCode.CommaExpected */, [], []); + } + if (isFirstElement) { + _jsonPath.push(0); + isFirstElement = false; + } + else { + _jsonPath[_jsonPath.length - 1]++; + } + if (!parseValue()) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], [4 /* SyntaxKind.CloseBracketToken */, 5 /* SyntaxKind.CommaToken */]); + } + needsComma = true; + } + onArrayEnd(); + if (!isFirstElement) { + _jsonPath.pop(); // remove array index + } + if (_scanner.getToken() !== 4 /* SyntaxKind.CloseBracketToken */) { + handleError(8 /* ParseErrorCode.CloseBracketExpected */, [4 /* SyntaxKind.CloseBracketToken */], []); + } + else { + scanNext(); // consume close bracket + } + return true; + } + function parseValue() { + switch (_scanner.getToken()) { + case 3 /* SyntaxKind.OpenBracketToken */: + return parseArray(); + case 1 /* SyntaxKind.OpenBraceToken */: + return parseObject(); + case 10 /* SyntaxKind.StringLiteral */: + return parseString(true); + default: + return parseLiteral(); + } + } + scanNext(); + if (_scanner.getToken() === 17 /* SyntaxKind.EOF */) { + if (options.allowEmptyContent) { + return true; + } + handleError(4 /* ParseErrorCode.ValueExpected */, [], []); + return false; + } + if (!parseValue()) { + handleError(4 /* ParseErrorCode.ValueExpected */, [], []); + return false; + } + if (_scanner.getToken() !== 17 /* SyntaxKind.EOF */) { + handleError(9 /* ParseErrorCode.EndOfFileExpected */, [], []); + } + return true; + } + exports.visit = visit; + /** + * Takes JSON with JavaScript-style comments and remove + * them. Optionally replaces every none-newline character + * of comments with a replaceCharacter + */ + function stripComments(text, replaceCh) { + let _scanner = (0, scanner_1.createScanner)(text), parts = [], kind, offset = 0, pos; + do { + pos = _scanner.getPosition(); + kind = _scanner.scan(); + switch (kind) { + case 12 /* SyntaxKind.LineCommentTrivia */: + case 13 /* SyntaxKind.BlockCommentTrivia */: + case 17 /* SyntaxKind.EOF */: + if (offset !== pos) { + parts.push(text.substring(offset, pos)); + } + if (replaceCh !== undefined) { + parts.push(_scanner.getTokenValue().replace(/[^\r\n]/g, replaceCh)); + } + offset = _scanner.getPosition(); + break; + } + } while (kind !== 17 /* SyntaxKind.EOF */); + return parts.join(''); + } + exports.stripComments = stripComments; + function getNodeType(value) { + switch (typeof value) { + case 'boolean': return 'boolean'; + case 'number': return 'number'; + case 'string': return 'string'; + case 'object': { + if (!value) { + return 'null'; + } + else if (Array.isArray(value)) { + return 'array'; + } + return 'object'; + } + default: return 'null'; + } + } + exports.getNodeType = getNodeType; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/scanner.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/scanner.js" index ee8812ab387f52ccee79be540acdad491be9f9ce..ebca65f49cc2507b2ca0f8cd784dfdf414896dd7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/scanner.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/scanner.js" @@ -1,3 +1,456 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:581d82c4f1aa84b0605369c01f414fb0164ee462e03daa298cb960076a2a9e82 -size 21446 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + /*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + 'use strict'; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createScanner = void 0; + /** + * Creates a JSON scanner on the given text. + * If ignoreTrivia is set, whitespaces or comments are ignored. + */ + function createScanner(text, ignoreTrivia = false) { + const len = text.length; + let pos = 0, value = '', tokenOffset = 0, token = 16 /* SyntaxKind.Unknown */, lineNumber = 0, lineStartOffset = 0, tokenLineStartOffset = 0, prevTokenLineStartOffset = 0, scanError = 0 /* ScanError.None */; + function scanHexDigits(count, exact) { + let digits = 0; + let value = 0; + while (digits < count || !exact) { + let ch = text.charCodeAt(pos); + if (ch >= 48 /* CharacterCodes._0 */ && ch <= 57 /* CharacterCodes._9 */) { + value = value * 16 + ch - 48 /* CharacterCodes._0 */; + } + else if (ch >= 65 /* CharacterCodes.A */ && ch <= 70 /* CharacterCodes.F */) { + value = value * 16 + ch - 65 /* CharacterCodes.A */ + 10; + } + else if (ch >= 97 /* CharacterCodes.a */ && ch <= 102 /* CharacterCodes.f */) { + value = value * 16 + ch - 97 /* CharacterCodes.a */ + 10; + } + else { + break; + } + pos++; + digits++; + } + if (digits < count) { + value = -1; + } + return value; + } + function setPosition(newPosition) { + pos = newPosition; + value = ''; + tokenOffset = 0; + token = 16 /* SyntaxKind.Unknown */; + scanError = 0 /* ScanError.None */; + } + function scanNumber() { + let start = pos; + if (text.charCodeAt(pos) === 48 /* CharacterCodes._0 */) { + pos++; + } + else { + pos++; + while (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + } + } + if (pos < text.length && text.charCodeAt(pos) === 46 /* CharacterCodes.dot */) { + pos++; + if (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + while (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + } + } + else { + scanError = 3 /* ScanError.UnexpectedEndOfNumber */; + return text.substring(start, pos); + } + } + let end = pos; + if (pos < text.length && (text.charCodeAt(pos) === 69 /* CharacterCodes.E */ || text.charCodeAt(pos) === 101 /* CharacterCodes.e */)) { + pos++; + if (pos < text.length && text.charCodeAt(pos) === 43 /* CharacterCodes.plus */ || text.charCodeAt(pos) === 45 /* CharacterCodes.minus */) { + pos++; + } + if (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + while (pos < text.length && isDigit(text.charCodeAt(pos))) { + pos++; + } + end = pos; + } + else { + scanError = 3 /* ScanError.UnexpectedEndOfNumber */; + } + } + return text.substring(start, end); + } + function scanString() { + let result = '', start = pos; + while (true) { + if (pos >= len) { + result += text.substring(start, pos); + scanError = 2 /* ScanError.UnexpectedEndOfString */; + break; + } + const ch = text.charCodeAt(pos); + if (ch === 34 /* CharacterCodes.doubleQuote */) { + result += text.substring(start, pos); + pos++; + break; + } + if (ch === 92 /* CharacterCodes.backslash */) { + result += text.substring(start, pos); + pos++; + if (pos >= len) { + scanError = 2 /* ScanError.UnexpectedEndOfString */; + break; + } + const ch2 = text.charCodeAt(pos++); + switch (ch2) { + case 34 /* CharacterCodes.doubleQuote */: + result += '\"'; + break; + case 92 /* CharacterCodes.backslash */: + result += '\\'; + break; + case 47 /* CharacterCodes.slash */: + result += '/'; + break; + case 98 /* CharacterCodes.b */: + result += '\b'; + break; + case 102 /* CharacterCodes.f */: + result += '\f'; + break; + case 110 /* CharacterCodes.n */: + result += '\n'; + break; + case 114 /* CharacterCodes.r */: + result += '\r'; + break; + case 116 /* CharacterCodes.t */: + result += '\t'; + break; + case 117 /* CharacterCodes.u */: + const ch3 = scanHexDigits(4, true); + if (ch3 >= 0) { + result += String.fromCharCode(ch3); + } + else { + scanError = 4 /* ScanError.InvalidUnicode */; + } + break; + default: + scanError = 5 /* ScanError.InvalidEscapeCharacter */; + } + start = pos; + continue; + } + if (ch >= 0 && ch <= 0x1f) { + if (isLineBreak(ch)) { + result += text.substring(start, pos); + scanError = 2 /* ScanError.UnexpectedEndOfString */; + break; + } + else { + scanError = 6 /* ScanError.InvalidCharacter */; + // mark as error but continue with string + } + } + pos++; + } + return result; + } + function scanNext() { + value = ''; + scanError = 0 /* ScanError.None */; + tokenOffset = pos; + lineStartOffset = lineNumber; + prevTokenLineStartOffset = tokenLineStartOffset; + if (pos >= len) { + // at the end + tokenOffset = len; + return token = 17 /* SyntaxKind.EOF */; + } + let code = text.charCodeAt(pos); + // trivia: whitespace + if (isWhiteSpace(code)) { + do { + pos++; + value += String.fromCharCode(code); + code = text.charCodeAt(pos); + } while (isWhiteSpace(code)); + return token = 15 /* SyntaxKind.Trivia */; + } + // trivia: newlines + if (isLineBreak(code)) { + pos++; + value += String.fromCharCode(code); + if (code === 13 /* CharacterCodes.carriageReturn */ && text.charCodeAt(pos) === 10 /* CharacterCodes.lineFeed */) { + pos++; + value += '\n'; + } + lineNumber++; + tokenLineStartOffset = pos; + return token = 14 /* SyntaxKind.LineBreakTrivia */; + } + switch (code) { + // tokens: []{}:, + case 123 /* CharacterCodes.openBrace */: + pos++; + return token = 1 /* SyntaxKind.OpenBraceToken */; + case 125 /* CharacterCodes.closeBrace */: + pos++; + return token = 2 /* SyntaxKind.CloseBraceToken */; + case 91 /* CharacterCodes.openBracket */: + pos++; + return token = 3 /* SyntaxKind.OpenBracketToken */; + case 93 /* CharacterCodes.closeBracket */: + pos++; + return token = 4 /* SyntaxKind.CloseBracketToken */; + case 58 /* CharacterCodes.colon */: + pos++; + return token = 6 /* SyntaxKind.ColonToken */; + case 44 /* CharacterCodes.comma */: + pos++; + return token = 5 /* SyntaxKind.CommaToken */; + // strings + case 34 /* CharacterCodes.doubleQuote */: + pos++; + value = scanString(); + return token = 10 /* SyntaxKind.StringLiteral */; + // comments + case 47 /* CharacterCodes.slash */: + const start = pos - 1; + // Single-line comment + if (text.charCodeAt(pos + 1) === 47 /* CharacterCodes.slash */) { + pos += 2; + while (pos < len) { + if (isLineBreak(text.charCodeAt(pos))) { + break; + } + pos++; + } + value = text.substring(start, pos); + return token = 12 /* SyntaxKind.LineCommentTrivia */; + } + // Multi-line comment + if (text.charCodeAt(pos + 1) === 42 /* CharacterCodes.asterisk */) { + pos += 2; + const safeLength = len - 1; // For lookahead. + let commentClosed = false; + while (pos < safeLength) { + const ch = text.charCodeAt(pos); + if (ch === 42 /* CharacterCodes.asterisk */ && text.charCodeAt(pos + 1) === 47 /* CharacterCodes.slash */) { + pos += 2; + commentClosed = true; + break; + } + pos++; + if (isLineBreak(ch)) { + if (ch === 13 /* CharacterCodes.carriageReturn */ && text.charCodeAt(pos) === 10 /* CharacterCodes.lineFeed */) { + pos++; + } + lineNumber++; + tokenLineStartOffset = pos; + } + } + if (!commentClosed) { + pos++; + scanError = 1 /* ScanError.UnexpectedEndOfComment */; + } + value = text.substring(start, pos); + return token = 13 /* SyntaxKind.BlockCommentTrivia */; + } + // just a single slash + value += String.fromCharCode(code); + pos++; + return token = 16 /* SyntaxKind.Unknown */; + // numbers + case 45 /* CharacterCodes.minus */: + value += String.fromCharCode(code); + pos++; + if (pos === len || !isDigit(text.charCodeAt(pos))) { + return token = 16 /* SyntaxKind.Unknown */; + } + // found a minus, followed by a number so + // we fall through to proceed with scanning + // numbers + case 48 /* CharacterCodes._0 */: + case 49 /* CharacterCodes._1 */: + case 50 /* CharacterCodes._2 */: + case 51 /* CharacterCodes._3 */: + case 52 /* CharacterCodes._4 */: + case 53 /* CharacterCodes._5 */: + case 54 /* CharacterCodes._6 */: + case 55 /* CharacterCodes._7 */: + case 56 /* CharacterCodes._8 */: + case 57 /* CharacterCodes._9 */: + value += scanNumber(); + return token = 11 /* SyntaxKind.NumericLiteral */; + // literals and unknown symbols + default: + // is a literal? Read the full word. + while (pos < len && isUnknownContentCharacter(code)) { + pos++; + code = text.charCodeAt(pos); + } + if (tokenOffset !== pos) { + value = text.substring(tokenOffset, pos); + // keywords: true, false, null + switch (value) { + case 'true': return token = 8 /* SyntaxKind.TrueKeyword */; + case 'false': return token = 9 /* SyntaxKind.FalseKeyword */; + case 'null': return token = 7 /* SyntaxKind.NullKeyword */; + } + return token = 16 /* SyntaxKind.Unknown */; + } + // some + value += String.fromCharCode(code); + pos++; + return token = 16 /* SyntaxKind.Unknown */; + } + } + function isUnknownContentCharacter(code) { + if (isWhiteSpace(code) || isLineBreak(code)) { + return false; + } + switch (code) { + case 125 /* CharacterCodes.closeBrace */: + case 93 /* CharacterCodes.closeBracket */: + case 123 /* CharacterCodes.openBrace */: + case 91 /* CharacterCodes.openBracket */: + case 34 /* CharacterCodes.doubleQuote */: + case 58 /* CharacterCodes.colon */: + case 44 /* CharacterCodes.comma */: + case 47 /* CharacterCodes.slash */: + return false; + } + return true; + } + function scanNextNonTrivia() { + let result; + do { + result = scanNext(); + } while (result >= 12 /* SyntaxKind.LineCommentTrivia */ && result <= 15 /* SyntaxKind.Trivia */); + return result; + } + return { + setPosition: setPosition, + getPosition: () => pos, + scan: ignoreTrivia ? scanNextNonTrivia : scanNext, + getToken: () => token, + getTokenValue: () => value, + getTokenOffset: () => tokenOffset, + getTokenLength: () => pos - tokenOffset, + getTokenStartLine: () => lineStartOffset, + getTokenStartCharacter: () => tokenOffset - prevTokenLineStartOffset, + getTokenError: () => scanError, + }; + } + exports.createScanner = createScanner; + function isWhiteSpace(ch) { + return ch === 32 /* CharacterCodes.space */ || ch === 9 /* CharacterCodes.tab */; + } + function isLineBreak(ch) { + return ch === 10 /* CharacterCodes.lineFeed */ || ch === 13 /* CharacterCodes.carriageReturn */; + } + function isDigit(ch) { + return ch >= 48 /* CharacterCodes._0 */ && ch <= 57 /* CharacterCodes._9 */; + } + var CharacterCodes; + (function (CharacterCodes) { + CharacterCodes[CharacterCodes["lineFeed"] = 10] = "lineFeed"; + CharacterCodes[CharacterCodes["carriageReturn"] = 13] = "carriageReturn"; + CharacterCodes[CharacterCodes["space"] = 32] = "space"; + CharacterCodes[CharacterCodes["_0"] = 48] = "_0"; + CharacterCodes[CharacterCodes["_1"] = 49] = "_1"; + CharacterCodes[CharacterCodes["_2"] = 50] = "_2"; + CharacterCodes[CharacterCodes["_3"] = 51] = "_3"; + CharacterCodes[CharacterCodes["_4"] = 52] = "_4"; + CharacterCodes[CharacterCodes["_5"] = 53] = "_5"; + CharacterCodes[CharacterCodes["_6"] = 54] = "_6"; + CharacterCodes[CharacterCodes["_7"] = 55] = "_7"; + CharacterCodes[CharacterCodes["_8"] = 56] = "_8"; + CharacterCodes[CharacterCodes["_9"] = 57] = "_9"; + CharacterCodes[CharacterCodes["a"] = 97] = "a"; + CharacterCodes[CharacterCodes["b"] = 98] = "b"; + CharacterCodes[CharacterCodes["c"] = 99] = "c"; + CharacterCodes[CharacterCodes["d"] = 100] = "d"; + CharacterCodes[CharacterCodes["e"] = 101] = "e"; + CharacterCodes[CharacterCodes["f"] = 102] = "f"; + CharacterCodes[CharacterCodes["g"] = 103] = "g"; + CharacterCodes[CharacterCodes["h"] = 104] = "h"; + CharacterCodes[CharacterCodes["i"] = 105] = "i"; + CharacterCodes[CharacterCodes["j"] = 106] = "j"; + CharacterCodes[CharacterCodes["k"] = 107] = "k"; + CharacterCodes[CharacterCodes["l"] = 108] = "l"; + CharacterCodes[CharacterCodes["m"] = 109] = "m"; + CharacterCodes[CharacterCodes["n"] = 110] = "n"; + CharacterCodes[CharacterCodes["o"] = 111] = "o"; + CharacterCodes[CharacterCodes["p"] = 112] = "p"; + CharacterCodes[CharacterCodes["q"] = 113] = "q"; + CharacterCodes[CharacterCodes["r"] = 114] = "r"; + CharacterCodes[CharacterCodes["s"] = 115] = "s"; + CharacterCodes[CharacterCodes["t"] = 116] = "t"; + CharacterCodes[CharacterCodes["u"] = 117] = "u"; + CharacterCodes[CharacterCodes["v"] = 118] = "v"; + CharacterCodes[CharacterCodes["w"] = 119] = "w"; + CharacterCodes[CharacterCodes["x"] = 120] = "x"; + CharacterCodes[CharacterCodes["y"] = 121] = "y"; + CharacterCodes[CharacterCodes["z"] = 122] = "z"; + CharacterCodes[CharacterCodes["A"] = 65] = "A"; + CharacterCodes[CharacterCodes["B"] = 66] = "B"; + CharacterCodes[CharacterCodes["C"] = 67] = "C"; + CharacterCodes[CharacterCodes["D"] = 68] = "D"; + CharacterCodes[CharacterCodes["E"] = 69] = "E"; + CharacterCodes[CharacterCodes["F"] = 70] = "F"; + CharacterCodes[CharacterCodes["G"] = 71] = "G"; + CharacterCodes[CharacterCodes["H"] = 72] = "H"; + CharacterCodes[CharacterCodes["I"] = 73] = "I"; + CharacterCodes[CharacterCodes["J"] = 74] = "J"; + CharacterCodes[CharacterCodes["K"] = 75] = "K"; + CharacterCodes[CharacterCodes["L"] = 76] = "L"; + CharacterCodes[CharacterCodes["M"] = 77] = "M"; + CharacterCodes[CharacterCodes["N"] = 78] = "N"; + CharacterCodes[CharacterCodes["O"] = 79] = "O"; + CharacterCodes[CharacterCodes["P"] = 80] = "P"; + CharacterCodes[CharacterCodes["Q"] = 81] = "Q"; + CharacterCodes[CharacterCodes["R"] = 82] = "R"; + CharacterCodes[CharacterCodes["S"] = 83] = "S"; + CharacterCodes[CharacterCodes["T"] = 84] = "T"; + CharacterCodes[CharacterCodes["U"] = 85] = "U"; + CharacterCodes[CharacterCodes["V"] = 86] = "V"; + CharacterCodes[CharacterCodes["W"] = 87] = "W"; + CharacterCodes[CharacterCodes["X"] = 88] = "X"; + CharacterCodes[CharacterCodes["Y"] = 89] = "Y"; + CharacterCodes[CharacterCodes["Z"] = 90] = "Z"; + CharacterCodes[CharacterCodes["asterisk"] = 42] = "asterisk"; + CharacterCodes[CharacterCodes["backslash"] = 92] = "backslash"; + CharacterCodes[CharacterCodes["closeBrace"] = 125] = "closeBrace"; + CharacterCodes[CharacterCodes["closeBracket"] = 93] = "closeBracket"; + CharacterCodes[CharacterCodes["colon"] = 58] = "colon"; + CharacterCodes[CharacterCodes["comma"] = 44] = "comma"; + CharacterCodes[CharacterCodes["dot"] = 46] = "dot"; + CharacterCodes[CharacterCodes["doubleQuote"] = 34] = "doubleQuote"; + CharacterCodes[CharacterCodes["minus"] = 45] = "minus"; + CharacterCodes[CharacterCodes["openBrace"] = 123] = "openBrace"; + CharacterCodes[CharacterCodes["openBracket"] = 91] = "openBracket"; + CharacterCodes[CharacterCodes["plus"] = 43] = "plus"; + CharacterCodes[CharacterCodes["slash"] = 47] = "slash"; + CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed"; + CharacterCodes[CharacterCodes["tab"] = 9] = "tab"; + })(CharacterCodes || (CharacterCodes = {})); +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/string-intern.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/string-intern.js" index 791e444caf9ffd0f9692f552ace6f33faba10e92..177f2d72734a7fdad28df179e9d00e32bf17657c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/string-intern.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/impl/string-intern.js" @@ -1,3 +1,42 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e590d27909a7c132382fbf9b8c4668054ab425734c1e0789753063356826c30f -size 1663 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.supportedEols = exports.cachedBreakLinesWithSpaces = exports.cachedSpaces = void 0; + exports.cachedSpaces = new Array(20).fill(0).map((_, index) => { + return ' '.repeat(index); + }); + const maxCachedValues = 200; + exports.cachedBreakLinesWithSpaces = { + ' ': { + '\n': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\n' + ' '.repeat(index); + }), + '\r': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\r' + ' '.repeat(index); + }), + '\r\n': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\r\n' + ' '.repeat(index); + }), + }, + '\t': { + '\n': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\n' + '\t'.repeat(index); + }), + '\r': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\r' + '\t'.repeat(index); + }), + '\r\n': new Array(maxCachedValues).fill(0).map((_, index) => { + return '\r\n' + '\t'.repeat(index); + }), + } + }; + exports.supportedEols = ['\n', '\r', '\r\n']; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/main.d.ts" index 694be0bd6eeee1b89b92cc30b8110de6532fb4d9..7312a36d4f48d03e354ba9c4e45fc28947d33894 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/main.d.ts" @@ -1,3 +1,349 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4d82dad8d8a312706a9bc240c805088fef713bc71eaa622e55970e251b6c1a0f -size 14314 +/** + * Creates a JSON scanner on the given text. + * If ignoreTrivia is set, whitespaces or comments are ignored. + */ +export declare const createScanner: (text: string, ignoreTrivia?: boolean) => JSONScanner; +export declare const enum ScanError { + None = 0, + UnexpectedEndOfComment = 1, + UnexpectedEndOfString = 2, + UnexpectedEndOfNumber = 3, + InvalidUnicode = 4, + InvalidEscapeCharacter = 5, + InvalidCharacter = 6 +} +export declare const enum SyntaxKind { + OpenBraceToken = 1, + CloseBraceToken = 2, + OpenBracketToken = 3, + CloseBracketToken = 4, + CommaToken = 5, + ColonToken = 6, + NullKeyword = 7, + TrueKeyword = 8, + FalseKeyword = 9, + StringLiteral = 10, + NumericLiteral = 11, + LineCommentTrivia = 12, + BlockCommentTrivia = 13, + LineBreakTrivia = 14, + Trivia = 15, + Unknown = 16, + EOF = 17 +} +/** + * The scanner object, representing a JSON scanner at a position in the input string. + */ +export interface JSONScanner { + /** + * Sets the scan position to a new offset. A call to 'scan' is needed to get the first token. + */ + setPosition(pos: number): void; + /** + * Read the next token. Returns the token code. + */ + scan(): SyntaxKind; + /** + * Returns the zero-based current scan position, which is after the last read token. + */ + getPosition(): number; + /** + * Returns the last read token. + */ + getToken(): SyntaxKind; + /** + * Returns the last read token value. The value for strings is the decoded string content. For numbers it's of type number, for boolean it's true or false. + */ + getTokenValue(): string; + /** + * The zero-based start offset of the last read token. + */ + getTokenOffset(): number; + /** + * The length of the last read token. + */ + getTokenLength(): number; + /** + * The zero-based start line number of the last read token. + */ + getTokenStartLine(): number; + /** + * The zero-based start character (column) of the last read token. + */ + getTokenStartCharacter(): number; + /** + * An error code of the last scan. + */ + getTokenError(): ScanError; +} +/** + * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. + */ +export declare const getLocation: (text: string, position: number) => Location; +/** + * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + * Therefore, always check the errors list to find out if the input was valid. + */ +export declare const parse: (text: string, errors?: ParseError[], options?: ParseOptions) => any; +/** + * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + */ +export declare const parseTree: (text: string, errors?: ParseError[], options?: ParseOptions) => Node | undefined; +/** + * Finds the node at the given path in a JSON DOM. + */ +export declare const findNodeAtLocation: (root: Node, path: JSONPath) => Node | undefined; +/** + * Finds the innermost node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. + */ +export declare const findNodeAtOffset: (root: Node, offset: number, includeRightBound?: boolean) => Node | undefined; +/** + * Gets the JSON path of the given JSON DOM node + */ +export declare const getNodePath: (node: Node) => JSONPath; +/** + * Evaluates the JavaScript object of the given JSON DOM node + */ +export declare const getNodeValue: (node: Node) => any; +/** + * Parses the given text and invokes the visitor functions for each object, array and literal reached. + */ +export declare const visit: (text: string, visitor: JSONVisitor, options?: ParseOptions) => any; +/** + * Takes JSON with JavaScript-style comments and remove + * them. Optionally replaces every none-newline character + * of comments with a replaceCharacter + */ +export declare const stripComments: (text: string, replaceCh?: string) => string; +export interface ParseError { + error: ParseErrorCode; + offset: number; + length: number; +} +export declare const enum ParseErrorCode { + InvalidSymbol = 1, + InvalidNumberFormat = 2, + PropertyNameExpected = 3, + ValueExpected = 4, + ColonExpected = 5, + CommaExpected = 6, + CloseBraceExpected = 7, + CloseBracketExpected = 8, + EndOfFileExpected = 9, + InvalidCommentToken = 10, + UnexpectedEndOfComment = 11, + UnexpectedEndOfString = 12, + UnexpectedEndOfNumber = 13, + InvalidUnicode = 14, + InvalidEscapeCharacter = 15, + InvalidCharacter = 16 +} +export declare function printParseErrorCode(code: ParseErrorCode): "InvalidSymbol" | "InvalidNumberFormat" | "PropertyNameExpected" | "ValueExpected" | "ColonExpected" | "CommaExpected" | "CloseBraceExpected" | "CloseBracketExpected" | "EndOfFileExpected" | "InvalidCommentToken" | "UnexpectedEndOfComment" | "UnexpectedEndOfString" | "UnexpectedEndOfNumber" | "InvalidUnicode" | "InvalidEscapeCharacter" | "InvalidCharacter" | ""; +export type NodeType = 'object' | 'array' | 'property' | 'string' | 'number' | 'boolean' | 'null'; +export interface Node { + readonly type: NodeType; + readonly value?: any; + readonly offset: number; + readonly length: number; + readonly colonOffset?: number; + readonly parent?: Node; + readonly children?: Node[]; +} +/** + * A {@linkcode JSONPath} segment. Either a string representing an object property name + * or a number (starting at 0) for array indices. + */ +export type Segment = string | number; +export type JSONPath = Segment[]; +export interface Location { + /** + * The previous property key or literal value (string, number, boolean or null) or undefined. + */ + previousNode?: Node; + /** + * The path describing the location in the JSON document. The path consists of a sequence of strings + * representing an object property or numbers for array indices. + */ + path: JSONPath; + /** + * Matches the locations path against a pattern consisting of strings (for properties) and numbers (for array indices). + * '*' will match a single segment of any property name or index. + * '**' will match a sequence of segments of any property name or index, or no segment. + */ + matches: (patterns: JSONPath) => boolean; + /** + * If set, the location's offset is at a property key. + */ + isAtPropertyKey: boolean; +} +export interface ParseOptions { + disallowComments?: boolean; + allowTrailingComma?: boolean; + allowEmptyContent?: boolean; +} +/** + * Visitor called by {@linkcode visit} when parsing JSON. + * + * The visitor functions have the following common parameters: + * - `offset`: Global offset within the JSON document, starting at 0 + * - `startLine`: Line number, starting at 0 + * - `startCharacter`: Start character (column) within the current line, starting at 0 + * + * Additionally some functions have a `pathSupplier` parameter which can be used to obtain the + * current `JSONPath` within the document. + */ +export interface JSONVisitor { + /** + * Invoked when an open brace is encountered and an object is started. The offset and length represent the location of the open brace. + */ + onObjectBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a property is encountered. The offset and length represent the location of the property name. + * The `JSONPath` created by the `pathSupplier` refers to the enclosing JSON object, it does not include the + * property name yet. + */ + onObjectProperty?: (property: string, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a closing brace is encountered and an object is completed. The offset and length represent the location of the closing brace. + */ + onObjectEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked when an open bracket is encountered. The offset and length represent the location of the open bracket. + */ + onArrayBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a closing bracket is encountered. The offset and length represent the location of the closing bracket. + */ + onArrayEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked when a literal value is encountered. The offset and length represent the location of the literal value. + */ + onLiteralValue?: (value: any, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a comma or colon separator is encountered. The offset and length represent the location of the separator. + */ + onSeparator?: (character: string, offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * When comments are allowed, invoked when a line or block comment is encountered. The offset and length represent the location of the comment. + */ + onComment?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked on an error. + */ + onError?: (error: ParseErrorCode, offset: number, length: number, startLine: number, startCharacter: number) => void; +} +/** + * An edit result describes a textual edit operation. It is the result of a {@linkcode format} and {@linkcode modify} operation. + * It consist of one or more edits describing insertions, replacements or removals of text segments. + * * The offsets of the edits refer to the original state of the document. + * * No two edits change or remove the same range of text in the original document. + * * Multiple edits can have the same offset if they are multiple inserts, or an insert followed by a remove or replace. + * * The order in the array defines which edit is applied first. + * To apply an edit result use {@linkcode applyEdits}. + * In general multiple EditResults must not be concatenated because they might impact each other, producing incorrect or malformed JSON data. + */ +export type EditResult = Edit[]; +/** + * Represents a text modification + */ +export interface Edit { + /** + * The start offset of the modification. + */ + offset: number; + /** + * The length of the modification. Must not be negative. Empty length represents an *insert*. + */ + length: number; + /** + * The new content. Empty content represents a *remove*. + */ + content: string; +} +/** + * A text range in the document +*/ +export interface Range { + /** + * The start offset of the range. + */ + offset: number; + /** + * The length of the range. Must not be negative. + */ + length: number; +} +/** + * Options used by {@linkcode format} when computing the formatting edit operations + */ +export interface FormattingOptions { + /** + * If indentation is based on spaces (`insertSpaces` = true), the number of spaces that make an indent. + */ + tabSize?: number; + /** + * Is indentation based on spaces? + */ + insertSpaces?: boolean; + /** + * The default 'end of line' character. If not set, '\n' is used as default. + */ + eol?: string; + /** + * If set, will add a new line at the end of the document. + */ + insertFinalNewline?: boolean; + /** + * If true, will keep line positions as is in the formatting + */ + keepLines?: boolean; +} +/** + * Computes the edit operations needed to format a JSON document. + * + * @param documentText The input text + * @param range The range to format or `undefined` to format the full content + * @param options The formatting options + * @returns The edit operations describing the formatting changes to the original document following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export declare function format(documentText: string, range: Range | undefined, options: FormattingOptions): EditResult; +/** + * Options used by {@linkcode modify} when computing the modification edit operations + */ +export interface ModificationOptions { + /** + * Formatting options. If undefined, the newly inserted code will be inserted unformatted. + */ + formattingOptions?: FormattingOptions; + /** + * Default false. If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then + * {@linkcode modify} will insert a new item at that location instead of overwriting its contents. + */ + isArrayInsertion?: boolean; + /** + * Optional function to define the insertion index given an existing list of properties. + */ + getInsertionIndex?: (properties: string[]) => number; +} +/** + * Computes the edit operations needed to modify a value in the JSON document. + * + * @param documentText The input text + * @param path The path of the value to change. The path represents either to the document root, a property or an array item. + * If the path points to an non-existing property or item, it will be created. + * @param value The new value for the specified property or item. If the value is undefined, + * the property or item will be removed. + * @param options Options + * @returns The edit operations describing the changes to the original document, following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export declare function modify(text: string, path: JSONPath, value: any, options: ModificationOptions): EditResult; +/** + * Applies edits to an input string. + * @param text The input text + * @param edits Edit operations following the format described in {@linkcode EditResult}. + * @returns The text with the applied edits. + * @throws An error if the edit operations are not well-formed as described in {@linkcode EditResult}. + */ +export declare function applyEdits(text: string, edits: EditResult): string; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/main.js" index 94fc7a3ebbf516e6325b93cbfdf9599da4e8757d..2ed744665430578caebcb12053150fbf4d7e76da 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib/umd/main.js" @@ -1,3 +1,194 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6dc132e2e792a9616688ff93d10dd671c1fbcfa3301d76bff3e81193d049337d -size 11059 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./impl/format", "./impl/edit", "./impl/scanner", "./impl/parser"], factory); + } +})(function (require, exports) { + /*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + 'use strict'; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.applyEdits = exports.modify = exports.format = exports.printParseErrorCode = exports.ParseErrorCode = exports.stripComments = exports.visit = exports.getNodeValue = exports.getNodePath = exports.findNodeAtOffset = exports.findNodeAtLocation = exports.parseTree = exports.parse = exports.getLocation = exports.SyntaxKind = exports.ScanError = exports.createScanner = void 0; + const formatter = require("./impl/format"); + const edit = require("./impl/edit"); + const scanner = require("./impl/scanner"); + const parser = require("./impl/parser"); + /** + * Creates a JSON scanner on the given text. + * If ignoreTrivia is set, whitespaces or comments are ignored. + */ + exports.createScanner = scanner.createScanner; + var ScanError; + (function (ScanError) { + ScanError[ScanError["None"] = 0] = "None"; + ScanError[ScanError["UnexpectedEndOfComment"] = 1] = "UnexpectedEndOfComment"; + ScanError[ScanError["UnexpectedEndOfString"] = 2] = "UnexpectedEndOfString"; + ScanError[ScanError["UnexpectedEndOfNumber"] = 3] = "UnexpectedEndOfNumber"; + ScanError[ScanError["InvalidUnicode"] = 4] = "InvalidUnicode"; + ScanError[ScanError["InvalidEscapeCharacter"] = 5] = "InvalidEscapeCharacter"; + ScanError[ScanError["InvalidCharacter"] = 6] = "InvalidCharacter"; + })(ScanError || (exports.ScanError = ScanError = {})); + var SyntaxKind; + (function (SyntaxKind) { + SyntaxKind[SyntaxKind["OpenBraceToken"] = 1] = "OpenBraceToken"; + SyntaxKind[SyntaxKind["CloseBraceToken"] = 2] = "CloseBraceToken"; + SyntaxKind[SyntaxKind["OpenBracketToken"] = 3] = "OpenBracketToken"; + SyntaxKind[SyntaxKind["CloseBracketToken"] = 4] = "CloseBracketToken"; + SyntaxKind[SyntaxKind["CommaToken"] = 5] = "CommaToken"; + SyntaxKind[SyntaxKind["ColonToken"] = 6] = "ColonToken"; + SyntaxKind[SyntaxKind["NullKeyword"] = 7] = "NullKeyword"; + SyntaxKind[SyntaxKind["TrueKeyword"] = 8] = "TrueKeyword"; + SyntaxKind[SyntaxKind["FalseKeyword"] = 9] = "FalseKeyword"; + SyntaxKind[SyntaxKind["StringLiteral"] = 10] = "StringLiteral"; + SyntaxKind[SyntaxKind["NumericLiteral"] = 11] = "NumericLiteral"; + SyntaxKind[SyntaxKind["LineCommentTrivia"] = 12] = "LineCommentTrivia"; + SyntaxKind[SyntaxKind["BlockCommentTrivia"] = 13] = "BlockCommentTrivia"; + SyntaxKind[SyntaxKind["LineBreakTrivia"] = 14] = "LineBreakTrivia"; + SyntaxKind[SyntaxKind["Trivia"] = 15] = "Trivia"; + SyntaxKind[SyntaxKind["Unknown"] = 16] = "Unknown"; + SyntaxKind[SyntaxKind["EOF"] = 17] = "EOF"; + })(SyntaxKind || (exports.SyntaxKind = SyntaxKind = {})); + /** + * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. + */ + exports.getLocation = parser.getLocation; + /** + * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + * Therefore, always check the errors list to find out if the input was valid. + */ + exports.parse = parser.parse; + /** + * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + */ + exports.parseTree = parser.parseTree; + /** + * Finds the node at the given path in a JSON DOM. + */ + exports.findNodeAtLocation = parser.findNodeAtLocation; + /** + * Finds the innermost node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. + */ + exports.findNodeAtOffset = parser.findNodeAtOffset; + /** + * Gets the JSON path of the given JSON DOM node + */ + exports.getNodePath = parser.getNodePath; + /** + * Evaluates the JavaScript object of the given JSON DOM node + */ + exports.getNodeValue = parser.getNodeValue; + /** + * Parses the given text and invokes the visitor functions for each object, array and literal reached. + */ + exports.visit = parser.visit; + /** + * Takes JSON with JavaScript-style comments and remove + * them. Optionally replaces every none-newline character + * of comments with a replaceCharacter + */ + exports.stripComments = parser.stripComments; + var ParseErrorCode; + (function (ParseErrorCode) { + ParseErrorCode[ParseErrorCode["InvalidSymbol"] = 1] = "InvalidSymbol"; + ParseErrorCode[ParseErrorCode["InvalidNumberFormat"] = 2] = "InvalidNumberFormat"; + ParseErrorCode[ParseErrorCode["PropertyNameExpected"] = 3] = "PropertyNameExpected"; + ParseErrorCode[ParseErrorCode["ValueExpected"] = 4] = "ValueExpected"; + ParseErrorCode[ParseErrorCode["ColonExpected"] = 5] = "ColonExpected"; + ParseErrorCode[ParseErrorCode["CommaExpected"] = 6] = "CommaExpected"; + ParseErrorCode[ParseErrorCode["CloseBraceExpected"] = 7] = "CloseBraceExpected"; + ParseErrorCode[ParseErrorCode["CloseBracketExpected"] = 8] = "CloseBracketExpected"; + ParseErrorCode[ParseErrorCode["EndOfFileExpected"] = 9] = "EndOfFileExpected"; + ParseErrorCode[ParseErrorCode["InvalidCommentToken"] = 10] = "InvalidCommentToken"; + ParseErrorCode[ParseErrorCode["UnexpectedEndOfComment"] = 11] = "UnexpectedEndOfComment"; + ParseErrorCode[ParseErrorCode["UnexpectedEndOfString"] = 12] = "UnexpectedEndOfString"; + ParseErrorCode[ParseErrorCode["UnexpectedEndOfNumber"] = 13] = "UnexpectedEndOfNumber"; + ParseErrorCode[ParseErrorCode["InvalidUnicode"] = 14] = "InvalidUnicode"; + ParseErrorCode[ParseErrorCode["InvalidEscapeCharacter"] = 15] = "InvalidEscapeCharacter"; + ParseErrorCode[ParseErrorCode["InvalidCharacter"] = 16] = "InvalidCharacter"; + })(ParseErrorCode || (exports.ParseErrorCode = ParseErrorCode = {})); + function printParseErrorCode(code) { + switch (code) { + case 1 /* ParseErrorCode.InvalidSymbol */: return 'InvalidSymbol'; + case 2 /* ParseErrorCode.InvalidNumberFormat */: return 'InvalidNumberFormat'; + case 3 /* ParseErrorCode.PropertyNameExpected */: return 'PropertyNameExpected'; + case 4 /* ParseErrorCode.ValueExpected */: return 'ValueExpected'; + case 5 /* ParseErrorCode.ColonExpected */: return 'ColonExpected'; + case 6 /* ParseErrorCode.CommaExpected */: return 'CommaExpected'; + case 7 /* ParseErrorCode.CloseBraceExpected */: return 'CloseBraceExpected'; + case 8 /* ParseErrorCode.CloseBracketExpected */: return 'CloseBracketExpected'; + case 9 /* ParseErrorCode.EndOfFileExpected */: return 'EndOfFileExpected'; + case 10 /* ParseErrorCode.InvalidCommentToken */: return 'InvalidCommentToken'; + case 11 /* ParseErrorCode.UnexpectedEndOfComment */: return 'UnexpectedEndOfComment'; + case 12 /* ParseErrorCode.UnexpectedEndOfString */: return 'UnexpectedEndOfString'; + case 13 /* ParseErrorCode.UnexpectedEndOfNumber */: return 'UnexpectedEndOfNumber'; + case 14 /* ParseErrorCode.InvalidUnicode */: return 'InvalidUnicode'; + case 15 /* ParseErrorCode.InvalidEscapeCharacter */: return 'InvalidEscapeCharacter'; + case 16 /* ParseErrorCode.InvalidCharacter */: return 'InvalidCharacter'; + } + return ''; + } + exports.printParseErrorCode = printParseErrorCode; + /** + * Computes the edit operations needed to format a JSON document. + * + * @param documentText The input text + * @param range The range to format or `undefined` to format the full content + * @param options The formatting options + * @returns The edit operations describing the formatting changes to the original document following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ + function format(documentText, range, options) { + return formatter.format(documentText, range, options); + } + exports.format = format; + /** + * Computes the edit operations needed to modify a value in the JSON document. + * + * @param documentText The input text + * @param path The path of the value to change. The path represents either to the document root, a property or an array item. + * If the path points to an non-existing property or item, it will be created. + * @param value The new value for the specified property or item. If the value is undefined, + * the property or item will be removed. + * @param options Options + * @returns The edit operations describing the changes to the original document, following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ + function modify(text, path, value, options) { + return edit.setProperty(text, path, value, options); + } + exports.modify = modify; + /** + * Applies edits to an input string. + * @param text The input text + * @param edits Edit operations following the format described in {@linkcode EditResult}. + * @returns The text with the applied edits. + * @throws An error if the edit operations are not well-formed as described in {@linkcode EditResult}. + */ + function applyEdits(text, edits) { + let sortedEdits = edits.slice(0).sort((a, b) => { + const diff = a.offset - b.offset; + if (diff === 0) { + return a.length - b.length; + } + return diff; + }); + let lastModifiedOffset = text.length; + for (let i = sortedEdits.length - 1; i >= 0; i--) { + let e = sortedEdits[i]; + if (e.offset + e.length <= lastModifiedOffset) { + text = edit.applyEdit(text, e); + } + else { + throw new Error('Overlapping edit'); + } + lastModifiedOffset = e.offset; + } + return text; + } + exports.applyEdits = applyEdits; +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/package.json" index 895928e60f0e511895647af5e4468007463932b6..da7a76b27709ed983d4c62c132e278b0da791872 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/package.json" @@ -1,3 +1,37 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6442d10a23718191adbedd34448552cea97a8ff9c67ee71292a9e1ab5d9a140d -size 1180 +{ + "name": "jsonc-parser", + "version": "3.2.1", + "description": "Scanner and parser for JSON with comments.", + "main": "./lib/umd/main.js", + "typings": "./lib/umd/main.d.ts", + "module": "./lib/esm/main.js", + "author": "Microsoft Corporation", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/node-jsonc-parser" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/microsoft/node-jsonc-parser/issues" + }, + "devDependencies": { + "mocha": "^10.2.0", + "typescript": "^5.3.3", + "@types/node": "^16.x", + "@types/mocha": "^10.0.6", + "@typescript-eslint/eslint-plugin": "^6.19.1", + "@typescript-eslint/parser": "^6.19.1", + "eslint": "^8.56.0", + "rimraf": "^5.0.5" + }, + "scripts": { + "prepack": "npm run clean && npm run compile-esm && npm run test && npm run remove-sourcemap-refs", + "compile": "tsc -p ./src && npm run lint", + "compile-esm": "tsc -p ./src/tsconfig.esm.json", + "remove-sourcemap-refs": "node ./build/remove-sourcemap-refs.js", + "clean": "rimraf lib", + "watch": "tsc -w -p ./src", + "test": "npm run compile && mocha ./lib/umd/test", + "lint": "eslint src/**/*.ts" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/LICENSE.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/LICENSE.md" index 19f0a8b9ff8b9e53af92488d51e4c778a1468641..29db530db43fe178f97f0bb244e79fa3f7e27745 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/LICENSE.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/LICENSE.md" @@ -1,3 +1,9 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c669138cb1eb01fbb745e8e460b291e4f2869c14a40061390b6095d845ed4c82 -size 1070 +The MIT License (MIT) + +Copyright (c) Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/README.md" index 8f452e84a77f84082a071296355c2fdb6a3fff4d..ee7b725b5998290c3adcbed96edfc679c18827ff 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/README.md" @@ -1,3 +1,67 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:39ad66715504e292bd71b6b258d0bdba95be22e3a539a280ef2534be0525218e -size 2475 +## vscode-uri + +[![Build Status](https://travis-ci.org/Microsoft/vscode-uri.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-uri) + +This module contains the URI implementation that is used by VS Code and its extensions. +It has support for parsing a string into `scheme`, `authority`, `path`, `query`, and +`fragment` URI components as defined in: http://tools.ietf.org/html/rfc3986 + +``` + foo://example.com:8042/over/there?name=ferret#nose + \_/ \______________/\_________/ \_________/ \__/ + | | | | | +scheme authority path query fragment + | _____________________|__ + / \ / \ + urn:example:animal:ferret:nose +``` + +## Usage + +```js +import { URI } from 'vscode-uri' + +// parse an URI from string + +let uri = URI.parse('https://code.visualstudio.com/docs/extensions/overview#frag') + +assert.ok(uri.scheme === 'https'); +assert.ok(uri.authority === 'code.visualstudio.com'); +assert.ok(uri.path === '/docs/extensions/overview'); +assert.ok(uri.query === ''); +assert.ok(uri.fragment === 'frag'); +assert.ok(uri.toString() === 'https://code.visualstudio.com/docs/extensions/overview#frag') + + +// create an URI from a fs path + +let uri = URI.file('/users/me/c#-projects/'); + +assert.ok(uri.scheme === 'file'); +assert.ok(uri.authority === ''); +assert.ok(uri.path === '/users/me/c#-projects/'); +assert.ok(uri.query === ''); +assert.ok(uri.fragment === ''); +assert.ok(uri.toString() === 'file:///users/me/c%23-projects/') +``` + +## Usage: Util + +This module also exports a `Utils` package which is an extension, not part of `vscode.Uri`, and useful for path-math. There is: + +* `Utils.joinPath(URI, paths): URI` +* `Utils.resolvePath(URI, paths): URI` +* `Utils.dirname(URI): string` +* `Utils.basename(URI): string` +* `Utils.extname(URI): string` + +All util use posix path-math as defined by the node.js path module. + + +## Contributing + +The source of this module is taken straight from the [vscode](https://github.com/microsoft/vscode)-sources and because of that issues and pull request should be created in that repository. Thanks and Happy Coding! + +## Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/SECURITY.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/SECURITY.md" index dffdea487032c75c7f9b01273a461d4d628c8b37..e138ec5d6a77c5e6e09346a69cbdc90c85a3806f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/SECURITY.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/SECURITY.md" @@ -1,3 +1,41 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:430987b8c5f30c366ecd501bc344c8b29b6280e8a10174376a769f7443a187cd -size 2757 + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). + + diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/esm/index.mjs" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/esm/index.mjs" index 2406dd7f538d892f46b3a83c758c93515297bd68..f70030caded9701e55154df2d37b712e131a6198 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/esm/index.mjs" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/esm/index.mjs" @@ -1,3 +1,2 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:01ef41f61c1974c6b83dac85a6cc44332f6793a90f838c54f07660121de4bc9d -size 10742 +var LIB;(()=>{"use strict";var t={470:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",i=0,o=-1,s=0,h=0;h<=t.length;++h){if(h2){var a=n.lastIndexOf("/");if(a!==n.length-1){-1===a?(n="",i=0):i=(n=n.slice(0,a)).length-1-n.lastIndexOf("/"),o=h,s=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=h,s=0;continue}e&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+t.slice(o+1,h):n=t.slice(o+1,h),i=h-o-1;o=h,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var t,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(void 0===t&&(t=process.cwd()),s=t),e(s),0!==s.length&&(n=s+"/"+n,i=47===s.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return".";var n=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&i&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,r=0;r0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return"";if((t=n.resolve(t))===(r=n.resolve(r)))return"";for(var i=1;ic){if(47===r.charCodeAt(h+u))return r.slice(h+u+1);if(0===u)return r.slice(h+u)}else s>c&&(47===t.charCodeAt(i+u)?f=u:0===u&&(f=0));break}var l=t.charCodeAt(i+u);if(l!==r.charCodeAt(h+u))break;47===l&&(f=u)}var g="";for(u=i+f+1;u<=o;++u)u!==o&&47!==t.charCodeAt(u)||(0===g.length?g+="..":g+="/..");return g.length>0?g+r.slice(h+f):(h+=f,47===r.charCodeAt(h)&&++h,r.slice(h))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,i=-1,o=!0,s=t.length-1;s>=1;--s)if(47===(r=t.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,i=0,o=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var h=r.length-1,a=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1),h>=0&&(c===r.charCodeAt(h)?-1==--h&&(o=n):(h=-1,o=a))}return i===o?o=a:-1===o&&(o=t.length),t.slice(i,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!s){i=n+1;break}}else-1===o&&(s=!1,o=n+1);return-1===o?"":t.slice(i,o)},extname:function(t){e(t);for(var r=-1,n=0,i=-1,o=!0,s=0,h=t.length-1;h>=0;--h){var a=t.charCodeAt(h);if(47!==a)-1===i&&(o=!1,i=h+1),46===a?-1===r?r=h:1!==s&&(s=1):-1!==r&&(s=-1);else if(!o){n=h+1;break}}return-1===r||-1===i||0===s||1===s&&r===i-1&&r===n+1?"":t.slice(r,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,i=t.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var s=-1,h=0,a=-1,c=!0,f=t.length-1,u=0;f>=n;--f)if(47!==(i=t.charCodeAt(f)))-1===a&&(c=!1,a=f+1),46===i?-1===s?s=f:1!==u&&(u=1):-1!==s&&(u=-1);else if(!c){h=f+1;break}return-1===s||-1===a||0===u||1===u&&s===a-1&&s===h+1?-1!==a&&(r.base=r.name=0===h&&o?t.slice(1,a):t.slice(h,a)):(0===h&&o?(r.name=t.slice(1,s),r.base=t.slice(1,a)):(r.name=t.slice(h,s),r.base=t.slice(h,a)),r.ext=t.slice(s,a)),h>0?r.dir=t.slice(0,h-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{let t;if(r.r(n),r.d(n,{URI:()=>f,Utils:()=>P}),"object"==typeof process)t="win32"===process.platform;else if("object"==typeof navigator){let e=navigator.userAgent;t=e.indexOf("Windows")>=0}const e=/^\w[\w\d+.-]*$/,i=/^\//,o=/^\/\//;function s(t,r){if(!t.scheme&&r)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!e.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!i.test(t.path))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')}else if(o.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const h="",a="/",c=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{static isUri(t){return t instanceof f||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,n,i,o=!1){"object"==typeof t?(this.scheme=t.scheme||h,this.authority=t.authority||h,this.path=t.path||h,this.query=t.query||h,this.fragment=t.fragment||h):(this.scheme=function(t,e){return t||e?t:"file"}(t,o),this.authority=e||h,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==a&&(e=a+e):e=a}return e}(this.scheme,r||h),this.query=n||h,this.fragment=i||h,s(this,o))}get fsPath(){return m(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:n,query:i,fragment:o}=t;return void 0===e?e=this.scheme:null===e&&(e=h),void 0===r?r=this.authority:null===r&&(r=h),void 0===n?n=this.path:null===n&&(n=h),void 0===i?i=this.query:null===i&&(i=h),void 0===o?o=this.fragment:null===o&&(o=h),e===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&o===this.fragment?this:new l(e,r,n,i,o)}static parse(t,e=!1){const r=c.exec(t);return r?new l(r[2]||h,C(r[4]||h),C(r[5]||h),C(r[7]||h),C(r[9]||h),e):new l(h,h,h,h,h)}static file(e){let r=h;if(t&&(e=e.replace(/\\/g,a)),e[0]===a&&e[1]===a){const t=e.indexOf(a,2);-1===t?(r=e.substring(2),e=a):(r=e.substring(2,t),e=e.substring(t)||a)}return new l("file",r,e,h,h)}static from(t){const e=new l(t.scheme,t.authority,t.path,t.query,t.fragment);return s(e,!0),e}toString(t=!1){return y(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof f)return t;{const e=new l(t);return e._formatted=t.external,e._fsPath=t._sep===u?t.fsPath:null,e}}return t}}const u=t?1:void 0;class l extends f{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=m(this,!1)),this._fsPath}toString(t=!1){return t?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=u),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function d(t,e,r){let n,i=-1;for(let o=0;o=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||e&&47===s||r&&91===s||r&&93===s||r&&58===s)-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),void 0!==n&&(n+=t.charAt(o));else{void 0===n&&(n=t.substr(0,o));const e=g[s];void 0!==e?(-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),n+=e):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(t.substring(i))),void 0!==n?n:t}function p(t){let e;for(let r=0;r1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?r?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,t&&(n=n.replace(/\//g,"\\")),n}function y(t,e){const r=e?p:d;let n="",{scheme:i,authority:o,path:s,query:h,fragment:c}=t;if(i&&(n+=i,n+=":"),(o||"file"===i)&&(n+=a,n+=a),o){let t=o.indexOf("@");if(-1!==t){const e=o.substr(0,t);o=o.substr(t+1),t=e.lastIndexOf(":"),-1===t?n+=r(e,!1,!1):(n+=r(e.substr(0,t),!1,!1),n+=":",n+=r(e.substr(t+1),!1,!0)),n+="@"}o=o.toLowerCase(),t=o.lastIndexOf(":"),-1===t?n+=r(o,!1,!0):(n+=r(o.substr(0,t),!1,!0),n+=o.substr(t))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const t=s.charCodeAt(1);t>=65&&t<=90&&(s=`/${String.fromCharCode(t+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const t=s.charCodeAt(0);t>=65&&t<=90&&(s=`${String.fromCharCode(t+32)}:${s.substr(2)}`)}n+=r(s,!0,!1)}return h&&(n+="?",n+=r(h,!1,!1)),c&&(n+="#",n+=e?c:d(c,!1,!1)),n}function v(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+v(t.substr(3)):t}}const b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(t){return t.match(b)?t.replace(b,(t=>v(t))):t}var A=r(470);const w=A.posix||A,x="/";var P;!function(t){t.joinPath=function(t,...e){return t.with({path:w.join(t.path,...e)})},t.resolvePath=function(t,...e){let r=t.path,n=!1;r[0]!==x&&(r=x+r,n=!0);let i=w.resolve(r,...e);return n&&i[0]===x&&!t.authority&&(i=i.substring(1)),t.with({path:i})},t.dirname=function(t){if(0===t.path.length||t.path===x)return t;let e=w.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},t.basename=function(t){return w.basename(t.path)},t.extname=function(t){return w.extname(t.path)}}(P||(P={}))})(),LIB=n})();export const{URI,Utils}=LIB; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/esm/index.mjs.map" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/esm/index.mjs.map" index 65b6434886833a640bb4c7877edaff23b9aa50e9..319b792ac59eaed2932b04a932bec488e97da187 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/esm/index.mjs.map" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/esm/index.mjs.map" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6a69a0c1d29aa26f327950da834efb7e9a183141f77203e7f83e24f32ad62baf -size 62941 +{"version":3,"file":"index.mjs","mappings":"0CA0BA,SAASA,EAAWC,GAClB,GAAoB,iBAATA,EACT,MAAM,IAAIC,UAAU,mCAAqCC,KAAKC,UAAUH,GAE5E,CAGA,SAASI,EAAqBJ,EAAMK,GAMlC,IALA,IAIIC,EAJAC,EAAM,GACNC,EAAoB,EACpBC,GAAa,EACbC,EAAO,EAEFC,EAAI,EAAGA,GAAKX,EAAKY,SAAUD,EAAG,CACrC,GAAIA,EAAIX,EAAKY,OACXN,EAAON,EAAKa,WAAWF,OACpB,IAAa,KAATL,EACP,MAEAA,EAAO,EAAQ,CACjB,GAAa,KAATA,EAAmB,CACrB,GAAIG,IAAcE,EAAI,GAAc,IAATD,QAEpB,GAAID,IAAcE,EAAI,GAAc,IAATD,EAAY,CAC5C,GAAIH,EAAIK,OAAS,GAA2B,IAAtBJ,GAA8D,KAAnCD,EAAIM,WAAWN,EAAIK,OAAS,IAAsD,KAAnCL,EAAIM,WAAWN,EAAIK,OAAS,GAC1H,GAAIL,EAAIK,OAAS,EAAG,CAClB,IAAIE,EAAiBP,EAAIQ,YAAY,KACrC,GAAID,IAAmBP,EAAIK,OAAS,EAAG,EACb,IAApBE,GACFP,EAAM,GACNC,EAAoB,GAGpBA,GADAD,EAAMA,EAAIS,MAAM,EAAGF,IACKF,OAAS,EAAIL,EAAIQ,YAAY,KAEvDN,EAAYE,EACZD,EAAO,EACP,QACF,CACF,MAAO,GAAmB,IAAfH,EAAIK,QAA+B,IAAfL,EAAIK,OAAc,CAC/CL,EAAM,GACNC,EAAoB,EACpBC,EAAYE,EACZD,EAAO,EACP,QACF,CAEEL,IACEE,EAAIK,OAAS,EACfL,GAAO,MAEPA,EAAM,KACRC,EAAoB,EAExB,MACMD,EAAIK,OAAS,EACfL,GAAO,IAAMP,EAAKgB,MAAMP,EAAY,EAAGE,GAEvCJ,EAAMP,EAAKgB,MAAMP,EAAY,EAAGE,GAClCH,EAAoBG,EAAIF,EAAY,EAEtCA,EAAYE,EACZD,EAAO,CACT,MAAoB,KAATJ,IAA+B,IAAVI,IAC5BA,EAEFA,GAAQ,CAEZ,CACA,OAAOH,CACT,CAcA,IAAIU,EAAQ,CAEVC,QAAS,WAKP,IAJA,IAEIC,EAFAC,EAAe,GACfC,GAAmB,EAGdV,EAAIW,UAAUV,OAAS,EAAGD,IAAM,IAAMU,EAAkBV,IAAK,CACpE,IAAIX,EACAW,GAAK,EACPX,EAAOsB,UAAUX,SAELY,IAARJ,IACFA,EAAMK,QAAQL,OAChBnB,EAAOmB,GAGTpB,EAAWC,GAGS,IAAhBA,EAAKY,SAITQ,EAAepB,EAAO,IAAMoB,EAC5BC,EAA0C,KAAvBrB,EAAKa,WAAW,GACrC,CAQA,OAFAO,EAAehB,EAAqBgB,GAAeC,GAE/CA,EACED,EAAaR,OAAS,EACjB,IAAMQ,EAEN,IACAA,EAAaR,OAAS,EACxBQ,EAEA,GAEX,EAEAK,UAAW,SAAmBzB,GAG5B,GAFAD,EAAWC,GAES,IAAhBA,EAAKY,OAAc,MAAO,IAE9B,IAAIc,EAAoC,KAAvB1B,EAAKa,WAAW,GAC7Bc,EAAyD,KAArC3B,EAAKa,WAAWb,EAAKY,OAAS,GAQtD,OAHoB,KAFpBZ,EAAOI,EAAqBJ,GAAO0B,IAE1Bd,QAAiBc,IAAY1B,EAAO,KACzCA,EAAKY,OAAS,GAAKe,IAAmB3B,GAAQ,KAE9C0B,EAAmB,IAAM1B,EACtBA,CACT,EAEA0B,WAAY,SAAoB1B,GAE9B,OADAD,EAAWC,GACJA,EAAKY,OAAS,GAA4B,KAAvBZ,EAAKa,WAAW,EAC5C,EAEAe,KAAM,WACJ,GAAyB,IAArBN,UAAUV,OACZ,MAAO,IAET,IADA,IAAIiB,EACKlB,EAAI,EAAGA,EAAIW,UAAUV,SAAUD,EAAG,CACzC,IAAImB,EAAMR,UAAUX,GACpBZ,EAAW+B,GACPA,EAAIlB,OAAS,SACAW,IAAXM,EACFA,EAASC,EAETD,GAAU,IAAMC,EAEtB,CACA,YAAeP,IAAXM,EACK,IACFZ,EAAMQ,UAAUI,EACzB,EAEAE,SAAU,SAAkBC,EAAMC,GAIhC,GAHAlC,EAAWiC,GACXjC,EAAWkC,GAEPD,IAASC,EAAI,MAAO,GAKxB,IAHAD,EAAOf,EAAMC,QAAQc,OACrBC,EAAKhB,EAAMC,QAAQe,IAEF,MAAO,GAIxB,IADA,IAAIC,EAAY,EACTA,EAAYF,EAAKpB,QACa,KAA/BoB,EAAKnB,WAAWqB,KADYA,GASlC,IALA,IAAIC,EAAUH,EAAKpB,OACfwB,EAAUD,EAAUD,EAGpBG,EAAU,EACPA,EAAUJ,EAAGrB,QACa,KAA3BqB,EAAGpB,WAAWwB,KADUA,GAW9B,IAPA,IACIC,EADQL,EAAGrB,OACKyB,EAGhBzB,EAASwB,EAAUE,EAAQF,EAAUE,EACrCC,GAAiB,EACjB5B,EAAI,EACDA,GAAKC,IAAUD,EAAG,CACvB,GAAIA,IAAMC,EAAQ,CAChB,GAAI0B,EAAQ1B,EAAQ,CAClB,GAAmC,KAA/BqB,EAAGpB,WAAWwB,EAAU1B,GAG1B,OAAOsB,EAAGjB,MAAMqB,EAAU1B,EAAI,GACzB,GAAU,IAANA,EAGT,OAAOsB,EAAGjB,MAAMqB,EAAU1B,EAE9B,MAAWyB,EAAUxB,IACoB,KAAnCoB,EAAKnB,WAAWqB,EAAYvB,GAG9B4B,EAAgB5B,EACD,IAANA,IAGT4B,EAAgB,IAGpB,KACF,CACA,IAAIC,EAAWR,EAAKnB,WAAWqB,EAAYvB,GAE3C,GAAI6B,IADSP,EAAGpB,WAAWwB,EAAU1B,GAEnC,MACoB,KAAb6B,IACPD,EAAgB5B,EACpB,CAEA,IAAI8B,EAAM,GAGV,IAAK9B,EAAIuB,EAAYK,EAAgB,EAAG5B,GAAKwB,IAAWxB,EAClDA,IAAMwB,GAAkC,KAAvBH,EAAKnB,WAAWF,KAChB,IAAf8B,EAAI7B,OACN6B,GAAO,KAEPA,GAAO,OAMb,OAAIA,EAAI7B,OAAS,EACR6B,EAAMR,EAAGjB,MAAMqB,EAAUE,IAEhCF,GAAWE,EACoB,KAA3BN,EAAGpB,WAAWwB,MACdA,EACGJ,EAAGjB,MAAMqB,GAEpB,EAEAK,UAAW,SAAmB1C,GAC5B,OAAOA,CACT,EAEA2C,QAAS,SAAiB3C,GAExB,GADAD,EAAWC,GACS,IAAhBA,EAAKY,OAAc,MAAO,IAK9B,IAJA,IAAIN,EAAON,EAAKa,WAAW,GACvB+B,EAAmB,KAATtC,EACVuC,GAAO,EACPC,GAAe,EACVnC,EAAIX,EAAKY,OAAS,EAAGD,GAAK,IAAKA,EAEtC,GAAa,MADbL,EAAON,EAAKa,WAAWF,KAEnB,IAAKmC,EAAc,CACjBD,EAAMlC,EACN,KACF,OAGFmC,GAAe,EAInB,OAAa,IAATD,EAAmBD,EAAU,IAAM,IACnCA,GAAmB,IAARC,EAAkB,KAC1B7C,EAAKgB,MAAM,EAAG6B,EACvB,EAEAE,SAAU,SAAkB/C,EAAMgD,GAChC,QAAYzB,IAARyB,GAAoC,iBAARA,EAAkB,MAAM,IAAI/C,UAAU,mCACtEF,EAAWC,GAEX,IAGIW,EAHAsC,EAAQ,EACRJ,GAAO,EACPC,GAAe,EAGnB,QAAYvB,IAARyB,GAAqBA,EAAIpC,OAAS,GAAKoC,EAAIpC,QAAUZ,EAAKY,OAAQ,CACpE,GAAIoC,EAAIpC,SAAWZ,EAAKY,QAAUoC,IAAQhD,EAAM,MAAO,GACvD,IAAIkD,EAASF,EAAIpC,OAAS,EACtBuC,GAAoB,EACxB,IAAKxC,EAAIX,EAAKY,OAAS,EAAGD,GAAK,IAAKA,EAAG,CACrC,IAAIL,EAAON,EAAKa,WAAWF,GAC3B,GAAa,KAATL,GAGA,IAAKwC,EAAc,CACjBG,EAAQtC,EAAI,EACZ,KACF,OAEwB,IAAtBwC,IAGFL,GAAe,EACfK,EAAmBxC,EAAI,GAErBuC,GAAU,IAER5C,IAAS0C,EAAInC,WAAWqC,IACR,KAAZA,IAGJL,EAAMlC,IAKRuC,GAAU,EACVL,EAAMM,GAId,CAGA,OADIF,IAAUJ,EAAKA,EAAMM,GAAmC,IAATN,IAAYA,EAAM7C,EAAKY,QACnEZ,EAAKgB,MAAMiC,EAAOJ,EAC3B,CACE,IAAKlC,EAAIX,EAAKY,OAAS,EAAGD,GAAK,IAAKA,EAClC,GAA2B,KAAvBX,EAAKa,WAAWF,IAGhB,IAAKmC,EAAc,CACjBG,EAAQtC,EAAI,EACZ,KACF,OACkB,IAATkC,IAGXC,GAAe,EACfD,EAAMlC,EAAI,GAId,OAAa,IAATkC,EAAmB,GAChB7C,EAAKgB,MAAMiC,EAAOJ,EAE7B,EAEAO,QAAS,SAAiBpD,GACxBD,EAAWC,GAQX,IAPA,IAAIqD,GAAY,EACZC,EAAY,EACZT,GAAO,EACPC,GAAe,EAGfS,EAAc,EACT5C,EAAIX,EAAKY,OAAS,EAAGD,GAAK,IAAKA,EAAG,CACzC,IAAIL,EAAON,EAAKa,WAAWF,GAC3B,GAAa,KAATL,GASS,IAATuC,IAGFC,GAAe,EACfD,EAAMlC,EAAI,GAEC,KAATL,GAEkB,IAAd+C,EACFA,EAAW1C,EACY,IAAhB4C,IACPA,EAAc,IACK,IAAdF,IAGTE,GAAe,QArBb,IAAKT,EAAc,CACjBQ,EAAY3C,EAAI,EAChB,KACF,CAoBN,CAEA,OAAkB,IAAd0C,IAA4B,IAATR,GAEH,IAAhBU,GAEgB,IAAhBA,GAAqBF,IAAaR,EAAM,GAAKQ,IAAaC,EAAY,EACjE,GAEFtD,EAAKgB,MAAMqC,EAAUR,EAC9B,EAEAW,OAAQ,SAAgBC,GACtB,GAAmB,OAAfA,GAA6C,iBAAfA,EAChC,MAAM,IAAIxD,UAAU,0EAA4EwD,GAElG,OAvVJ,SAAiBC,EAAKD,GACpB,IAAIE,EAAMF,EAAWE,KAAOF,EAAWG,KACnCC,EAAOJ,EAAWI,OAASJ,EAAWK,MAAQ,KAAOL,EAAWT,KAAO,IAC3E,OAAKW,EAGDA,IAAQF,EAAWG,KACdD,EAAME,EAERF,EA8UU,IA9UEE,EALVA,CAMX,CA6UWE,CAAQ,EAAKN,EACtB,EAEAO,MAAO,SAAehE,GACpBD,EAAWC,GAEX,IAAIiE,EAAM,CAAEL,KAAM,GAAID,IAAK,GAAIE,KAAM,GAAIb,IAAK,GAAIc,KAAM,IACxD,GAAoB,IAAhB9D,EAAKY,OAAc,OAAOqD,EAC9B,IAEIhB,EAFA3C,EAAON,EAAKa,WAAW,GACvBa,EAAsB,KAATpB,EAEboB,GACFuC,EAAIL,KAAO,IACXX,EAAQ,GAERA,EAAQ,EAaV,IAXA,IAAII,GAAY,EACZC,EAAY,EACZT,GAAO,EACPC,GAAe,EACfnC,EAAIX,EAAKY,OAAS,EAIlB2C,EAAc,EAGX5C,GAAKsC,IAAStC,EAEnB,GAAa,MADbL,EAAON,EAAKa,WAAWF,KAUV,IAATkC,IAGFC,GAAe,EACfD,EAAMlC,EAAI,GAEC,KAATL,GAEkB,IAAd+C,EAAiBA,EAAW1C,EAA2B,IAAhB4C,IAAmBA,EAAc,IACrD,IAAdF,IAGXE,GAAe,QAlBb,IAAKT,EAAc,CACjBQ,EAAY3C,EAAI,EAChB,KACF,CAwCN,OArBkB,IAAd0C,IAA4B,IAATR,GAEP,IAAhBU,GAEgB,IAAhBA,GAAqBF,IAAaR,EAAM,GAAKQ,IAAaC,EAAY,GACvD,IAATT,IACiCoB,EAAIJ,KAAOI,EAAIH,KAAhC,IAAdR,GAAmB5B,EAAkC1B,EAAKgB,MAAM,EAAG6B,GAAgC7C,EAAKgB,MAAMsC,EAAWT,KAG7G,IAAdS,GAAmB5B,GACrBuC,EAAIH,KAAO9D,EAAKgB,MAAM,EAAGqC,GACzBY,EAAIJ,KAAO7D,EAAKgB,MAAM,EAAG6B,KAEzBoB,EAAIH,KAAO9D,EAAKgB,MAAMsC,EAAWD,GACjCY,EAAIJ,KAAO7D,EAAKgB,MAAMsC,EAAWT,IAEnCoB,EAAIjB,IAAMhD,EAAKgB,MAAMqC,EAAUR,IAG7BS,EAAY,EAAGW,EAAIN,IAAM3D,EAAKgB,MAAM,EAAGsC,EAAY,GAAY5B,IAAYuC,EAAIN,IAAM,KAElFM,CACT,EAEAP,IAAK,IACLQ,UAAW,IACXC,MAAO,KACPlD,MAAO,MAGTA,EAAMA,MAAQA,EAEdmD,EAAOC,QAAUpD,C,GC/gBbqD,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBjD,IAAjBkD,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAK,EAAoBF,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,CCrBAE,EAAoBI,EAAI,CAACN,EAASO,KACjC,IAAI,IAAIC,KAAOD,EACXL,EAAoBO,EAAEF,EAAYC,KAASN,EAAoBO,EAAET,EAASQ,IAC5EE,OAAOC,eAAeX,EAASQ,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDN,EAAoBO,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFb,EAAoBiB,EAAKnB,IACH,oBAAXoB,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAeX,EAASoB,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAeX,EAAS,aAAc,CAAEsB,OAAO,GAAO,E,eCQvD,IAAIC,EAEX,G,sCAAuB,iBAAZpE,QACVoE,EAAiC,UAArBpE,QAAQqE,cACd,GAAyB,iBAAdC,UAAwB,CACzC,IAAIC,EAAYD,UAAUC,UAC1BH,EAAYG,EAAUC,QAAQ,YAAc,C,CCV7C,MAAMC,EAAiB,iBACjBC,EAAoB,MACpBC,EAAoB,QAE1B,SAASC,EAAanC,EAAUoC,GAG/B,IAAKpC,EAAIqC,QAAUD,EAClB,MAAM,IAAIE,MAAM,2DAA2DtC,EAAIuC,sBAAsBvC,EAAIjE,kBAAkBiE,EAAIwC,sBAAsBxC,EAAIyC,cAK1J,GAAIzC,EAAIqC,SAAWL,EAAeU,KAAK1C,EAAIqC,QAC1C,MAAM,IAAIC,MAAM,mDAQjB,GAAItC,EAAIjE,KACP,GAAIiE,EAAIuC,WACP,IAAKN,EAAkBS,KAAK1C,EAAIjE,MAC/B,MAAM,IAAIuG,MAAM,iJAGjB,GAAIJ,EAAkBQ,KAAK1C,EAAIjE,MAC9B,MAAM,IAAIuG,MAAM,4HAIpB,CAkCA,MAAMK,EAAS,GACTC,EAAS,IACTC,EAAU,+DAkBT,MAAMC,EAEZ,YAAOC,CAAMC,GACZ,OAAIA,aAAiBF,KAGhBE,GAGoC,iBAArBA,EAAOT,WACU,iBAApBS,EAAOP,UACS,iBAAhBO,EAAOjH,MACU,iBAAjBiH,EAAOR,OACW,iBAAlBQ,EAAOX,QACW,iBAAlBW,EAAOC,QACS,mBAAhBD,EAAOE,MACa,mBAApBF,EAAOG,QACzB,CAMSd,OAMAE,UAKAxG,KAKAyG,MAKAC,SAeT,YAAsBW,EAAsCb,EAAoBxG,EAAeyG,EAAgBC,EAAmBL,GAAmB,GAExH,iBAAjBgB,GACVC,KAAKhB,OAASe,EAAaf,QAAUM,EACrCU,KAAKd,UAAYa,EAAab,WAAaI,EAC3CU,KAAKtH,KAAOqH,EAAarH,MAAQ4G,EACjCU,KAAKb,MAAQY,EAAaZ,OAASG,EACnCU,KAAKZ,SAAWW,EAAaX,UAAYE,IAKzCU,KAAKhB,OAvHR,SAAoBA,EAAgBD,GACnC,OAAKC,GAAWD,EAGTC,EAFC,MAGT,CAkHiBiB,CAAWF,EAAchB,GACvCiB,KAAKd,UAAYA,GAAaI,EAC9BU,KAAKtH,KAjHR,SAA8BsG,EAAgBtG,GAM7C,OAAQsG,GACP,IAAK,QACL,IAAK,OACL,IAAK,OACCtG,EAEMA,EAAK,KAAO6G,IACtB7G,EAAO6G,EAAS7G,GAFhBA,EAAO6G,EAMV,OAAO7G,CACR,CA+FewH,CAAqBF,KAAKhB,OAAQtG,GAAQ4G,GACtDU,KAAKb,MAAQA,GAASG,EACtBU,KAAKZ,SAAWA,GAAYE,EAE5BR,EAAakB,KAAMjB,GAErB,CA4BA,UAAIa,GAIH,OAAOO,EAAYH,MAAM,EAC1B,CAIA,KAAKI,GAEJ,IAAKA,EACJ,OAAOJ,KAGR,IAAI,OAAEhB,EAAM,UAAEE,EAAS,KAAExG,EAAI,MAAEyG,EAAK,SAAEC,GAAagB,EA2BnD,YA1BenG,IAAX+E,EACHA,EAASgB,KAAKhB,OACO,OAAXA,IACVA,EAASM,QAEQrF,IAAdiF,EACHA,EAAYc,KAAKd,UACO,OAAdA,IACVA,EAAYI,QAEArF,IAATvB,EACHA,EAAOsH,KAAKtH,KACO,OAATA,IACVA,EAAO4G,QAEMrF,IAAVkF,EACHA,EAAQa,KAAKb,MACO,OAAVA,IACVA,EAAQG,QAEQrF,IAAbmF,EACHA,EAAWY,KAAKZ,SACO,OAAbA,IACVA,EAAWE,GAGRN,IAAWgB,KAAKhB,QAChBE,IAAcc,KAAKd,WACnBxG,IAASsH,KAAKtH,MACdyG,IAAUa,KAAKb,OACfC,IAAaY,KAAKZ,SAEdY,KAGD,IAAIK,EAAIrB,EAAQE,EAAWxG,EAAMyG,EAAOC,EAChD,CAUA,YAAO1C,CAAM2B,EAAeU,GAAmB,GAC9C,MAAMuB,EAAQd,EAAQe,KAAKlC,GAC3B,OAAKiC,EAGE,IAAID,EACVC,EAAM,IAAMhB,EACZkB,EAAcF,EAAM,IAAMhB,GAC1BkB,EAAcF,EAAM,IAAMhB,GAC1BkB,EAAcF,EAAM,IAAMhB,GAC1BkB,EAAcF,EAAM,IAAMhB,GAC1BP,GARO,IAAIsB,EAAIf,EAAQA,EAAQA,EAAQA,EAAQA,EAUjD,CAuBA,WAAOmB,CAAK/H,GAEX,IAAIwG,EAAYI,EAWhB,GANIhB,IACH5F,EAAOA,EAAKgI,QAAQ,MAAOnB,IAKxB7G,EAAK,KAAO6G,GAAU7G,EAAK,KAAO6G,EAAQ,CAC7C,MAAMoB,EAAMjI,EAAKgG,QAAQa,EAAQ,IACpB,IAAToB,GACHzB,EAAYxG,EAAKkI,UAAU,GAC3BlI,EAAO6G,IAEPL,EAAYxG,EAAKkI,UAAU,EAAGD,GAC9BjI,EAAOA,EAAKkI,UAAUD,IAAQpB,E,CAIhC,OAAO,IAAIc,EAAI,OAAQnB,EAAWxG,EAAM4G,EAAQA,EACjD,CAEA,WAAO5E,CAAKmG,GACX,MAAMC,EAAS,IAAIT,EAClBQ,EAAW7B,OACX6B,EAAW3B,UACX2B,EAAWnI,KACXmI,EAAW1B,MACX0B,EAAWzB,UAGZ,OADAN,EAAagC,GAAQ,GACdA,CACR,CAeA,QAAAhB,CAASiB,GAAwB,GAChC,OAAOC,EAAahB,KAAMe,EAC3B,CAEA,MAAAE,GACC,OAAOjB,IACR,CAMA,aAAOkB,CAAOC,GACb,GAAKA,EAEE,IAAIA,aAAgB1B,EAC1B,OAAO0B,EACD,CACN,MAAML,EAAS,IAAIT,EAAIc,GAGvB,OAFAL,EAAOM,WAAwBD,EAAME,SACrCP,EAAOQ,QAAqBH,EAAMI,OAASC,EAA4BL,EAAMvB,OAAS,KAC/EkB,C,EAPP,OAAYK,CASd,EAkBD,MAAMK,EAAiBlD,EAAY,OAAIrE,EAGvC,MAAMoG,UAAYZ,EAEjB2B,WAA4B,KAC5BE,QAAyB,KAEzB,UAAa1B,GAIZ,OAHKI,KAAKsB,UACTtB,KAAKsB,QAAUnB,EAAYH,MAAM,IAE3BA,KAAKsB,OACb,CAES,QAAAxB,CAASiB,GAAwB,GACzC,OAAKA,EAOGC,EAAahB,MAAM,IANrBA,KAAKoB,aACTpB,KAAKoB,WAAaJ,EAAahB,MAAM,IAE/BA,KAAKoB,WAKd,CAES,MAAAH,GACR,MAAMhI,EAAgB,CACrBwI,KAAM,GA0BP,OAvBIzB,KAAKsB,UACRrI,EAAI2G,OAASI,KAAKsB,QAClBrI,EAAIsI,KAAOC,GAERxB,KAAKoB,aACRnI,EAAIoI,SAAWrB,KAAKoB,YAGjBpB,KAAKtH,OACRO,EAAIP,KAAOsH,KAAKtH,MAEbsH,KAAKhB,SACR/F,EAAI+F,OAASgB,KAAKhB,QAEfgB,KAAKd,YACRjG,EAAIiG,UAAYc,KAAKd,WAElBc,KAAKb,QACRlG,EAAIkG,MAAQa,KAAKb,OAEda,KAAKZ,WACRnG,EAAImG,SAAWY,KAAKZ,UAEdnG,CACR,EAID,MAAMyI,EAAwC,CAC7C,GAAkB,MAClB,GAAkB,MAClB,GAAyB,MACzB,GAAiB,MACjB,GAA8B,MAC9B,GAA+B,MAC/B,GAAmB,MAEnB,GAA4B,MAC5B,GAAuB,MACvB,GAAsB,MACtB,GAAwB,MACxB,GAAsB,MACtB,GAAuB,MACvB,GAAqB,MACrB,GAAiB,MACjB,GAAkB,MAClB,GAAsB,MACtB,GAAmB,MAEnB,GAAkB,OAGnB,SAASC,EAAuBC,EAAsBC,EAAiBC,GACtE,IAAI7I,EACA8I,GAAmB,EAEvB,IAAK,IAAIC,EAAM,EAAGA,EAAMJ,EAAatI,OAAQ0I,IAAO,CACnD,MAAMhJ,EAAO4I,EAAarI,WAAWyI,GAGrC,GACEhJ,GAAQ,IAAcA,GAAQ,KAC3BA,GAAQ,IAAcA,GAAQ,IAC9BA,GAAQ,IAAmBA,GAAQ,IAC3B,KAATA,GACS,KAATA,GACS,KAATA,GACS,MAATA,GACC6I,GAAmB,KAAT7I,GACV8I,GAAwB,KAAT9I,GACf8I,GAAwB,KAAT9I,GACf8I,GAAwB,KAAT9I,GAGM,IAArB+I,IACH9I,GAAOgJ,mBAAmBL,EAAahB,UAAUmB,EAAiBC,IAClED,GAAmB,QAGR9H,IAARhB,IACHA,GAAO2I,EAAaM,OAAOF,QAGtB,MAEM/H,IAARhB,IACHA,EAAM2I,EAAaO,OAAO,EAAGH,IAI9B,MAAMI,EAAUV,EAAY1I,QACZiB,IAAZmI,IAGsB,IAArBL,IACH9I,GAAOgJ,mBAAmBL,EAAahB,UAAUmB,EAAiBC,IAClED,GAAmB,GAIpB9I,GAAOmJ,IAEwB,IAArBL,IAEVA,EAAkBC,E,EASrB,OAJyB,IAArBD,IACH9I,GAAOgJ,mBAAmBL,EAAahB,UAAUmB,UAGnC9H,IAARhB,EAAoBA,EAAM2I,CAClC,CAEA,SAASS,EAA0B3J,GAClC,IAAIO,EACJ,IAAK,IAAI+I,EAAM,EAAGA,EAAMtJ,EAAKY,OAAQ0I,IAAO,CAC3C,MAAMhJ,EAAON,EAAKa,WAAWyI,GAChB,KAAThJ,GAAmC,KAATA,QACjBiB,IAARhB,IACHA,EAAMP,EAAKyJ,OAAO,EAAGH,IAEtB/I,GAAOyI,EAAY1I,SAEPiB,IAARhB,IACHA,GAAOP,EAAKsJ,G,CAIf,YAAe/H,IAARhB,EAAoBA,EAAMP,CAClC,CAKO,SAASyH,EAAYmC,EAAUC,GAErC,IAAIlE,EAsBJ,OAnBCA,EAFGiE,EAAIpD,WAAaoD,EAAI5J,KAAKY,OAAS,GAAoB,SAAfgJ,EAAItD,OAEvC,KAAKsD,EAAIpD,YAAYoD,EAAI5J,OAEN,KAA3B4J,EAAI5J,KAAKa,WAAW,KAChB+I,EAAI5J,KAAKa,WAAW,IAAM,IAAc+I,EAAI5J,KAAKa,WAAW,IAAM,IAAc+I,EAAI5J,KAAKa,WAAW,IAAM,IAAc+I,EAAI5J,KAAKa,WAAW,IAAM,MACxH,KAA3B+I,EAAI5J,KAAKa,WAAW,GAElBgJ,EAIID,EAAI5J,KAAKyJ,OAAO,GAFhBG,EAAI5J,KAAK,GAAG8J,cAAgBF,EAAI5J,KAAKyJ,OAAO,GAM7CG,EAAI5J,KAET4F,IACHD,EAAQA,EAAMqC,QAAQ,MAAO,OAEvBrC,CACR,CAKA,SAAS2C,EAAasB,EAAUvB,GAE/B,MAAM0B,EAAW1B,EAEdsB,EADAV,EAGH,IAAI1I,EAAM,IACN,OAAE+F,EAAM,UAAEE,EAAS,KAAExG,EAAI,MAAEyG,EAAK,SAAEC,GAAakD,EASnD,GARItD,IACH/F,GAAO+F,EACP/F,GAAO,MAEJiG,GAAwB,SAAXF,KAChB/F,GAAOsG,EACPtG,GAAOsG,GAEJL,EAAW,CACd,IAAIyB,EAAMzB,EAAUR,QAAQ,KAC5B,IAAa,IAATiC,EAAY,CAEf,MAAM+B,EAAWxD,EAAUiD,OAAO,EAAGxB,GACrCzB,EAAYA,EAAUiD,OAAOxB,EAAM,GACnCA,EAAM+B,EAASjJ,YAAY,MACd,IAATkH,EACH1H,GAAOwJ,EAAQC,GAAU,GAAO,IAGhCzJ,GAAOwJ,EAAQC,EAASP,OAAO,EAAGxB,IAAM,GAAO,GAC/C1H,GAAO,IACPA,GAAOwJ,EAAQC,EAASP,OAAOxB,EAAM,IAAI,GAAO,IAEjD1H,GAAO,G,CAERiG,EAAYA,EAAUsD,cACtB7B,EAAMzB,EAAUzF,YAAY,MACf,IAATkH,EACH1H,GAAOwJ,EAAQvD,GAAW,GAAO,IAGjCjG,GAAOwJ,EAAQvD,EAAUiD,OAAO,EAAGxB,IAAM,GAAO,GAChD1H,GAAOiG,EAAUiD,OAAOxB,G,CAG1B,GAAIjI,EAAM,CAET,GAAIA,EAAKY,QAAU,GAA4B,KAAvBZ,EAAKa,WAAW,IAAgD,KAAvBb,EAAKa,WAAW,GAAuB,CACvG,MAAMP,EAAON,EAAKa,WAAW,GACzBP,GAAQ,IAAcA,GAAQ,KACjCN,EAAO,IAAIiK,OAAOC,aAAa5J,EAAO,OAAON,EAAKyJ,OAAO,K,MAEpD,GAAIzJ,EAAKY,QAAU,GAA4B,KAAvBZ,EAAKa,WAAW,GAAuB,CACrE,MAAMP,EAAON,EAAKa,WAAW,GACzBP,GAAQ,IAAcA,GAAQ,KACjCN,EAAO,GAAGiK,OAAOC,aAAa5J,EAAO,OAAON,EAAKyJ,OAAO,K,CAI1DlJ,GAAOwJ,EAAQ/J,GAAM,GAAM,E,CAU5B,OARIyG,IACHlG,GAAO,IACPA,GAAOwJ,EAAQtD,GAAO,GAAO,IAE1BC,IACHnG,GAAO,IACPA,GAAQ8H,EAAgE3B,EAAjDuC,EAAuBvC,GAAU,GAAO,IAEzDnG,CACR,CAIA,SAAS4J,EAA2BC,GACnC,IACC,OAAOC,mBAAmBD,E,CACzB,MACD,OAAIA,EAAIxJ,OAAS,EACTwJ,EAAIX,OAAO,EAAG,GAAKU,EAA2BC,EAAIX,OAAO,IAEzDW,C,CAGV,CAEA,MAAME,EAAiB,8BAEvB,SAASxC,EAAcsC,GACtB,OAAKA,EAAIxC,MAAM0C,GAGRF,EAAIpC,QAAQsC,GAAiB1C,GAAUuC,EAA2BvC,KAFjEwC,CAGT,C,aCjqBA,MAAMG,EAAY,SAAkB,EAC9BC,EAAQ,IAEP,IAAUC,GAAjB,SAAiBA,GAeG,EAAAC,SAAhB,SAAyBd,KAAae,GAClC,OAAOf,EAAIzC,KAAK,CAAEnH,KAAMuK,EAAU3I,KAAKgI,EAAI5J,QAAS2K,IACxD,EAgBgB,EAAAC,YAAhB,SAA4BhB,KAAae,GACrC,IAAI3K,EAAO4J,EAAI5J,KACX6K,GAAa,EACb7K,EAAK,KAAOwK,IACZxK,EAAOwK,EAAQxK,EACf6K,GAAa,GAEjB,IAAIzJ,EAAemJ,EAAUrJ,QAAQlB,KAAS2K,GAI9C,OAHIE,GAAczJ,EAAa,KAAOoJ,IAAUZ,EAAIpD,YAChDpF,EAAeA,EAAa8G,UAAU,IAEnC0B,EAAIzC,KAAK,CAAEnH,KAAMoB,GAC5B,EAUgB,EAAAuB,QAAhB,SAAwBiH,GACpB,GAAwB,IAApBA,EAAI5J,KAAKY,QAAgBgJ,EAAI5J,OAASwK,EACtC,OAAOZ,EAEX,IAAI5J,EAAOuK,EAAU5H,QAAQiH,EAAI5J,MAIjC,OAHoB,IAAhBA,EAAKY,QAAuC,KAAvBZ,EAAKa,WAAW,KACrCb,EAAO,IAEJ4J,EAAIzC,KAAK,CAAEnH,QACtB,EAUgB,EAAA+C,SAAhB,SAAyB6G,GACrB,OAAOW,EAAUxH,SAAS6G,EAAI5J,KAClC,EAUgB,EAAAoD,QAAhB,SAAwBwG,GACpB,OAAOW,EAAUnH,QAAQwG,EAAI5J,KACjC,CACH,CAzFD,CAAiByK,IAAAA,EAAK,I","sources":["webpack://LIB/./node_modules/path-browserify/index.js","webpack://LIB/webpack/bootstrap","webpack://LIB/webpack/runtime/define property getters","webpack://LIB/webpack/runtime/hasOwnProperty shorthand","webpack://LIB/webpack/runtime/make namespace object","webpack://LIB/./src/platform.ts","webpack://LIB/./src/uri.ts","webpack://LIB/./src/utils.ts"],"sourcesContent":["// 'path' module extracted from Node.js v8.11.1 (only the posix part)\n// transplited with Babel\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));\n }\n}\n\n// Resolves . and .. elements in a path with directory names\nfunction normalizeStringPosix(path, allowAboveRoot) {\n var res = '';\n var lastSegmentLength = 0;\n var lastSlash = -1;\n var dots = 0;\n var code;\n for (var i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = path.charCodeAt(i);\n else if (code === 47 /*/*/)\n break;\n else\n code = 47 /*/*/;\n if (code === 47 /*/*/) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n if (res.length > 2) {\n var lastSlashIndex = res.lastIndexOf('/');\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n } else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0)\n res += '/..';\n else\n res = '..';\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0)\n res += '/' + path.slice(lastSlash + 1, i);\n else\n res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\nfunction _format(sep, pathObject) {\n var dir = pathObject.dir || pathObject.root;\n var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');\n if (!dir) {\n return base;\n }\n if (dir === pathObject.root) {\n return dir + base;\n }\n return dir + sep + base;\n}\n\nvar posix = {\n // path.resolve([from ...], to)\n resolve: function resolve() {\n var resolvedPath = '';\n var resolvedAbsolute = false;\n var cwd;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path;\n if (i >= 0)\n path = arguments[i];\n else {\n if (cwd === undefined)\n cwd = process.cwd();\n path = cwd;\n }\n\n assertPath(path);\n\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0)\n return '/' + resolvedPath;\n else\n return '/';\n } else if (resolvedPath.length > 0) {\n return resolvedPath;\n } else {\n return '.';\n }\n },\n\n normalize: function normalize(path) {\n assertPath(path);\n\n if (path.length === 0) return '.';\n\n var isAbsolute = path.charCodeAt(0) === 47 /*/*/;\n var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;\n\n // Normalize the path\n path = normalizeStringPosix(path, !isAbsolute);\n\n if (path.length === 0 && !isAbsolute) path = '.';\n if (path.length > 0 && trailingSeparator) path += '/';\n\n if (isAbsolute) return '/' + path;\n return path;\n },\n\n isAbsolute: function isAbsolute(path) {\n assertPath(path);\n return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;\n },\n\n join: function join() {\n if (arguments.length === 0)\n return '.';\n var joined;\n for (var i = 0; i < arguments.length; ++i) {\n var arg = arguments[i];\n assertPath(arg);\n if (arg.length > 0) {\n if (joined === undefined)\n joined = arg;\n else\n joined += '/' + arg;\n }\n }\n if (joined === undefined)\n return '.';\n return posix.normalize(joined);\n },\n\n relative: function relative(from, to) {\n assertPath(from);\n assertPath(to);\n\n if (from === to) return '';\n\n from = posix.resolve(from);\n to = posix.resolve(to);\n\n if (from === to) return '';\n\n // Trim any leading backslashes\n var fromStart = 1;\n for (; fromStart < from.length; ++fromStart) {\n if (from.charCodeAt(fromStart) !== 47 /*/*/)\n break;\n }\n var fromEnd = from.length;\n var fromLen = fromEnd - fromStart;\n\n // Trim any leading backslashes\n var toStart = 1;\n for (; toStart < to.length; ++toStart) {\n if (to.charCodeAt(toStart) !== 47 /*/*/)\n break;\n }\n var toEnd = to.length;\n var toLen = toEnd - toStart;\n\n // Compare paths to find the longest common path from root\n var length = fromLen < toLen ? fromLen : toLen;\n var lastCommonSep = -1;\n var i = 0;\n for (; i <= length; ++i) {\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === 47 /*/*/) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n } else if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n } else if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === 47 /*/*/) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n } else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo'; to='/'\n lastCommonSep = 0;\n }\n }\n break;\n }\n var fromCode = from.charCodeAt(fromStart + i);\n var toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode)\n break;\n else if (fromCode === 47 /*/*/)\n lastCommonSep = i;\n }\n\n var out = '';\n // Generate the relative path based on the path difference between `to`\n // and `from`\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {\n if (out.length === 0)\n out += '..';\n else\n out += '/..';\n }\n }\n\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0)\n return out + to.slice(toStart + lastCommonSep);\n else {\n toStart += lastCommonSep;\n if (to.charCodeAt(toStart) === 47 /*/*/)\n ++toStart;\n return to.slice(toStart);\n }\n },\n\n _makeLong: function _makeLong(path) {\n return path;\n },\n\n dirname: function dirname(path) {\n assertPath(path);\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) return '//';\n return path.slice(0, end);\n },\n\n basename: function basename(path, ext) {\n if (ext !== undefined && typeof ext !== 'string') throw new TypeError('\"ext\" argument must be a string');\n assertPath(path);\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext.length === path.length && ext === path) return '';\n var extIdx = ext.length - 1;\n var firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n\n if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;\n return path.slice(start, end);\n } else {\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n }\n },\n\n extname: function extname(path) {\n assertPath(path);\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n },\n\n format: function format(pathObject) {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new TypeError('The \"pathObject\" argument must be of type Object. Received type ' + typeof pathObject);\n }\n return _format('/', pathObject);\n },\n\n parse: function parse(path) {\n assertPath(path);\n\n var ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) return ret;\n var code = path.charCodeAt(0);\n var isAbsolute = code === 47 /*/*/;\n var start;\n if (isAbsolute) {\n ret.root = '/';\n start = 1;\n } else {\n start = 0;\n }\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n var i = path.length - 1;\n\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n\n // Get non-dir info\n for (; i >= start; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);\n }\n } else {\n if (startPart === 0 && isAbsolute) {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n\n if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';\n\n return ret;\n },\n\n sep: '/',\n delimiter: ':',\n win32: null,\n posix: null\n};\n\nposix.posix = posix;\n\nmodule.exports = posix;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\n// !!!!!\n// SEE https://github.com/microsoft/vscode/blob/master/src/vs/base/common/platform.ts\n// !!!!!\n\ndeclare const process: { platform: 'win32' };\ndeclare const navigator: { userAgent: string };\n\nexport let isWindows: boolean;\n\nif (typeof process === 'object') {\n\tisWindows = process.platform === 'win32';\n} else if (typeof navigator === 'object') {\n\tlet userAgent = navigator.userAgent;\n\tisWindows = userAgent.indexOf('Windows') >= 0;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nimport { CharCode } from './charCode'\nimport { isWindows } from './platform';\n\nconst _schemePattern = /^\\w[\\w\\d+.-]*$/;\nconst _singleSlashStart = /^\\//;\nconst _doubleSlashStart = /^\\/\\//;\n\nfunction _validateUri(ret: URI, _strict?: boolean): void {\n\n\t// scheme, must be set\n\tif (!ret.scheme && _strict) {\n\t\tthrow new Error(`[UriError]: Scheme is missing: {scheme: \"\", authority: \"${ret.authority}\", path: \"${ret.path}\", query: \"${ret.query}\", fragment: \"${ret.fragment}\"}`);\n\t}\n\n\t// scheme, https://tools.ietf.org/html/rfc3986#section-3.1\n\t// ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\n\tif (ret.scheme && !_schemePattern.test(ret.scheme)) {\n\t\tthrow new Error('[UriError]: Scheme contains illegal characters.');\n\t}\n\n\t// path, http://tools.ietf.org/html/rfc3986#section-3.3\n\t// If a URI contains an authority component, then the path component\n\t// must either be empty or begin with a slash (\"/\") character. If a URI\n\t// does not contain an authority component, then the path cannot begin\n\t// with two slash characters (\"//\").\n\tif (ret.path) {\n\t\tif (ret.authority) {\n\t\t\tif (!_singleSlashStart.test(ret.path)) {\n\t\t\t\tthrow new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character');\n\t\t\t}\n\t\t} else {\n\t\t\tif (_doubleSlashStart.test(ret.path)) {\n\t\t\t\tthrow new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")');\n\t\t\t}\n\t\t}\n\t}\n}\n\n// for a while we allowed uris *without* schemes and this is the migration\n// for them, e.g. an uri without scheme and without strict-mode warns and falls\n// back to the file-scheme. that should cause the least carnage and still be a\n// clear warning\nfunction _schemeFix(scheme: string, _strict: boolean): string {\n\tif (!scheme && !_strict) {\n\t\treturn 'file';\n\t}\n\treturn scheme;\n}\n\n// implements a bit of https://tools.ietf.org/html/rfc3986#section-5\nfunction _referenceResolution(scheme: string, path: string): string {\n\n\t// the slash-character is our 'default base' as we don't\n\t// support constructing URIs relative to other URIs. This\n\t// also means that we alter and potentially break paths.\n\t// see https://tools.ietf.org/html/rfc3986#section-5.1.4\n\tswitch (scheme) {\n\t\tcase 'https':\n\t\tcase 'http':\n\t\tcase 'file':\n\t\t\tif (!path) {\n\t\t\t\tpath = _slash;\n\t\t\t} else if (path[0] !== _slash) {\n\t\t\t\tpath = _slash + path;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn path;\n}\n\nconst _empty = '';\nconst _slash = '/';\nconst _regexp = /^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\n\n/**\n * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.\n * This class is a simple parser which creates the basic component parts\n * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation\n * and encoding.\n *\n * ```txt\n * foo://example.com:8042/over/there?name=ferret#nose\n * \\_/ \\______________/\\_________/ \\_________/ \\__/\n * | | | | |\n * scheme authority path query fragment\n * | _____________________|__\n * / \\ / \\\n * urn:example:animal:ferret:nose\n * ```\n */\nexport class URI implements UriComponents {\n\n\tstatic isUri(thing: any): thing is URI {\n\t\tif (thing instanceof URI) {\n\t\t\treturn true;\n\t\t}\n\t\tif (!thing) {\n\t\t\treturn false;\n\t\t}\n\t\treturn typeof (thing).authority === 'string'\n\t\t\t&& typeof (thing).fragment === 'string'\n\t\t\t&& typeof (thing).path === 'string'\n\t\t\t&& typeof (thing).query === 'string'\n\t\t\t&& typeof (thing).scheme === 'string'\n\t\t\t&& typeof (thing).fsPath === 'string'\n\t\t\t&& typeof (thing).with === 'function'\n\t\t\t&& typeof (thing).toString === 'function';\n\t}\n\n\t/**\n\t * scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.\n\t * The part before the first colon.\n\t */\n\treadonly scheme: string;\n\n\t/**\n\t * authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'.\n\t * The part between the first double slashes and the next slash.\n\t */\n\treadonly authority: string;\n\n\t/**\n\t * path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly path: string;\n\n\t/**\n\t * query is the 'query' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly query: string;\n\n\t/**\n\t * fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly fragment: string;\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean);\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(components: UriComponents);\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(schemeOrData: string | UriComponents, authority?: string, path?: string, query?: string, fragment?: string, _strict: boolean = false) {\n\n\t\tif (typeof schemeOrData === 'object') {\n\t\t\tthis.scheme = schemeOrData.scheme || _empty;\n\t\t\tthis.authority = schemeOrData.authority || _empty;\n\t\t\tthis.path = schemeOrData.path || _empty;\n\t\t\tthis.query = schemeOrData.query || _empty;\n\t\t\tthis.fragment = schemeOrData.fragment || _empty;\n\t\t\t// no validation because it's this URI\n\t\t\t// that creates uri components.\n\t\t\t// _validateUri(this);\n\t\t} else {\n\t\t\tthis.scheme = _schemeFix(schemeOrData, _strict);\n\t\t\tthis.authority = authority || _empty;\n\t\t\tthis.path = _referenceResolution(this.scheme, path || _empty);\n\t\t\tthis.query = query || _empty;\n\t\t\tthis.fragment = fragment || _empty;\n\n\t\t\t_validateUri(this, _strict);\n\t\t}\n\t}\n\n\t// ---- filesystem path -----------------------\n\n\t/**\n\t * Returns a string representing the corresponding file system path of this URI.\n\t * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the\n\t * platform specific path separator.\n\t *\n\t * * Will *not* validate the path for invalid characters and semantics.\n\t * * Will *not* look at the scheme of this URI.\n\t * * The result shall *not* be used for display purposes but for accessing a file on disk.\n\t *\n\t *\n\t * The *difference* to `URI#path` is the use of the platform specific separator and the handling\n\t * of UNC paths. See the below sample of a file-uri with an authority (UNC path).\n\t *\n\t * ```ts\n\t\tconst u = URI.parse('file://server/c$/folder/file.txt')\n\t\tu.authority === 'server'\n\t\tu.path === '/shares/c$/file.txt'\n\t\tu.fsPath === '\\\\server\\c$\\folder\\file.txt'\n\t```\n\t *\n\t * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,\n\t * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working\n\t * with URIs that represent files on disk (`file` scheme).\n\t */\n\tget fsPath(): string {\n\t\t// if (this.scheme !== 'file') {\n\t\t// \tconsole.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);\n\t\t// }\n\t\treturn uriToFsPath(this, false);\n\t}\n\n\t// ---- modify to new -------------------------\n\n\twith(change: { scheme?: string; authority?: string | null; path?: string | null; query?: string | null; fragment?: string | null }): URI {\n\n\t\tif (!change) {\n\t\t\treturn this;\n\t\t}\n\n\t\tlet { scheme, authority, path, query, fragment } = change;\n\t\tif (scheme === undefined) {\n\t\t\tscheme = this.scheme;\n\t\t} else if (scheme === null) {\n\t\t\tscheme = _empty;\n\t\t}\n\t\tif (authority === undefined) {\n\t\t\tauthority = this.authority;\n\t\t} else if (authority === null) {\n\t\t\tauthority = _empty;\n\t\t}\n\t\tif (path === undefined) {\n\t\t\tpath = this.path;\n\t\t} else if (path === null) {\n\t\t\tpath = _empty;\n\t\t}\n\t\tif (query === undefined) {\n\t\t\tquery = this.query;\n\t\t} else if (query === null) {\n\t\t\tquery = _empty;\n\t\t}\n\t\tif (fragment === undefined) {\n\t\t\tfragment = this.fragment;\n\t\t} else if (fragment === null) {\n\t\t\tfragment = _empty;\n\t\t}\n\n\t\tif (scheme === this.scheme\n\t\t\t&& authority === this.authority\n\t\t\t&& path === this.path\n\t\t\t&& query === this.query\n\t\t\t&& fragment === this.fragment) {\n\n\t\t\treturn this;\n\t\t}\n\n\t\treturn new Uri(scheme, authority, path, query, fragment);\n\t}\n\n\t// ---- parse & validate ------------------------\n\n\t/**\n\t * Creates a new URI from a string, e.g. `http://www.example.com/some/path`,\n\t * `file:///usr/home`, or `scheme:with/path`.\n\t *\n\t * @param value A string which represents an URI (see `URI#toString`).\n\t */\n\tstatic parse(value: string, _strict: boolean = false): URI {\n\t\tconst match = _regexp.exec(value);\n\t\tif (!match) {\n\t\t\treturn new Uri(_empty, _empty, _empty, _empty, _empty);\n\t\t}\n\t\treturn new Uri(\n\t\t\tmatch[2] || _empty,\n\t\t\tpercentDecode(match[4] || _empty),\n\t\t\tpercentDecode(match[5] || _empty),\n\t\t\tpercentDecode(match[7] || _empty),\n\t\t\tpercentDecode(match[9] || _empty),\n\t\t\t_strict\n\t\t);\n\t}\n\n\t/**\n\t * Creates a new URI from a file system path, e.g. `c:\\my\\files`,\n\t * `/usr/home`, or `\\\\server\\share\\some\\path`.\n\t *\n\t * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument\n\t * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**\n\t * `URI.parse('file://' + path)` because the path might contain characters that are\n\t * interpreted (# and ?). See the following sample:\n\t * ```ts\n\tconst good = URI.file('/coding/c#/project1');\n\tgood.scheme === 'file';\n\tgood.path === '/coding/c#/project1';\n\tgood.fragment === '';\n\tconst bad = URI.parse('file://' + '/coding/c#/project1');\n\tbad.scheme === 'file';\n\tbad.path === '/coding/c'; // path is now broken\n\tbad.fragment === '/project1';\n\t```\n\t *\n\t * @param path A file system path (see `URI#fsPath`)\n\t */\n\tstatic file(path: string): URI {\n\n\t\tlet authority = _empty;\n\n\t\t// normalize to fwd-slashes on windows,\n\t\t// on other systems bwd-slashes are valid\n\t\t// filename character, eg /f\\oo/ba\\r.txt\n\t\tif (isWindows) {\n\t\t\tpath = path.replace(/\\\\/g, _slash);\n\t\t}\n\n\t\t// check for authority as used in UNC shares\n\t\t// or use the path as given\n\t\tif (path[0] === _slash && path[1] === _slash) {\n\t\t\tconst idx = path.indexOf(_slash, 2);\n\t\t\tif (idx === -1) {\n\t\t\t\tauthority = path.substring(2);\n\t\t\t\tpath = _slash;\n\t\t\t} else {\n\t\t\t\tauthority = path.substring(2, idx);\n\t\t\t\tpath = path.substring(idx) || _slash;\n\t\t\t}\n\t\t}\n\n\t\treturn new Uri('file', authority, path, _empty, _empty);\n\t}\n\n\tstatic from(components: { scheme: string; authority?: string; path?: string; query?: string; fragment?: string }): URI {\n\t\tconst result = new Uri(\n\t\t\tcomponents.scheme,\n\t\t\tcomponents.authority,\n\t\t\tcomponents.path,\n\t\t\tcomponents.query,\n\t\t\tcomponents.fragment,\n\t\t);\n\t\t_validateUri(result, true);\n\t\treturn result;\n\t}\n\n\t// ---- printing/externalize ---------------------------\n\n\t/**\n\t * Creates a string representation for this URI. It's guaranteed that calling\n\t * `URI.parse` with the result of this function creates an URI which is equal\n\t * to this URI.\n\t *\n\t * * The result shall *not* be used for display purposes but for externalization or transport.\n\t * * The result will be encoded using the percentage encoding and encoding happens mostly\n\t * ignore the scheme-specific encoding rules.\n\t *\n\t * @param skipEncoding Do not encode the result, default is `false`\n\t */\n\ttoString(skipEncoding: boolean = false): string {\n\t\treturn _asFormatted(this, skipEncoding);\n\t}\n\n\ttoJSON(): UriComponents {\n\t\treturn this;\n\t}\n\n\tstatic revive(data: UriComponents | URI): URI;\n\tstatic revive(data: UriComponents | URI | undefined): URI | undefined;\n\tstatic revive(data: UriComponents | URI | null): URI | null;\n\tstatic revive(data: UriComponents | URI | undefined | null): URI | undefined | null;\n\tstatic revive(data: UriComponents | URI | undefined | null): URI | undefined | null {\n\t\tif (!data) {\n\t\t\treturn data;\n\t\t} else if (data instanceof URI) {\n\t\t\treturn data;\n\t\t} else {\n\t\t\tconst result = new Uri(data);\n\t\t\tresult._formatted = (data).external;\n\t\t\tresult._fsPath = (data)._sep === _pathSepMarker ? (data).fsPath : null;\n\t\t\treturn result;\n\t\t}\n\t}\n}\n\nexport interface UriComponents {\n\tscheme: string;\n\tauthority: string;\n\tpath: string;\n\tquery: string;\n\tfragment: string;\n}\n\ninterface UriState extends UriComponents {\n\t$mid: number;\n\texternal: string;\n\tfsPath: string;\n\t_sep: 1 | undefined;\n}\n\nconst _pathSepMarker = isWindows ? 1 : undefined;\n\n// This class exists so that URI is compatible with vscode.Uri (API).\nclass Uri extends URI {\n\n\t_formatted: string | null = null;\n\t_fsPath: string | null = null;\n\n\toverride get fsPath(): string {\n\t\tif (!this._fsPath) {\n\t\t\tthis._fsPath = uriToFsPath(this, false);\n\t\t}\n\t\treturn this._fsPath;\n\t}\n\n\toverride toString(skipEncoding: boolean = false): string {\n\t\tif (!skipEncoding) {\n\t\t\tif (!this._formatted) {\n\t\t\t\tthis._formatted = _asFormatted(this, false);\n\t\t\t}\n\t\t\treturn this._formatted;\n\t\t} else {\n\t\t\t// we don't cache that\n\t\t\treturn _asFormatted(this, true);\n\t\t}\n\t}\n\n\toverride toJSON(): UriComponents {\n\t\tconst res = {\n\t\t\t$mid: 1\n\t\t};\n\t\t// cached state\n\t\tif (this._fsPath) {\n\t\t\tres.fsPath = this._fsPath;\n\t\t\tres._sep = _pathSepMarker;\n\t\t}\n\t\tif (this._formatted) {\n\t\t\tres.external = this._formatted;\n\t\t}\n\t\t// uri components\n\t\tif (this.path) {\n\t\t\tres.path = this.path;\n\t\t}\n\t\tif (this.scheme) {\n\t\t\tres.scheme = this.scheme;\n\t\t}\n\t\tif (this.authority) {\n\t\t\tres.authority = this.authority;\n\t\t}\n\t\tif (this.query) {\n\t\t\tres.query = this.query;\n\t\t}\n\t\tif (this.fragment) {\n\t\t\tres.fragment = this.fragment;\n\t\t}\n\t\treturn res;\n\t}\n}\n\n// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2\nconst encodeTable: { [ch: number]: string } = {\n\t[CharCode.Colon]: '%3A', // gen-delims\n\t[CharCode.Slash]: '%2F',\n\t[CharCode.QuestionMark]: '%3F',\n\t[CharCode.Hash]: '%23',\n\t[CharCode.OpenSquareBracket]: '%5B',\n\t[CharCode.CloseSquareBracket]: '%5D',\n\t[CharCode.AtSign]: '%40',\n\n\t[CharCode.ExclamationMark]: '%21', // sub-delims\n\t[CharCode.DollarSign]: '%24',\n\t[CharCode.Ampersand]: '%26',\n\t[CharCode.SingleQuote]: '%27',\n\t[CharCode.OpenParen]: '%28',\n\t[CharCode.CloseParen]: '%29',\n\t[CharCode.Asterisk]: '%2A',\n\t[CharCode.Plus]: '%2B',\n\t[CharCode.Comma]: '%2C',\n\t[CharCode.Semicolon]: '%3B',\n\t[CharCode.Equals]: '%3D',\n\n\t[CharCode.Space]: '%20',\n};\n\nfunction encodeURIComponentFast(uriComponent: string, isPath: boolean, isAuthority: boolean): string {\n\tlet res: string | undefined = undefined;\n\tlet nativeEncodePos = -1;\n\n\tfor (let pos = 0; pos < uriComponent.length; pos++) {\n\t\tconst code = uriComponent.charCodeAt(pos);\n\n\t\t// unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3\n\t\tif (\n\t\t\t(code >= CharCode.a && code <= CharCode.z)\n\t\t\t|| (code >= CharCode.A && code <= CharCode.Z)\n\t\t\t|| (code >= CharCode.Digit0 && code <= CharCode.Digit9)\n\t\t\t|| code === CharCode.Dash\n\t\t\t|| code === CharCode.Period\n\t\t\t|| code === CharCode.Underline\n\t\t\t|| code === CharCode.Tilde\n\t\t\t|| (isPath && code === CharCode.Slash)\n\t\t\t|| (isAuthority && code === CharCode.OpenSquareBracket)\n\t\t\t|| (isAuthority && code === CharCode.CloseSquareBracket)\n\t\t\t|| (isAuthority && code === CharCode.Colon)\n\t\t) {\n\t\t\t// check if we are delaying native encode\n\t\t\tif (nativeEncodePos !== -1) {\n\t\t\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n\t\t\t\tnativeEncodePos = -1;\n\t\t\t}\n\t\t\t// check if we write into a new string (by default we try to return the param)\n\t\t\tif (res !== undefined) {\n\t\t\t\tres += uriComponent.charAt(pos);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// encoding needed, we need to allocate a new string\n\t\t\tif (res === undefined) {\n\t\t\t\tres = uriComponent.substr(0, pos);\n\t\t\t}\n\n\t\t\t// check with default table first\n\t\t\tconst escaped = encodeTable[code];\n\t\t\tif (escaped !== undefined) {\n\n\t\t\t\t// check if we are delaying native encode\n\t\t\t\tif (nativeEncodePos !== -1) {\n\t\t\t\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n\t\t\t\t\tnativeEncodePos = -1;\n\t\t\t\t}\n\n\t\t\t\t// append escaped variant to result\n\t\t\t\tres += escaped;\n\n\t\t\t} else if (nativeEncodePos === -1) {\n\t\t\t\t// use native encode only when needed\n\t\t\t\tnativeEncodePos = pos;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (nativeEncodePos !== -1) {\n\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos));\n\t}\n\n\treturn res !== undefined ? res : uriComponent;\n}\n\nfunction encodeURIComponentMinimal(path: string): string {\n\tlet res: string | undefined = undefined;\n\tfor (let pos = 0; pos < path.length; pos++) {\n\t\tconst code = path.charCodeAt(pos);\n\t\tif (code === CharCode.Hash || code === CharCode.QuestionMark) {\n\t\t\tif (res === undefined) {\n\t\t\t\tres = path.substr(0, pos);\n\t\t\t}\n\t\t\tres += encodeTable[code];\n\t\t} else {\n\t\t\tif (res !== undefined) {\n\t\t\t\tres += path[pos];\n\t\t\t}\n\t\t}\n\t}\n\treturn res !== undefined ? res : path;\n}\n\n/**\n * Compute `fsPath` for the given uri\n */\nexport function uriToFsPath(uri: URI, keepDriveLetterCasing: boolean): string {\n\n\tlet value: string;\n\tif (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {\n\t\t// unc path: file://shares/c$/far/boo\n\t\tvalue = `//${uri.authority}${uri.path}`;\n\t} else if (\n\t\turi.path.charCodeAt(0) === CharCode.Slash\n\t\t&& (uri.path.charCodeAt(1) >= CharCode.A && uri.path.charCodeAt(1) <= CharCode.Z || uri.path.charCodeAt(1) >= CharCode.a && uri.path.charCodeAt(1) <= CharCode.z)\n\t\t&& uri.path.charCodeAt(2) === CharCode.Colon\n\t) {\n\t\tif (!keepDriveLetterCasing) {\n\t\t\t// windows drive letter: file:///c:/far/boo\n\t\t\tvalue = uri.path[1].toLowerCase() + uri.path.substr(2);\n\t\t} else {\n\t\t\tvalue = uri.path.substr(1);\n\t\t}\n\t} else {\n\t\t// other path\n\t\tvalue = uri.path;\n\t}\n\tif (isWindows) {\n\t\tvalue = value.replace(/\\//g, '\\\\');\n\t}\n\treturn value;\n}\n\n/**\n * Create the external version of a uri\n */\nfunction _asFormatted(uri: URI, skipEncoding: boolean): string {\n\n\tconst encoder = !skipEncoding\n\t\t? encodeURIComponentFast\n\t\t: encodeURIComponentMinimal;\n\n\tlet res = '';\n\tlet { scheme, authority, path, query, fragment } = uri;\n\tif (scheme) {\n\t\tres += scheme;\n\t\tres += ':';\n\t}\n\tif (authority || scheme === 'file') {\n\t\tres += _slash;\n\t\tres += _slash;\n\t}\n\tif (authority) {\n\t\tlet idx = authority.indexOf('@');\n\t\tif (idx !== -1) {\n\t\t\t// @\n\t\t\tconst userinfo = authority.substr(0, idx);\n\t\t\tauthority = authority.substr(idx + 1);\n\t\t\tidx = userinfo.lastIndexOf(':');\n\t\t\tif (idx === -1) {\n\t\t\t\tres += encoder(userinfo, false, false);\n\t\t\t} else {\n\t\t\t\t// :@\n\t\t\t\tres += encoder(userinfo.substr(0, idx), false, false);\n\t\t\t\tres += ':';\n\t\t\t\tres += encoder(userinfo.substr(idx + 1), false, true);\n\t\t\t}\n\t\t\tres += '@';\n\t\t}\n\t\tauthority = authority.toLowerCase();\n\t\tidx = authority.lastIndexOf(':');\n\t\tif (idx === -1) {\n\t\t\tres += encoder(authority, false, true);\n\t\t} else {\n\t\t\t// :\n\t\t\tres += encoder(authority.substr(0, idx), false, true);\n\t\t\tres += authority.substr(idx);\n\t\t}\n\t}\n\tif (path) {\n\t\t// lower-case windows drive letters in /C:/fff or C:/fff\n\t\tif (path.length >= 3 && path.charCodeAt(0) === CharCode.Slash && path.charCodeAt(2) === CharCode.Colon) {\n\t\t\tconst code = path.charCodeAt(1);\n\t\t\tif (code >= CharCode.A && code <= CharCode.Z) {\n\t\t\t\tpath = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`; // \"/c:\".length === 3\n\t\t\t}\n\t\t} else if (path.length >= 2 && path.charCodeAt(1) === CharCode.Colon) {\n\t\t\tconst code = path.charCodeAt(0);\n\t\t\tif (code >= CharCode.A && code <= CharCode.Z) {\n\t\t\t\tpath = `${String.fromCharCode(code + 32)}:${path.substr(2)}`; // \"/c:\".length === 3\n\t\t\t}\n\t\t}\n\t\t// encode the rest of the path\n\t\tres += encoder(path, true, false);\n\t}\n\tif (query) {\n\t\tres += '?';\n\t\tres += encoder(query, false, false);\n\t}\n\tif (fragment) {\n\t\tres += '#';\n\t\tres += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment;\n\t}\n\treturn res;\n}\n\n// --- decode\n\nfunction decodeURIComponentGraceful(str: string): string {\n\ttry {\n\t\treturn decodeURIComponent(str);\n\t} catch {\n\t\tif (str.length > 3) {\n\t\t\treturn str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));\n\t\t} else {\n\t\t\treturn str;\n\t\t}\n\t}\n}\n\nconst _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;\n\nfunction percentDecode(str: string): string {\n\tif (!str.match(_rEncodedAsHex)) {\n\t\treturn str;\n\t}\n\treturn str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match));\n}\n\n/**\n * Mapped-type that replaces all occurrences of URI with UriComponents\n */\nexport type UriDto = { [K in keyof T]: T[K] extends URI\n\t? UriComponents\n\t: UriDto };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n'use strict';\n\nimport { CharCode } from './charCode';\nimport { URI } from './uri';\nimport * as nodePath from 'path';\n\nconst posixPath = nodePath.posix || nodePath;\nconst slash = '/';\n\nexport namespace Utils {\n\n /**\n * Joins one or more input paths to the path of URI. \n * '/' is used as the directory separation character. \n * \n * The resolved path will be normalized. That means:\n * - all '..' and '.' segments are resolved.\n * - multiple, sequential occurences of '/' are replaced by a single instance of '/'.\n * - trailing separators are preserved.\n * \n * @param uri The input URI.\n * @param paths The paths to be joined with the path of URI.\n * @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.\n */\n export function joinPath(uri: URI, ...paths: string[]): URI {\n return uri.with({ path: posixPath.join(uri.path, ...paths) });\n }\n\n\n /**\n * Resolves one or more paths against the path of a URI. \n * '/' is used as the directory separation character. \n * \n * The resolved path will be normalized. That means:\n * - all '..' and '.' segments are resolved. \n * - multiple, sequential occurences of '/' are replaced by a single instance of '/'.\n * - trailing separators are removed.\n * \n * @param uri The input URI.\n * @param paths The paths to resolve against the path of URI.\n * @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.\n */\n export function resolvePath(uri: URI, ...paths: string[]): URI {\n let path = uri.path; \n let slashAdded = false;\n if (path[0] !== slash) {\n path = slash + path; // make the path abstract: for posixPath.resolve the first segments has to be absolute or cwd is used.\n slashAdded = true;\n }\n let resolvedPath = posixPath.resolve(path, ...paths);\n if (slashAdded && resolvedPath[0] === slash && !uri.authority) {\n resolvedPath = resolvedPath.substring(1);\n }\n return uri.with({ path: resolvedPath });\n }\n\n /**\n * Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The orignal URI is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The last segment of the URIs path.\n */\n export function dirname(uri: URI): URI {\n if (uri.path.length === 0 || uri.path === slash) {\n return uri;\n }\n let path = posixPath.dirname(uri.path);\n if (path.length === 1 && path.charCodeAt(0) === CharCode.Period) {\n path = '';\n }\n return uri.with({ path });\n }\n\n /**\n * Returns the last segment of the path of a URI, similar to the Unix basename command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The empty string is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The base name of the URIs path.\n */\n export function basename(uri: URI): string {\n return posixPath.basename(uri.path);\n }\n\n /**\n * Returns the extension name of the path of a URI, similar to the Unix extname command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The empty string is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The extension name of the URIs path.\n */\n export function extname(uri: URI): string {\n return posixPath.extname(uri.path);\n }\n}"],"names":["assertPath","path","TypeError","JSON","stringify","normalizeStringPosix","allowAboveRoot","code","res","lastSegmentLength","lastSlash","dots","i","length","charCodeAt","lastSlashIndex","lastIndexOf","slice","posix","resolve","cwd","resolvedPath","resolvedAbsolute","arguments","undefined","process","normalize","isAbsolute","trailingSeparator","join","joined","arg","relative","from","to","fromStart","fromEnd","fromLen","toStart","toLen","lastCommonSep","fromCode","out","_makeLong","dirname","hasRoot","end","matchedSlash","basename","ext","start","extIdx","firstNonSlashEnd","extname","startDot","startPart","preDotState","format","pathObject","sep","dir","root","base","name","_format","parse","ret","delimiter","win32","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","isWindows","platform","navigator","userAgent","indexOf","_schemePattern","_singleSlashStart","_doubleSlashStart","_validateUri","_strict","scheme","Error","authority","query","fragment","test","_empty","_slash","_regexp","URI","isUri","thing","fsPath","with","toString","schemeOrData","this","_schemeFix","_referenceResolution","uriToFsPath","change","Uri","match","exec","percentDecode","file","replace","idx","substring","components","result","skipEncoding","_asFormatted","toJSON","revive","data","_formatted","external","_fsPath","_sep","_pathSepMarker","$mid","encodeTable","encodeURIComponentFast","uriComponent","isPath","isAuthority","nativeEncodePos","pos","encodeURIComponent","charAt","substr","escaped","encodeURIComponentMinimal","uri","keepDriveLetterCasing","toLowerCase","encoder","userinfo","String","fromCharCode","decodeURIComponentGraceful","str","decodeURIComponent","_rEncodedAsHex","posixPath","slash","Utils","joinPath","paths","resolvePath","slashAdded"],"sourceRoot":""} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/charCode.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/charCode.d.ts" index 086d0697e6121fb643b7d90a799dbbb0fae4066b..61c9a2fa955407a2a032f17e689298f9194f2fab 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/charCode.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/charCode.d.ts" @@ -1,3 +1,415 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:12589e6b27710c071911512033dcc0031cba705fe4dd911cb1b65139c7ef0fb9 -size 11020 +/** + * An inlined enum containing useful character codes (to be used with String.charCodeAt). + * Please leave the const keyword such that it gets inlined when compiled to JavaScript! + */ +export declare const enum CharCode { + Null = 0, + /** + * The `\b` character. + */ + Backspace = 8, + /** + * The `\t` character. + */ + Tab = 9, + /** + * The `\n` character. + */ + LineFeed = 10, + /** + * The `\r` character. + */ + CarriageReturn = 13, + Space = 32, + /** + * The `!` character. + */ + ExclamationMark = 33, + /** + * The `"` character. + */ + DoubleQuote = 34, + /** + * The `#` character. + */ + Hash = 35, + /** + * The `$` character. + */ + DollarSign = 36, + /** + * The `%` character. + */ + PercentSign = 37, + /** + * The `&` character. + */ + Ampersand = 38, + /** + * The `'` character. + */ + SingleQuote = 39, + /** + * The `(` character. + */ + OpenParen = 40, + /** + * The `)` character. + */ + CloseParen = 41, + /** + * The `*` character. + */ + Asterisk = 42, + /** + * The `+` character. + */ + Plus = 43, + /** + * The `,` character. + */ + Comma = 44, + /** + * The `-` character. + */ + Dash = 45, + /** + * The `.` character. + */ + Period = 46, + /** + * The `/` character. + */ + Slash = 47, + Digit0 = 48, + Digit1 = 49, + Digit2 = 50, + Digit3 = 51, + Digit4 = 52, + Digit5 = 53, + Digit6 = 54, + Digit7 = 55, + Digit8 = 56, + Digit9 = 57, + /** + * The `:` character. + */ + Colon = 58, + /** + * The `;` character. + */ + Semicolon = 59, + /** + * The `<` character. + */ + LessThan = 60, + /** + * The `=` character. + */ + Equals = 61, + /** + * The `>` character. + */ + GreaterThan = 62, + /** + * The `?` character. + */ + QuestionMark = 63, + /** + * The `@` character. + */ + AtSign = 64, + A = 65, + B = 66, + C = 67, + D = 68, + E = 69, + F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + /** + * The `[` character. + */ + OpenSquareBracket = 91, + /** + * The `\` character. + */ + Backslash = 92, + /** + * The `]` character. + */ + CloseSquareBracket = 93, + /** + * The `^` character. + */ + Caret = 94, + /** + * The `_` character. + */ + Underline = 95, + /** + * The ``(`)`` character. + */ + BackTick = 96, + a = 97, + b = 98, + c = 99, + d = 100, + e = 101, + f = 102, + g = 103, + h = 104, + i = 105, + j = 106, + k = 107, + l = 108, + m = 109, + n = 110, + o = 111, + p = 112, + q = 113, + r = 114, + s = 115, + t = 116, + u = 117, + v = 118, + w = 119, + x = 120, + y = 121, + z = 122, + /** + * The `{` character. + */ + OpenCurlyBrace = 123, + /** + * The `|` character. + */ + Pipe = 124, + /** + * The `}` character. + */ + CloseCurlyBrace = 125, + /** + * The `~` character. + */ + Tilde = 126, + U_Combining_Grave_Accent = 768, + U_Combining_Acute_Accent = 769, + U_Combining_Circumflex_Accent = 770, + U_Combining_Tilde = 771, + U_Combining_Macron = 772, + U_Combining_Overline = 773, + U_Combining_Breve = 774, + U_Combining_Dot_Above = 775, + U_Combining_Diaeresis = 776, + U_Combining_Hook_Above = 777, + U_Combining_Ring_Above = 778, + U_Combining_Double_Acute_Accent = 779, + U_Combining_Caron = 780, + U_Combining_Vertical_Line_Above = 781, + U_Combining_Double_Vertical_Line_Above = 782, + U_Combining_Double_Grave_Accent = 783, + U_Combining_Candrabindu = 784, + U_Combining_Inverted_Breve = 785, + U_Combining_Turned_Comma_Above = 786, + U_Combining_Comma_Above = 787, + U_Combining_Reversed_Comma_Above = 788, + U_Combining_Comma_Above_Right = 789, + U_Combining_Grave_Accent_Below = 790, + U_Combining_Acute_Accent_Below = 791, + U_Combining_Left_Tack_Below = 792, + U_Combining_Right_Tack_Below = 793, + U_Combining_Left_Angle_Above = 794, + U_Combining_Horn = 795, + U_Combining_Left_Half_Ring_Below = 796, + U_Combining_Up_Tack_Below = 797, + U_Combining_Down_Tack_Below = 798, + U_Combining_Plus_Sign_Below = 799, + U_Combining_Minus_Sign_Below = 800, + U_Combining_Palatalized_Hook_Below = 801, + U_Combining_Retroflex_Hook_Below = 802, + U_Combining_Dot_Below = 803, + U_Combining_Diaeresis_Below = 804, + U_Combining_Ring_Below = 805, + U_Combining_Comma_Below = 806, + U_Combining_Cedilla = 807, + U_Combining_Ogonek = 808, + U_Combining_Vertical_Line_Below = 809, + U_Combining_Bridge_Below = 810, + U_Combining_Inverted_Double_Arch_Below = 811, + U_Combining_Caron_Below = 812, + U_Combining_Circumflex_Accent_Below = 813, + U_Combining_Breve_Below = 814, + U_Combining_Inverted_Breve_Below = 815, + U_Combining_Tilde_Below = 816, + U_Combining_Macron_Below = 817, + U_Combining_Low_Line = 818, + U_Combining_Double_Low_Line = 819, + U_Combining_Tilde_Overlay = 820, + U_Combining_Short_Stroke_Overlay = 821, + U_Combining_Long_Stroke_Overlay = 822, + U_Combining_Short_Solidus_Overlay = 823, + U_Combining_Long_Solidus_Overlay = 824, + U_Combining_Right_Half_Ring_Below = 825, + U_Combining_Inverted_Bridge_Below = 826, + U_Combining_Square_Below = 827, + U_Combining_Seagull_Below = 828, + U_Combining_X_Above = 829, + U_Combining_Vertical_Tilde = 830, + U_Combining_Double_Overline = 831, + U_Combining_Grave_Tone_Mark = 832, + U_Combining_Acute_Tone_Mark = 833, + U_Combining_Greek_Perispomeni = 834, + U_Combining_Greek_Koronis = 835, + U_Combining_Greek_Dialytika_Tonos = 836, + U_Combining_Greek_Ypogegrammeni = 837, + U_Combining_Bridge_Above = 838, + U_Combining_Equals_Sign_Below = 839, + U_Combining_Double_Vertical_Line_Below = 840, + U_Combining_Left_Angle_Below = 841, + U_Combining_Not_Tilde_Above = 842, + U_Combining_Homothetic_Above = 843, + U_Combining_Almost_Equal_To_Above = 844, + U_Combining_Left_Right_Arrow_Below = 845, + U_Combining_Upwards_Arrow_Below = 846, + U_Combining_Grapheme_Joiner = 847, + U_Combining_Right_Arrowhead_Above = 848, + U_Combining_Left_Half_Ring_Above = 849, + U_Combining_Fermata = 850, + U_Combining_X_Below = 851, + U_Combining_Left_Arrowhead_Below = 852, + U_Combining_Right_Arrowhead_Below = 853, + U_Combining_Right_Arrowhead_And_Up_Arrowhead_Below = 854, + U_Combining_Right_Half_Ring_Above = 855, + U_Combining_Dot_Above_Right = 856, + U_Combining_Asterisk_Below = 857, + U_Combining_Double_Ring_Below = 858, + U_Combining_Zigzag_Above = 859, + U_Combining_Double_Breve_Below = 860, + U_Combining_Double_Breve = 861, + U_Combining_Double_Macron = 862, + U_Combining_Double_Macron_Below = 863, + U_Combining_Double_Tilde = 864, + U_Combining_Double_Inverted_Breve = 865, + U_Combining_Double_Rightwards_Arrow_Below = 866, + U_Combining_Latin_Small_Letter_A = 867, + U_Combining_Latin_Small_Letter_E = 868, + U_Combining_Latin_Small_Letter_I = 869, + U_Combining_Latin_Small_Letter_O = 870, + U_Combining_Latin_Small_Letter_U = 871, + U_Combining_Latin_Small_Letter_C = 872, + U_Combining_Latin_Small_Letter_D = 873, + U_Combining_Latin_Small_Letter_H = 874, + U_Combining_Latin_Small_Letter_M = 875, + U_Combining_Latin_Small_Letter_R = 876, + U_Combining_Latin_Small_Letter_T = 877, + U_Combining_Latin_Small_Letter_V = 878, + U_Combining_Latin_Small_Letter_X = 879, + /** + * Unicode Character 'LINE SEPARATOR' (U+2028) + * http://www.fileformat.info/info/unicode/char/2028/index.htm + */ + LINE_SEPARATOR = 8232, + /** + * Unicode Character 'PARAGRAPH SEPARATOR' (U+2029) + * http://www.fileformat.info/info/unicode/char/2029/index.htm + */ + PARAGRAPH_SEPARATOR = 8233, + /** + * Unicode Character 'NEXT LINE' (U+0085) + * http://www.fileformat.info/info/unicode/char/0085/index.htm + */ + NEXT_LINE = 133, + U_CIRCUMFLEX = 94, + U_GRAVE_ACCENT = 96, + U_DIAERESIS = 168, + U_MACRON = 175, + U_ACUTE_ACCENT = 180, + U_CEDILLA = 184, + U_MODIFIER_LETTER_LEFT_ARROWHEAD = 706, + U_MODIFIER_LETTER_RIGHT_ARROWHEAD = 707, + U_MODIFIER_LETTER_UP_ARROWHEAD = 708, + U_MODIFIER_LETTER_DOWN_ARROWHEAD = 709, + U_MODIFIER_LETTER_CENTRED_RIGHT_HALF_RING = 722, + U_MODIFIER_LETTER_CENTRED_LEFT_HALF_RING = 723, + U_MODIFIER_LETTER_UP_TACK = 724, + U_MODIFIER_LETTER_DOWN_TACK = 725, + U_MODIFIER_LETTER_PLUS_SIGN = 726, + U_MODIFIER_LETTER_MINUS_SIGN = 727, + U_BREVE = 728, + U_DOT_ABOVE = 729, + U_RING_ABOVE = 730, + U_OGONEK = 731, + U_SMALL_TILDE = 732, + U_DOUBLE_ACUTE_ACCENT = 733, + U_MODIFIER_LETTER_RHOTIC_HOOK = 734, + U_MODIFIER_LETTER_CROSS_ACCENT = 735, + U_MODIFIER_LETTER_EXTRA_HIGH_TONE_BAR = 741, + U_MODIFIER_LETTER_HIGH_TONE_BAR = 742, + U_MODIFIER_LETTER_MID_TONE_BAR = 743, + U_MODIFIER_LETTER_LOW_TONE_BAR = 744, + U_MODIFIER_LETTER_EXTRA_LOW_TONE_BAR = 745, + U_MODIFIER_LETTER_YIN_DEPARTING_TONE_MARK = 746, + U_MODIFIER_LETTER_YANG_DEPARTING_TONE_MARK = 747, + U_MODIFIER_LETTER_UNASPIRATED = 749, + U_MODIFIER_LETTER_LOW_DOWN_ARROWHEAD = 751, + U_MODIFIER_LETTER_LOW_UP_ARROWHEAD = 752, + U_MODIFIER_LETTER_LOW_LEFT_ARROWHEAD = 753, + U_MODIFIER_LETTER_LOW_RIGHT_ARROWHEAD = 754, + U_MODIFIER_LETTER_LOW_RING = 755, + U_MODIFIER_LETTER_MIDDLE_GRAVE_ACCENT = 756, + U_MODIFIER_LETTER_MIDDLE_DOUBLE_GRAVE_ACCENT = 757, + U_MODIFIER_LETTER_MIDDLE_DOUBLE_ACUTE_ACCENT = 758, + U_MODIFIER_LETTER_LOW_TILDE = 759, + U_MODIFIER_LETTER_RAISED_COLON = 760, + U_MODIFIER_LETTER_BEGIN_HIGH_TONE = 761, + U_MODIFIER_LETTER_END_HIGH_TONE = 762, + U_MODIFIER_LETTER_BEGIN_LOW_TONE = 763, + U_MODIFIER_LETTER_END_LOW_TONE = 764, + U_MODIFIER_LETTER_SHELF = 765, + U_MODIFIER_LETTER_OPEN_SHELF = 766, + U_MODIFIER_LETTER_LOW_LEFT_ARROW = 767, + U_GREEK_LOWER_NUMERAL_SIGN = 885, + U_GREEK_TONOS = 900, + U_GREEK_DIALYTIKA_TONOS = 901, + U_GREEK_KORONIS = 8125, + U_GREEK_PSILI = 8127, + U_GREEK_PERISPOMENI = 8128, + U_GREEK_DIALYTIKA_AND_PERISPOMENI = 8129, + U_GREEK_PSILI_AND_VARIA = 8141, + U_GREEK_PSILI_AND_OXIA = 8142, + U_GREEK_PSILI_AND_PERISPOMENI = 8143, + U_GREEK_DASIA_AND_VARIA = 8157, + U_GREEK_DASIA_AND_OXIA = 8158, + U_GREEK_DASIA_AND_PERISPOMENI = 8159, + U_GREEK_DIALYTIKA_AND_VARIA = 8173, + U_GREEK_DIALYTIKA_AND_OXIA = 8174, + U_GREEK_VARIA = 8175, + U_GREEK_OXIA = 8189, + U_GREEK_DASIA = 8190, + U_OVERLINE = 8254, + /** + * UTF-8 BOM + * Unicode Character 'ZERO WIDTH NO-BREAK SPACE' (U+FEFF) + * http://www.fileformat.info/info/unicode/char/feff/index.htm + */ + UTF8_BOM = 65279 +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/charCode.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/charCode.js" index e517ccbb668f7e36ac3c48e97d2fd42781ffb5c7..6bafcec8582c769c7ce9ec1c5f98d31fcee82d3f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/charCode.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/charCode.js" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8aff082422674415b257672bdb20d7ac94380c214180c36b4b9c3fed1e854a37 -size 429 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/index.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/index.d.ts" index df114ea5af6f21c61887982c0efece894f8a5b60..e1c71f78b237f5e759e635364534218a5425eb63 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/index.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/index.d.ts" @@ -1,3 +1,3 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a2ca9f3aee02a7fa0ec6f80afc09c5465191e5ca513be720bf858f5da275e66b -size 85 +import { URI } from './uri'; +import { Utils } from './utils'; +export { URI, Utils }; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/index.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/index.js" index bf563ad99e8d0c02beb9c1bcc1d7a28f97fd20b0..23225cf3764779dea56d2410e45ea9b48c08440d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/index.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/index.js" @@ -1,3 +1,2 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e3d74b5b62d5b58591240f96028d5ac8f3a7b759db97630d136c551db0378039 -size 11853 +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(this,(()=>(()=>{"use strict";var t={470:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",i=0,o=-1,s=0,a=0;a<=t.length;++a){if(a2){var h=n.lastIndexOf("/");if(h!==n.length-1){-1===h?(n="",i=0):i=(n=n.slice(0,h)).length-1-n.lastIndexOf("/"),o=a,s=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=a,s=0;continue}e&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+t.slice(o+1,a):n=t.slice(o+1,a),i=a-o-1;o=a,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var t,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(void 0===t&&(t=process.cwd()),s=t),e(s),0!==s.length&&(n=s+"/"+n,i=47===s.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return".";var n=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&i&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,r=0;r0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return"";if((t=n.resolve(t))===(r=n.resolve(r)))return"";for(var i=1;ic){if(47===r.charCodeAt(a+u))return r.slice(a+u+1);if(0===u)return r.slice(a+u)}else s>c&&(47===t.charCodeAt(i+u)?f=u:0===u&&(f=0));break}var l=t.charCodeAt(i+u);if(l!==r.charCodeAt(a+u))break;47===l&&(f=u)}var d="";for(u=i+f+1;u<=o;++u)u!==o&&47!==t.charCodeAt(u)||(0===d.length?d+="..":d+="/..");return d.length>0?d+r.slice(a+f):(a+=f,47===r.charCodeAt(a)&&++a,r.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,i=-1,o=!0,s=t.length-1;s>=1;--s)if(47===(r=t.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,i=0,o=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var a=r.length-1,h=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!s){i=n+1;break}}else-1===h&&(s=!1,h=n+1),a>=0&&(c===r.charCodeAt(a)?-1==--a&&(o=n):(a=-1,o=h))}return i===o?o=h:-1===o&&(o=t.length),t.slice(i,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!s){i=n+1;break}}else-1===o&&(s=!1,o=n+1);return-1===o?"":t.slice(i,o)},extname:function(t){e(t);for(var r=-1,n=0,i=-1,o=!0,s=0,a=t.length-1;a>=0;--a){var h=t.charCodeAt(a);if(47!==h)-1===i&&(o=!1,i=a+1),46===h?-1===r?r=a:1!==s&&(s=1):-1!==r&&(s=-1);else if(!o){n=a+1;break}}return-1===r||-1===i||0===s||1===s&&r===i-1&&r===n+1?"":t.slice(r,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,i=t.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var s=-1,a=0,h=-1,c=!0,f=t.length-1,u=0;f>=n;--f)if(47!==(i=t.charCodeAt(f)))-1===h&&(c=!1,h=f+1),46===i?-1===s?s=f:1!==u&&(u=1):-1!==s&&(u=-1);else if(!c){a=f+1;break}return-1===s||-1===h||0===u||1===u&&s===h-1&&s===a+1?-1!==h&&(r.base=r.name=0===a&&o?t.slice(1,h):t.slice(a,h)):(0===a&&o?(r.name=t.slice(1,s),r.base=t.slice(1,h)):(r.name=t.slice(a,s),r.base=t.slice(a,h)),r.ext=t.slice(s,h)),a>0?r.dir=t.slice(0,a-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n},674:(t,e)=>{if(Object.defineProperty(e,"__esModule",{value:!0}),e.isWindows=void 0,"object"==typeof process)e.isWindows="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e.isWindows=t.indexOf("Windows")>=0}},796:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const n=r(674),i=/^\w[\w\d+.-]*$/,o=/^\//,s=/^\/\//;function a(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!i.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!o.test(t.path))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')}else if(s.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const h="",c="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(t){return t instanceof u||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,n,i,o=!1){"object"==typeof t?(this.scheme=t.scheme||h,this.authority=t.authority||h,this.path=t.path||h,this.query=t.query||h,this.fragment=t.fragment||h):(this.scheme=function(t,e){return t||e?t:"file"}(t,o),this.authority=e||h,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==c&&(e=c+e):e=c}return e}(this.scheme,r||h),this.query=n||h,this.fragment=i||h,a(this,o))}get fsPath(){return v(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:n,query:i,fragment:o}=t;return void 0===e?e=this.scheme:null===e&&(e=h),void 0===r?r=this.authority:null===r&&(r=h),void 0===n?n=this.path:null===n&&(n=h),void 0===i?i=this.query:null===i&&(i=h),void 0===o?o=this.fragment:null===o&&(o=h),e===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&o===this.fragment?this:new d(e,r,n,i,o)}static parse(t,e=!1){const r=f.exec(t);return r?new d(r[2]||h,w(r[4]||h),w(r[5]||h),w(r[7]||h),w(r[9]||h),e):new d(h,h,h,h,h)}static file(t){let e=h;if(n.isWindows&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const r=t.indexOf(c,2);-1===r?(e=t.substring(2),t=c):(e=t.substring(2,r),t=t.substring(r)||c)}return new d("file",e,t,h,h)}static from(t){const e=new d(t.scheme,t.authority,t.path,t.query,t.fragment);return a(e,!0),e}toString(t=!1){return y(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof u)return t;{const e=new d(t);return e._formatted=t.external,e._fsPath=t._sep===l?t.fsPath:null,e}}return t}}e.URI=u;const l=n.isWindows?1:void 0;class d extends u{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(t=!1){return t?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=l),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function g(t,e,r){let n,i=-1;for(let o=0;o=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||e&&47===s||r&&91===s||r&&93===s||r&&58===s)-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),void 0!==n&&(n+=t.charAt(o));else{void 0===n&&(n=t.substr(0,o));const e=p[s];void 0!==e?(-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),n+=e):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(t.substring(i))),void 0!==n?n:t}function m(t){let e;for(let r=0;r1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,n.isWindows&&(r=r.replace(/\//g,"\\")),r}function y(t,e){const r=e?m:g;let n="",{scheme:i,authority:o,path:s,query:a,fragment:h}=t;if(i&&(n+=i,n+=":"),(o||"file"===i)&&(n+=c,n+=c),o){let t=o.indexOf("@");if(-1!==t){const e=o.substr(0,t);o=o.substr(t+1),t=e.lastIndexOf(":"),-1===t?n+=r(e,!1,!1):(n+=r(e.substr(0,t),!1,!1),n+=":",n+=r(e.substr(t+1),!1,!0)),n+="@"}o=o.toLowerCase(),t=o.lastIndexOf(":"),-1===t?n+=r(o,!1,!0):(n+=r(o.substr(0,t),!1,!0),n+=o.substr(t))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const t=s.charCodeAt(1);t>=65&&t<=90&&(s=`/${String.fromCharCode(t+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const t=s.charCodeAt(0);t>=65&&t<=90&&(s=`${String.fromCharCode(t+32)}:${s.substr(2)}`)}n+=r(s,!0,!1)}return a&&(n+="?",n+=r(a,!1,!1)),h&&(n+="#",n+=e?h:g(h,!1,!1)),n}function b(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+b(t.substr(3)):t}}e.uriToFsPath=v;const C=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(t){return t.match(C)?t.replace(C,(t=>b(t))):t}},679:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=void 0;const s=o(r(470)),a=s.posix||s,h="/";var c;!function(t){t.joinPath=function(t,...e){return t.with({path:a.join(t.path,...e)})},t.resolvePath=function(t,...e){let r=t.path,n=!1;r[0]!==h&&(r=h+r,n=!0);let i=a.resolve(r,...e);return n&&i[0]===h&&!t.authority&&(i=i.substring(1)),t.with({path:i})},t.dirname=function(t){if(0===t.path.length||t.path===h)return t;let e=a.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},t.basename=function(t){return a.basename(t.path)},t.extname=function(t){return a.extname(t.path)}}(c||(e.Utils=c={}))}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}var n={};return(()=>{var t=n;Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=t.URI=void 0;const e=r(796);Object.defineProperty(t,"URI",{enumerable:!0,get:function(){return e.URI}});const i=r(679);Object.defineProperty(t,"Utils",{enumerable:!0,get:function(){return i.Utils}})})(),n})())); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/index.js.map" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/index.js.map" index e19eb005b0290a056229c851716772a0c2048a92..fa77a4e34bba485d85178978c4058eeb02a6c310 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/index.js.map" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/index.js.map" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0b367b07824241bd4b143b765c3cc48f86dd77d1bbbccbc57ec8297b7fc9ad5a -size 62976 +{"version":3,"file":"index.js","mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,EACvE,CACA,CATD,CASGC,MAAM,I,kCCiBT,SAASC,EAAWC,GAClB,GAAoB,iBAATA,EACT,MAAM,IAAIC,UAAU,mCAAqCC,KAAKC,UAAUH,GAE5E,CAGA,SAASI,EAAqBJ,EAAMK,GAMlC,IALA,IAIIC,EAJAC,EAAM,GACNC,EAAoB,EACpBC,GAAa,EACbC,EAAO,EAEFb,EAAI,EAAGA,GAAKG,EAAKW,SAAUd,EAAG,CACrC,GAAIA,EAAIG,EAAKW,OACXL,EAAON,EAAKY,WAAWf,OACpB,IAAa,KAATS,EACP,MAEAA,EAAO,EAAQ,CACjB,GAAa,KAATA,EAAmB,CACrB,GAAIG,IAAcZ,EAAI,GAAc,IAATa,QAEpB,GAAID,IAAcZ,EAAI,GAAc,IAATa,EAAY,CAC5C,GAAIH,EAAII,OAAS,GAA2B,IAAtBH,GAA8D,KAAnCD,EAAIK,WAAWL,EAAII,OAAS,IAAsD,KAAnCJ,EAAIK,WAAWL,EAAII,OAAS,GAC1H,GAAIJ,EAAII,OAAS,EAAG,CAClB,IAAIE,EAAiBN,EAAIO,YAAY,KACrC,GAAID,IAAmBN,EAAII,OAAS,EAAG,EACb,IAApBE,GACFN,EAAM,GACNC,EAAoB,GAGpBA,GADAD,EAAMA,EAAIQ,MAAM,EAAGF,IACKF,OAAS,EAAIJ,EAAIO,YAAY,KAEvDL,EAAYZ,EACZa,EAAO,EACP,QACF,CACF,MAAO,GAAmB,IAAfH,EAAII,QAA+B,IAAfJ,EAAII,OAAc,CAC/CJ,EAAM,GACNC,EAAoB,EACpBC,EAAYZ,EACZa,EAAO,EACP,QACF,CAEEL,IACEE,EAAII,OAAS,EACfJ,GAAO,MAEPA,EAAM,KACRC,EAAoB,EAExB,MACMD,EAAII,OAAS,EACfJ,GAAO,IAAMP,EAAKe,MAAMN,EAAY,EAAGZ,GAEvCU,EAAMP,EAAKe,MAAMN,EAAY,EAAGZ,GAClCW,EAAoBX,EAAIY,EAAY,EAEtCA,EAAYZ,EACZa,EAAO,CACT,MAAoB,KAATJ,IAA+B,IAAVI,IAC5BA,EAEFA,GAAQ,CAEZ,CACA,OAAOH,CACT,CAcA,IAAIS,EAAQ,CAEVC,QAAS,WAKP,IAJA,IAEIC,EAFAC,EAAe,GACfC,GAAmB,EAGdvB,EAAIwB,UAAUV,OAAS,EAAGd,IAAM,IAAMuB,EAAkBvB,IAAK,CACpE,IAAIG,EACAH,GAAK,EACPG,EAAOqB,UAAUxB,SAELyB,IAARJ,IACFA,EAAMK,QAAQL,OAChBlB,EAAOkB,GAGTnB,EAAWC,GAGS,IAAhBA,EAAKW,SAITQ,EAAenB,EAAO,IAAMmB,EAC5BC,EAA0C,KAAvBpB,EAAKY,WAAW,GACrC,CAQA,OAFAO,EAAef,EAAqBe,GAAeC,GAE/CA,EACED,EAAaR,OAAS,EACjB,IAAMQ,EAEN,IACAA,EAAaR,OAAS,EACxBQ,EAEA,GAEX,EAEAK,UAAW,SAAmBxB,GAG5B,GAFAD,EAAWC,GAES,IAAhBA,EAAKW,OAAc,MAAO,IAE9B,IAAIc,EAAoC,KAAvBzB,EAAKY,WAAW,GAC7Bc,EAAyD,KAArC1B,EAAKY,WAAWZ,EAAKW,OAAS,GAQtD,OAHoB,KAFpBX,EAAOI,EAAqBJ,GAAOyB,IAE1Bd,QAAiBc,IAAYzB,EAAO,KACzCA,EAAKW,OAAS,GAAKe,IAAmB1B,GAAQ,KAE9CyB,EAAmB,IAAMzB,EACtBA,CACT,EAEAyB,WAAY,SAAoBzB,GAE9B,OADAD,EAAWC,GACJA,EAAKW,OAAS,GAA4B,KAAvBX,EAAKY,WAAW,EAC5C,EAEAe,KAAM,WACJ,GAAyB,IAArBN,UAAUV,OACZ,MAAO,IAET,IADA,IAAIiB,EACK/B,EAAI,EAAGA,EAAIwB,UAAUV,SAAUd,EAAG,CACzC,IAAIgC,EAAMR,UAAUxB,GACpBE,EAAW8B,GACPA,EAAIlB,OAAS,SACAW,IAAXM,EACFA,EAASC,EAETD,GAAU,IAAMC,EAEtB,CACA,YAAeP,IAAXM,EACK,IACFZ,EAAMQ,UAAUI,EACzB,EAEAE,SAAU,SAAkBC,EAAMC,GAIhC,GAHAjC,EAAWgC,GACXhC,EAAWiC,GAEPD,IAASC,EAAI,MAAO,GAKxB,IAHAD,EAAOf,EAAMC,QAAQc,OACrBC,EAAKhB,EAAMC,QAAQe,IAEF,MAAO,GAIxB,IADA,IAAIC,EAAY,EACTA,EAAYF,EAAKpB,QACa,KAA/BoB,EAAKnB,WAAWqB,KADYA,GASlC,IALA,IAAIC,EAAUH,EAAKpB,OACfwB,EAAUD,EAAUD,EAGpBG,EAAU,EACPA,EAAUJ,EAAGrB,QACa,KAA3BqB,EAAGpB,WAAWwB,KADUA,GAW9B,IAPA,IACIC,EADQL,EAAGrB,OACKyB,EAGhBzB,EAASwB,EAAUE,EAAQF,EAAUE,EACrCC,GAAiB,EACjBzC,EAAI,EACDA,GAAKc,IAAUd,EAAG,CACvB,GAAIA,IAAMc,EAAQ,CAChB,GAAI0B,EAAQ1B,EAAQ,CAClB,GAAmC,KAA/BqB,EAAGpB,WAAWwB,EAAUvC,GAG1B,OAAOmC,EAAGjB,MAAMqB,EAAUvC,EAAI,GACzB,GAAU,IAANA,EAGT,OAAOmC,EAAGjB,MAAMqB,EAAUvC,EAE9B,MAAWsC,EAAUxB,IACoB,KAAnCoB,EAAKnB,WAAWqB,EAAYpC,GAG9ByC,EAAgBzC,EACD,IAANA,IAGTyC,EAAgB,IAGpB,KACF,CACA,IAAIC,EAAWR,EAAKnB,WAAWqB,EAAYpC,GAE3C,GAAI0C,IADSP,EAAGpB,WAAWwB,EAAUvC,GAEnC,MACoB,KAAb0C,IACPD,EAAgBzC,EACpB,CAEA,IAAI2C,EAAM,GAGV,IAAK3C,EAAIoC,EAAYK,EAAgB,EAAGzC,GAAKqC,IAAWrC,EAClDA,IAAMqC,GAAkC,KAAvBH,EAAKnB,WAAWf,KAChB,IAAf2C,EAAI7B,OACN6B,GAAO,KAEPA,GAAO,OAMb,OAAIA,EAAI7B,OAAS,EACR6B,EAAMR,EAAGjB,MAAMqB,EAAUE,IAEhCF,GAAWE,EACoB,KAA3BN,EAAGpB,WAAWwB,MACdA,EACGJ,EAAGjB,MAAMqB,GAEpB,EAEAK,UAAW,SAAmBzC,GAC5B,OAAOA,CACT,EAEA0C,QAAS,SAAiB1C,GAExB,GADAD,EAAWC,GACS,IAAhBA,EAAKW,OAAc,MAAO,IAK9B,IAJA,IAAIL,EAAON,EAAKY,WAAW,GACvB+B,EAAmB,KAATrC,EACVsC,GAAO,EACPC,GAAe,EACVhD,EAAIG,EAAKW,OAAS,EAAGd,GAAK,IAAKA,EAEtC,GAAa,MADbS,EAAON,EAAKY,WAAWf,KAEnB,IAAKgD,EAAc,CACjBD,EAAM/C,EACN,KACF,OAGFgD,GAAe,EAInB,OAAa,IAATD,EAAmBD,EAAU,IAAM,IACnCA,GAAmB,IAARC,EAAkB,KAC1B5C,EAAKe,MAAM,EAAG6B,EACvB,EAEAE,SAAU,SAAkB9C,EAAM+C,GAChC,QAAYzB,IAARyB,GAAoC,iBAARA,EAAkB,MAAM,IAAI9C,UAAU,mCACtEF,EAAWC,GAEX,IAGIH,EAHAmD,EAAQ,EACRJ,GAAO,EACPC,GAAe,EAGnB,QAAYvB,IAARyB,GAAqBA,EAAIpC,OAAS,GAAKoC,EAAIpC,QAAUX,EAAKW,OAAQ,CACpE,GAAIoC,EAAIpC,SAAWX,EAAKW,QAAUoC,IAAQ/C,EAAM,MAAO,GACvD,IAAIiD,EAASF,EAAIpC,OAAS,EACtBuC,GAAoB,EACxB,IAAKrD,EAAIG,EAAKW,OAAS,EAAGd,GAAK,IAAKA,EAAG,CACrC,IAAIS,EAAON,EAAKY,WAAWf,GAC3B,GAAa,KAATS,GAGA,IAAKuC,EAAc,CACjBG,EAAQnD,EAAI,EACZ,KACF,OAEwB,IAAtBqD,IAGFL,GAAe,EACfK,EAAmBrD,EAAI,GAErBoD,GAAU,IAER3C,IAASyC,EAAInC,WAAWqC,IACR,KAAZA,IAGJL,EAAM/C,IAKRoD,GAAU,EACVL,EAAMM,GAId,CAGA,OADIF,IAAUJ,EAAKA,EAAMM,GAAmC,IAATN,IAAYA,EAAM5C,EAAKW,QACnEX,EAAKe,MAAMiC,EAAOJ,EAC3B,CACE,IAAK/C,EAAIG,EAAKW,OAAS,EAAGd,GAAK,IAAKA,EAClC,GAA2B,KAAvBG,EAAKY,WAAWf,IAGhB,IAAKgD,EAAc,CACjBG,EAAQnD,EAAI,EACZ,KACF,OACkB,IAAT+C,IAGXC,GAAe,EACfD,EAAM/C,EAAI,GAId,OAAa,IAAT+C,EAAmB,GAChB5C,EAAKe,MAAMiC,EAAOJ,EAE7B,EAEAO,QAAS,SAAiBnD,GACxBD,EAAWC,GAQX,IAPA,IAAIoD,GAAY,EACZC,EAAY,EACZT,GAAO,EACPC,GAAe,EAGfS,EAAc,EACTzD,EAAIG,EAAKW,OAAS,EAAGd,GAAK,IAAKA,EAAG,CACzC,IAAIS,EAAON,EAAKY,WAAWf,GAC3B,GAAa,KAATS,GASS,IAATsC,IAGFC,GAAe,EACfD,EAAM/C,EAAI,GAEC,KAATS,GAEkB,IAAd8C,EACFA,EAAWvD,EACY,IAAhByD,IACPA,EAAc,IACK,IAAdF,IAGTE,GAAe,QArBb,IAAKT,EAAc,CACjBQ,EAAYxD,EAAI,EAChB,KACF,CAoBN,CAEA,OAAkB,IAAduD,IAA4B,IAATR,GAEH,IAAhBU,GAEgB,IAAhBA,GAAqBF,IAAaR,EAAM,GAAKQ,IAAaC,EAAY,EACjE,GAEFrD,EAAKe,MAAMqC,EAAUR,EAC9B,EAEAW,OAAQ,SAAgBC,GACtB,GAAmB,OAAfA,GAA6C,iBAAfA,EAChC,MAAM,IAAIvD,UAAU,0EAA4EuD,GAElG,OAvVJ,SAAiBC,EAAKD,GACpB,IAAIE,EAAMF,EAAWE,KAAOF,EAAWlE,KACnCqE,EAAOH,EAAWG,OAASH,EAAWI,MAAQ,KAAOJ,EAAWT,KAAO,IAC3E,OAAKW,EAGDA,IAAQF,EAAWlE,KACdoE,EAAMC,EAERD,EA8UU,IA9UEC,EALVA,CAMX,CA6UWE,CAAQ,EAAKL,EACtB,EAEAM,MAAO,SAAe9D,GACpBD,EAAWC,GAEX,IAAI+D,EAAM,CAAEzE,KAAM,GAAIoE,IAAK,GAAIC,KAAM,GAAIZ,IAAK,GAAIa,KAAM,IACxD,GAAoB,IAAhB5D,EAAKW,OAAc,OAAOoD,EAC9B,IAEIf,EAFA1C,EAAON,EAAKY,WAAW,GACvBa,EAAsB,KAATnB,EAEbmB,GACFsC,EAAIzE,KAAO,IACX0D,EAAQ,GAERA,EAAQ,EAaV,IAXA,IAAII,GAAY,EACZC,EAAY,EACZT,GAAO,EACPC,GAAe,EACfhD,EAAIG,EAAKW,OAAS,EAIlB2C,EAAc,EAGXzD,GAAKmD,IAASnD,EAEnB,GAAa,MADbS,EAAON,EAAKY,WAAWf,KAUV,IAAT+C,IAGFC,GAAe,EACfD,EAAM/C,EAAI,GAEC,KAATS,GAEkB,IAAd8C,EAAiBA,EAAWvD,EAA2B,IAAhByD,IAAmBA,EAAc,IACrD,IAAdF,IAGXE,GAAe,QAlBb,IAAKT,EAAc,CACjBQ,EAAYxD,EAAI,EAChB,KACF,CAwCN,OArBkB,IAAduD,IAA4B,IAATR,GAEP,IAAhBU,GAEgB,IAAhBA,GAAqBF,IAAaR,EAAM,GAAKQ,IAAaC,EAAY,GACvD,IAATT,IACiCmB,EAAIJ,KAAOI,EAAIH,KAAhC,IAAdP,GAAmB5B,EAAkCzB,EAAKe,MAAM,EAAG6B,GAAgC5C,EAAKe,MAAMsC,EAAWT,KAG7G,IAAdS,GAAmB5B,GACrBsC,EAAIH,KAAO5D,EAAKe,MAAM,EAAGqC,GACzBW,EAAIJ,KAAO3D,EAAKe,MAAM,EAAG6B,KAEzBmB,EAAIH,KAAO5D,EAAKe,MAAMsC,EAAWD,GACjCW,EAAIJ,KAAO3D,EAAKe,MAAMsC,EAAWT,IAEnCmB,EAAIhB,IAAM/C,EAAKe,MAAMqC,EAAUR,IAG7BS,EAAY,EAAGU,EAAIL,IAAM1D,EAAKe,MAAM,EAAGsC,EAAY,GAAY5B,IAAYsC,EAAIL,IAAM,KAElFK,CACT,EAEAN,IAAK,IACLO,UAAW,IACXC,MAAO,KACPjD,MAAO,MAGTA,EAAMA,MAAQA,EAEdvB,EAAOD,QAAUwB,C,cCjgBjB,G,oEAAuB,iBAAZO,QACV,EAAA2C,UAAiC,UAArB3C,QAAQ4C,cACd,GAAyB,iBAAdC,UAAwB,CACzC,IAAIC,EAAYD,UAAUC,UAC1B,EAAAH,UAAYG,EAAUC,QAAQ,YAAc,C,6FCZ7C,eAEMC,EAAiB,iBACjBC,EAAoB,MACpBC,EAAoB,QAE1B,SAASC,EAAaX,EAAUY,GAG/B,IAAKZ,EAAIa,QAAUD,EAClB,MAAM,IAAIE,MAAM,2DAA2Dd,EAAIe,sBAAsBf,EAAI/D,kBAAkB+D,EAAIgB,sBAAsBhB,EAAIiB,cAK1J,GAAIjB,EAAIa,SAAWL,EAAeU,KAAKlB,EAAIa,QAC1C,MAAM,IAAIC,MAAM,mDAQjB,GAAId,EAAI/D,KACP,GAAI+D,EAAIe,WACP,IAAKN,EAAkBS,KAAKlB,EAAI/D,MAC/B,MAAM,IAAI6E,MAAM,iJAGjB,GAAIJ,EAAkBQ,KAAKlB,EAAI/D,MAC9B,MAAM,IAAI6E,MAAM,4HAIpB,CAkCA,MAAMK,EAAS,GACTC,EAAS,IACTC,EAAU,+DAkBhB,MAAaC,EAEZ,YAAOC,CAAMC,GACZ,OAAIA,aAAiBF,KAGhBE,GAGoC,iBAArBA,EAAOT,WACU,iBAApBS,EAAOP,UACS,iBAAhBO,EAAOvF,MACU,iBAAjBuF,EAAOR,OACW,iBAAlBQ,EAAOX,QACW,iBAAlBW,EAAOC,QACS,mBAAhBD,EAAOE,MACa,mBAApBF,EAAOG,QACzB,CAMSd,OAMAE,UAKA9E,KAKA+E,MAKAC,SAeT,YAAsBW,EAAsCb,EAAoB9E,EAAe+E,EAAgBC,EAAmBL,GAAmB,GAExH,iBAAjBgB,GACV7F,KAAK8E,OAASe,EAAaf,QAAUM,EACrCpF,KAAKgF,UAAYa,EAAab,WAAaI,EAC3CpF,KAAKE,KAAO2F,EAAa3F,MAAQkF,EACjCpF,KAAKiF,MAAQY,EAAaZ,OAASG,EACnCpF,KAAKkF,SAAWW,EAAaX,UAAYE,IAKzCpF,KAAK8E,OAvHR,SAAoBA,EAAgBD,GACnC,OAAKC,GAAWD,EAGTC,EAFC,MAGT,CAkHiBgB,CAAWD,EAAchB,GACvC7E,KAAKgF,UAAYA,GAAaI,EAC9BpF,KAAKE,KAjHR,SAA8B4E,EAAgB5E,GAM7C,OAAQ4E,GACP,IAAK,QACL,IAAK,OACL,IAAK,OACC5E,EAEMA,EAAK,KAAOmF,IACtBnF,EAAOmF,EAASnF,GAFhBA,EAAOmF,EAMV,OAAOnF,CACR,CA+Fe6F,CAAqB/F,KAAK8E,OAAQ5E,GAAQkF,GACtDpF,KAAKiF,MAAQA,GAASG,EACtBpF,KAAKkF,SAAWA,GAAYE,EAE5BR,EAAa5E,KAAM6E,GAErB,CA4BA,UAAIa,GAIH,OAAOM,EAAYhG,MAAM,EAC1B,CAIA,KAAKiG,GAEJ,IAAKA,EACJ,OAAOjG,KAGR,IAAI,OAAE8E,EAAM,UAAEE,EAAS,KAAE9E,EAAI,MAAE+E,EAAK,SAAEC,GAAae,EA2BnD,YA1BezE,IAAXsD,EACHA,EAAS9E,KAAK8E,OACO,OAAXA,IACVA,EAASM,QAEQ5D,IAAdwD,EACHA,EAAYhF,KAAKgF,UACO,OAAdA,IACVA,EAAYI,QAEA5D,IAATtB,EACHA,EAAOF,KAAKE,KACO,OAATA,IACVA,EAAOkF,QAEM5D,IAAVyD,EACHA,EAAQjF,KAAKiF,MACO,OAAVA,IACVA,EAAQG,QAEQ5D,IAAb0D,EACHA,EAAWlF,KAAKkF,SACO,OAAbA,IACVA,EAAWE,GAGRN,IAAW9E,KAAK8E,QAChBE,IAAchF,KAAKgF,WACnB9E,IAASF,KAAKE,MACd+E,IAAUjF,KAAKiF,OACfC,IAAalF,KAAKkF,SAEdlF,KAGD,IAAIkG,EAAIpB,EAAQE,EAAW9E,EAAM+E,EAAOC,EAChD,CAUA,YAAOlB,CAAMmC,EAAetB,GAAmB,GAC9C,MAAMuB,EAAQd,EAAQe,KAAKF,GAC3B,OAAKC,EAGE,IAAIF,EACVE,EAAM,IAAMhB,EACZkB,EAAcF,EAAM,IAAMhB,GAC1BkB,EAAcF,EAAM,IAAMhB,GAC1BkB,EAAcF,EAAM,IAAMhB,GAC1BkB,EAAcF,EAAM,IAAMhB,GAC1BP,GARO,IAAIqB,EAAId,EAAQA,EAAQA,EAAQA,EAAQA,EAUjD,CAuBA,WAAOmB,CAAKrG,GAEX,IAAI8E,EAAYI,EAWhB,GANI,EAAAhB,YACHlE,EAAOA,EAAKsG,QAAQ,MAAOnB,IAKxBnF,EAAK,KAAOmF,GAAUnF,EAAK,KAAOmF,EAAQ,CAC7C,MAAMoB,EAAMvG,EAAKsE,QAAQa,EAAQ,IACpB,IAAToB,GACHzB,EAAY9E,EAAKwG,UAAU,GAC3BxG,EAAOmF,IAEPL,EAAY9E,EAAKwG,UAAU,EAAGD,GAC9BvG,EAAOA,EAAKwG,UAAUD,IAAQpB,E,CAIhC,OAAO,IAAIa,EAAI,OAAQlB,EAAW9E,EAAMkF,EAAQA,EACjD,CAEA,WAAOnD,CAAK0E,GACX,MAAMC,EAAS,IAAIV,EAClBS,EAAW7B,OACX6B,EAAW3B,UACX2B,EAAWzG,KACXyG,EAAW1B,MACX0B,EAAWzB,UAGZ,OADAN,EAAagC,GAAQ,GACdA,CACR,CAeA,QAAAhB,CAASiB,GAAwB,GAChC,OAAOC,EAAa9G,KAAM6G,EAC3B,CAEA,MAAAE,GACC,OAAO/G,IACR,CAMA,aAAOgH,CAAOC,GACb,GAAKA,EAEE,IAAIA,aAAgB1B,EAC1B,OAAO0B,EACD,CACN,MAAML,EAAS,IAAIV,EAAIe,GAGvB,OAFAL,EAAOM,WAAwBD,EAAME,SACrCP,EAAOQ,QAAqBH,EAAMI,OAASC,EAA4BL,EAAMvB,OAAS,KAC/EkB,C,EAPP,OAAYK,CASd,EAxRD,QA0SA,MAAMK,EAAiB,EAAAlD,UAAY,OAAI5C,EAGvC,MAAM0E,UAAYX,EAEjB2B,WAA4B,KAC5BE,QAAyB,KAEzB,UAAa1B,GAIZ,OAHK1F,KAAKoH,UACTpH,KAAKoH,QAAUpB,EAAYhG,MAAM,IAE3BA,KAAKoH,OACb,CAES,QAAAxB,CAASiB,GAAwB,GACzC,OAAKA,EAOGC,EAAa9G,MAAM,IANrBA,KAAKkH,aACTlH,KAAKkH,WAAaJ,EAAa9G,MAAM,IAE/BA,KAAKkH,WAKd,CAES,MAAAH,GACR,MAAMtG,EAAgB,CACrB8G,KAAM,GA0BP,OAvBIvH,KAAKoH,UACR3G,EAAIiF,OAAS1F,KAAKoH,QAClB3G,EAAI4G,KAAOC,GAERtH,KAAKkH,aACRzG,EAAI0G,SAAWnH,KAAKkH,YAGjBlH,KAAKE,OACRO,EAAIP,KAAOF,KAAKE,MAEbF,KAAK8E,SACRrE,EAAIqE,OAAS9E,KAAK8E,QAEf9E,KAAKgF,YACRvE,EAAIuE,UAAYhF,KAAKgF,WAElBhF,KAAKiF,QACRxE,EAAIwE,MAAQjF,KAAKiF,OAEdjF,KAAKkF,WACRzE,EAAIyE,SAAWlF,KAAKkF,UAEdzE,CACR,EAID,MAAM+G,EAAwC,CAC7C,GAAkB,MAClB,GAAkB,MAClB,GAAyB,MACzB,GAAiB,MACjB,GAA8B,MAC9B,GAA+B,MAC/B,GAAmB,MAEnB,GAA4B,MAC5B,GAAuB,MACvB,GAAsB,MACtB,GAAwB,MACxB,GAAsB,MACtB,GAAuB,MACvB,GAAqB,MACrB,GAAiB,MACjB,GAAkB,MAClB,GAAsB,MACtB,GAAmB,MAEnB,GAAkB,OAGnB,SAASC,EAAuBC,EAAsBC,EAAiBC,GACtE,IAAInH,EACAoH,GAAmB,EAEvB,IAAK,IAAIC,EAAM,EAAGA,EAAMJ,EAAa7G,OAAQiH,IAAO,CACnD,MAAMtH,EAAOkH,EAAa5G,WAAWgH,GAGrC,GACEtH,GAAQ,IAAcA,GAAQ,KAC3BA,GAAQ,IAAcA,GAAQ,IAC9BA,GAAQ,IAAmBA,GAAQ,IAC3B,KAATA,GACS,KAATA,GACS,KAATA,GACS,MAATA,GACCmH,GAAmB,KAATnH,GACVoH,GAAwB,KAATpH,GACfoH,GAAwB,KAATpH,GACfoH,GAAwB,KAATpH,GAGM,IAArBqH,IACHpH,GAAOsH,mBAAmBL,EAAahB,UAAUmB,EAAiBC,IAClED,GAAmB,QAGRrG,IAARf,IACHA,GAAOiH,EAAaM,OAAOF,QAGtB,MAEMtG,IAARf,IACHA,EAAMiH,EAAaO,OAAO,EAAGH,IAI9B,MAAMI,EAAUV,EAAYhH,QACZgB,IAAZ0G,IAGsB,IAArBL,IACHpH,GAAOsH,mBAAmBL,EAAahB,UAAUmB,EAAiBC,IAClED,GAAmB,GAIpBpH,GAAOyH,IAEwB,IAArBL,IAEVA,EAAkBC,E,EASrB,OAJyB,IAArBD,IACHpH,GAAOsH,mBAAmBL,EAAahB,UAAUmB,UAGnCrG,IAARf,EAAoBA,EAAMiH,CAClC,CAEA,SAASS,EAA0BjI,GAClC,IAAIO,EACJ,IAAK,IAAIqH,EAAM,EAAGA,EAAM5H,EAAKW,OAAQiH,IAAO,CAC3C,MAAMtH,EAAON,EAAKY,WAAWgH,GAChB,KAATtH,GAAmC,KAATA,QACjBgB,IAARf,IACHA,EAAMP,EAAK+H,OAAO,EAAGH,IAEtBrH,GAAO+G,EAAYhH,SAEPgB,IAARf,IACHA,GAAOP,EAAK4H,G,CAIf,YAAetG,IAARf,EAAoBA,EAAMP,CAClC,CAKA,SAAgB8F,EAAYoC,EAAUC,GAErC,IAAIlC,EAsBJ,OAnBCA,EAFGiC,EAAIpD,WAAaoD,EAAIlI,KAAKW,OAAS,GAAoB,SAAfuH,EAAItD,OAEvC,KAAKsD,EAAIpD,YAAYoD,EAAIlI,OAEN,KAA3BkI,EAAIlI,KAAKY,WAAW,KAChBsH,EAAIlI,KAAKY,WAAW,IAAM,IAAcsH,EAAIlI,KAAKY,WAAW,IAAM,IAAcsH,EAAIlI,KAAKY,WAAW,IAAM,IAAcsH,EAAIlI,KAAKY,WAAW,IAAM,MACxH,KAA3BsH,EAAIlI,KAAKY,WAAW,GAElBuH,EAIID,EAAIlI,KAAK+H,OAAO,GAFhBG,EAAIlI,KAAK,GAAGoI,cAAgBF,EAAIlI,KAAK+H,OAAO,GAM7CG,EAAIlI,KAET,EAAAkE,YACH+B,EAAQA,EAAMK,QAAQ,MAAO,OAEvBL,CACR,CAKA,SAASW,EAAasB,EAAUvB,GAE/B,MAAM0B,EAAW1B,EAEdsB,EADAV,EAGH,IAAIhH,EAAM,IACN,OAAEqE,EAAM,UAAEE,EAAS,KAAE9E,EAAI,MAAE+E,EAAK,SAAEC,GAAakD,EASnD,GARItD,IACHrE,GAAOqE,EACPrE,GAAO,MAEJuE,GAAwB,SAAXF,KAChBrE,GAAO4E,EACP5E,GAAO4E,GAEJL,EAAW,CACd,IAAIyB,EAAMzB,EAAUR,QAAQ,KAC5B,IAAa,IAATiC,EAAY,CAEf,MAAM+B,EAAWxD,EAAUiD,OAAO,EAAGxB,GACrCzB,EAAYA,EAAUiD,OAAOxB,EAAM,GACnCA,EAAM+B,EAASxH,YAAY,MACd,IAATyF,EACHhG,GAAO8H,EAAQC,GAAU,GAAO,IAGhC/H,GAAO8H,EAAQC,EAASP,OAAO,EAAGxB,IAAM,GAAO,GAC/ChG,GAAO,IACPA,GAAO8H,EAAQC,EAASP,OAAOxB,EAAM,IAAI,GAAO,IAEjDhG,GAAO,G,CAERuE,EAAYA,EAAUsD,cACtB7B,EAAMzB,EAAUhE,YAAY,MACf,IAATyF,EACHhG,GAAO8H,EAAQvD,GAAW,GAAO,IAGjCvE,GAAO8H,EAAQvD,EAAUiD,OAAO,EAAGxB,IAAM,GAAO,GAChDhG,GAAOuE,EAAUiD,OAAOxB,G,CAG1B,GAAIvG,EAAM,CAET,GAAIA,EAAKW,QAAU,GAA4B,KAAvBX,EAAKY,WAAW,IAAgD,KAAvBZ,EAAKY,WAAW,GAAuB,CACvG,MAAMN,EAAON,EAAKY,WAAW,GACzBN,GAAQ,IAAcA,GAAQ,KACjCN,EAAO,IAAIuI,OAAOC,aAAalI,EAAO,OAAON,EAAK+H,OAAO,K,MAEpD,GAAI/H,EAAKW,QAAU,GAA4B,KAAvBX,EAAKY,WAAW,GAAuB,CACrE,MAAMN,EAAON,EAAKY,WAAW,GACzBN,GAAQ,IAAcA,GAAQ,KACjCN,EAAO,GAAGuI,OAAOC,aAAalI,EAAO,OAAON,EAAK+H,OAAO,K,CAI1DxH,GAAO8H,EAAQrI,GAAM,GAAM,E,CAU5B,OARI+E,IACHxE,GAAO,IACPA,GAAO8H,EAAQtD,GAAO,GAAO,IAE1BC,IACHzE,GAAO,IACPA,GAAQoG,EAAgE3B,EAAjDuC,EAAuBvC,GAAU,GAAO,IAEzDzE,CACR,CAIA,SAASkI,EAA2BC,GACnC,IACC,OAAOC,mBAAmBD,E,CACzB,MACD,OAAIA,EAAI/H,OAAS,EACT+H,EAAIX,OAAO,EAAG,GAAKU,EAA2BC,EAAIX,OAAO,IAEzDW,C,CAGV,CAhHA,gBAkHA,MAAME,EAAiB,8BAEvB,SAASxC,EAAcsC,GACtB,OAAKA,EAAIxC,MAAM0C,GAGRF,EAAIpC,QAAQsC,GAAiB1C,GAAUuC,EAA2BvC,KAFjEwC,CAGT,C,8tBCnqBA,kBAEMG,EAAYC,EAAS9H,OAAS8H,EAC9BC,EAAQ,IAEd,IAAiBC,GAAjB,SAAiBA,GAeG,EAAAC,SAAhB,SAAyBf,KAAagB,GAClC,OAAOhB,EAAIzC,KAAK,CAAEzF,KAAM6I,EAAUlH,KAAKuG,EAAIlI,QAASkJ,IACxD,EAgBgB,EAAAC,YAAhB,SAA4BjB,KAAagB,GACrC,IAAIlJ,EAAOkI,EAAIlI,KACXoJ,GAAa,EACbpJ,EAAK,KAAO+I,IACZ/I,EAAO+I,EAAQ/I,EACfoJ,GAAa,GAEjB,IAAIjI,EAAe0H,EAAU5H,QAAQjB,KAASkJ,GAI9C,OAHIE,GAAcjI,EAAa,KAAO4H,IAAUb,EAAIpD,YAChD3D,EAAeA,EAAaqF,UAAU,IAEnC0B,EAAIzC,KAAK,CAAEzF,KAAMmB,GAC5B,EAUgB,EAAAuB,QAAhB,SAAwBwF,GACpB,GAAwB,IAApBA,EAAIlI,KAAKW,QAAgBuH,EAAIlI,OAAS+I,EACtC,OAAOb,EAEX,IAAIlI,EAAO6I,EAAUnG,QAAQwF,EAAIlI,MAIjC,OAHoB,IAAhBA,EAAKW,QAAuC,KAAvBX,EAAKY,WAAW,KACrCZ,EAAO,IAEJkI,EAAIzC,KAAK,CAAEzF,QACtB,EAUgB,EAAA8C,SAAhB,SAAyBoF,GACrB,OAAOW,EAAU/F,SAASoF,EAAIlI,KAClC,EAUgB,EAAAmD,QAAhB,SAAwB+E,GACpB,OAAOW,EAAU1F,QAAQ+E,EAAIlI,KACjC,CACH,CAzFD,CAAiBgJ,IAAK,QAALA,EAAK,I,GCblBK,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBjI,IAAjBkI,EACH,OAAOA,EAAahK,QAGrB,IAAIC,EAAS4J,EAAyBE,GAAY,CAGjD/J,QAAS,CAAC,GAOX,OAHAiK,EAAoBF,GAAUG,KAAKjK,EAAOD,QAASC,EAAQA,EAAOD,QAAS8J,GAGpE7J,EAAOD,OACf,C,mGChBA,eAGS,mEAHA,EAAA6F,GAAG,IACZ,eAEc,qEAFL,EAAA2D,KAAK,G","sources":["webpack://vscode-uri/webpack/universalModuleDefinition","webpack://vscode-uri/./node_modules/path-browserify/index.js","webpack://vscode-uri/./src/platform.ts","webpack://vscode-uri/./src/uri.ts","webpack://vscode-uri/./src/utils.ts","webpack://vscode-uri/webpack/bootstrap","webpack://vscode-uri/./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, () => {\nreturn ","// 'path' module extracted from Node.js v8.11.1 (only the posix part)\n// transplited with Babel\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));\n }\n}\n\n// Resolves . and .. elements in a path with directory names\nfunction normalizeStringPosix(path, allowAboveRoot) {\n var res = '';\n var lastSegmentLength = 0;\n var lastSlash = -1;\n var dots = 0;\n var code;\n for (var i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = path.charCodeAt(i);\n else if (code === 47 /*/*/)\n break;\n else\n code = 47 /*/*/;\n if (code === 47 /*/*/) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n if (res.length > 2) {\n var lastSlashIndex = res.lastIndexOf('/');\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n } else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0)\n res += '/..';\n else\n res = '..';\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0)\n res += '/' + path.slice(lastSlash + 1, i);\n else\n res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\nfunction _format(sep, pathObject) {\n var dir = pathObject.dir || pathObject.root;\n var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');\n if (!dir) {\n return base;\n }\n if (dir === pathObject.root) {\n return dir + base;\n }\n return dir + sep + base;\n}\n\nvar posix = {\n // path.resolve([from ...], to)\n resolve: function resolve() {\n var resolvedPath = '';\n var resolvedAbsolute = false;\n var cwd;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path;\n if (i >= 0)\n path = arguments[i];\n else {\n if (cwd === undefined)\n cwd = process.cwd();\n path = cwd;\n }\n\n assertPath(path);\n\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0)\n return '/' + resolvedPath;\n else\n return '/';\n } else if (resolvedPath.length > 0) {\n return resolvedPath;\n } else {\n return '.';\n }\n },\n\n normalize: function normalize(path) {\n assertPath(path);\n\n if (path.length === 0) return '.';\n\n var isAbsolute = path.charCodeAt(0) === 47 /*/*/;\n var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;\n\n // Normalize the path\n path = normalizeStringPosix(path, !isAbsolute);\n\n if (path.length === 0 && !isAbsolute) path = '.';\n if (path.length > 0 && trailingSeparator) path += '/';\n\n if (isAbsolute) return '/' + path;\n return path;\n },\n\n isAbsolute: function isAbsolute(path) {\n assertPath(path);\n return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;\n },\n\n join: function join() {\n if (arguments.length === 0)\n return '.';\n var joined;\n for (var i = 0; i < arguments.length; ++i) {\n var arg = arguments[i];\n assertPath(arg);\n if (arg.length > 0) {\n if (joined === undefined)\n joined = arg;\n else\n joined += '/' + arg;\n }\n }\n if (joined === undefined)\n return '.';\n return posix.normalize(joined);\n },\n\n relative: function relative(from, to) {\n assertPath(from);\n assertPath(to);\n\n if (from === to) return '';\n\n from = posix.resolve(from);\n to = posix.resolve(to);\n\n if (from === to) return '';\n\n // Trim any leading backslashes\n var fromStart = 1;\n for (; fromStart < from.length; ++fromStart) {\n if (from.charCodeAt(fromStart) !== 47 /*/*/)\n break;\n }\n var fromEnd = from.length;\n var fromLen = fromEnd - fromStart;\n\n // Trim any leading backslashes\n var toStart = 1;\n for (; toStart < to.length; ++toStart) {\n if (to.charCodeAt(toStart) !== 47 /*/*/)\n break;\n }\n var toEnd = to.length;\n var toLen = toEnd - toStart;\n\n // Compare paths to find the longest common path from root\n var length = fromLen < toLen ? fromLen : toLen;\n var lastCommonSep = -1;\n var i = 0;\n for (; i <= length; ++i) {\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === 47 /*/*/) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n } else if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n } else if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === 47 /*/*/) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n } else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo'; to='/'\n lastCommonSep = 0;\n }\n }\n break;\n }\n var fromCode = from.charCodeAt(fromStart + i);\n var toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode)\n break;\n else if (fromCode === 47 /*/*/)\n lastCommonSep = i;\n }\n\n var out = '';\n // Generate the relative path based on the path difference between `to`\n // and `from`\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {\n if (out.length === 0)\n out += '..';\n else\n out += '/..';\n }\n }\n\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0)\n return out + to.slice(toStart + lastCommonSep);\n else {\n toStart += lastCommonSep;\n if (to.charCodeAt(toStart) === 47 /*/*/)\n ++toStart;\n return to.slice(toStart);\n }\n },\n\n _makeLong: function _makeLong(path) {\n return path;\n },\n\n dirname: function dirname(path) {\n assertPath(path);\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) return '//';\n return path.slice(0, end);\n },\n\n basename: function basename(path, ext) {\n if (ext !== undefined && typeof ext !== 'string') throw new TypeError('\"ext\" argument must be a string');\n assertPath(path);\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext.length === path.length && ext === path) return '';\n var extIdx = ext.length - 1;\n var firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n\n if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;\n return path.slice(start, end);\n } else {\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n }\n },\n\n extname: function extname(path) {\n assertPath(path);\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n },\n\n format: function format(pathObject) {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new TypeError('The \"pathObject\" argument must be of type Object. Received type ' + typeof pathObject);\n }\n return _format('/', pathObject);\n },\n\n parse: function parse(path) {\n assertPath(path);\n\n var ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) return ret;\n var code = path.charCodeAt(0);\n var isAbsolute = code === 47 /*/*/;\n var start;\n if (isAbsolute) {\n ret.root = '/';\n start = 1;\n } else {\n start = 0;\n }\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n var i = path.length - 1;\n\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n\n // Get non-dir info\n for (; i >= start; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);\n }\n } else {\n if (startPart === 0 && isAbsolute) {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n\n if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';\n\n return ret;\n },\n\n sep: '/',\n delimiter: ':',\n win32: null,\n posix: null\n};\n\nposix.posix = posix;\n\nmodule.exports = posix;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\n// !!!!!\n// SEE https://github.com/microsoft/vscode/blob/master/src/vs/base/common/platform.ts\n// !!!!!\n\ndeclare const process: { platform: 'win32' };\ndeclare const navigator: { userAgent: string };\n\nexport let isWindows: boolean;\n\nif (typeof process === 'object') {\n\tisWindows = process.platform === 'win32';\n} else if (typeof navigator === 'object') {\n\tlet userAgent = navigator.userAgent;\n\tisWindows = userAgent.indexOf('Windows') >= 0;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nimport { CharCode } from './charCode'\nimport { isWindows } from './platform';\n\nconst _schemePattern = /^\\w[\\w\\d+.-]*$/;\nconst _singleSlashStart = /^\\//;\nconst _doubleSlashStart = /^\\/\\//;\n\nfunction _validateUri(ret: URI, _strict?: boolean): void {\n\n\t// scheme, must be set\n\tif (!ret.scheme && _strict) {\n\t\tthrow new Error(`[UriError]: Scheme is missing: {scheme: \"\", authority: \"${ret.authority}\", path: \"${ret.path}\", query: \"${ret.query}\", fragment: \"${ret.fragment}\"}`);\n\t}\n\n\t// scheme, https://tools.ietf.org/html/rfc3986#section-3.1\n\t// ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\n\tif (ret.scheme && !_schemePattern.test(ret.scheme)) {\n\t\tthrow new Error('[UriError]: Scheme contains illegal characters.');\n\t}\n\n\t// path, http://tools.ietf.org/html/rfc3986#section-3.3\n\t// If a URI contains an authority component, then the path component\n\t// must either be empty or begin with a slash (\"/\") character. If a URI\n\t// does not contain an authority component, then the path cannot begin\n\t// with two slash characters (\"//\").\n\tif (ret.path) {\n\t\tif (ret.authority) {\n\t\t\tif (!_singleSlashStart.test(ret.path)) {\n\t\t\t\tthrow new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character');\n\t\t\t}\n\t\t} else {\n\t\t\tif (_doubleSlashStart.test(ret.path)) {\n\t\t\t\tthrow new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")');\n\t\t\t}\n\t\t}\n\t}\n}\n\n// for a while we allowed uris *without* schemes and this is the migration\n// for them, e.g. an uri without scheme and without strict-mode warns and falls\n// back to the file-scheme. that should cause the least carnage and still be a\n// clear warning\nfunction _schemeFix(scheme: string, _strict: boolean): string {\n\tif (!scheme && !_strict) {\n\t\treturn 'file';\n\t}\n\treturn scheme;\n}\n\n// implements a bit of https://tools.ietf.org/html/rfc3986#section-5\nfunction _referenceResolution(scheme: string, path: string): string {\n\n\t// the slash-character is our 'default base' as we don't\n\t// support constructing URIs relative to other URIs. This\n\t// also means that we alter and potentially break paths.\n\t// see https://tools.ietf.org/html/rfc3986#section-5.1.4\n\tswitch (scheme) {\n\t\tcase 'https':\n\t\tcase 'http':\n\t\tcase 'file':\n\t\t\tif (!path) {\n\t\t\t\tpath = _slash;\n\t\t\t} else if (path[0] !== _slash) {\n\t\t\t\tpath = _slash + path;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn path;\n}\n\nconst _empty = '';\nconst _slash = '/';\nconst _regexp = /^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\n\n/**\n * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.\n * This class is a simple parser which creates the basic component parts\n * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation\n * and encoding.\n *\n * ```txt\n * foo://example.com:8042/over/there?name=ferret#nose\n * \\_/ \\______________/\\_________/ \\_________/ \\__/\n * | | | | |\n * scheme authority path query fragment\n * | _____________________|__\n * / \\ / \\\n * urn:example:animal:ferret:nose\n * ```\n */\nexport class URI implements UriComponents {\n\n\tstatic isUri(thing: any): thing is URI {\n\t\tif (thing instanceof URI) {\n\t\t\treturn true;\n\t\t}\n\t\tif (!thing) {\n\t\t\treturn false;\n\t\t}\n\t\treturn typeof (thing).authority === 'string'\n\t\t\t&& typeof (thing).fragment === 'string'\n\t\t\t&& typeof (thing).path === 'string'\n\t\t\t&& typeof (thing).query === 'string'\n\t\t\t&& typeof (thing).scheme === 'string'\n\t\t\t&& typeof (thing).fsPath === 'string'\n\t\t\t&& typeof (thing).with === 'function'\n\t\t\t&& typeof (thing).toString === 'function';\n\t}\n\n\t/**\n\t * scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.\n\t * The part before the first colon.\n\t */\n\treadonly scheme: string;\n\n\t/**\n\t * authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'.\n\t * The part between the first double slashes and the next slash.\n\t */\n\treadonly authority: string;\n\n\t/**\n\t * path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly path: string;\n\n\t/**\n\t * query is the 'query' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly query: string;\n\n\t/**\n\t * fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly fragment: string;\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean);\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(components: UriComponents);\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(schemeOrData: string | UriComponents, authority?: string, path?: string, query?: string, fragment?: string, _strict: boolean = false) {\n\n\t\tif (typeof schemeOrData === 'object') {\n\t\t\tthis.scheme = schemeOrData.scheme || _empty;\n\t\t\tthis.authority = schemeOrData.authority || _empty;\n\t\t\tthis.path = schemeOrData.path || _empty;\n\t\t\tthis.query = schemeOrData.query || _empty;\n\t\t\tthis.fragment = schemeOrData.fragment || _empty;\n\t\t\t// no validation because it's this URI\n\t\t\t// that creates uri components.\n\t\t\t// _validateUri(this);\n\t\t} else {\n\t\t\tthis.scheme = _schemeFix(schemeOrData, _strict);\n\t\t\tthis.authority = authority || _empty;\n\t\t\tthis.path = _referenceResolution(this.scheme, path || _empty);\n\t\t\tthis.query = query || _empty;\n\t\t\tthis.fragment = fragment || _empty;\n\n\t\t\t_validateUri(this, _strict);\n\t\t}\n\t}\n\n\t// ---- filesystem path -----------------------\n\n\t/**\n\t * Returns a string representing the corresponding file system path of this URI.\n\t * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the\n\t * platform specific path separator.\n\t *\n\t * * Will *not* validate the path for invalid characters and semantics.\n\t * * Will *not* look at the scheme of this URI.\n\t * * The result shall *not* be used for display purposes but for accessing a file on disk.\n\t *\n\t *\n\t * The *difference* to `URI#path` is the use of the platform specific separator and the handling\n\t * of UNC paths. See the below sample of a file-uri with an authority (UNC path).\n\t *\n\t * ```ts\n\t\tconst u = URI.parse('file://server/c$/folder/file.txt')\n\t\tu.authority === 'server'\n\t\tu.path === '/shares/c$/file.txt'\n\t\tu.fsPath === '\\\\server\\c$\\folder\\file.txt'\n\t```\n\t *\n\t * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,\n\t * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working\n\t * with URIs that represent files on disk (`file` scheme).\n\t */\n\tget fsPath(): string {\n\t\t// if (this.scheme !== 'file') {\n\t\t// \tconsole.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);\n\t\t// }\n\t\treturn uriToFsPath(this, false);\n\t}\n\n\t// ---- modify to new -------------------------\n\n\twith(change: { scheme?: string; authority?: string | null; path?: string | null; query?: string | null; fragment?: string | null }): URI {\n\n\t\tif (!change) {\n\t\t\treturn this;\n\t\t}\n\n\t\tlet { scheme, authority, path, query, fragment } = change;\n\t\tif (scheme === undefined) {\n\t\t\tscheme = this.scheme;\n\t\t} else if (scheme === null) {\n\t\t\tscheme = _empty;\n\t\t}\n\t\tif (authority === undefined) {\n\t\t\tauthority = this.authority;\n\t\t} else if (authority === null) {\n\t\t\tauthority = _empty;\n\t\t}\n\t\tif (path === undefined) {\n\t\t\tpath = this.path;\n\t\t} else if (path === null) {\n\t\t\tpath = _empty;\n\t\t}\n\t\tif (query === undefined) {\n\t\t\tquery = this.query;\n\t\t} else if (query === null) {\n\t\t\tquery = _empty;\n\t\t}\n\t\tif (fragment === undefined) {\n\t\t\tfragment = this.fragment;\n\t\t} else if (fragment === null) {\n\t\t\tfragment = _empty;\n\t\t}\n\n\t\tif (scheme === this.scheme\n\t\t\t&& authority === this.authority\n\t\t\t&& path === this.path\n\t\t\t&& query === this.query\n\t\t\t&& fragment === this.fragment) {\n\n\t\t\treturn this;\n\t\t}\n\n\t\treturn new Uri(scheme, authority, path, query, fragment);\n\t}\n\n\t// ---- parse & validate ------------------------\n\n\t/**\n\t * Creates a new URI from a string, e.g. `http://www.example.com/some/path`,\n\t * `file:///usr/home`, or `scheme:with/path`.\n\t *\n\t * @param value A string which represents an URI (see `URI#toString`).\n\t */\n\tstatic parse(value: string, _strict: boolean = false): URI {\n\t\tconst match = _regexp.exec(value);\n\t\tif (!match) {\n\t\t\treturn new Uri(_empty, _empty, _empty, _empty, _empty);\n\t\t}\n\t\treturn new Uri(\n\t\t\tmatch[2] || _empty,\n\t\t\tpercentDecode(match[4] || _empty),\n\t\t\tpercentDecode(match[5] || _empty),\n\t\t\tpercentDecode(match[7] || _empty),\n\t\t\tpercentDecode(match[9] || _empty),\n\t\t\t_strict\n\t\t);\n\t}\n\n\t/**\n\t * Creates a new URI from a file system path, e.g. `c:\\my\\files`,\n\t * `/usr/home`, or `\\\\server\\share\\some\\path`.\n\t *\n\t * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument\n\t * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**\n\t * `URI.parse('file://' + path)` because the path might contain characters that are\n\t * interpreted (# and ?). See the following sample:\n\t * ```ts\n\tconst good = URI.file('/coding/c#/project1');\n\tgood.scheme === 'file';\n\tgood.path === '/coding/c#/project1';\n\tgood.fragment === '';\n\tconst bad = URI.parse('file://' + '/coding/c#/project1');\n\tbad.scheme === 'file';\n\tbad.path === '/coding/c'; // path is now broken\n\tbad.fragment === '/project1';\n\t```\n\t *\n\t * @param path A file system path (see `URI#fsPath`)\n\t */\n\tstatic file(path: string): URI {\n\n\t\tlet authority = _empty;\n\n\t\t// normalize to fwd-slashes on windows,\n\t\t// on other systems bwd-slashes are valid\n\t\t// filename character, eg /f\\oo/ba\\r.txt\n\t\tif (isWindows) {\n\t\t\tpath = path.replace(/\\\\/g, _slash);\n\t\t}\n\n\t\t// check for authority as used in UNC shares\n\t\t// or use the path as given\n\t\tif (path[0] === _slash && path[1] === _slash) {\n\t\t\tconst idx = path.indexOf(_slash, 2);\n\t\t\tif (idx === -1) {\n\t\t\t\tauthority = path.substring(2);\n\t\t\t\tpath = _slash;\n\t\t\t} else {\n\t\t\t\tauthority = path.substring(2, idx);\n\t\t\t\tpath = path.substring(idx) || _slash;\n\t\t\t}\n\t\t}\n\n\t\treturn new Uri('file', authority, path, _empty, _empty);\n\t}\n\n\tstatic from(components: { scheme: string; authority?: string; path?: string; query?: string; fragment?: string }): URI {\n\t\tconst result = new Uri(\n\t\t\tcomponents.scheme,\n\t\t\tcomponents.authority,\n\t\t\tcomponents.path,\n\t\t\tcomponents.query,\n\t\t\tcomponents.fragment,\n\t\t);\n\t\t_validateUri(result, true);\n\t\treturn result;\n\t}\n\n\t// ---- printing/externalize ---------------------------\n\n\t/**\n\t * Creates a string representation for this URI. It's guaranteed that calling\n\t * `URI.parse` with the result of this function creates an URI which is equal\n\t * to this URI.\n\t *\n\t * * The result shall *not* be used for display purposes but for externalization or transport.\n\t * * The result will be encoded using the percentage encoding and encoding happens mostly\n\t * ignore the scheme-specific encoding rules.\n\t *\n\t * @param skipEncoding Do not encode the result, default is `false`\n\t */\n\ttoString(skipEncoding: boolean = false): string {\n\t\treturn _asFormatted(this, skipEncoding);\n\t}\n\n\ttoJSON(): UriComponents {\n\t\treturn this;\n\t}\n\n\tstatic revive(data: UriComponents | URI): URI;\n\tstatic revive(data: UriComponents | URI | undefined): URI | undefined;\n\tstatic revive(data: UriComponents | URI | null): URI | null;\n\tstatic revive(data: UriComponents | URI | undefined | null): URI | undefined | null;\n\tstatic revive(data: UriComponents | URI | undefined | null): URI | undefined | null {\n\t\tif (!data) {\n\t\t\treturn data;\n\t\t} else if (data instanceof URI) {\n\t\t\treturn data;\n\t\t} else {\n\t\t\tconst result = new Uri(data);\n\t\t\tresult._formatted = (data).external;\n\t\t\tresult._fsPath = (data)._sep === _pathSepMarker ? (data).fsPath : null;\n\t\t\treturn result;\n\t\t}\n\t}\n}\n\nexport interface UriComponents {\n\tscheme: string;\n\tauthority: string;\n\tpath: string;\n\tquery: string;\n\tfragment: string;\n}\n\ninterface UriState extends UriComponents {\n\t$mid: number;\n\texternal: string;\n\tfsPath: string;\n\t_sep: 1 | undefined;\n}\n\nconst _pathSepMarker = isWindows ? 1 : undefined;\n\n// This class exists so that URI is compatible with vscode.Uri (API).\nclass Uri extends URI {\n\n\t_formatted: string | null = null;\n\t_fsPath: string | null = null;\n\n\toverride get fsPath(): string {\n\t\tif (!this._fsPath) {\n\t\t\tthis._fsPath = uriToFsPath(this, false);\n\t\t}\n\t\treturn this._fsPath;\n\t}\n\n\toverride toString(skipEncoding: boolean = false): string {\n\t\tif (!skipEncoding) {\n\t\t\tif (!this._formatted) {\n\t\t\t\tthis._formatted = _asFormatted(this, false);\n\t\t\t}\n\t\t\treturn this._formatted;\n\t\t} else {\n\t\t\t// we don't cache that\n\t\t\treturn _asFormatted(this, true);\n\t\t}\n\t}\n\n\toverride toJSON(): UriComponents {\n\t\tconst res = {\n\t\t\t$mid: 1\n\t\t};\n\t\t// cached state\n\t\tif (this._fsPath) {\n\t\t\tres.fsPath = this._fsPath;\n\t\t\tres._sep = _pathSepMarker;\n\t\t}\n\t\tif (this._formatted) {\n\t\t\tres.external = this._formatted;\n\t\t}\n\t\t// uri components\n\t\tif (this.path) {\n\t\t\tres.path = this.path;\n\t\t}\n\t\tif (this.scheme) {\n\t\t\tres.scheme = this.scheme;\n\t\t}\n\t\tif (this.authority) {\n\t\t\tres.authority = this.authority;\n\t\t}\n\t\tif (this.query) {\n\t\t\tres.query = this.query;\n\t\t}\n\t\tif (this.fragment) {\n\t\t\tres.fragment = this.fragment;\n\t\t}\n\t\treturn res;\n\t}\n}\n\n// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2\nconst encodeTable: { [ch: number]: string } = {\n\t[CharCode.Colon]: '%3A', // gen-delims\n\t[CharCode.Slash]: '%2F',\n\t[CharCode.QuestionMark]: '%3F',\n\t[CharCode.Hash]: '%23',\n\t[CharCode.OpenSquareBracket]: '%5B',\n\t[CharCode.CloseSquareBracket]: '%5D',\n\t[CharCode.AtSign]: '%40',\n\n\t[CharCode.ExclamationMark]: '%21', // sub-delims\n\t[CharCode.DollarSign]: '%24',\n\t[CharCode.Ampersand]: '%26',\n\t[CharCode.SingleQuote]: '%27',\n\t[CharCode.OpenParen]: '%28',\n\t[CharCode.CloseParen]: '%29',\n\t[CharCode.Asterisk]: '%2A',\n\t[CharCode.Plus]: '%2B',\n\t[CharCode.Comma]: '%2C',\n\t[CharCode.Semicolon]: '%3B',\n\t[CharCode.Equals]: '%3D',\n\n\t[CharCode.Space]: '%20',\n};\n\nfunction encodeURIComponentFast(uriComponent: string, isPath: boolean, isAuthority: boolean): string {\n\tlet res: string | undefined = undefined;\n\tlet nativeEncodePos = -1;\n\n\tfor (let pos = 0; pos < uriComponent.length; pos++) {\n\t\tconst code = uriComponent.charCodeAt(pos);\n\n\t\t// unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3\n\t\tif (\n\t\t\t(code >= CharCode.a && code <= CharCode.z)\n\t\t\t|| (code >= CharCode.A && code <= CharCode.Z)\n\t\t\t|| (code >= CharCode.Digit0 && code <= CharCode.Digit9)\n\t\t\t|| code === CharCode.Dash\n\t\t\t|| code === CharCode.Period\n\t\t\t|| code === CharCode.Underline\n\t\t\t|| code === CharCode.Tilde\n\t\t\t|| (isPath && code === CharCode.Slash)\n\t\t\t|| (isAuthority && code === CharCode.OpenSquareBracket)\n\t\t\t|| (isAuthority && code === CharCode.CloseSquareBracket)\n\t\t\t|| (isAuthority && code === CharCode.Colon)\n\t\t) {\n\t\t\t// check if we are delaying native encode\n\t\t\tif (nativeEncodePos !== -1) {\n\t\t\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n\t\t\t\tnativeEncodePos = -1;\n\t\t\t}\n\t\t\t// check if we write into a new string (by default we try to return the param)\n\t\t\tif (res !== undefined) {\n\t\t\t\tres += uriComponent.charAt(pos);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// encoding needed, we need to allocate a new string\n\t\t\tif (res === undefined) {\n\t\t\t\tres = uriComponent.substr(0, pos);\n\t\t\t}\n\n\t\t\t// check with default table first\n\t\t\tconst escaped = encodeTable[code];\n\t\t\tif (escaped !== undefined) {\n\n\t\t\t\t// check if we are delaying native encode\n\t\t\t\tif (nativeEncodePos !== -1) {\n\t\t\t\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n\t\t\t\t\tnativeEncodePos = -1;\n\t\t\t\t}\n\n\t\t\t\t// append escaped variant to result\n\t\t\t\tres += escaped;\n\n\t\t\t} else if (nativeEncodePos === -1) {\n\t\t\t\t// use native encode only when needed\n\t\t\t\tnativeEncodePos = pos;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (nativeEncodePos !== -1) {\n\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos));\n\t}\n\n\treturn res !== undefined ? res : uriComponent;\n}\n\nfunction encodeURIComponentMinimal(path: string): string {\n\tlet res: string | undefined = undefined;\n\tfor (let pos = 0; pos < path.length; pos++) {\n\t\tconst code = path.charCodeAt(pos);\n\t\tif (code === CharCode.Hash || code === CharCode.QuestionMark) {\n\t\t\tif (res === undefined) {\n\t\t\t\tres = path.substr(0, pos);\n\t\t\t}\n\t\t\tres += encodeTable[code];\n\t\t} else {\n\t\t\tif (res !== undefined) {\n\t\t\t\tres += path[pos];\n\t\t\t}\n\t\t}\n\t}\n\treturn res !== undefined ? res : path;\n}\n\n/**\n * Compute `fsPath` for the given uri\n */\nexport function uriToFsPath(uri: URI, keepDriveLetterCasing: boolean): string {\n\n\tlet value: string;\n\tif (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {\n\t\t// unc path: file://shares/c$/far/boo\n\t\tvalue = `//${uri.authority}${uri.path}`;\n\t} else if (\n\t\turi.path.charCodeAt(0) === CharCode.Slash\n\t\t&& (uri.path.charCodeAt(1) >= CharCode.A && uri.path.charCodeAt(1) <= CharCode.Z || uri.path.charCodeAt(1) >= CharCode.a && uri.path.charCodeAt(1) <= CharCode.z)\n\t\t&& uri.path.charCodeAt(2) === CharCode.Colon\n\t) {\n\t\tif (!keepDriveLetterCasing) {\n\t\t\t// windows drive letter: file:///c:/far/boo\n\t\t\tvalue = uri.path[1].toLowerCase() + uri.path.substr(2);\n\t\t} else {\n\t\t\tvalue = uri.path.substr(1);\n\t\t}\n\t} else {\n\t\t// other path\n\t\tvalue = uri.path;\n\t}\n\tif (isWindows) {\n\t\tvalue = value.replace(/\\//g, '\\\\');\n\t}\n\treturn value;\n}\n\n/**\n * Create the external version of a uri\n */\nfunction _asFormatted(uri: URI, skipEncoding: boolean): string {\n\n\tconst encoder = !skipEncoding\n\t\t? encodeURIComponentFast\n\t\t: encodeURIComponentMinimal;\n\n\tlet res = '';\n\tlet { scheme, authority, path, query, fragment } = uri;\n\tif (scheme) {\n\t\tres += scheme;\n\t\tres += ':';\n\t}\n\tif (authority || scheme === 'file') {\n\t\tres += _slash;\n\t\tres += _slash;\n\t}\n\tif (authority) {\n\t\tlet idx = authority.indexOf('@');\n\t\tif (idx !== -1) {\n\t\t\t// @\n\t\t\tconst userinfo = authority.substr(0, idx);\n\t\t\tauthority = authority.substr(idx + 1);\n\t\t\tidx = userinfo.lastIndexOf(':');\n\t\t\tif (idx === -1) {\n\t\t\t\tres += encoder(userinfo, false, false);\n\t\t\t} else {\n\t\t\t\t// :@\n\t\t\t\tres += encoder(userinfo.substr(0, idx), false, false);\n\t\t\t\tres += ':';\n\t\t\t\tres += encoder(userinfo.substr(idx + 1), false, true);\n\t\t\t}\n\t\t\tres += '@';\n\t\t}\n\t\tauthority = authority.toLowerCase();\n\t\tidx = authority.lastIndexOf(':');\n\t\tif (idx === -1) {\n\t\t\tres += encoder(authority, false, true);\n\t\t} else {\n\t\t\t// :\n\t\t\tres += encoder(authority.substr(0, idx), false, true);\n\t\t\tres += authority.substr(idx);\n\t\t}\n\t}\n\tif (path) {\n\t\t// lower-case windows drive letters in /C:/fff or C:/fff\n\t\tif (path.length >= 3 && path.charCodeAt(0) === CharCode.Slash && path.charCodeAt(2) === CharCode.Colon) {\n\t\t\tconst code = path.charCodeAt(1);\n\t\t\tif (code >= CharCode.A && code <= CharCode.Z) {\n\t\t\t\tpath = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`; // \"/c:\".length === 3\n\t\t\t}\n\t\t} else if (path.length >= 2 && path.charCodeAt(1) === CharCode.Colon) {\n\t\t\tconst code = path.charCodeAt(0);\n\t\t\tif (code >= CharCode.A && code <= CharCode.Z) {\n\t\t\t\tpath = `${String.fromCharCode(code + 32)}:${path.substr(2)}`; // \"/c:\".length === 3\n\t\t\t}\n\t\t}\n\t\t// encode the rest of the path\n\t\tres += encoder(path, true, false);\n\t}\n\tif (query) {\n\t\tres += '?';\n\t\tres += encoder(query, false, false);\n\t}\n\tif (fragment) {\n\t\tres += '#';\n\t\tres += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment;\n\t}\n\treturn res;\n}\n\n// --- decode\n\nfunction decodeURIComponentGraceful(str: string): string {\n\ttry {\n\t\treturn decodeURIComponent(str);\n\t} catch {\n\t\tif (str.length > 3) {\n\t\t\treturn str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));\n\t\t} else {\n\t\t\treturn str;\n\t\t}\n\t}\n}\n\nconst _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;\n\nfunction percentDecode(str: string): string {\n\tif (!str.match(_rEncodedAsHex)) {\n\t\treturn str;\n\t}\n\treturn str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match));\n}\n\n/**\n * Mapped-type that replaces all occurrences of URI with UriComponents\n */\nexport type UriDto = { [K in keyof T]: T[K] extends URI\n\t? UriComponents\n\t: UriDto };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n'use strict';\n\nimport { CharCode } from './charCode';\nimport { URI } from './uri';\nimport * as nodePath from 'path';\n\nconst posixPath = nodePath.posix || nodePath;\nconst slash = '/';\n\nexport namespace Utils {\n\n /**\n * Joins one or more input paths to the path of URI. \n * '/' is used as the directory separation character. \n * \n * The resolved path will be normalized. That means:\n * - all '..' and '.' segments are resolved.\n * - multiple, sequential occurences of '/' are replaced by a single instance of '/'.\n * - trailing separators are preserved.\n * \n * @param uri The input URI.\n * @param paths The paths to be joined with the path of URI.\n * @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.\n */\n export function joinPath(uri: URI, ...paths: string[]): URI {\n return uri.with({ path: posixPath.join(uri.path, ...paths) });\n }\n\n\n /**\n * Resolves one or more paths against the path of a URI. \n * '/' is used as the directory separation character. \n * \n * The resolved path will be normalized. That means:\n * - all '..' and '.' segments are resolved. \n * - multiple, sequential occurences of '/' are replaced by a single instance of '/'.\n * - trailing separators are removed.\n * \n * @param uri The input URI.\n * @param paths The paths to resolve against the path of URI.\n * @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.\n */\n export function resolvePath(uri: URI, ...paths: string[]): URI {\n let path = uri.path; \n let slashAdded = false;\n if (path[0] !== slash) {\n path = slash + path; // make the path abstract: for posixPath.resolve the first segments has to be absolute or cwd is used.\n slashAdded = true;\n }\n let resolvedPath = posixPath.resolve(path, ...paths);\n if (slashAdded && resolvedPath[0] === slash && !uri.authority) {\n resolvedPath = resolvedPath.substring(1);\n }\n return uri.with({ path: resolvedPath });\n }\n\n /**\n * Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The orignal URI is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The last segment of the URIs path.\n */\n export function dirname(uri: URI): URI {\n if (uri.path.length === 0 || uri.path === slash) {\n return uri;\n }\n let path = posixPath.dirname(uri.path);\n if (path.length === 1 && path.charCodeAt(0) === CharCode.Period) {\n path = '';\n }\n return uri.with({ path });\n }\n\n /**\n * Returns the last segment of the path of a URI, similar to the Unix basename command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The empty string is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The base name of the URIs path.\n */\n export function basename(uri: URI): string {\n return posixPath.basename(uri.path);\n }\n\n /**\n * Returns the extension name of the path of a URI, similar to the Unix extname command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The empty string is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The extension name of the URIs path.\n */\n export function extname(uri: URI): string {\n return posixPath.extname(uri.path);\n }\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nimport { URI } from './uri';\nimport { Utils } from './utils';\n\nexport { URI, Utils }"],"names":["root","factory","exports","module","define","amd","a","i","this","assertPath","path","TypeError","JSON","stringify","normalizeStringPosix","allowAboveRoot","code","res","lastSegmentLength","lastSlash","dots","length","charCodeAt","lastSlashIndex","lastIndexOf","slice","posix","resolve","cwd","resolvedPath","resolvedAbsolute","arguments","undefined","process","normalize","isAbsolute","trailingSeparator","join","joined","arg","relative","from","to","fromStart","fromEnd","fromLen","toStart","toLen","lastCommonSep","fromCode","out","_makeLong","dirname","hasRoot","end","matchedSlash","basename","ext","start","extIdx","firstNonSlashEnd","extname","startDot","startPart","preDotState","format","pathObject","sep","dir","base","name","_format","parse","ret","delimiter","win32","isWindows","platform","navigator","userAgent","indexOf","_schemePattern","_singleSlashStart","_doubleSlashStart","_validateUri","_strict","scheme","Error","authority","query","fragment","test","_empty","_slash","_regexp","URI","isUri","thing","fsPath","with","toString","schemeOrData","_schemeFix","_referenceResolution","uriToFsPath","change","Uri","value","match","exec","percentDecode","file","replace","idx","substring","components","result","skipEncoding","_asFormatted","toJSON","revive","data","_formatted","external","_fsPath","_sep","_pathSepMarker","$mid","encodeTable","encodeURIComponentFast","uriComponent","isPath","isAuthority","nativeEncodePos","pos","encodeURIComponent","charAt","substr","escaped","encodeURIComponentMinimal","uri","keepDriveLetterCasing","toLowerCase","encoder","userinfo","String","fromCharCode","decodeURIComponentGraceful","str","decodeURIComponent","_rEncodedAsHex","posixPath","nodePath","slash","Utils","joinPath","paths","resolvePath","slashAdded","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","call"],"sourceRoot":""} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/platform.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/platform.d.ts" index d02698ab0fab6ff243c2549df4b5776de03d267d..1660688e2e46a06cb97e0ab573e55856c6775f96 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/platform.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/platform.d.ts" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ab34bee45fe908c992964ac5f881e1c96140c04c2e4e6e7ad9b9a282bf4325de -size 39 +export declare let isWindows: boolean; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/platform.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/platform.js" index c47babcd8802d30a58dbd103d5e0131ee0b07e8d..f6538ab92dd08eb7c804c098029270fa155035f5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/platform.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/platform.js" @@ -1,3 +1,14 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8db7f807d815332325bd1c24b7e0862d4979305135ab4a5a8609ebe7f8d5ef16 -size 692 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isWindows = void 0; +if (typeof process === 'object') { + exports.isWindows = process.platform === 'win32'; +} +else if (typeof navigator === 'object') { + let userAgent = navigator.userAgent; + exports.isWindows = userAgent.indexOf('Windows') >= 0; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/uri.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/uri.d.ts" index 84c971220f6f53588ef4222a88f07e92149bff82..1d46b9b09c7228bb0f37c496f342d907ddcaeb20 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/uri.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/uri.d.ts" @@ -1,3 +1,151 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:657e6dc684415721980e91e97785f1b8e6da4134e194de757d2d3733c54b4f06 -size 5843 +/** + * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986. + * This class is a simple parser which creates the basic component parts + * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation + * and encoding. + * + * ```txt + * foo://example.com:8042/over/there?name=ferret#nose + * \_/ \______________/\_________/ \_________/ \__/ + * | | | | | + * scheme authority path query fragment + * | _____________________|__ + * / \ / \ + * urn:example:animal:ferret:nose + * ``` + */ +export declare class URI implements UriComponents { + static isUri(thing: any): thing is URI; + /** + * scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'. + * The part before the first colon. + */ + readonly scheme: string; + /** + * authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'. + * The part between the first double slashes and the next slash. + */ + readonly authority: string; + /** + * path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'. + */ + readonly path: string; + /** + * query is the 'query' part of 'http://www.example.com/some/path?query#fragment'. + */ + readonly query: string; + /** + * fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'. + */ + readonly fragment: string; + /** + * @internal + */ + protected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean); + /** + * @internal + */ + protected constructor(components: UriComponents); + /** + * Returns a string representing the corresponding file system path of this URI. + * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the + * platform specific path separator. + * + * * Will *not* validate the path for invalid characters and semantics. + * * Will *not* look at the scheme of this URI. + * * The result shall *not* be used for display purposes but for accessing a file on disk. + * + * + * The *difference* to `URI#path` is the use of the platform specific separator and the handling + * of UNC paths. See the below sample of a file-uri with an authority (UNC path). + * + * ```ts + const u = URI.parse('file://server/c$/folder/file.txt') + u.authority === 'server' + u.path === '/shares/c$/file.txt' + u.fsPath === '\\server\c$\folder\file.txt' + ``` + * + * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path, + * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working + * with URIs that represent files on disk (`file` scheme). + */ + get fsPath(): string; + with(change: { + scheme?: string; + authority?: string | null; + path?: string | null; + query?: string | null; + fragment?: string | null; + }): URI; + /** + * Creates a new URI from a string, e.g. `http://www.example.com/some/path`, + * `file:///usr/home`, or `scheme:with/path`. + * + * @param value A string which represents an URI (see `URI#toString`). + */ + static parse(value: string, _strict?: boolean): URI; + /** + * Creates a new URI from a file system path, e.g. `c:\my\files`, + * `/usr/home`, or `\\server\share\some\path`. + * + * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument + * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as** + * `URI.parse('file://' + path)` because the path might contain characters that are + * interpreted (# and ?). See the following sample: + * ```ts + const good = URI.file('/coding/c#/project1'); + good.scheme === 'file'; + good.path === '/coding/c#/project1'; + good.fragment === ''; + const bad = URI.parse('file://' + '/coding/c#/project1'); + bad.scheme === 'file'; + bad.path === '/coding/c'; // path is now broken + bad.fragment === '/project1'; + ``` + * + * @param path A file system path (see `URI#fsPath`) + */ + static file(path: string): URI; + static from(components: { + scheme: string; + authority?: string; + path?: string; + query?: string; + fragment?: string; + }): URI; + /** + * Creates a string representation for this URI. It's guaranteed that calling + * `URI.parse` with the result of this function creates an URI which is equal + * to this URI. + * + * * The result shall *not* be used for display purposes but for externalization or transport. + * * The result will be encoded using the percentage encoding and encoding happens mostly + * ignore the scheme-specific encoding rules. + * + * @param skipEncoding Do not encode the result, default is `false` + */ + toString(skipEncoding?: boolean): string; + toJSON(): UriComponents; + static revive(data: UriComponents | URI): URI; + static revive(data: UriComponents | URI | undefined): URI | undefined; + static revive(data: UriComponents | URI | null): URI | null; + static revive(data: UriComponents | URI | undefined | null): URI | undefined | null; +} +export interface UriComponents { + scheme: string; + authority: string; + path: string; + query: string; + fragment: string; +} +/** + * Compute `fsPath` for the given uri + */ +export declare function uriToFsPath(uri: URI, keepDriveLetterCasing: boolean): string; +/** + * Mapped-type that replaces all occurrences of URI with UriComponents + */ +export type UriDto = { + [K in keyof T]: T[K] extends URI ? UriComponents : UriDto; +}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/uri.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/uri.js" index efd918443ad9718950f15000dc56747ee67814e9..dc88986c27396e55133b2c07334e5350cd625551 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/uri.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/uri.js" @@ -1,3 +1,595 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c1c3551c85a2812e7e1e56a34d5a371f1114027bfca9bebee7eb88fe616afd4 -size 21939 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.uriToFsPath = exports.URI = void 0; +const platform_1 = require("./platform"); +const _schemePattern = /^\w[\w\d+.-]*$/; +const _singleSlashStart = /^\//; +const _doubleSlashStart = /^\/\//; +function _validateUri(ret, _strict) { + // scheme, must be set + if (!ret.scheme && _strict) { + throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${ret.authority}", path: "${ret.path}", query: "${ret.query}", fragment: "${ret.fragment}"}`); + } + // scheme, https://tools.ietf.org/html/rfc3986#section-3.1 + // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) + if (ret.scheme && !_schemePattern.test(ret.scheme)) { + throw new Error('[UriError]: Scheme contains illegal characters.'); + } + // path, http://tools.ietf.org/html/rfc3986#section-3.3 + // If a URI contains an authority component, then the path component + // must either be empty or begin with a slash ("/") character. If a URI + // does not contain an authority component, then the path cannot begin + // with two slash characters ("//"). + if (ret.path) { + if (ret.authority) { + if (!_singleSlashStart.test(ret.path)) { + 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'); + } + } + else { + if (_doubleSlashStart.test(ret.path)) { + throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'); + } + } + } +} +// for a while we allowed uris *without* schemes and this is the migration +// for them, e.g. an uri without scheme and without strict-mode warns and falls +// back to the file-scheme. that should cause the least carnage and still be a +// clear warning +function _schemeFix(scheme, _strict) { + if (!scheme && !_strict) { + return 'file'; + } + return scheme; +} +// implements a bit of https://tools.ietf.org/html/rfc3986#section-5 +function _referenceResolution(scheme, path) { + // the slash-character is our 'default base' as we don't + // support constructing URIs relative to other URIs. This + // also means that we alter and potentially break paths. + // see https://tools.ietf.org/html/rfc3986#section-5.1.4 + switch (scheme) { + case 'https': + case 'http': + case 'file': + if (!path) { + path = _slash; + } + else if (path[0] !== _slash) { + path = _slash + path; + } + break; + } + return path; +} +const _empty = ''; +const _slash = '/'; +const _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; +/** + * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986. + * This class is a simple parser which creates the basic component parts + * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation + * and encoding. + * + * ```txt + * foo://example.com:8042/over/there?name=ferret#nose + * \_/ \______________/\_________/ \_________/ \__/ + * | | | | | + * scheme authority path query fragment + * | _____________________|__ + * / \ / \ + * urn:example:animal:ferret:nose + * ``` + */ +class URI { + static isUri(thing) { + if (thing instanceof URI) { + return true; + } + if (!thing) { + return false; + } + return typeof thing.authority === 'string' + && typeof thing.fragment === 'string' + && typeof thing.path === 'string' + && typeof thing.query === 'string' + && typeof thing.scheme === 'string' + && typeof thing.fsPath === 'string' + && typeof thing.with === 'function' + && typeof thing.toString === 'function'; + } + /** + * scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'. + * The part before the first colon. + */ + scheme; + /** + * authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'. + * The part between the first double slashes and the next slash. + */ + authority; + /** + * path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'. + */ + path; + /** + * query is the 'query' part of 'http://www.example.com/some/path?query#fragment'. + */ + query; + /** + * fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'. + */ + fragment; + /** + * @internal + */ + constructor(schemeOrData, authority, path, query, fragment, _strict = false) { + if (typeof schemeOrData === 'object') { + this.scheme = schemeOrData.scheme || _empty; + this.authority = schemeOrData.authority || _empty; + this.path = schemeOrData.path || _empty; + this.query = schemeOrData.query || _empty; + this.fragment = schemeOrData.fragment || _empty; + // no validation because it's this URI + // that creates uri components. + // _validateUri(this); + } + else { + this.scheme = _schemeFix(schemeOrData, _strict); + this.authority = authority || _empty; + this.path = _referenceResolution(this.scheme, path || _empty); + this.query = query || _empty; + this.fragment = fragment || _empty; + _validateUri(this, _strict); + } + } + // ---- filesystem path ----------------------- + /** + * Returns a string representing the corresponding file system path of this URI. + * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the + * platform specific path separator. + * + * * Will *not* validate the path for invalid characters and semantics. + * * Will *not* look at the scheme of this URI. + * * The result shall *not* be used for display purposes but for accessing a file on disk. + * + * + * The *difference* to `URI#path` is the use of the platform specific separator and the handling + * of UNC paths. See the below sample of a file-uri with an authority (UNC path). + * + * ```ts + const u = URI.parse('file://server/c$/folder/file.txt') + u.authority === 'server' + u.path === '/shares/c$/file.txt' + u.fsPath === '\\server\c$\folder\file.txt' + ``` + * + * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path, + * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working + * with URIs that represent files on disk (`file` scheme). + */ + get fsPath() { + // if (this.scheme !== 'file') { + // console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`); + // } + return uriToFsPath(this, false); + } + // ---- modify to new ------------------------- + with(change) { + if (!change) { + return this; + } + let { scheme, authority, path, query, fragment } = change; + if (scheme === undefined) { + scheme = this.scheme; + } + else if (scheme === null) { + scheme = _empty; + } + if (authority === undefined) { + authority = this.authority; + } + else if (authority === null) { + authority = _empty; + } + if (path === undefined) { + path = this.path; + } + else if (path === null) { + path = _empty; + } + if (query === undefined) { + query = this.query; + } + else if (query === null) { + query = _empty; + } + if (fragment === undefined) { + fragment = this.fragment; + } + else if (fragment === null) { + fragment = _empty; + } + if (scheme === this.scheme + && authority === this.authority + && path === this.path + && query === this.query + && fragment === this.fragment) { + return this; + } + return new Uri(scheme, authority, path, query, fragment); + } + // ---- parse & validate ------------------------ + /** + * Creates a new URI from a string, e.g. `http://www.example.com/some/path`, + * `file:///usr/home`, or `scheme:with/path`. + * + * @param value A string which represents an URI (see `URI#toString`). + */ + static parse(value, _strict = false) { + const match = _regexp.exec(value); + if (!match) { + return new Uri(_empty, _empty, _empty, _empty, _empty); + } + return new Uri(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict); + } + /** + * Creates a new URI from a file system path, e.g. `c:\my\files`, + * `/usr/home`, or `\\server\share\some\path`. + * + * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument + * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as** + * `URI.parse('file://' + path)` because the path might contain characters that are + * interpreted (# and ?). See the following sample: + * ```ts + const good = URI.file('/coding/c#/project1'); + good.scheme === 'file'; + good.path === '/coding/c#/project1'; + good.fragment === ''; + const bad = URI.parse('file://' + '/coding/c#/project1'); + bad.scheme === 'file'; + bad.path === '/coding/c'; // path is now broken + bad.fragment === '/project1'; + ``` + * + * @param path A file system path (see `URI#fsPath`) + */ + static file(path) { + let authority = _empty; + // normalize to fwd-slashes on windows, + // on other systems bwd-slashes are valid + // filename character, eg /f\oo/ba\r.txt + if (platform_1.isWindows) { + path = path.replace(/\\/g, _slash); + } + // check for authority as used in UNC shares + // or use the path as given + if (path[0] === _slash && path[1] === _slash) { + const idx = path.indexOf(_slash, 2); + if (idx === -1) { + authority = path.substring(2); + path = _slash; + } + else { + authority = path.substring(2, idx); + path = path.substring(idx) || _slash; + } + } + return new Uri('file', authority, path, _empty, _empty); + } + static from(components) { + const result = new Uri(components.scheme, components.authority, components.path, components.query, components.fragment); + _validateUri(result, true); + return result; + } + // ---- printing/externalize --------------------------- + /** + * Creates a string representation for this URI. It's guaranteed that calling + * `URI.parse` with the result of this function creates an URI which is equal + * to this URI. + * + * * The result shall *not* be used for display purposes but for externalization or transport. + * * The result will be encoded using the percentage encoding and encoding happens mostly + * ignore the scheme-specific encoding rules. + * + * @param skipEncoding Do not encode the result, default is `false` + */ + toString(skipEncoding = false) { + return _asFormatted(this, skipEncoding); + } + toJSON() { + return this; + } + static revive(data) { + if (!data) { + return data; + } + else if (data instanceof URI) { + return data; + } + else { + const result = new Uri(data); + result._formatted = data.external; + result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null; + return result; + } + } +} +exports.URI = URI; +const _pathSepMarker = platform_1.isWindows ? 1 : undefined; +// This class exists so that URI is compatible with vscode.Uri (API). +class Uri extends URI { + _formatted = null; + _fsPath = null; + get fsPath() { + if (!this._fsPath) { + this._fsPath = uriToFsPath(this, false); + } + return this._fsPath; + } + toString(skipEncoding = false) { + if (!skipEncoding) { + if (!this._formatted) { + this._formatted = _asFormatted(this, false); + } + return this._formatted; + } + else { + // we don't cache that + return _asFormatted(this, true); + } + } + toJSON() { + const res = { + $mid: 1 + }; + // cached state + if (this._fsPath) { + res.fsPath = this._fsPath; + res._sep = _pathSepMarker; + } + if (this._formatted) { + res.external = this._formatted; + } + // uri components + if (this.path) { + res.path = this.path; + } + if (this.scheme) { + res.scheme = this.scheme; + } + if (this.authority) { + res.authority = this.authority; + } + if (this.query) { + res.query = this.query; + } + if (this.fragment) { + res.fragment = this.fragment; + } + return res; + } +} +// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2 +const encodeTable = { + [58 /* CharCode.Colon */]: '%3A', + [47 /* CharCode.Slash */]: '%2F', + [63 /* CharCode.QuestionMark */]: '%3F', + [35 /* CharCode.Hash */]: '%23', + [91 /* CharCode.OpenSquareBracket */]: '%5B', + [93 /* CharCode.CloseSquareBracket */]: '%5D', + [64 /* CharCode.AtSign */]: '%40', + [33 /* CharCode.ExclamationMark */]: '%21', + [36 /* CharCode.DollarSign */]: '%24', + [38 /* CharCode.Ampersand */]: '%26', + [39 /* CharCode.SingleQuote */]: '%27', + [40 /* CharCode.OpenParen */]: '%28', + [41 /* CharCode.CloseParen */]: '%29', + [42 /* CharCode.Asterisk */]: '%2A', + [43 /* CharCode.Plus */]: '%2B', + [44 /* CharCode.Comma */]: '%2C', + [59 /* CharCode.Semicolon */]: '%3B', + [61 /* CharCode.Equals */]: '%3D', + [32 /* CharCode.Space */]: '%20', +}; +function encodeURIComponentFast(uriComponent, isPath, isAuthority) { + let res = undefined; + let nativeEncodePos = -1; + for (let pos = 0; pos < uriComponent.length; pos++) { + const code = uriComponent.charCodeAt(pos); + // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3 + if ((code >= 97 /* CharCode.a */ && code <= 122 /* CharCode.z */) + || (code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */) + || (code >= 48 /* CharCode.Digit0 */ && code <= 57 /* CharCode.Digit9 */) + || code === 45 /* CharCode.Dash */ + || code === 46 /* CharCode.Period */ + || code === 95 /* CharCode.Underline */ + || code === 126 /* CharCode.Tilde */ + || (isPath && code === 47 /* CharCode.Slash */) + || (isAuthority && code === 91 /* CharCode.OpenSquareBracket */) + || (isAuthority && code === 93 /* CharCode.CloseSquareBracket */) + || (isAuthority && code === 58 /* CharCode.Colon */)) { + // check if we are delaying native encode + if (nativeEncodePos !== -1) { + res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos)); + nativeEncodePos = -1; + } + // check if we write into a new string (by default we try to return the param) + if (res !== undefined) { + res += uriComponent.charAt(pos); + } + } + else { + // encoding needed, we need to allocate a new string + if (res === undefined) { + res = uriComponent.substr(0, pos); + } + // check with default table first + const escaped = encodeTable[code]; + if (escaped !== undefined) { + // check if we are delaying native encode + if (nativeEncodePos !== -1) { + res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos)); + nativeEncodePos = -1; + } + // append escaped variant to result + res += escaped; + } + else if (nativeEncodePos === -1) { + // use native encode only when needed + nativeEncodePos = pos; + } + } + } + if (nativeEncodePos !== -1) { + res += encodeURIComponent(uriComponent.substring(nativeEncodePos)); + } + return res !== undefined ? res : uriComponent; +} +function encodeURIComponentMinimal(path) { + let res = undefined; + for (let pos = 0; pos < path.length; pos++) { + const code = path.charCodeAt(pos); + if (code === 35 /* CharCode.Hash */ || code === 63 /* CharCode.QuestionMark */) { + if (res === undefined) { + res = path.substr(0, pos); + } + res += encodeTable[code]; + } + else { + if (res !== undefined) { + res += path[pos]; + } + } + } + return res !== undefined ? res : path; +} +/** + * Compute `fsPath` for the given uri + */ +function uriToFsPath(uri, keepDriveLetterCasing) { + let value; + if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') { + // unc path: file://shares/c$/far/boo + value = `//${uri.authority}${uri.path}`; + } + else if (uri.path.charCodeAt(0) === 47 /* CharCode.Slash */ + && (uri.path.charCodeAt(1) >= 65 /* CharCode.A */ && uri.path.charCodeAt(1) <= 90 /* CharCode.Z */ || uri.path.charCodeAt(1) >= 97 /* CharCode.a */ && uri.path.charCodeAt(1) <= 122 /* CharCode.z */) + && uri.path.charCodeAt(2) === 58 /* CharCode.Colon */) { + if (!keepDriveLetterCasing) { + // windows drive letter: file:///c:/far/boo + value = uri.path[1].toLowerCase() + uri.path.substr(2); + } + else { + value = uri.path.substr(1); + } + } + else { + // other path + value = uri.path; + } + if (platform_1.isWindows) { + value = value.replace(/\//g, '\\'); + } + return value; +} +exports.uriToFsPath = uriToFsPath; +/** + * Create the external version of a uri + */ +function _asFormatted(uri, skipEncoding) { + const encoder = !skipEncoding + ? encodeURIComponentFast + : encodeURIComponentMinimal; + let res = ''; + let { scheme, authority, path, query, fragment } = uri; + if (scheme) { + res += scheme; + res += ':'; + } + if (authority || scheme === 'file') { + res += _slash; + res += _slash; + } + if (authority) { + let idx = authority.indexOf('@'); + if (idx !== -1) { + // @ + const userinfo = authority.substr(0, idx); + authority = authority.substr(idx + 1); + idx = userinfo.lastIndexOf(':'); + if (idx === -1) { + res += encoder(userinfo, false, false); + } + else { + // :@ + res += encoder(userinfo.substr(0, idx), false, false); + res += ':'; + res += encoder(userinfo.substr(idx + 1), false, true); + } + res += '@'; + } + authority = authority.toLowerCase(); + idx = authority.lastIndexOf(':'); + if (idx === -1) { + res += encoder(authority, false, true); + } + else { + // : + res += encoder(authority.substr(0, idx), false, true); + res += authority.substr(idx); + } + } + if (path) { + // lower-case windows drive letters in /C:/fff or C:/fff + if (path.length >= 3 && path.charCodeAt(0) === 47 /* CharCode.Slash */ && path.charCodeAt(2) === 58 /* CharCode.Colon */) { + const code = path.charCodeAt(1); + if (code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */) { + path = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`; // "/c:".length === 3 + } + } + else if (path.length >= 2 && path.charCodeAt(1) === 58 /* CharCode.Colon */) { + const code = path.charCodeAt(0); + if (code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */) { + path = `${String.fromCharCode(code + 32)}:${path.substr(2)}`; // "/c:".length === 3 + } + } + // encode the rest of the path + res += encoder(path, true, false); + } + if (query) { + res += '?'; + res += encoder(query, false, false); + } + if (fragment) { + res += '#'; + res += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment; + } + return res; +} +// --- decode +function decodeURIComponentGraceful(str) { + try { + return decodeURIComponent(str); + } + catch { + if (str.length > 3) { + return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3)); + } + else { + return str; + } + } +} +const _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g; +function percentDecode(str) { + if (!str.match(_rEncodedAsHex)) { + return str; + } + return str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match)); +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/utils.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/utils.d.ts" index 35a843864288a0ec3dc68953da034aac771c82f7..26ed5e6501878ef9c4440275fed08df1aca105a2 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/utils.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/utils.d.ts" @@ -1,3 +1,58 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bad1bc59cf9ba7f2b8efc0f7342b141843cbf3d3d791fa13df4ff9b86db26df9 -size 2861 +import { URI } from './uri'; +export declare namespace Utils { + /** + * Joins one or more input paths to the path of URI. + * '/' is used as the directory separation character. + * + * The resolved path will be normalized. That means: + * - all '..' and '.' segments are resolved. + * - multiple, sequential occurences of '/' are replaced by a single instance of '/'. + * - trailing separators are preserved. + * + * @param uri The input URI. + * @param paths The paths to be joined with the path of URI. + * @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI. + */ + function joinPath(uri: URI, ...paths: string[]): URI; + /** + * Resolves one or more paths against the path of a URI. + * '/' is used as the directory separation character. + * + * The resolved path will be normalized. That means: + * - all '..' and '.' segments are resolved. + * - multiple, sequential occurences of '/' are replaced by a single instance of '/'. + * - trailing separators are removed. + * + * @param uri The input URI. + * @param paths The paths to resolve against the path of URI. + * @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI. + */ + function resolvePath(uri: URI, ...paths: string[]): URI; + /** + * Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The orignal URI is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The last segment of the URIs path. + */ + function dirname(uri: URI): URI; + /** + * Returns the last segment of the path of a URI, similar to the Unix basename command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The empty string is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The base name of the URIs path. + */ + function basename(uri: URI): string; + /** + * Returns the extension name of the path of a URI, similar to the Unix extname command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The empty string is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The extension name of the URIs path. + */ + function extname(uri: URI): string; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/utils.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/utils.js" index 83efe6b9c8707bbd6324afa744fdcfe91cee46b2..c683b4cb5f93533fe407a785a2fc49050b6888be 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/utils.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/lib/umd/utils.js" @@ -1,3 +1,123 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9f9b8f431890c158e48c2d7d2eb509898efb88d2d20d46351f015dbce4439ed9 -size 5552 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Utils = void 0; +const nodePath = __importStar(require("path")); +const posixPath = nodePath.posix || nodePath; +const slash = '/'; +var Utils; +(function (Utils) { + /** + * Joins one or more input paths to the path of URI. + * '/' is used as the directory separation character. + * + * The resolved path will be normalized. That means: + * - all '..' and '.' segments are resolved. + * - multiple, sequential occurences of '/' are replaced by a single instance of '/'. + * - trailing separators are preserved. + * + * @param uri The input URI. + * @param paths The paths to be joined with the path of URI. + * @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI. + */ + function joinPath(uri, ...paths) { + return uri.with({ path: posixPath.join(uri.path, ...paths) }); + } + Utils.joinPath = joinPath; + /** + * Resolves one or more paths against the path of a URI. + * '/' is used as the directory separation character. + * + * The resolved path will be normalized. That means: + * - all '..' and '.' segments are resolved. + * - multiple, sequential occurences of '/' are replaced by a single instance of '/'. + * - trailing separators are removed. + * + * @param uri The input URI. + * @param paths The paths to resolve against the path of URI. + * @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI. + */ + function resolvePath(uri, ...paths) { + let path = uri.path; + let slashAdded = false; + if (path[0] !== slash) { + path = slash + path; // make the path abstract: for posixPath.resolve the first segments has to be absolute or cwd is used. + slashAdded = true; + } + let resolvedPath = posixPath.resolve(path, ...paths); + if (slashAdded && resolvedPath[0] === slash && !uri.authority) { + resolvedPath = resolvedPath.substring(1); + } + return uri.with({ path: resolvedPath }); + } + Utils.resolvePath = resolvePath; + /** + * Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The orignal URI is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The last segment of the URIs path. + */ + function dirname(uri) { + if (uri.path.length === 0 || uri.path === slash) { + return uri; + } + let path = posixPath.dirname(uri.path); + if (path.length === 1 && path.charCodeAt(0) === 46 /* CharCode.Period */) { + path = ''; + } + return uri.with({ path }); + } + Utils.dirname = dirname; + /** + * Returns the last segment of the path of a URI, similar to the Unix basename command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The empty string is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The base name of the URIs path. + */ + function basename(uri) { + return posixPath.basename(uri.path); + } + Utils.basename = basename; + /** + * Returns the extension name of the path of a URI, similar to the Unix extname command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The empty string is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The extension name of the URIs path. + */ + function extname(uri) { + return posixPath.extname(uri.path); + } + Utils.extname = extname; +})(Utils || (exports.Utils = Utils = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/package.json" index f6d52d484b26e8e314d90989ee0a2a1e8ba964bd..3cf2ab720e4f7962e0d61128f859ef2d2a735129 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/node_modules/vscode-uri/package.json" @@ -1,3 +1,43 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d09b69a9f81addcaf2e162ab64bba0496726b7dd7cca17985163795eb7601633 -size 1214 +{ + "name": "vscode-uri", + "author": "Microsoft", + "version": "3.0.8", + "description": "The URI implementation that is used by VS Code and its extensions", + "main": "./lib/umd/index.js", + "typings": "./lib/umd/index", + "exports": { + "import": "./lib/esm/index.mjs", + "require": "./lib/umd/index.js", + "types": "./lib/umd/index.d.ts", + "browser": "./lib/esm/index.mjs" + }, + "sideEffects": false, + "scripts": { + "clean": "rimraf lib", + "pack-production": "webpack --mode=production", + "pack-dev": "webpack", + "compile": "tsc -p ./src", + "prepublish": "npm run pack-production", + "test": "tsc -p ./src && npm run pack-dev && mocha" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/microsoft/vscode-uri.git" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/microsoft/vscode-uri/issues" + }, + "homepage": "https://github.com/microsoft/vscode-uri#readme", + "devDependencies": { + "@types/mocha": "^10.0.2", + "@types/node": "16.x", + "mocha": "^10.2.0", + "path-browserify": "^1.0.1", + "rimraf": "^5.0.5", + "ts-loader": "^9.4.4", + "typescript": "^5.2.2", + "webpack": "^5.88.2", + "webpack-cli": "^5.1.4" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/package.json" index 365f2bda27fdcd8da528b7bdfc8a1aa93a436a0d..196f5724b4776bb1e811bbc308346f52ed51d067 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-json-languageservice/package.json" @@ -1,3 +1,50 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f4379971dce76638f0f6bce08541950381fa6a38d29570809c1990d469e2dff8 -size 1851 +{ + "name": "vscode-json-languageservice", + "version": "5.3.11", + "description": "Language service for JSON", + "main": "./lib/umd/jsonLanguageService.js", + "typings": "./lib/umd/jsonLanguageService", + "module": "./lib/esm/jsonLanguageService.js", + "author": "Microsoft Corporation", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-json-languageservice" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/Microsoft/vscode-json-languageservice" + }, + "devDependencies": { + "@types/mocha": "^10.0.6", + "@types/node": "16.x", + "@typescript-eslint/eslint-plugin": "^7.7.0", + "@typescript-eslint/parser": "^7.7.0", + "eslint": "^8.57.0", + "json-schema-test-suite": "https://github.com/json-schema-org/JSON-Schema-Test-Suite.git#69acf52990b004240839ae19b4bec8fb01d50876", + "mocha": "^10.4.0", + "rimraf": "^5.0.5", + "typescript": "^5.4.5" + }, + "dependencies": { + "jsonc-parser": "^3.2.1", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-languageserver-types": "^3.17.5", + "vscode-uri": "^3.0.8", + "@vscode/l10n": "^0.0.18" + }, + "scripts": { + "prepack": "npm run clean && npm run compile-esm && npm run test && npm run remove-sourcemap-refs", + "compile": "tsc -p ./src", + "compile-esm": "tsc -p ./src/tsconfig.esm.json", + "clean": "rimraf lib", + "remove-sourcemap-refs": "node ./build/remove-sourcemap-refs.js", + "watch": "tsc -w -p ./src", + "pretest": "npm run compile", + "test": "mocha", + "posttest": "npm run lint", + "coverage": "npx nyc -r lcov npm run test", + "lint": "eslint src/**/*.ts", + "install-types-next": "npm install vscode-languageserver-types@next -f -S && npm install vscode-languageserver-textdocument@next -f -S", + "sample": "npm run compile && node ./lib/umd/example/sample.js" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/License.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/License.txt" index 71c73d0cbbb244fd8977b1334dae3ac9800e0c19..a07e3ae825f86b6d1f966659954bffc0768bef66 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/License.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/License.txt" @@ -1,3 +1,11 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec9ee83580841e8eb687aca9867f221503809ba6426c7f876ede17d91b9fcfd0 -size 1095 +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/README.md" index 1aa91813a133c4c186dbe4def4e6cbd1e324501e..4eac3c3b6f075cc21be94cf8a0754c31c9663303 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/README.md" @@ -1,3 +1,69 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:87318e80a9917d4a1a3396c9d2bec8047f7283de5c0d2f169ce93b6cc39713bb -size 2195 +# VSCode JSON RPC + +[![NPM Version](https://img.shields.io/npm/v/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc) +[![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-node) + +This npm module implements the base messaging protocol spoken between a VSCode language server and a VSCode language client. + +The npm module can also be used standalone to establish a [JSON-RPC](http://www.jsonrpc.org/) channel between +a client and a server. Below an example how to setup a JSON-RPC connection. First the client side. + +```ts +import * as cp from 'child_process'; +import * as rpc from 'vscode-jsonrpc'; + +let childProcess = cp.spawn(...); + +// Use stdin and stdout for communication: +let connection = rpc.createMessageConnection( + new rpc.StreamMessageReader(childProcess.stdout), + new rpc.StreamMessageWriter(childProcess.stdin)); + +let notification = new rpc.NotificationType('testNotification'); + +connection.listen(); + +connection.sendNotification(notification, 'Hello World'); +``` + +The server side looks very symmetrical: + +```ts +import * as rpc from 'vscode-jsonrpc'; + + +let connection = rpc.createMessageConnection( + new rpc.StreamMessageReader(process.stdin), + new rpc.StreamMessageWriter(process.stdout)); + +let notification = new rpc.NotificationType('testNotification'); +connection.onNotification(notification, (param: string) => { + console.log(param); // This prints Hello World +}); + +connection.listen(); +``` + +# History + +### 5.0.0 + +- add progress support +- move JS target to ES2017 + +### 4.0.0 + +- move JS target to ES6. + +### 3.0.0: + +- converted the NPM module to use TypeScript 2.0.3. +- added strict null support. +- support for passing more than one parameter to a request or notification. +- Breaking changes: + - due to the use of TypeScript 2.0.3 and differences in d.ts generation users of the new version need to move to + TypeScript 2.0.3 as well. + +## License +[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt) diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/browser.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/browser.d.ts" index 0898e728f1aa9ab8ecda68d04096c898e91dbe6a..e628f1b5caf549c4b58cead28e5ca6a1d682acf8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/browser.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/browser.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99170b7257d895bb2594d7db9c255a4b0029a1363fe5e89849fda830b5c997ce -size 385 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/browser/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/browser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/browser.js" index da29a4f6ec2636f4c79c022c589b7adc67c91530..f5caebf0011feb56821400f3e85f752c80778192 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/browser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/browser.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9406802db032558d3cd8bde9f68d20c067f3a7eca251ad7d0e4473da8d457ada -size 411 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/browser/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/browser/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/browser/main.d.ts" index fbbd793da186074dfcd9c432567a136db31a4d9a..44c006f4362a23811bede180cd5db74b26519ea1 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/browser/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/browser/main.d.ts" @@ -1,3 +1,17 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:37f3494c3e4e87d7f0d11397e864f71a56b783feee45a21c77c01a260a250acd -size 975 +import { AbstractMessageReader, DataCallback, AbstractMessageWriter, Message, Disposable, ConnectionStrategy, ConnectionOptions, MessageReader, MessageWriter, Logger, MessageConnection } from '../common/api'; +export * from '../common/api'; +export declare class BrowserMessageReader extends AbstractMessageReader implements MessageReader { + private _onData; + private _messageListener; + constructor(context: Worker | DedicatedWorkerGlobalScope); + listen(callback: DataCallback): Disposable; +} +export declare class BrowserMessageWriter extends AbstractMessageWriter implements MessageWriter { + private context; + private errorCount; + constructor(context: Worker | DedicatedWorkerGlobalScope); + write(msg: Message): Promise; + private handleError; + end(): void; +} +export declare function createMessageConnection(reader: MessageReader, writer: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/browser/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/browser/main.js" index 984650d68b667baecad9d6f83efa47d38dac0339..6289e82fb51ed94e6708481446e0c3bc7d1c581c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/browser/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/browser/main.js" @@ -1,3 +1,73 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2de616ecb3120aee5a452066d80c5732736ba3b4ef29266159783426e93ee8f9 -size 2847 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createMessageConnection = exports.BrowserMessageWriter = exports.BrowserMessageReader = void 0; +const ril_1 = require("./ril"); +// Install the browser runtime abstract. +ril_1.default.install(); +const api_1 = require("../common/api"); +__exportStar(require("../common/api"), exports); +class BrowserMessageReader extends api_1.AbstractMessageReader { + constructor(context) { + super(); + this._onData = new api_1.Emitter(); + this._messageListener = (event) => { + this._onData.fire(event.data); + }; + context.addEventListener('error', (event) => this.fireError(event)); + context.onmessage = this._messageListener; + } + listen(callback) { + return this._onData.event(callback); + } +} +exports.BrowserMessageReader = BrowserMessageReader; +class BrowserMessageWriter extends api_1.AbstractMessageWriter { + constructor(context) { + super(); + this.context = context; + this.errorCount = 0; + context.addEventListener('error', (event) => this.fireError(event)); + } + write(msg) { + try { + this.context.postMessage(msg); + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.BrowserMessageWriter = BrowserMessageWriter; +function createMessageConnection(reader, writer, logger, options) { + if (logger === undefined) { + logger = api_1.NullLogger; + } + if (api_1.ConnectionStrategy.is(options)) { + options = { connectionStrategy: options }; + } + return api_1.createMessageConnection(reader, writer, logger, options); +} +exports.createMessageConnection = createMessageConnection; +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts" index 81fe0d70145a6e718b9683be54a85cf73d364e21..b8c697861beaaf4041ebeea476805038b9783d22 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts" @@ -1,3 +1,12 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:947da51287a1b3ef541bbfdb64217e4e291eeb60b879369b6e5db6624dfd2028 -size 354 +import RAL from '../common/ral'; +interface RIL extends RAL { + readonly stream: { + readonly asReadableStream: (stream: WebSocket) => RAL.ReadableStream; + readonly asWritableStream: (stream: WebSocket) => RAL.WritableStream; + }; +} +declare function RIL(): RIL; +declare namespace RIL { + function install(): void; +} +export default RIL; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/browser/ril.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/browser/ril.js" index 1db88ef46a90dd7c6a67b6d35a2b13aac2f03bf2..adb73a0ed882e4f4b44d6906e5694722e0115aa7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/browser/ril.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/browser/ril.js" @@ -1,3 +1,158 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cdbc081adc7f58e10798ad2b0334a56ce0968ea210894f34d538ee0b85d9e8a0 -size 5614 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +const ral_1 = require("../common/ral"); +const disposable_1 = require("../common/disposable"); +const events_1 = require("../common/events"); +const messageBuffer_1 = require("../common/messageBuffer"); +class MessageBuffer extends messageBuffer_1.AbstractMessageBuffer { + constructor(encoding = 'utf-8') { + super(encoding); + this.asciiDecoder = new TextDecoder('ascii'); + } + emptyBuffer() { + return MessageBuffer.emptyBuffer; + } + fromString(value, _encoding) { + return (new TextEncoder()).encode(value); + } + toString(value, encoding) { + if (encoding === 'ascii') { + return this.asciiDecoder.decode(value); + } + else { + return (new TextDecoder(encoding)).decode(value); + } + } + asNative(buffer, length) { + if (length === undefined) { + return buffer; + } + else { + return buffer.slice(0, length); + } + } + allocNative(length) { + return new Uint8Array(length); + } +} +MessageBuffer.emptyBuffer = new Uint8Array(0); +class ReadableStreamWrapper { + constructor(socket) { + this.socket = socket; + this._onData = new events_1.Emitter(); + this._messageListener = (event) => { + const blob = event.data; + blob.arrayBuffer().then((buffer) => { + this._onData.fire(new Uint8Array(buffer)); + }); + }; + this.socket.addEventListener('message', this._messageListener); + } + onClose(listener) { + this.socket.addEventListener('close', listener); + return disposable_1.Disposable.create(() => this.socket.removeEventListener('close', listener)); + } + onError(listener) { + this.socket.addEventListener('error', listener); + return disposable_1.Disposable.create(() => this.socket.removeEventListener('error', listener)); + } + onEnd(listener) { + this.socket.addEventListener('end', listener); + return disposable_1.Disposable.create(() => this.socket.removeEventListener('end', listener)); + } + onData(listener) { + return this._onData.event(listener); + } +} +class WritableStreamWrapper { + constructor(socket) { + this.socket = socket; + } + onClose(listener) { + this.socket.addEventListener('close', listener); + return disposable_1.Disposable.create(() => this.socket.removeEventListener('close', listener)); + } + onError(listener) { + this.socket.addEventListener('error', listener); + return disposable_1.Disposable.create(() => this.socket.removeEventListener('error', listener)); + } + onEnd(listener) { + this.socket.addEventListener('end', listener); + return disposable_1.Disposable.create(() => this.socket.removeEventListener('end', listener)); + } + write(data, encoding) { + if (typeof data === 'string') { + if (encoding !== undefined && encoding !== 'utf-8') { + throw new Error(`In a Browser environments only utf-8 text encding is supported. But got encoding: ${encoding}`); + } + this.socket.send(data); + } + else { + this.socket.send(data); + } + return Promise.resolve(); + } + end() { + this.socket.close(); + } +} +const _textEncoder = new TextEncoder(); +const _ril = Object.freeze({ + messageBuffer: Object.freeze({ + create: (encoding) => new MessageBuffer(encoding) + }), + applicationJson: Object.freeze({ + encoder: Object.freeze({ + name: 'application/json', + encode: (msg, options) => { + if (options.charset !== 'utf-8') { + throw new Error(`In a Browser environments only utf-8 text encding is supported. But got encoding: ${options.charset}`); + } + return Promise.resolve(_textEncoder.encode(JSON.stringify(msg, undefined, 0))); + } + }), + decoder: Object.freeze({ + name: 'application/json', + decode: (buffer, options) => { + if (!(buffer instanceof Uint8Array)) { + throw new Error(`In a Browser environments only Uint8Arrays are supported.`); + } + return Promise.resolve(JSON.parse(new TextDecoder(options.charset).decode(buffer))); + } + }) + }), + stream: Object.freeze({ + asReadableStream: (socket) => new ReadableStreamWrapper(socket), + asWritableStream: (socket) => new WritableStreamWrapper(socket) + }), + console: console, + timer: Object.freeze({ + setTimeout(callback, ms, ...args) { + return setTimeout(callback, ms, ...args); + }, + clearTimeout(handle) { + clearTimeout(handle); + }, + setImmediate(callback, ...args) { + return setTimeout(callback, 0, ...args); + }, + clearImmediate(handle) { + clearTimeout(handle); + } + }) +}); +function RIL() { + return _ril; +} +(function (RIL) { + function install() { + ral_1.default.install(_ril); + } + RIL.install = install; +})(RIL || (RIL = {})); +exports.default = RIL; +//# sourceMappingURL=ril.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/api.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/api.d.ts" index e05fd95563b0dde3dbe6f5f147bd20f4e6672925..c3a69652eda470094cb86d0a93920bbec52e2150 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/api.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/api.d.ts" @@ -1,3 +1,10 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:03a931e4fb1e8b851a171b246a8aeba575fcdecde60c914b23f472af5beb29b0 -size 3860 +/// +import { Message, MessageSignature, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseError, ErrorCodes, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, ResponseMessage, ParameterStructures, _EM } from '../common/messages'; +import { Disposable } from '../common/disposable'; +import { Event, Emitter } from '../common/events'; +import { AbstractCancellationTokenSource, CancellationTokenSource, CancellationToken } from '../common/cancellation'; +import { MessageReader, AbstractMessageReader, ReadableStreamMessageReader, DataCallback, MessageReaderOptions, PartialMessageInfo } from '../common/messageReader'; +import { MessageWriter, AbstractMessageWriter, WriteableStreamMessageWriter, MessageWriterOptions } from '../common/messageWriter'; +import { Logger, ConnectionStrategy, ConnectionOptions, MessageConnection, NullLogger, createMessageConnection, ProgressToken, ProgressType, HandlerResult, StarRequestHandler, GenericRequestHandler, RequestHandler0, RequestHandler, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, StarNotificationHandler, GenericNotificationHandler, NotificationHandler0, NotificationHandler, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, Trace, TraceValues, TraceFormat, TraceOptions, SetTraceParams, SetTraceNotification, LogTraceParams, LogTraceNotification, Tracer, ConnectionErrors, ConnectionError, CancellationId, CancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy } from '../common/connection'; +import RAL from './ral'; +export { RAL, Message, MessageSignature, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseError, ErrorCodes, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, ResponseMessage, ParameterStructures, _EM, Disposable, Event, Emitter, AbstractCancellationTokenSource, CancellationTokenSource, CancellationToken, MessageReader, AbstractMessageReader, ReadableStreamMessageReader, DataCallback, MessageReaderOptions, PartialMessageInfo, MessageWriter, AbstractMessageWriter, WriteableStreamMessageWriter, MessageWriterOptions, Logger, ConnectionStrategy, ConnectionOptions, MessageConnection, NullLogger, createMessageConnection, ProgressToken, ProgressType, HandlerResult, StarRequestHandler, GenericRequestHandler, RequestHandler0, RequestHandler, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, StarNotificationHandler, GenericNotificationHandler, NotificationHandler0, NotificationHandler, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, Trace, TraceValues, TraceFormat, TraceOptions, SetTraceParams, SetTraceNotification, LogTraceParams, LogTraceNotification, Tracer, ConnectionErrors, ConnectionError, CancellationId, CancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy, }; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/api.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/api.js" index fdc358432fc4f9c82b86ba4bfb3111c32317d1ee..86b7a070e9707d032e6ff9c4ece18d77962bbf1f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/api.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/api.js" @@ -1,3 +1,69 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c25ca3afaddbf34689df6a3633a9829b9f9836594daf67fd8d2e44b33548c129 -size 8953 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +/// +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.Trace = exports.ProgressType = exports.createMessageConnection = exports.NullLogger = exports.ConnectionOptions = exports.ConnectionStrategy = exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = exports.CancellationToken = exports.CancellationTokenSource = exports.Emitter = exports.Event = exports.Disposable = exports.ParameterStructures = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.ErrorCodes = exports.ResponseError = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType0 = exports.RequestType = exports.RAL = void 0; +exports.CancellationStrategy = void 0; +const messages_1 = require("../common/messages"); +Object.defineProperty(exports, "RequestType", { enumerable: true, get: function () { return messages_1.RequestType; } }); +Object.defineProperty(exports, "RequestType0", { enumerable: true, get: function () { return messages_1.RequestType0; } }); +Object.defineProperty(exports, "RequestType1", { enumerable: true, get: function () { return messages_1.RequestType1; } }); +Object.defineProperty(exports, "RequestType2", { enumerable: true, get: function () { return messages_1.RequestType2; } }); +Object.defineProperty(exports, "RequestType3", { enumerable: true, get: function () { return messages_1.RequestType3; } }); +Object.defineProperty(exports, "RequestType4", { enumerable: true, get: function () { return messages_1.RequestType4; } }); +Object.defineProperty(exports, "RequestType5", { enumerable: true, get: function () { return messages_1.RequestType5; } }); +Object.defineProperty(exports, "RequestType6", { enumerable: true, get: function () { return messages_1.RequestType6; } }); +Object.defineProperty(exports, "RequestType7", { enumerable: true, get: function () { return messages_1.RequestType7; } }); +Object.defineProperty(exports, "RequestType8", { enumerable: true, get: function () { return messages_1.RequestType8; } }); +Object.defineProperty(exports, "RequestType9", { enumerable: true, get: function () { return messages_1.RequestType9; } }); +Object.defineProperty(exports, "ResponseError", { enumerable: true, get: function () { return messages_1.ResponseError; } }); +Object.defineProperty(exports, "ErrorCodes", { enumerable: true, get: function () { return messages_1.ErrorCodes; } }); +Object.defineProperty(exports, "NotificationType", { enumerable: true, get: function () { return messages_1.NotificationType; } }); +Object.defineProperty(exports, "NotificationType0", { enumerable: true, get: function () { return messages_1.NotificationType0; } }); +Object.defineProperty(exports, "NotificationType1", { enumerable: true, get: function () { return messages_1.NotificationType1; } }); +Object.defineProperty(exports, "NotificationType2", { enumerable: true, get: function () { return messages_1.NotificationType2; } }); +Object.defineProperty(exports, "NotificationType3", { enumerable: true, get: function () { return messages_1.NotificationType3; } }); +Object.defineProperty(exports, "NotificationType4", { enumerable: true, get: function () { return messages_1.NotificationType4; } }); +Object.defineProperty(exports, "NotificationType5", { enumerable: true, get: function () { return messages_1.NotificationType5; } }); +Object.defineProperty(exports, "NotificationType6", { enumerable: true, get: function () { return messages_1.NotificationType6; } }); +Object.defineProperty(exports, "NotificationType7", { enumerable: true, get: function () { return messages_1.NotificationType7; } }); +Object.defineProperty(exports, "NotificationType8", { enumerable: true, get: function () { return messages_1.NotificationType8; } }); +Object.defineProperty(exports, "NotificationType9", { enumerable: true, get: function () { return messages_1.NotificationType9; } }); +Object.defineProperty(exports, "ParameterStructures", { enumerable: true, get: function () { return messages_1.ParameterStructures; } }); +const disposable_1 = require("../common/disposable"); +Object.defineProperty(exports, "Disposable", { enumerable: true, get: function () { return disposable_1.Disposable; } }); +const events_1 = require("../common/events"); +Object.defineProperty(exports, "Event", { enumerable: true, get: function () { return events_1.Event; } }); +Object.defineProperty(exports, "Emitter", { enumerable: true, get: function () { return events_1.Emitter; } }); +const cancellation_1 = require("../common/cancellation"); +Object.defineProperty(exports, "CancellationTokenSource", { enumerable: true, get: function () { return cancellation_1.CancellationTokenSource; } }); +Object.defineProperty(exports, "CancellationToken", { enumerable: true, get: function () { return cancellation_1.CancellationToken; } }); +const messageReader_1 = require("../common/messageReader"); +Object.defineProperty(exports, "MessageReader", { enumerable: true, get: function () { return messageReader_1.MessageReader; } }); +Object.defineProperty(exports, "AbstractMessageReader", { enumerable: true, get: function () { return messageReader_1.AbstractMessageReader; } }); +Object.defineProperty(exports, "ReadableStreamMessageReader", { enumerable: true, get: function () { return messageReader_1.ReadableStreamMessageReader; } }); +const messageWriter_1 = require("../common/messageWriter"); +Object.defineProperty(exports, "MessageWriter", { enumerable: true, get: function () { return messageWriter_1.MessageWriter; } }); +Object.defineProperty(exports, "AbstractMessageWriter", { enumerable: true, get: function () { return messageWriter_1.AbstractMessageWriter; } }); +Object.defineProperty(exports, "WriteableStreamMessageWriter", { enumerable: true, get: function () { return messageWriter_1.WriteableStreamMessageWriter; } }); +const connection_1 = require("../common/connection"); +Object.defineProperty(exports, "ConnectionStrategy", { enumerable: true, get: function () { return connection_1.ConnectionStrategy; } }); +Object.defineProperty(exports, "ConnectionOptions", { enumerable: true, get: function () { return connection_1.ConnectionOptions; } }); +Object.defineProperty(exports, "NullLogger", { enumerable: true, get: function () { return connection_1.NullLogger; } }); +Object.defineProperty(exports, "createMessageConnection", { enumerable: true, get: function () { return connection_1.createMessageConnection; } }); +Object.defineProperty(exports, "ProgressType", { enumerable: true, get: function () { return connection_1.ProgressType; } }); +Object.defineProperty(exports, "Trace", { enumerable: true, get: function () { return connection_1.Trace; } }); +Object.defineProperty(exports, "TraceFormat", { enumerable: true, get: function () { return connection_1.TraceFormat; } }); +Object.defineProperty(exports, "SetTraceNotification", { enumerable: true, get: function () { return connection_1.SetTraceNotification; } }); +Object.defineProperty(exports, "LogTraceNotification", { enumerable: true, get: function () { return connection_1.LogTraceNotification; } }); +Object.defineProperty(exports, "ConnectionErrors", { enumerable: true, get: function () { return connection_1.ConnectionErrors; } }); +Object.defineProperty(exports, "ConnectionError", { enumerable: true, get: function () { return connection_1.ConnectionError; } }); +Object.defineProperty(exports, "CancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.CancellationReceiverStrategy; } }); +Object.defineProperty(exports, "CancellationSenderStrategy", { enumerable: true, get: function () { return connection_1.CancellationSenderStrategy; } }); +Object.defineProperty(exports, "CancellationStrategy", { enumerable: true, get: function () { return connection_1.CancellationStrategy; } }); +const ral_1 = require("./ral"); +exports.RAL = ral_1.default; +//# sourceMappingURL=api.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts" index 8fa88aa43f2ba416bde4aa17e6cba9d56012d386..b8a300d7c23fb9a614ea985a18f06022976987b7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts" @@ -1,3 +1,32 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:41a35a21d3c9c0450229cf41be783285f3c01edd84039a41ffd162d42a93a576 -size 1026 +import { Event } from './events'; +import { Disposable } from './disposable'; +/** + * Defines a CancellationToken. This interface is not + * intended to be implemented. A CancellationToken must + * be created via a CancellationTokenSource. + */ +export interface CancellationToken { + /** + * Is `true` when the token has been cancelled, `false` otherwise. + */ + readonly isCancellationRequested: boolean; + /** + * An [event](#Event) which fires upon cancellation. + */ + readonly onCancellationRequested: Event; +} +export declare namespace CancellationToken { + const None: CancellationToken; + const Cancelled: CancellationToken; + function is(value: any): value is CancellationToken; +} +export interface AbstractCancellationTokenSource extends Disposable { + token: CancellationToken; + cancel(): void; +} +export declare class CancellationTokenSource implements AbstractCancellationTokenSource { + private _token; + get token(): CancellationToken; + cancel(): void; + dispose(): void; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/cancellation.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/cancellation.js" index 6c01223d48716edb4ddf31f9d796016a7f7fd4c1..64f2c143114ba6ba06a5af86f8059d1a3ae96514 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/cancellation.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/cancellation.js" @@ -1,3 +1,97 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:27785e44f54fef9d4d649741fcff491f4bcacb5d9202ba5958f06e86cd7bef60 -size 3357 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CancellationTokenSource = exports.CancellationToken = void 0; +const ral_1 = require("./ral"); +const Is = require("./is"); +const events_1 = require("./events"); +var CancellationToken; +(function (CancellationToken) { + CancellationToken.None = Object.freeze({ + isCancellationRequested: false, + onCancellationRequested: events_1.Event.None + }); + CancellationToken.Cancelled = Object.freeze({ + isCancellationRequested: true, + onCancellationRequested: events_1.Event.None + }); + function is(value) { + const candidate = value; + return candidate && (candidate === CancellationToken.None + || candidate === CancellationToken.Cancelled + || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested)); + } + CancellationToken.is = is; +})(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {})); +const shortcutEvent = Object.freeze(function (callback, context) { + const handle = ral_1.default().timer.setTimeout(callback.bind(context), 0); + return { dispose() { ral_1.default().timer.clearTimeout(handle); } }; +}); +class MutableToken { + constructor() { + this._isCancelled = false; + } + cancel() { + if (!this._isCancelled) { + this._isCancelled = true; + if (this._emitter) { + this._emitter.fire(undefined); + this.dispose(); + } + } + } + get isCancellationRequested() { + return this._isCancelled; + } + get onCancellationRequested() { + if (this._isCancelled) { + return shortcutEvent; + } + if (!this._emitter) { + this._emitter = new events_1.Emitter(); + } + return this._emitter.event; + } + dispose() { + if (this._emitter) { + this._emitter.dispose(); + this._emitter = undefined; + } + } +} +class CancellationTokenSource { + get token() { + if (!this._token) { + // be lazy and create the token only when + // actually needed + this._token = new MutableToken(); + } + return this._token; + } + cancel() { + if (!this._token) { + // save an object by returning the default + // cancelled token when cancellation happens + // before someone asks for the token + this._token = CancellationToken.Cancelled; + } + else { + this._token.cancel(); + } + } + dispose() { + if (!this._token) { + // ensure to initialize with an empty token if we had none + this._token = CancellationToken.None; + } + else if (this._token instanceof MutableToken) { + // actually dispose + this._token.dispose(); + } + } +} +exports.CancellationTokenSource = CancellationTokenSource; +//# sourceMappingURL=cancellation.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/connection.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/connection.d.ts" index 3a5ed090ed49bff81a23c695a83beebcca7c7182..715e3f4b1a5bd426e8735a0f743e8b6c5df81e98 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/connection.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/connection.d.ts" @@ -1,3 +1,274 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7cd0faa5800c730d5e9387a5ad312732d95d0a3bd5a67e266721f36ae1068a91 -size 15147 +import { Message, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseMessage, ResponseError, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, _EM, ParameterStructures } from './messages'; +import type { Disposable } from './disposable'; +import { Event } from './events'; +import { CancellationToken, AbstractCancellationTokenSource } from './cancellation'; +import { MessageReader } from './messageReader'; +import { MessageWriter } from './messageWriter'; +export declare type ProgressToken = number | string; +interface ProgressParams { + /** + * The progress token provided by the client or server. + */ + token: ProgressToken; + /** + * The progress data. + */ + value: T; +} +export declare class ProgressType { + /** + * Clients must not use these properties. They are here to ensure correct typing. + * in TypeScript + */ + readonly __?: [PR, _EM]; + readonly _pr?: PR; + constructor(); +} +export declare type HandlerResult = R | ResponseError | Thenable | Thenable> | Thenable>; +export interface StarRequestHandler { + (method: string, params: any[] | object | undefined, token: CancellationToken): HandlerResult; +} +export interface GenericRequestHandler { + (...params: any[]): HandlerResult; +} +export interface RequestHandler0 { + (token: CancellationToken): HandlerResult; +} +export interface RequestHandler { + (params: P, token: CancellationToken): HandlerResult; +} +export interface RequestHandler1 { + (p1: P1, token: CancellationToken): HandlerResult; +} +export interface RequestHandler2 { + (p1: P1, p2: P2, token: CancellationToken): HandlerResult; +} +export interface RequestHandler3 { + (p1: P1, p2: P2, p3: P3, token: CancellationToken): HandlerResult; +} +export interface RequestHandler4 { + (p1: P1, p2: P2, p3: P3, p4: P4, token: CancellationToken): HandlerResult; +} +export interface RequestHandler5 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, token: CancellationToken): HandlerResult; +} +export interface RequestHandler6 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, token: CancellationToken): HandlerResult; +} +export interface RequestHandler7 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, token: CancellationToken): HandlerResult; +} +export interface RequestHandler8 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, token: CancellationToken): HandlerResult; +} +export interface RequestHandler9 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, token: CancellationToken): HandlerResult; +} +export interface StarNotificationHandler { + (method: string, params: any[] | object | undefined): void; +} +export interface GenericNotificationHandler { + (...params: any[]): void; +} +export interface NotificationHandler0 { + (): void; +} +export interface NotificationHandler

{ + (params: P): void; +} +export interface NotificationHandler1 { + (p1: P1): void; +} +export interface NotificationHandler2 { + (p1: P1, p2: P2): void; +} +export interface NotificationHandler3 { + (p1: P1, p2: P2, p3: P3): void; +} +export interface NotificationHandler4 { + (p1: P1, p2: P2, p3: P3, p4: P4): void; +} +export interface NotificationHandler5 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5): void; +} +export interface NotificationHandler6 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6): void; +} +export interface NotificationHandler7 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7): void; +} +export interface NotificationHandler8 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8): void; +} +export interface NotificationHandler9 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9): void; +} +export interface Logger { + error(message: string): void; + warn(message: string): void; + info(message: string): void; + log(message: string): void; +} +export declare const NullLogger: Logger; +export declare enum Trace { + Off = 0, + Messages = 1, + Verbose = 2 +} +export declare type TraceValues = 'off' | 'messages' | 'verbose'; +export declare namespace Trace { + function fromString(value: string): Trace; + function toString(value: Trace): TraceValues; +} +export declare enum TraceFormat { + Text = "text", + JSON = "json" +} +export declare namespace TraceFormat { + function fromString(value: string): TraceFormat; +} +export interface TraceOptions { + sendNotification?: boolean; + traceFormat?: TraceFormat; +} +export interface SetTraceParams { + value: TraceValues; +} +export declare namespace SetTraceNotification { + const type: NotificationType; +} +export interface LogTraceParams { + message: string; + verbose?: string; +} +export declare namespace LogTraceNotification { + const type: NotificationType; +} +export interface Tracer { + log(dataObject: any): void; + log(message: string, data?: string): void; +} +export declare enum ConnectionErrors { + /** + * The connection is closed. + */ + Closed = 1, + /** + * The connection got disposed. + */ + Disposed = 2, + /** + * The connection is already in listening mode. + */ + AlreadyListening = 3 +} +export declare class ConnectionError extends Error { + readonly code: ConnectionErrors; + constructor(code: ConnectionErrors, message: string); +} +export declare type ConnectionStrategy = { + cancelUndispatched?: (message: Message, next: (message: Message) => ResponseMessage | undefined) => ResponseMessage | undefined; +}; +export declare namespace ConnectionStrategy { + function is(value: any): value is ConnectionStrategy; +} +export declare type CancellationId = number | string; +export interface CancellationReceiverStrategy { + createCancellationTokenSource(id: CancellationId): AbstractCancellationTokenSource; + dispose?(): void; +} +export declare namespace CancellationReceiverStrategy { + const Message: CancellationReceiverStrategy; + function is(value: any): value is CancellationReceiverStrategy; +} +export interface CancellationSenderStrategy { + sendCancellation(conn: MessageConnection, id: CancellationId): void; + cleanup(id: CancellationId): void; + dispose?(): void; +} +export declare namespace CancellationSenderStrategy { + const Message: CancellationSenderStrategy; + function is(value: any): value is CancellationSenderStrategy; +} +export interface CancellationStrategy { + receiver: CancellationReceiverStrategy; + sender: CancellationSenderStrategy; +} +export declare namespace CancellationStrategy { + const Message: CancellationStrategy; + function is(value: any): value is CancellationStrategy; +} +export interface ConnectionOptions { + cancellationStrategy?: CancellationStrategy; + connectionStrategy?: ConnectionStrategy; +} +export declare namespace ConnectionOptions { + function is(value: any): value is ConnectionOptions; +} +export interface MessageConnection { + sendRequest(type: RequestType0, token?: CancellationToken): Promise; + sendRequest(type: RequestType, params: P, token?: CancellationToken): Promise; + sendRequest(type: RequestType1, p1: P1, token?: CancellationToken): Promise; + sendRequest(type: RequestType2, p1: P1, p2: P2, token?: CancellationToken): Promise; + sendRequest(type: RequestType3, p1: P1, p2: P2, p3: P3, token?: CancellationToken): Promise; + sendRequest(type: RequestType4, p1: P1, p2: P2, p3: P3, p4: P4, token?: CancellationToken): Promise; + sendRequest(type: RequestType5, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, token?: CancellationToken): Promise; + sendRequest(type: RequestType6, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, token?: CancellationToken): Promise; + sendRequest(type: RequestType7, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, token?: CancellationToken): Promise; + sendRequest(type: RequestType8, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, token?: CancellationToken): Promise; + sendRequest(type: RequestType9, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, token?: CancellationToken): Promise; + sendRequest(method: string, r0?: ParameterStructures | any, ...rest: any[]): Promise; + onRequest(type: RequestType0, handler: RequestHandler0): Disposable; + onRequest(type: RequestType, handler: RequestHandler): Disposable; + onRequest(type: RequestType1, handler: RequestHandler1): Disposable; + onRequest(type: RequestType2, handler: RequestHandler2): Disposable; + onRequest(type: RequestType3, handler: RequestHandler3): Disposable; + onRequest(type: RequestType4, handler: RequestHandler4): Disposable; + onRequest(type: RequestType5, handler: RequestHandler5): Disposable; + onRequest(type: RequestType6, handler: RequestHandler6): Disposable; + onRequest(type: RequestType7, handler: RequestHandler7): Disposable; + onRequest(type: RequestType8, handler: RequestHandler8): Disposable; + onRequest(type: RequestType9, handler: RequestHandler9): Disposable; + onRequest(method: string, handler: GenericRequestHandler): Disposable; + onRequest(handler: StarRequestHandler): Disposable; + sendNotification(type: NotificationType0): void; + sendNotification

(type: NotificationType

, params?: P): void; + sendNotification(type: NotificationType1, p1: P1): void; + sendNotification(type: NotificationType2, p1: P1, p2: P2): void; + sendNotification(type: NotificationType3, p1: P1, p2: P2, p3: P3): void; + sendNotification(type: NotificationType4, p1: P1, p2: P2, p3: P3, p4: P4): void; + sendNotification(type: NotificationType5, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5): void; + sendNotification(type: NotificationType6, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6): void; + sendNotification(type: NotificationType7, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7): void; + sendNotification(type: NotificationType8, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8): void; + sendNotification(type: NotificationType9, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9): void; + sendNotification(method: string, r0?: ParameterStructures | any, ...rest: any[]): void; + onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable; + onNotification

(type: NotificationType

, handler: NotificationHandler

): Disposable; + onNotification(type: NotificationType1, handler: NotificationHandler1): Disposable; + onNotification(type: NotificationType2, handler: NotificationHandler2): Disposable; + onNotification(type: NotificationType3, handler: NotificationHandler3): Disposable; + onNotification(type: NotificationType4, handler: NotificationHandler4): Disposable; + onNotification(type: NotificationType5, handler: NotificationHandler5): Disposable; + onNotification(type: NotificationType6, handler: NotificationHandler6): Disposable; + onNotification(type: NotificationType7, handler: NotificationHandler7): Disposable; + onNotification(type: NotificationType8, handler: NotificationHandler8): Disposable; + onNotification(type: NotificationType9, handler: NotificationHandler9): Disposable; + onNotification(method: string, handler: GenericNotificationHandler): Disposable; + onNotification(handler: StarNotificationHandler): Disposable; + onUnhandledNotification: Event; + onProgress

(type: ProgressType

, token: string | number, handler: NotificationHandler

): Disposable; + sendProgress

(type: ProgressType

, token: string | number, value: P): void; + onUnhandledProgress: Event>; + trace(value: Trace, tracer: Tracer, sendNotification?: boolean): void; + trace(value: Trace, tracer: Tracer, traceOptions?: TraceOptions): void; + onError: Event<[Error, Message | undefined, number | undefined]>; + onClose: Event; + listen(): void; + end(): void; + onDispose: Event; + dispose(): void; + inspect(): void; +} +export declare function createMessageConnection(messageReader: MessageReader, messageWriter: MessageWriter, _logger?: Logger, options?: ConnectionOptions): MessageConnection; +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/connection.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/connection.js" index d844ca9afb1c24b2a5d96b1b9959a35aea99eacc..c47fe73bcaee55a7992ea77289c65117fdbd34ee 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/connection.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/connection.js" @@ -1,3 +1,1088 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:80cd833570ecd1f025a1937dcaaadcaa905bc77c44da6010ed1a6d1ab0608ed1 -size 45109 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createMessageConnection = exports.ConnectionOptions = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.ConnectionStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.Trace = exports.NullLogger = exports.ProgressType = void 0; +const ral_1 = require("./ral"); +const Is = require("./is"); +const messages_1 = require("./messages"); +const linkedMap_1 = require("./linkedMap"); +const events_1 = require("./events"); +const cancellation_1 = require("./cancellation"); +var CancelNotification; +(function (CancelNotification) { + CancelNotification.type = new messages_1.NotificationType('$/cancelRequest'); +})(CancelNotification || (CancelNotification = {})); +var ProgressNotification; +(function (ProgressNotification) { + ProgressNotification.type = new messages_1.NotificationType('$/progress'); +})(ProgressNotification || (ProgressNotification = {})); +class ProgressType { + constructor() { + } +} +exports.ProgressType = ProgressType; +var StarRequestHandler; +(function (StarRequestHandler) { + function is(value) { + return Is.func(value); + } + StarRequestHandler.is = is; +})(StarRequestHandler || (StarRequestHandler = {})); +exports.NullLogger = Object.freeze({ + error: () => { }, + warn: () => { }, + info: () => { }, + log: () => { } +}); +var Trace; +(function (Trace) { + Trace[Trace["Off"] = 0] = "Off"; + Trace[Trace["Messages"] = 1] = "Messages"; + Trace[Trace["Verbose"] = 2] = "Verbose"; +})(Trace = exports.Trace || (exports.Trace = {})); +(function (Trace) { + function fromString(value) { + if (!Is.string(value)) { + return Trace.Off; + } + value = value.toLowerCase(); + switch (value) { + case 'off': + return Trace.Off; + case 'messages': + return Trace.Messages; + case 'verbose': + return Trace.Verbose; + default: + return Trace.Off; + } + } + Trace.fromString = fromString; + function toString(value) { + switch (value) { + case Trace.Off: + return 'off'; + case Trace.Messages: + return 'messages'; + case Trace.Verbose: + return 'verbose'; + default: + return 'off'; + } + } + Trace.toString = toString; +})(Trace = exports.Trace || (exports.Trace = {})); +var TraceFormat; +(function (TraceFormat) { + TraceFormat["Text"] = "text"; + TraceFormat["JSON"] = "json"; +})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {})); +(function (TraceFormat) { + function fromString(value) { + value = value.toLowerCase(); + if (value === 'json') { + return TraceFormat.JSON; + } + else { + return TraceFormat.Text; + } + } + TraceFormat.fromString = fromString; +})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {})); +var SetTraceNotification; +(function (SetTraceNotification) { + SetTraceNotification.type = new messages_1.NotificationType('$/setTrace'); +})(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {})); +var LogTraceNotification; +(function (LogTraceNotification) { + LogTraceNotification.type = new messages_1.NotificationType('$/logTrace'); +})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {})); +var ConnectionErrors; +(function (ConnectionErrors) { + /** + * The connection is closed. + */ + ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed"; + /** + * The connection got disposed. + */ + ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed"; + /** + * The connection is already in listening mode. + */ + ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening"; +})(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {})); +class ConnectionError extends Error { + constructor(code, message) { + super(message); + this.code = code; + Object.setPrototypeOf(this, ConnectionError.prototype); + } +} +exports.ConnectionError = ConnectionError; +var ConnectionStrategy; +(function (ConnectionStrategy) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.cancelUndispatched); + } + ConnectionStrategy.is = is; +})(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {})); +var CancellationReceiverStrategy; +(function (CancellationReceiverStrategy) { + CancellationReceiverStrategy.Message = Object.freeze({ + createCancellationTokenSource(_) { + return new cancellation_1.CancellationTokenSource(); + } + }); + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.createCancellationTokenSource); + } + CancellationReceiverStrategy.is = is; +})(CancellationReceiverStrategy = exports.CancellationReceiverStrategy || (exports.CancellationReceiverStrategy = {})); +var CancellationSenderStrategy; +(function (CancellationSenderStrategy) { + CancellationSenderStrategy.Message = Object.freeze({ + sendCancellation(conn, id) { + conn.sendNotification(CancelNotification.type, { id }); + }, + cleanup(_) { } + }); + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup); + } + CancellationSenderStrategy.is = is; +})(CancellationSenderStrategy = exports.CancellationSenderStrategy || (exports.CancellationSenderStrategy = {})); +var CancellationStrategy; +(function (CancellationStrategy) { + CancellationStrategy.Message = Object.freeze({ + receiver: CancellationReceiverStrategy.Message, + sender: CancellationSenderStrategy.Message + }); + function is(value) { + const candidate = value; + return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender); + } + CancellationStrategy.is = is; +})(CancellationStrategy = exports.CancellationStrategy || (exports.CancellationStrategy = {})); +var ConnectionOptions; +(function (ConnectionOptions) { + function is(value) { + const candidate = value; + return candidate && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy)); + } + ConnectionOptions.is = is; +})(ConnectionOptions = exports.ConnectionOptions || (exports.ConnectionOptions = {})); +var ConnectionState; +(function (ConnectionState) { + ConnectionState[ConnectionState["New"] = 1] = "New"; + ConnectionState[ConnectionState["Listening"] = 2] = "Listening"; + ConnectionState[ConnectionState["Closed"] = 3] = "Closed"; + ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed"; +})(ConnectionState || (ConnectionState = {})); +function createMessageConnection(messageReader, messageWriter, _logger, options) { + const logger = _logger !== undefined ? _logger : exports.NullLogger; + let sequenceNumber = 0; + let notificationSquenceNumber = 0; + let unknownResponseSquenceNumber = 0; + const version = '2.0'; + let starRequestHandler = undefined; + const requestHandlers = Object.create(null); + let starNotificationHandler = undefined; + const notificationHandlers = Object.create(null); + const progressHandlers = new Map(); + let timer; + let messageQueue = new linkedMap_1.LinkedMap(); + let responsePromises = Object.create(null); + let requestTokens = Object.create(null); + let trace = Trace.Off; + let traceFormat = TraceFormat.Text; + let tracer; + let state = ConnectionState.New; + const errorEmitter = new events_1.Emitter(); + const closeEmitter = new events_1.Emitter(); + const unhandledNotificationEmitter = new events_1.Emitter(); + const unhandledProgressEmitter = new events_1.Emitter(); + const disposeEmitter = new events_1.Emitter(); + const cancellationStrategy = (options && options.cancellationStrategy) ? options.cancellationStrategy : CancellationStrategy.Message; + function createRequestQueueKey(id) { + if (id === null) { + throw new Error(`Can't send requests with id null since the response can't be correlated.`); + } + return 'req-' + id.toString(); + } + function createResponseQueueKey(id) { + if (id === null) { + return 'res-unknown-' + (++unknownResponseSquenceNumber).toString(); + } + else { + return 'res-' + id.toString(); + } + } + function createNotificationQueueKey() { + return 'not-' + (++notificationSquenceNumber).toString(); + } + function addMessageToQueue(queue, message) { + if (messages_1.isRequestMessage(message)) { + queue.set(createRequestQueueKey(message.id), message); + } + else if (messages_1.isResponseMessage(message)) { + queue.set(createResponseQueueKey(message.id), message); + } + else { + queue.set(createNotificationQueueKey(), message); + } + } + function cancelUndispatched(_message) { + return undefined; + } + function isListening() { + return state === ConnectionState.Listening; + } + function isClosed() { + return state === ConnectionState.Closed; + } + function isDisposed() { + return state === ConnectionState.Disposed; + } + function closeHandler() { + if (state === ConnectionState.New || state === ConnectionState.Listening) { + state = ConnectionState.Closed; + closeEmitter.fire(undefined); + } + // If the connection is disposed don't sent close events. + } + function readErrorHandler(error) { + errorEmitter.fire([error, undefined, undefined]); + } + function writeErrorHandler(data) { + errorEmitter.fire(data); + } + messageReader.onClose(closeHandler); + messageReader.onError(readErrorHandler); + messageWriter.onClose(closeHandler); + messageWriter.onError(writeErrorHandler); + function triggerMessageQueue() { + if (timer || messageQueue.size === 0) { + return; + } + timer = ral_1.default().timer.setImmediate(() => { + timer = undefined; + processMessageQueue(); + }); + } + function processMessageQueue() { + if (messageQueue.size === 0) { + return; + } + const message = messageQueue.shift(); + try { + if (messages_1.isRequestMessage(message)) { + handleRequest(message); + } + else if (messages_1.isNotificationMessage(message)) { + handleNotification(message); + } + else if (messages_1.isResponseMessage(message)) { + handleResponse(message); + } + else { + handleInvalidMessage(message); + } + } + finally { + triggerMessageQueue(); + } + } + const callback = (message) => { + try { + // We have received a cancellation message. Check if the message is still in the queue + // and cancel it if allowed to do so. + if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) { + const key = createRequestQueueKey(message.params.id); + const toCancel = messageQueue.get(key); + if (messages_1.isRequestMessage(toCancel)) { + const strategy = options === null || options === void 0 ? void 0 : options.connectionStrategy; + const response = (strategy && strategy.cancelUndispatched) ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel); + if (response && (response.error !== undefined || response.result !== undefined)) { + messageQueue.delete(key); + response.id = toCancel.id; + traceSendingResponse(response, message.method, Date.now()); + messageWriter.write(response); + return; + } + } + } + addMessageToQueue(messageQueue, message); + } + finally { + triggerMessageQueue(); + } + }; + function handleRequest(requestMessage) { + if (isDisposed()) { + // we return here silently since we fired an event when the + // connection got disposed. + return; + } + function reply(resultOrError, method, startTime) { + const message = { + jsonrpc: version, + id: requestMessage.id + }; + if (resultOrError instanceof messages_1.ResponseError) { + message.error = resultOrError.toJson(); + } + else { + message.result = resultOrError === undefined ? null : resultOrError; + } + traceSendingResponse(message, method, startTime); + messageWriter.write(message); + } + function replyError(error, method, startTime) { + const message = { + jsonrpc: version, + id: requestMessage.id, + error: error.toJson() + }; + traceSendingResponse(message, method, startTime); + messageWriter.write(message); + } + function replySuccess(result, method, startTime) { + // The JSON RPC defines that a response must either have a result or an error + // So we can't treat undefined as a valid response result. + if (result === undefined) { + result = null; + } + const message = { + jsonrpc: version, + id: requestMessage.id, + result: result + }; + traceSendingResponse(message, method, startTime); + messageWriter.write(message); + } + traceReceivedRequest(requestMessage); + const element = requestHandlers[requestMessage.method]; + let type; + let requestHandler; + if (element) { + type = element.type; + requestHandler = element.handler; + } + const startTime = Date.now(); + if (requestHandler || starRequestHandler) { + const tokenKey = String(requestMessage.id); + const cancellationSource = cancellationStrategy.receiver.createCancellationTokenSource(tokenKey); + requestTokens[tokenKey] = cancellationSource; + try { + let handlerResult; + if (requestHandler) { + if (requestMessage.params === undefined) { + if (type !== undefined && type.numberOfParams !== 0) { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines ${type.numberOfParams} params but recevied none.`), requestMessage.method, startTime); + return; + } + handlerResult = requestHandler(cancellationSource.token); + } + else if (Array.isArray(requestMessage.params)) { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byName) { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by name but received parameters by position`), requestMessage.method, startTime); + return; + } + handlerResult = requestHandler(...requestMessage.params, cancellationSource.token); + } + else { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by position but received parameters by name`), requestMessage.method, startTime); + return; + } + handlerResult = requestHandler(requestMessage.params, cancellationSource.token); + } + } + else if (starRequestHandler) { + handlerResult = starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token); + } + const promise = handlerResult; + if (!handlerResult) { + delete requestTokens[tokenKey]; + replySuccess(handlerResult, requestMessage.method, startTime); + } + else if (promise.then) { + promise.then((resultOrError) => { + delete requestTokens[tokenKey]; + reply(resultOrError, requestMessage.method, startTime); + }, error => { + delete requestTokens[tokenKey]; + if (error instanceof messages_1.ResponseError) { + replyError(error, requestMessage.method, startTime); + } + else if (error && Is.string(error.message)) { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime); + } + else { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime); + } + }); + } + else { + delete requestTokens[tokenKey]; + reply(handlerResult, requestMessage.method, startTime); + } + } + catch (error) { + delete requestTokens[tokenKey]; + if (error instanceof messages_1.ResponseError) { + reply(error, requestMessage.method, startTime); + } + else if (error && Is.string(error.message)) { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime); + } + else { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime); + } + } + } + else { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime); + } + } + function handleResponse(responseMessage) { + if (isDisposed()) { + // See handle request. + return; + } + if (responseMessage.id === null) { + if (responseMessage.error) { + logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`); + } + else { + logger.error(`Received response message without id. No further error information provided.`); + } + } + else { + const key = String(responseMessage.id); + const responsePromise = responsePromises[key]; + traceReceivedResponse(responseMessage, responsePromise); + if (responsePromise) { + delete responsePromises[key]; + try { + if (responseMessage.error) { + const error = responseMessage.error; + responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data)); + } + else if (responseMessage.result !== undefined) { + responsePromise.resolve(responseMessage.result); + } + else { + throw new Error('Should never happen.'); + } + } + catch (error) { + if (error.message) { + logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`); + } + else { + logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`); + } + } + } + } + } + function handleNotification(message) { + if (isDisposed()) { + // See handle request. + return; + } + let type = undefined; + let notificationHandler; + if (message.method === CancelNotification.type.method) { + notificationHandler = (params) => { + const id = params.id; + const source = requestTokens[String(id)]; + if (source) { + source.cancel(); + } + }; + } + else { + const element = notificationHandlers[message.method]; + if (element) { + notificationHandler = element.handler; + type = element.type; + } + } + if (notificationHandler || starNotificationHandler) { + try { + traceReceivedNotification(message); + if (notificationHandler) { + if (message.params === undefined) { + if (type !== undefined) { + if (type.numberOfParams !== 0 && type.parameterStructures !== messages_1.ParameterStructures.byName) { + logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but recevied none.`); + } + } + notificationHandler(); + } + else if (Array.isArray(message.params)) { + if (type !== undefined) { + if (type.parameterStructures === messages_1.ParameterStructures.byName) { + logger.error(`Notification ${message.method} defines parameters by name but received parameters by position`); + } + if (type.numberOfParams !== message.params.length) { + logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received ${message.params.length} argumennts`); + } + } + notificationHandler(...message.params); + } + else { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) { + logger.error(`Notification ${message.method} defines parameters by position but received parameters by name`); + } + notificationHandler(message.params); + } + } + else if (starNotificationHandler) { + starNotificationHandler(message.method, message.params); + } + } + catch (error) { + if (error.message) { + logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`); + } + else { + logger.error(`Notification handler '${message.method}' failed unexpectedly.`); + } + } + } + else { + unhandledNotificationEmitter.fire(message); + } + } + function handleInvalidMessage(message) { + if (!message) { + logger.error('Received empty message.'); + return; + } + logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`); + // Test whether we find an id to reject the promise + const responseMessage = message; + if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) { + const key = String(responseMessage.id); + const responseHandler = responsePromises[key]; + if (responseHandler) { + responseHandler.reject(new Error('The received response has neither a result nor an error property.')); + } + } + } + function traceSendingRequest(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose && message.params) { + data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`; + } + tracer.log(`Sending request '${message.method} - (${message.id})'.`, data); + } + else { + logLSPMessage('send-request', message); + } + } + function traceSendingNotification(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose) { + if (message.params) { + data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`; + } + else { + data = 'No parameters provided.\n\n'; + } + } + tracer.log(`Sending notification '${message.method}'.`, data); + } + else { + logLSPMessage('send-notification', message); + } + } + function traceSendingResponse(message, method, startTime) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose) { + if (message.error && message.error.data) { + data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`; + } + else { + if (message.result) { + data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`; + } + else if (message.error === undefined) { + data = 'No result returned.\n\n'; + } + } + } + tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data); + } + else { + logLSPMessage('send-response', message); + } + } + function traceReceivedRequest(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose && message.params) { + data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`; + } + tracer.log(`Received request '${message.method} - (${message.id})'.`, data); + } + else { + logLSPMessage('receive-request', message); + } + } + function traceReceivedNotification(message) { + if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose) { + if (message.params) { + data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`; + } + else { + data = 'No parameters provided.\n\n'; + } + } + tracer.log(`Received notification '${message.method}'.`, data); + } + else { + logLSPMessage('receive-notification', message); + } + } + function traceReceivedResponse(message, responsePromise) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose) { + if (message.error && message.error.data) { + data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`; + } + else { + if (message.result) { + data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`; + } + else if (message.error === undefined) { + data = 'No result returned.\n\n'; + } + } + } + if (responsePromise) { + const error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : ''; + tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data); + } + else { + tracer.log(`Received response ${message.id} without active response promise.`, data); + } + } + else { + logLSPMessage('receive-response', message); + } + } + function logLSPMessage(type, message) { + if (!tracer || trace === Trace.Off) { + return; + } + const lspMessage = { + isLSPMessage: true, + type, + message, + timestamp: Date.now() + }; + tracer.log(lspMessage); + } + function throwIfClosedOrDisposed() { + if (isClosed()) { + throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.'); + } + if (isDisposed()) { + throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.'); + } + } + function throwIfListening() { + if (isListening()) { + throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening'); + } + } + function throwIfNotListening() { + if (!isListening()) { + throw new Error('Call listen() first.'); + } + } + function undefinedToNull(param) { + if (param === undefined) { + return null; + } + else { + return param; + } + } + function nullToUndefined(param) { + if (param === null) { + return undefined; + } + else { + return param; + } + } + function isNamedParam(param) { + return param !== undefined && param !== null && !Array.isArray(param) && typeof param === 'object'; + } + function computeSingleParam(parameterStructures, param) { + switch (parameterStructures) { + case messages_1.ParameterStructures.auto: + if (isNamedParam(param)) { + return nullToUndefined(param); + } + else { + return [undefinedToNull(param)]; + } + break; + case messages_1.ParameterStructures.byName: + if (!isNamedParam(param)) { + throw new Error(`Recevied parameters by name but param is not an object literal.`); + } + return nullToUndefined(param); + case messages_1.ParameterStructures.byPosition: + return [undefinedToNull(param)]; + default: + throw new Error(`Unknown parameter structure ${parameterStructures.toString()}`); + } + } + function computeMessageParams(type, params) { + let result; + const numberOfParams = type.numberOfParams; + switch (numberOfParams) { + case 0: + result = undefined; + break; + case 1: + result = computeSingleParam(type.parameterStructures, params[0]); + break; + default: + result = []; + for (let i = 0; i < params.length && i < numberOfParams; i++) { + result.push(undefinedToNull(params[i])); + } + if (params.length < numberOfParams) { + for (let i = params.length; i < numberOfParams; i++) { + result.push(null); + } + } + break; + } + return result; + } + const connection = { + sendNotification: (type, ...args) => { + throwIfClosedOrDisposed(); + let method; + let messageParams; + if (Is.string(type)) { + method = type; + const first = args[0]; + let paramStart = 0; + let parameterStructures = messages_1.ParameterStructures.auto; + if (messages_1.ParameterStructures.is(first)) { + paramStart = 1; + parameterStructures = first; + } + let paramEnd = args.length; + const numberOfParams = paramEnd - paramStart; + switch (numberOfParams) { + case 0: + messageParams = undefined; + break; + case 1: + messageParams = computeSingleParam(parameterStructures, args[paramStart]); + break; + default: + if (parameterStructures === messages_1.ParameterStructures.byName) { + throw new Error(`Recevied ${numberOfParams} parameters for 'by Name' notification parameter structure.`); + } + messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value)); + break; + } + } + else { + const params = args; + method = type.method; + messageParams = computeMessageParams(type, params); + } + const notificationMessage = { + jsonrpc: version, + method: method, + params: messageParams + }; + traceSendingNotification(notificationMessage); + messageWriter.write(notificationMessage); + }, + onNotification: (type, handler) => { + throwIfClosedOrDisposed(); + let method; + if (Is.func(type)) { + starNotificationHandler = type; + } + else if (handler) { + if (Is.string(type)) { + method = type; + notificationHandlers[type] = { type: undefined, handler }; + } + else { + method = type.method; + notificationHandlers[type.method] = { type, handler }; + } + } + return { + dispose: () => { + if (method !== undefined) { + delete notificationHandlers[method]; + } + else { + starNotificationHandler = undefined; + } + } + }; + }, + onProgress: (_type, token, handler) => { + if (progressHandlers.has(token)) { + throw new Error(`Progress handler for token ${token} already registered`); + } + progressHandlers.set(token, handler); + return { + dispose: () => { + progressHandlers.delete(token); + } + }; + }, + sendProgress: (_type, token, value) => { + connection.sendNotification(ProgressNotification.type, { token, value }); + }, + onUnhandledProgress: unhandledProgressEmitter.event, + sendRequest: (type, ...args) => { + throwIfClosedOrDisposed(); + throwIfNotListening(); + let method; + let messageParams; + let token = undefined; + if (Is.string(type)) { + method = type; + const first = args[0]; + const last = args[args.length - 1]; + let paramStart = 0; + let parameterStructures = messages_1.ParameterStructures.auto; + if (messages_1.ParameterStructures.is(first)) { + paramStart = 1; + parameterStructures = first; + } + let paramEnd = args.length; + if (cancellation_1.CancellationToken.is(last)) { + paramEnd = paramEnd - 1; + token = last; + } + const numberOfParams = paramEnd - paramStart; + switch (numberOfParams) { + case 0: + messageParams = undefined; + break; + case 1: + messageParams = computeSingleParam(parameterStructures, args[paramStart]); + break; + default: + if (parameterStructures === messages_1.ParameterStructures.byName) { + throw new Error(`Recevied ${numberOfParams} parameters for 'by Name' request parameter structure.`); + } + messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value)); + break; + } + } + else { + const params = args; + method = type.method; + messageParams = computeMessageParams(type, params); + const numberOfParams = type.numberOfParams; + token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined; + } + const id = sequenceNumber++; + let disposable; + if (token) { + disposable = token.onCancellationRequested(() => { + cancellationStrategy.sender.sendCancellation(connection, id); + }); + } + const result = new Promise((resolve, reject) => { + const requestMessage = { + jsonrpc: version, + id: id, + method: method, + params: messageParams + }; + const resolveWithCleanup = (r) => { + resolve(r); + cancellationStrategy.sender.cleanup(id); + disposable === null || disposable === void 0 ? void 0 : disposable.dispose(); + }; + const rejectWithCleanup = (r) => { + reject(r); + cancellationStrategy.sender.cleanup(id); + disposable === null || disposable === void 0 ? void 0 : disposable.dispose(); + }; + let responsePromise = { method: method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup }; + traceSendingRequest(requestMessage); + try { + messageWriter.write(requestMessage); + } + catch (e) { + // Writing the message failed. So we need to reject the promise. + responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason')); + responsePromise = null; + } + if (responsePromise) { + responsePromises[String(id)] = responsePromise; + } + }); + return result; + }, + onRequest: (type, handler) => { + throwIfClosedOrDisposed(); + let method = null; + if (StarRequestHandler.is(type)) { + method = undefined; + starRequestHandler = type; + } + else if (Is.string(type)) { + method = null; + if (handler !== undefined) { + method = type; + requestHandlers[type] = { handler: handler, type: undefined }; + } + } + else { + if (handler !== undefined) { + method = type.method; + requestHandlers[type.method] = { type, handler }; + } + } + return { + dispose: () => { + if (method === null) { + return; + } + if (method !== undefined) { + delete requestHandlers[method]; + } + else { + starRequestHandler = undefined; + } + } + }; + }, + trace: (_value, _tracer, sendNotificationOrTraceOptions) => { + let _sendNotification = false; + let _traceFormat = TraceFormat.Text; + if (sendNotificationOrTraceOptions !== undefined) { + if (Is.boolean(sendNotificationOrTraceOptions)) { + _sendNotification = sendNotificationOrTraceOptions; + } + else { + _sendNotification = sendNotificationOrTraceOptions.sendNotification || false; + _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text; + } + } + trace = _value; + traceFormat = _traceFormat; + if (trace === Trace.Off) { + tracer = undefined; + } + else { + tracer = _tracer; + } + if (_sendNotification && !isClosed() && !isDisposed()) { + connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) }); + } + }, + onError: errorEmitter.event, + onClose: closeEmitter.event, + onUnhandledNotification: unhandledNotificationEmitter.event, + onDispose: disposeEmitter.event, + end: () => { + messageWriter.end(); + }, + dispose: () => { + if (isDisposed()) { + return; + } + state = ConnectionState.Disposed; + disposeEmitter.fire(undefined); + const error = new Error('Connection got disposed.'); + Object.keys(responsePromises).forEach((key) => { + responsePromises[key].reject(error); + }); + responsePromises = Object.create(null); + requestTokens = Object.create(null); + messageQueue = new linkedMap_1.LinkedMap(); + // Test for backwards compatibility + if (Is.func(messageWriter.dispose)) { + messageWriter.dispose(); + } + if (Is.func(messageReader.dispose)) { + messageReader.dispose(); + } + }, + listen: () => { + throwIfClosedOrDisposed(); + throwIfListening(); + state = ConnectionState.Listening; + messageReader.listen(callback); + }, + inspect: () => { + // eslint-disable-next-line no-console + ral_1.default().console.log('inspect'); + } + }; + connection.onNotification(LogTraceNotification.type, (params) => { + if (trace === Trace.Off || !tracer) { + return; + } + tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined); + }); + connection.onNotification(ProgressNotification.type, (params) => { + const handler = progressHandlers.get(params.token); + if (handler) { + handler(params.value); + } + else { + unhandledProgressEmitter.fire(params); + } + }); + return connection; +} +exports.createMessageConnection = createMessageConnection; +//# sourceMappingURL=connection.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts" index 41dac66c8a8621db7da17f29483c4c9e42c3acb3..99878bba42532ae95d0d978fcaa8d97420470d8a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts" @@ -1,3 +1,9 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f0745ab78e18a2befaf1d9951481973318722c4e2f33e859239f55fa999ff2b1 -size 188 +export interface Disposable { + /** + * Dispose this object. + */ + dispose(): void; +} +export declare namespace Disposable { + function create(func: () => void): Disposable; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/disposable.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/disposable.js" index 0afcd618d74b1bc86801c7c5d6302be625fbcca0..99c386e1ed6dfe4a4648339ba95b3d0c389f48c2 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/disposable.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/disposable.js" @@ -1,3 +1,17 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a962003d81caa64db3b51ab8e7bd4398700429ccb7ed5aa45ed9d5c3b50ab098 -size 723 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Disposable = void 0; +var Disposable; +(function (Disposable) { + function create(func) { + return { + dispose: func + }; + } + Disposable.create = create; +})(Disposable = exports.Disposable || (exports.Disposable = {})); +//# sourceMappingURL=disposable.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts" index 53ed6c84d3968bd2b0c0855571b3de93c24457a0..2c18ce004f7d3b78e1e88d1ac5a4a966b7b4f1fe 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts" @@ -1,3 +1,52 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec9d55888e353f9b5cdda761308dffc7eeb6aa0b7b25d328c64d3776a1cf2a7e -size 1929 +import type RAL from './ral'; +import { Message } from './messages'; +export interface FunctionContentEncoder { + name: string; + encode(input: Uint8Array): Promise; +} +export interface StreamContentEncoder { + name: string; + create(): RAL.WritableStream; +} +export declare type ContentEncoder = FunctionContentEncoder | (FunctionContentEncoder & StreamContentEncoder); +export interface FunctionContentDecoder { + name: string; + decode(buffer: Uint8Array): Promise; +} +export interface StreamContentDecoder { + name: string; + create(): RAL.WritableStream; +} +export declare type ContentDecoder = FunctionContentDecoder | (FunctionContentDecoder & StreamContentDecoder); +export interface ContentTypeEncoderOptions { + charset: RAL.MessageBufferEncoding; +} +export interface FunctionContentTypeEncoder { + name: string; + encode(msg: Message, options: ContentTypeEncoderOptions): Promise; +} +export interface StreamContentTypeEncoder { + name: string; + create(options: ContentTypeEncoderOptions): RAL.WritableStream; +} +export declare type ContentTypeEncoder = FunctionContentTypeEncoder | (FunctionContentTypeEncoder & StreamContentTypeEncoder); +export interface ContentTypeDecoderOptions { + charset: RAL.MessageBufferEncoding; +} +export interface FunctionContentTypeDecoder { + name: string; + decode(buffer: Uint8Array, options: ContentTypeDecoderOptions): Promise; +} +export interface StreamContentTypeDecoder { + name: string; + create(options: ContentTypeDecoderOptions): RAL.WritableStream; +} +export declare type ContentTypeDecoder = FunctionContentTypeDecoder | (FunctionContentTypeDecoder & StreamContentTypeDecoder); +interface Named { + name: string; +} +export declare namespace Encodings { + function getEncodingHeaderValue(encodings: Named[]): string | undefined; + function parseEncodingHeaderValue(value: string): string[]; +} +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/encoding.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/encoding.js" index 20821a264f57f9c9c46be272652f56ec2052e221..f3931ef3618c6edd765d4c18c10b136daa1a8c93 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/encoding.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/encoding.js" @@ -1,3 +1,71 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2a42a2b4e6ab00e7fc63bb2a54facad4d3f603be53a5d952fef0dacf00be015d -size 2686 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Encodings = void 0; +var Encodings; +(function (Encodings) { + function getEncodingHeaderValue(encodings) { + if (encodings.length === 1) { + return encodings[0].name; + } + const distribute = encodings.length - 1; + if (distribute > 1000) { + throw new Error(`Quality value can only have three decimal digits but trying to distribute ${encodings.length} elements.`); + } + const digits = Math.ceil(Math.log10(distribute)); + const factor = Math.pow(10, digits); + const diff = Math.floor((1 / distribute) * factor) / factor; + const result = []; + let q = 1; + for (const encoding of encodings) { + result.push(`${encoding.name};q=${q === 1 || q === 0 ? q.toFixed(0) : q.toFixed(digits)}`); + q = q - diff; + } + return result.join(', '); + } + Encodings.getEncodingHeaderValue = getEncodingHeaderValue; + function parseEncodingHeaderValue(value) { + const map = new Map(); + const encodings = value.split(/\s*,\s*/); + for (const value of encodings) { + const [encoding, q] = parseEncoding(value); + if (encoding === '*') { + continue; + } + let values = map.get(q); + if (values === undefined) { + values = []; + map.set(q, values); + } + values.push(encoding); + } + const keys = Array.from(map.keys()); + keys.sort((a, b) => b - a); + const result = []; + for (const key of keys) { + result.push(...map.get(key)); + } + return result; + } + Encodings.parseEncodingHeaderValue = parseEncodingHeaderValue; + function parseEncoding(value) { + let q = 1; + let encoding; + const index = value.indexOf(';q='); + if (index !== -1) { + const parsed = parseFloat(value.substr(index)); + if (parsed !== NaN) { + q = parsed; + } + encoding = value.substr(0, index); + } + else { + encoding = value; + } + return [encoding, q]; + } +})(Encodings = exports.Encodings || (exports.Encodings = {})); +//# sourceMappingURL=encoding.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/events.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/events.d.ts" index 0a53d8dc2e689d84ff0fca7798543c0217898ed3..3d8d0639eb7a5da4f55527e056f1394eb73e0f9c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/events.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/events.d.ts" @@ -1,3 +1,39 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b61ebe734dabd3ca10247807bfa4585ed51c889282e5decd152eea86daea7383 -size 1088 +import { Disposable } from './disposable'; +/** + * Represents a typed event. + */ +export interface Event { + /** + * + * @param listener The listener function will be call when the event happens. + * @param thisArgs The 'this' which will be used when calling the event listener. + * @param disposables An array to which a {{IDisposable}} will be added. The + * @return + */ + (listener: (e: T) => any, thisArgs?: any, disposables?: Disposable[]): Disposable; +} +export declare namespace Event { + const None: Event; +} +export interface EmitterOptions { + onFirstListenerAdd?: Function; + onLastListenerRemove?: Function; +} +export declare class Emitter { + private _options?; + private static _noop; + private _event; + private _callbacks; + constructor(_options?: EmitterOptions | undefined); + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + get event(): Event; + /** + * To be kept private to fire an event to + * subscribers + */ + fire(event: T): any; + dispose(): void; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/events.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/events.js" index e5653b4513d4b91e6f1189ea89fbe897fab214f0..cc5171ab7f9ebedc2808aa9bafb0da73e2a7c093 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/events.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/events.js" @@ -1,3 +1,129 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e39604fc6beafbea62f1cb4566d4b686e144f626bcf4f51fb6ab23b10093d452 -size 4543 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Emitter = exports.Event = void 0; +const ral_1 = require("./ral"); +var Event; +(function (Event) { + const _disposable = { dispose() { } }; + Event.None = function () { return _disposable; }; +})(Event = exports.Event || (exports.Event = {})); +class CallbackList { + add(callback, context = null, bucket) { + if (!this._callbacks) { + this._callbacks = []; + this._contexts = []; + } + this._callbacks.push(callback); + this._contexts.push(context); + if (Array.isArray(bucket)) { + bucket.push({ dispose: () => this.remove(callback, context) }); + } + } + remove(callback, context = null) { + if (!this._callbacks) { + return; + } + let foundCallbackWithDifferentContext = false; + for (let i = 0, len = this._callbacks.length; i < len; i++) { + if (this._callbacks[i] === callback) { + if (this._contexts[i] === context) { + // callback & context match => remove it + this._callbacks.splice(i, 1); + this._contexts.splice(i, 1); + return; + } + else { + foundCallbackWithDifferentContext = true; + } + } + } + if (foundCallbackWithDifferentContext) { + throw new Error('When adding a listener with a context, you should remove it with the same context'); + } + } + invoke(...args) { + if (!this._callbacks) { + return []; + } + const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0); + for (let i = 0, len = callbacks.length; i < len; i++) { + try { + ret.push(callbacks[i].apply(contexts[i], args)); + } + catch (e) { + // eslint-disable-next-line no-console + ral_1.default().console.error(e); + } + } + return ret; + } + isEmpty() { + return !this._callbacks || this._callbacks.length === 0; + } + dispose() { + this._callbacks = undefined; + this._contexts = undefined; + } +} +class Emitter { + constructor(_options) { + this._options = _options; + } + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + get event() { + if (!this._event) { + this._event = (listener, thisArgs, disposables) => { + if (!this._callbacks) { + this._callbacks = new CallbackList(); + } + if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) { + this._options.onFirstListenerAdd(this); + } + this._callbacks.add(listener, thisArgs); + const result = { + dispose: () => { + if (!this._callbacks) { + // disposable is disposed after emitter is disposed. + return; + } + this._callbacks.remove(listener, thisArgs); + result.dispose = Emitter._noop; + if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) { + this._options.onLastListenerRemove(this); + } + } + }; + if (Array.isArray(disposables)) { + disposables.push(result); + } + return result; + }; + } + return this._event; + } + /** + * To be kept private to fire an event to + * subscribers + */ + fire(event) { + if (this._callbacks) { + this._callbacks.invoke.call(this._callbacks, event); + } + } + dispose() { + if (this._callbacks) { + this._callbacks.dispose(); + this._callbacks = undefined; + } + } +} +exports.Emitter = Emitter; +Emitter._noop = function () { }; +//# sourceMappingURL=events.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/is.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/is.d.ts" index bc53f5df6c6caf87f0c9425ae9a603687ae044a0..9261a2697bedff7fb49ad6a075afdd68f98b20ff 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/is.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/is.d.ts" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cf445a02b226e862589a7a4d4296dc0eb7e2b3398d24e2a9109fae165a179db1 -size 433 +export declare function boolean(value: any): value is boolean; +export declare function string(value: any): value is string; +export declare function number(value: any): value is number; +export declare function error(value: any): value is Error; +export declare function func(value: any): value is Function; +export declare function array(value: any): value is T[]; +export declare function stringArray(value: any): value is string[]; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/is.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/is.js" index 730c16a2cb1276f29af139c18404dea1b5b6a816..a8fad75745ab0612fcfdff4e2b8e77a7d4c67a24 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/is.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/is.js" @@ -1,3 +1,36 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:695b1e11907329e4c270b1c8230b4f79060d1b84fdb1f5cdd595d4c87fe83f5d -size 1302 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0; +function boolean(value) { + return value === true || value === false; +} +exports.boolean = boolean; +function string(value) { + return typeof value === 'string' || value instanceof String; +} +exports.string = string; +function number(value) { + return typeof value === 'number' || value instanceof Number; +} +exports.number = number; +function error(value) { + return value instanceof Error; +} +exports.error = error; +function func(value) { + return typeof value === 'function'; +} +exports.func = func; +function array(value) { + return Array.isArray(value); +} +exports.array = array; +function stringArray(value) { + return array(value) && value.every(elem => string(elem)); +} +exports.stringArray = stringArray; +//# sourceMappingURL=is.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts" index 9dc806a5c3b05d7dc712f7dddc709111aec9e254..6f01a1c4dfe702e1bf9496693671711322bf34fe 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts" @@ -1,3 +1,53 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:049e3511439f11e1285bec4647ab8aac53e0c06951b93ba507565dbde851ba31 -size 1594 +export declare namespace Touch { + const None: 0; + const First: 1; + const AsOld: 1; + const Last: 2; + const AsNew: 2; +} +export declare type Touch = 0 | 1 | 2; +export declare class LinkedMap implements Map { + readonly [Symbol.toStringTag] = "LinkedMap"; + private _map; + private _head; + private _tail; + private _size; + private _state; + constructor(); + clear(): void; + isEmpty(): boolean; + get size(): number; + get first(): V | undefined; + get last(): V | undefined; + has(key: K): boolean; + get(key: K, touch?: Touch): V | undefined; + set(key: K, value: V, touch?: Touch): this; + delete(key: K): boolean; + remove(key: K): V | undefined; + shift(): V | undefined; + forEach(callbackfn: (value: V, key: K, map: LinkedMap) => void, thisArg?: any): void; + keys(): IterableIterator; + values(): IterableIterator; + entries(): IterableIterator<[K, V]>; + [Symbol.iterator](): IterableIterator<[K, V]>; + protected trimOld(newSize: number): void; + private addItemFirst; + private addItemLast; + private removeItem; + private touch; + toJSON(): [K, V][]; + fromJSON(data: [K, V][]): void; +} +export declare class LRUCache extends LinkedMap { + private _limit; + private _ratio; + constructor(limit: number, ratio?: number); + get limit(): number; + set limit(limit: number); + get ratio(): number; + set ratio(ratio: number); + get(key: K, touch?: Touch): V | undefined; + peek(key: K): V | undefined; + set(key: K, value: V): this; + private checkTrim; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/linkedMap.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/linkedMap.js" index 1f5718d4e51dbc03e78615961b6f433ab8719c4d..d5f1e876628c899a7a4862347cc40abbb8410ebd 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/linkedMap.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/linkedMap.js" @@ -1,3 +1,403 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d70616145889de5536817219c51c99e0fce7efa741e8bcc0e2a776ee85d274ac -size 11952 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LRUCache = exports.LinkedMap = exports.Touch = void 0; +var Touch; +(function (Touch) { + Touch.None = 0; + Touch.First = 1; + Touch.AsOld = Touch.First; + Touch.Last = 2; + Touch.AsNew = Touch.Last; +})(Touch = exports.Touch || (exports.Touch = {})); +class LinkedMap { + constructor() { + this[Symbol.toStringTag] = 'LinkedMap'; + this._map = new Map(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + this._state = 0; + } + clear() { + this._map.clear(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + this._state++; + } + isEmpty() { + return !this._head && !this._tail; + } + get size() { + return this._size; + } + get first() { + var _a; + return (_a = this._head) === null || _a === void 0 ? void 0 : _a.value; + } + get last() { + var _a; + return (_a = this._tail) === null || _a === void 0 ? void 0 : _a.value; + } + has(key) { + return this._map.has(key); + } + get(key, touch = Touch.None) { + const item = this._map.get(key); + if (!item) { + return undefined; + } + if (touch !== Touch.None) { + this.touch(item, touch); + } + return item.value; + } + set(key, value, touch = Touch.None) { + let item = this._map.get(key); + if (item) { + item.value = value; + if (touch !== Touch.None) { + this.touch(item, touch); + } + } + else { + item = { key, value, next: undefined, previous: undefined }; + switch (touch) { + case Touch.None: + this.addItemLast(item); + break; + case Touch.First: + this.addItemFirst(item); + break; + case Touch.Last: + this.addItemLast(item); + break; + default: + this.addItemLast(item); + break; + } + this._map.set(key, item); + this._size++; + } + return this; + } + delete(key) { + return !!this.remove(key); + } + remove(key) { + const item = this._map.get(key); + if (!item) { + return undefined; + } + this._map.delete(key); + this.removeItem(item); + this._size--; + return item.value; + } + shift() { + if (!this._head && !this._tail) { + return undefined; + } + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + const item = this._head; + this._map.delete(item.key); + this.removeItem(item); + this._size--; + return item.value; + } + forEach(callbackfn, thisArg) { + const state = this._state; + let current = this._head; + while (current) { + if (thisArg) { + callbackfn.bind(thisArg)(current.value, current.key, this); + } + else { + callbackfn(current.value, current.key, this); + } + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + current = current.next; + } + } + keys() { + const map = this; + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]() { + return iterator; + }, + next() { + if (map._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: current.key, done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + values() { + const map = this; + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]() { + return iterator; + }, + next() { + if (map._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: current.value, done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + entries() { + const map = this; + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]() { + return iterator; + }, + next() { + if (map._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: [current.key, current.value], done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + [Symbol.iterator]() { + return this.entries(); + } + trimOld(newSize) { + if (newSize >= this.size) { + return; + } + if (newSize === 0) { + this.clear(); + return; + } + let current = this._head; + let currentSize = this.size; + while (current && currentSize > newSize) { + this._map.delete(current.key); + current = current.next; + currentSize--; + } + this._head = current; + this._size = currentSize; + if (current) { + current.previous = undefined; + } + this._state++; + } + addItemFirst(item) { + // First time Insert + if (!this._head && !this._tail) { + this._tail = item; + } + else if (!this._head) { + throw new Error('Invalid list'); + } + else { + item.next = this._head; + this._head.previous = item; + } + this._head = item; + this._state++; + } + addItemLast(item) { + // First time Insert + if (!this._head && !this._tail) { + this._head = item; + } + else if (!this._tail) { + throw new Error('Invalid list'); + } + else { + item.previous = this._tail; + this._tail.next = item; + } + this._tail = item; + this._state++; + } + removeItem(item) { + if (item === this._head && item === this._tail) { + this._head = undefined; + this._tail = undefined; + } + else if (item === this._head) { + // This can only happend if size === 1 which is handle + // by the case above. + if (!item.next) { + throw new Error('Invalid list'); + } + item.next.previous = undefined; + this._head = item.next; + } + else if (item === this._tail) { + // This can only happend if size === 1 which is handle + // by the case above. + if (!item.previous) { + throw new Error('Invalid list'); + } + item.previous.next = undefined; + this._tail = item.previous; + } + else { + const next = item.next; + const previous = item.previous; + if (!next || !previous) { + throw new Error('Invalid list'); + } + next.previous = previous; + previous.next = next; + } + item.next = undefined; + item.previous = undefined; + this._state++; + } + touch(item, touch) { + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + if ((touch !== Touch.First && touch !== Touch.Last)) { + return; + } + if (touch === Touch.First) { + if (item === this._head) { + return; + } + const next = item.next; + const previous = item.previous; + // Unlink the item + if (item === this._tail) { + // previous must be defined since item was not head but is tail + // So there are more than on item in the map + previous.next = undefined; + this._tail = previous; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next.previous = previous; + previous.next = next; + } + // Insert the node at head + item.previous = undefined; + item.next = this._head; + this._head.previous = item; + this._head = item; + this._state++; + } + else if (touch === Touch.Last) { + if (item === this._tail) { + return; + } + const next = item.next; + const previous = item.previous; + // Unlink the item. + if (item === this._head) { + // next must be defined since item was not tail but is head + // So there are more than on item in the map + next.previous = undefined; + this._head = next; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next.previous = previous; + previous.next = next; + } + item.next = undefined; + item.previous = this._tail; + this._tail.next = item; + this._tail = item; + this._state++; + } + } + toJSON() { + const data = []; + this.forEach((value, key) => { + data.push([key, value]); + }); + return data; + } + fromJSON(data) { + this.clear(); + for (const [key, value] of data) { + this.set(key, value); + } + } +} +exports.LinkedMap = LinkedMap; +class LRUCache extends LinkedMap { + constructor(limit, ratio = 1) { + super(); + this._limit = limit; + this._ratio = Math.min(Math.max(0, ratio), 1); + } + get limit() { + return this._limit; + } + set limit(limit) { + this._limit = limit; + this.checkTrim(); + } + get ratio() { + return this._ratio; + } + set ratio(ratio) { + this._ratio = Math.min(Math.max(0, ratio), 1); + this.checkTrim(); + } + get(key, touch = Touch.AsNew) { + return super.get(key, touch); + } + peek(key) { + return super.get(key, Touch.None); + } + set(key, value) { + super.set(key, value, Touch.Last); + this.checkTrim(); + return this; + } + checkTrim() { + if (this.size > this._limit) { + this.trimOld(Math.round(this._limit * this._ratio)); + } + } +} +exports.LRUCache = LRUCache; +//# sourceMappingURL=linkedMap.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts" index cfea255833ff27c79a7f62c2a2674a600c8119f7..bc9862eee5e439362b1ccade838660af3e4731a9 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts" @@ -1,3 +1,18 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f8eb570a18c2d41dab40b7ceaefcc29e7e54e3e0070f464be180c0d49da2f54a -size 884 +import RAL from './ral'; +export declare abstract class AbstractMessageBuffer implements RAL.MessageBuffer { + private _encoding; + private _chunks; + private _totalLength; + constructor(encoding?: RAL.MessageBufferEncoding); + protected abstract emptyBuffer(): Uint8Array; + protected abstract fromString(value: string, encoding: RAL.MessageBufferEncoding): Uint8Array; + protected abstract toString(value: Uint8Array, encoding: RAL.MessageBufferEncoding): string; + protected abstract asNative(buffer: Uint8Array, length?: number): Uint8Array; + protected abstract allocNative(length: number): Uint8Array; + get encoding(): RAL.MessageBufferEncoding; + append(chunk: Uint8Array | string): void; + tryReadHeaders(): Map | undefined; + tryReadBody(length: number): Uint8Array | undefined; + get numberOfBytes(): number; + private _read; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js" index 065f31cf865f2e3aa0db117bf984a58537423086..f29173ec3cfec9bbcc03e387a98a1384f10c6ff9 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js" @@ -1,3 +1,153 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bc709a245dd63e7d16a2042cb0664e3b3470eedc05eb238b4fd924c94ad1cab7 -size 5630 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AbstractMessageBuffer = void 0; +const CR = 13; +const LF = 10; +const CRLF = '\r\n'; +class AbstractMessageBuffer { + constructor(encoding = 'utf-8') { + this._encoding = encoding; + this._chunks = []; + this._totalLength = 0; + } + get encoding() { + return this._encoding; + } + append(chunk) { + const toAppend = typeof chunk === 'string' ? this.fromString(chunk, this._encoding) : chunk; + this._chunks.push(toAppend); + this._totalLength += toAppend.byteLength; + } + tryReadHeaders() { + if (this._chunks.length === 0) { + return undefined; + } + let state = 0; + let chunkIndex = 0; + let offset = 0; + let chunkBytesRead = 0; + row: while (chunkIndex < this._chunks.length) { + const chunk = this._chunks[chunkIndex]; + offset = 0; + column: while (offset < chunk.length) { + const value = chunk[offset]; + switch (value) { + case CR: + switch (state) { + case 0: + state = 1; + break; + case 2: + state = 3; + break; + default: + state = 0; + } + break; + case LF: + switch (state) { + case 1: + state = 2; + break; + case 3: + state = 4; + offset++; + break row; + default: + state = 0; + } + break; + default: + state = 0; + } + offset++; + } + chunkBytesRead += chunk.byteLength; + chunkIndex++; + } + if (state !== 4) { + return undefined; + } + // The buffer contains the two CRLF at the end. So we will + // have two empty lines after the split at the end as well. + const buffer = this._read(chunkBytesRead + offset); + const result = new Map(); + const headers = this.toString(buffer, 'ascii').split(CRLF); + if (headers.length < 2) { + return result; + } + for (let i = 0; i < headers.length - 2; i++) { + const header = headers[i]; + const index = header.indexOf(':'); + if (index === -1) { + throw new Error('Message header must separate key and value using :'); + } + const key = header.substr(0, index); + const value = header.substr(index + 1).trim(); + result.set(key, value); + } + return result; + } + tryReadBody(length) { + if (this._totalLength < length) { + return undefined; + } + return this._read(length); + } + get numberOfBytes() { + return this._totalLength; + } + _read(byteCount) { + if (byteCount === 0) { + return this.emptyBuffer(); + } + if (byteCount > this._totalLength) { + throw new Error(`Cannot read so many bytes!`); + } + if (this._chunks[0].byteLength === byteCount) { + // super fast path, precisely first chunk must be returned + const chunk = this._chunks[0]; + this._chunks.shift(); + this._totalLength -= byteCount; + return this.asNative(chunk); + } + if (this._chunks[0].byteLength > byteCount) { + // fast path, the reading is entirely within the first chunk + const chunk = this._chunks[0]; + const result = this.asNative(chunk, byteCount); + this._chunks[0] = chunk.slice(byteCount); + this._totalLength -= byteCount; + return result; + } + const result = this.allocNative(byteCount); + let resultOffset = 0; + let chunkIndex = 0; + while (byteCount > 0) { + const chunk = this._chunks[chunkIndex]; + if (chunk.byteLength > byteCount) { + // this chunk will survive + const chunkPart = chunk.slice(0, byteCount); + result.set(chunkPart, resultOffset); + resultOffset += byteCount; + this._chunks[chunkIndex] = chunk.slice(byteCount); + this._totalLength -= byteCount; + byteCount -= byteCount; + } + else { + // this chunk will be entirely read + result.set(chunk, resultOffset); + resultOffset += chunk.byteLength; + this._chunks.shift(); + this._totalLength -= chunk.byteLength; + byteCount -= chunk.byteLength; + } + } + return result; + } +} +exports.AbstractMessageBuffer = AbstractMessageBuffer; +//# sourceMappingURL=messageBuffer.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts" index 52eff31cbf66a36af0c78ced28ef938868988d3e..4058986adfb126ad3e60528dc89fcffbb8a953d8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts" @@ -1,3 +1,76 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:78fbf5d1265bdca3b2e54323d63678e3f73fecf70c05d988966a683da4cdf2f8 -size 2975 +import RAL from './ral'; +import { Event } from './events'; +import { Message } from './messages'; +import { ContentDecoder, ContentTypeDecoder } from './encoding'; +import { Disposable } from './api'; +/** + * A callback that receives each incoming JSON-RPC message. + */ +export interface DataCallback { + (data: Message): void; +} +export interface PartialMessageInfo { + readonly messageToken: number; + readonly waitingTime: number; +} +/** Reads JSON-RPC messages from some underlying transport. */ +export interface MessageReader { + /** Raised whenever an error occurs while reading a message. */ + readonly onError: Event; + /** An event raised when the end of the underlying transport has been reached. */ + readonly onClose: Event; + /** + * An event that *may* be raised to inform the owner that only part of a message has been received. + * A MessageReader implementation may choose to raise this event after a timeout elapses while waiting for more of a partially received message to be received. + */ + readonly onPartialMessage: Event; + /** + * Begins listening for incoming messages. To be called at most once. + * @param callback A callback for receiving decoded messages. + */ + listen(callback: DataCallback): Disposable; + /** Releases resources incurred from reading or raising events. Does NOT close the underlying transport, if any. */ + dispose(): void; +} +export declare namespace MessageReader { + function is(value: any): value is MessageReader; +} +export declare abstract class AbstractMessageReader implements MessageReader { + private errorEmitter; + private closeEmitter; + private partialMessageEmitter; + constructor(); + dispose(): void; + get onError(): Event; + protected fireError(error: any): void; + get onClose(): Event; + protected fireClose(): void; + get onPartialMessage(): Event; + protected firePartialMessage(info: PartialMessageInfo): void; + private asError; + abstract listen(callback: DataCallback): Disposable; +} +export interface MessageReaderOptions { + charset?: RAL.MessageBufferEncoding; + contentDecoder?: ContentDecoder; + contentDecoders?: ContentDecoder[]; + contentTypeDecoder?: ContentTypeDecoder; + contentTypeDecoders?: ContentTypeDecoder[]; +} +export declare class ReadableStreamMessageReader extends AbstractMessageReader { + private readable; + private options; + private callback; + private nextMessageLength; + private messageToken; + private buffer; + private partialMessageTimer; + private _partialMessageTimeout; + constructor(readable: RAL.ReadableStream, options?: RAL.MessageBufferEncoding | MessageReaderOptions); + set partialMessageTimeout(timeout: number); + get partialMessageTimeout(): number; + listen(callback: DataCallback): Disposable; + private onData; + private clearPartialMessageTimer; + private setPartialMessageTimer; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageReader.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageReader.js" index e28265df64db1eec9c5a6a036f8e5fba5f08e843..15b2393ff659471ed7fa26c8941d0d0465db38c2 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageReader.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageReader.js" @@ -1,3 +1,193 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7360208ad57903b3d3b21553a62b18cab9232895da245fcd79632a6268d719b3 -size 7622 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = void 0; +const ral_1 = require("./ral"); +const Is = require("./is"); +const events_1 = require("./events"); +var MessageReader; +(function (MessageReader) { + function is(value) { + let candidate = value; + return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) && + Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage); + } + MessageReader.is = is; +})(MessageReader = exports.MessageReader || (exports.MessageReader = {})); +class AbstractMessageReader { + constructor() { + this.errorEmitter = new events_1.Emitter(); + this.closeEmitter = new events_1.Emitter(); + this.partialMessageEmitter = new events_1.Emitter(); + } + dispose() { + this.errorEmitter.dispose(); + this.closeEmitter.dispose(); + } + get onError() { + return this.errorEmitter.event; + } + fireError(error) { + this.errorEmitter.fire(this.asError(error)); + } + get onClose() { + return this.closeEmitter.event; + } + fireClose() { + this.closeEmitter.fire(undefined); + } + get onPartialMessage() { + return this.partialMessageEmitter.event; + } + firePartialMessage(info) { + this.partialMessageEmitter.fire(info); + } + asError(error) { + if (error instanceof Error) { + return error; + } + else { + return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`); + } + } +} +exports.AbstractMessageReader = AbstractMessageReader; +var ResolvedMessageReaderOptions; +(function (ResolvedMessageReaderOptions) { + function fromOptions(options) { + var _a; + let charset; + let result; + let contentDecoder; + const contentDecoders = new Map(); + let contentTypeDecoder; + const contentTypeDecoders = new Map(); + if (options === undefined || typeof options === 'string') { + charset = options !== null && options !== void 0 ? options : 'utf-8'; + } + else { + charset = (_a = options.charset) !== null && _a !== void 0 ? _a : 'utf-8'; + if (options.contentDecoder !== undefined) { + contentDecoder = options.contentDecoder; + contentDecoders.set(contentDecoder.name, contentDecoder); + } + if (options.contentDecoders !== undefined) { + for (const decoder of options.contentDecoders) { + contentDecoders.set(decoder.name, decoder); + } + } + if (options.contentTypeDecoder !== undefined) { + contentTypeDecoder = options.contentTypeDecoder; + contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder); + } + if (options.contentTypeDecoders !== undefined) { + for (const decoder of options.contentTypeDecoders) { + contentTypeDecoders.set(decoder.name, decoder); + } + } + } + if (contentTypeDecoder === undefined) { + contentTypeDecoder = ral_1.default().applicationJson.decoder; + contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder); + } + return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders }; + } + ResolvedMessageReaderOptions.fromOptions = fromOptions; +})(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {})); +class ReadableStreamMessageReader extends AbstractMessageReader { + constructor(readable, options) { + super(); + this.readable = readable; + this.options = ResolvedMessageReaderOptions.fromOptions(options); + this.buffer = ral_1.default().messageBuffer.create(this.options.charset); + this._partialMessageTimeout = 10000; + this.nextMessageLength = -1; + this.messageToken = 0; + } + set partialMessageTimeout(timeout) { + this._partialMessageTimeout = timeout; + } + get partialMessageTimeout() { + return this._partialMessageTimeout; + } + listen(callback) { + this.nextMessageLength = -1; + this.messageToken = 0; + this.partialMessageTimer = undefined; + this.callback = callback; + const result = this.readable.onData((data) => { + this.onData(data); + }); + this.readable.onError((error) => this.fireError(error)); + this.readable.onClose(() => this.fireClose()); + return result; + } + onData(data) { + this.buffer.append(data); + while (true) { + if (this.nextMessageLength === -1) { + const headers = this.buffer.tryReadHeaders(); + if (!headers) { + return; + } + const contentLength = headers.get('Content-Length'); + if (!contentLength) { + throw new Error('Header must provide a Content-Length property.'); + } + const length = parseInt(contentLength); + if (isNaN(length)) { + throw new Error('Content-Length value must be a number.'); + } + this.nextMessageLength = length; + } + const body = this.buffer.tryReadBody(this.nextMessageLength); + if (body === undefined) { + /** We haven't received the full message yet. */ + this.setPartialMessageTimer(); + return; + } + this.clearPartialMessageTimer(); + this.nextMessageLength = -1; + let p; + if (this.options.contentDecoder !== undefined) { + p = this.options.contentDecoder.decode(body); + } + else { + p = Promise.resolve(body); + } + p.then((value) => { + this.options.contentTypeDecoder.decode(value, this.options).then((msg) => { + this.callback(msg); + }, (error) => { + this.fireError(error); + }); + }, (error) => { + this.fireError(error); + }); + } + } + clearPartialMessageTimer() { + if (this.partialMessageTimer) { + ral_1.default().timer.clearTimeout(this.partialMessageTimer); + this.partialMessageTimer = undefined; + } + } + setPartialMessageTimer() { + this.clearPartialMessageTimer(); + if (this._partialMessageTimeout <= 0) { + return; + } + this.partialMessageTimer = ral_1.default().timer.setTimeout((token, timeout) => { + this.partialMessageTimer = undefined; + if (token === this.messageToken) { + this.firePartialMessage({ messageToken: token, waitingTime: timeout }); + this.setPartialMessageTimer(); + } + }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout); + } +} +exports.ReadableStreamMessageReader = ReadableStreamMessageReader; +//# sourceMappingURL=messageReader.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts" index dce209c3a46782f7647f8563d26e88ac8dea0e9f..235005eab2ff8c81e46a8d9d81e5db069654813d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts" @@ -1,3 +1,50 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:37c0fd48eb043fdc395435716585587815f63afc66159588db8ed6c25a5f0636 -size 2038 +import RAL from './ral'; +import { Message } from './messages'; +import { Event } from './events'; +import { ContentEncoder, ContentTypeEncoder } from './encoding'; +/** Writes JSON-RPC messages to an underlying transport. */ +export interface MessageWriter { + /** Raised whenever an error occurs while writing a message. */ + readonly onError: Event<[Error, Message | undefined, number | undefined]>; + /** An event raised when the underlying transport has closed and writing is no longer possible. */ + readonly onClose: Event; + /** + * Sends a JSON-RPC message. + * @param msg The JSON-RPC message to be sent. + * @description Implementations should guarantee messages are transmitted in the same order that they are received by this method. + */ + write(msg: Message): Promise; + end(): void; + /** Releases resources incurred from writing or raising events. Does NOT close the underlying transport, if any. */ + dispose(): void; +} +export declare namespace MessageWriter { + function is(value: any): value is MessageWriter; +} +export declare abstract class AbstractMessageWriter { + private errorEmitter; + private closeEmitter; + constructor(); + dispose(): void; + get onError(): Event<[Error, Message | undefined, number | undefined]>; + protected fireError(error: any, message?: Message, count?: number): void; + get onClose(): Event; + protected fireClose(): void; + private asError; +} +export interface MessageWriterOptions { + charset?: RAL.MessageBufferEncoding; + contentEncoder?: ContentEncoder; + contentTypeEncoder?: ContentTypeEncoder; +} +export declare class WriteableStreamMessageWriter extends AbstractMessageWriter implements MessageWriter { + private writable; + private options; + private errorCount; + private writeSemaphore; + constructor(writable: RAL.WritableStream, options?: RAL.MessageBufferEncoding | MessageWriterOptions); + write(msg: Message): Promise; + private doWrite; + private handleError; + end(): void; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageWriter.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageWriter.js" index 0260455555c0d7d4fda5ef1dbbc4940ccddf2214..a13f29814e250bc9c215698173aa5ce223854667 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageWriter.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messageWriter.js" @@ -1,3 +1,117 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:32ff7e70381921a34ce1934ad4e90547383f415ce28bfae2d71c2f2ea4a19933 -size 4604 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = void 0; +const ral_1 = require("./ral"); +const Is = require("./is"); +const semaphore_1 = require("./semaphore"); +const events_1 = require("./events"); +const ContentLength = 'Content-Length: '; +const CRLF = '\r\n'; +var MessageWriter; +(function (MessageWriter) { + function is(value) { + let candidate = value; + return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) && + Is.func(candidate.onError) && Is.func(candidate.write); + } + MessageWriter.is = is; +})(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {})); +class AbstractMessageWriter { + constructor() { + this.errorEmitter = new events_1.Emitter(); + this.closeEmitter = new events_1.Emitter(); + } + dispose() { + this.errorEmitter.dispose(); + this.closeEmitter.dispose(); + } + get onError() { + return this.errorEmitter.event; + } + fireError(error, message, count) { + this.errorEmitter.fire([this.asError(error), message, count]); + } + get onClose() { + return this.closeEmitter.event; + } + fireClose() { + this.closeEmitter.fire(undefined); + } + asError(error) { + if (error instanceof Error) { + return error; + } + else { + return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`); + } + } +} +exports.AbstractMessageWriter = AbstractMessageWriter; +var ResolvedMessageWriterOptions; +(function (ResolvedMessageWriterOptions) { + function fromOptions(options) { + var _a, _b; + if (options === undefined || typeof options === 'string') { + return { charset: options !== null && options !== void 0 ? options : 'utf-8', contentTypeEncoder: ral_1.default().applicationJson.encoder }; + } + else { + return { charset: (_a = options.charset) !== null && _a !== void 0 ? _a : 'utf-8', contentEncoder: options.contentEncoder, contentTypeEncoder: (_b = options.contentTypeEncoder) !== null && _b !== void 0 ? _b : ral_1.default().applicationJson.encoder }; + } + } + ResolvedMessageWriterOptions.fromOptions = fromOptions; +})(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {})); +class WriteableStreamMessageWriter extends AbstractMessageWriter { + constructor(writable, options) { + super(); + this.writable = writable; + this.options = ResolvedMessageWriterOptions.fromOptions(options); + this.errorCount = 0; + this.writeSemaphore = new semaphore_1.Semaphore(1); + this.writable.onError((error) => this.fireError(error)); + this.writable.onClose(() => this.fireClose()); + } + async write(msg) { + return this.writeSemaphore.lock(async () => { + const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => { + if (this.options.contentEncoder !== undefined) { + return this.options.contentEncoder.encode(buffer); + } + else { + return buffer; + } + }); + return payload.then((buffer) => { + const headers = []; + headers.push(ContentLength, buffer.byteLength.toString(), CRLF); + headers.push(CRLF); + return this.doWrite(msg, headers, buffer); + }, (error) => { + this.fireError(error); + throw error; + }); + }); + } + async doWrite(msg, headers, data) { + try { + await this.writable.write(headers.join(''), 'ascii'); + return this.writable.write(data); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + this.writable.end(); + } +} +exports.WriteableStreamMessageWriter = WriteableStreamMessageWriter; +//# sourceMappingURL=messageWriter.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messages.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messages.d.ts" index 7e1efc84667947b506b96d6bfe7a23d18019ef7d..98f73a97646cd47ccbab17337cf8b507396286fe 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messages.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messages.d.ts" @@ -1,3 +1,345 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:58bdd5fd93f39bae19f34924ad304608ee37b6c6b357a57823ddfd2585a56d0f -size 11910 +/** + * A language server message + */ +export interface Message { + jsonrpc: string; +} +/** + * Request message + */ +export interface RequestMessage extends Message { + /** + * The request id. + */ + id: number | string | null; + /** + * The method to be invoked. + */ + method: string; + /** + * The method's params. + */ + params?: any[] | object; +} +/** + * Predefined error codes. + */ +export declare namespace ErrorCodes { + const ParseError: number; + const InvalidRequest: number; + const MethodNotFound: number; + const InvalidParams: number; + const InternalError: number; + /** + * This is the start range of JSON RPC reserved error codes. + * It doesn't denote a real error code. No application error codes should + * be defined between the start and end range. For backwards + * compatibility the `ServerNotInitialized` and the `UnknownErrorCode` + * are left in the range. + * + * @since 3.16.0 + */ + const jsonrpcReservedErrorRangeStart: number; + /** @deprecated use jsonrpcReservedErrorRangeStart */ + const serverErrorStart: number; + const MessageWriteError: number; + const MessageReadError: number; + const ServerNotInitialized: number; + const UnknownErrorCode: number; + /** + * This is the end range of JSON RPC reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + const jsonrpcReservedErrorRangeEnd = -32000; + /** @deprecated use jsonrpcReservedErrorRangeEnd */ + const serverErrorEnd: number; +} +export interface ResponseErrorLiteral { + /** + * A number indicating the error type that occured. + */ + code: number; + /** + * A string providing a short decription of the error. + */ + message: string; + /** + * A Primitive or Structured value that contains additional + * information about the error. Can be omitted. + */ + data?: D; +} +/** + * An error object return in a response in case a request + * has failed. + */ +export declare class ResponseError extends Error { + readonly code: number; + readonly data: D | undefined; + constructor(code: number, message: string, data?: D); + toJson(): ResponseErrorLiteral; +} +/** + * A response message. + */ +export interface ResponseMessage extends Message { + /** + * The request id. + */ + id: number | string | null; + /** + * The result of a request. This member is REQUIRED on success. + * This member MUST NOT exist if there was an error invoking the method. + */ + result?: string | number | boolean | object | any[] | null; + /** + * The error object in case a request fails. + */ + error?: ResponseErrorLiteral; +} +/** + * A LSP Log Entry. + */ +export declare type LSPMessageType = 'send-request' | 'receive-request' | 'send-response' | 'receive-response' | 'send-notification' | 'receive-notification'; +export interface LSPLogMessage { + type: LSPMessageType; + message: RequestMessage | ResponseMessage | NotificationMessage; + timestamp: number; +} +export declare class ParameterStructures { + private readonly kind; + /** + * The parameter structure is automatically inferred on the number of parameters + * and the parameter type in case of a single param. + */ + static readonly auto: ParameterStructures; + /** + * Forces `byPosition` parameter structure. This is useful if you have a single + * parameter which has a literal type. + */ + static readonly byPosition: ParameterStructures; + /** + * Forces `byName` parameter structure. This is only useful when having a single + * parameter. The library will report errors if used with a different number of + * parameters. + */ + static readonly byName: ParameterStructures; + private constructor(); + static is(value: any): value is ParameterStructures; + toString(): string; +} +/** + * An interface to type messages. + */ +export interface MessageSignature { + readonly method: string; + readonly numberOfParams: number; + readonly parameterStructures: ParameterStructures; +} +/** + * An abstract implementation of a MessageType. + */ +export declare abstract class AbstractMessageSignature implements MessageSignature { + readonly method: string; + readonly numberOfParams: number; + constructor(method: string, numberOfParams: number); + get parameterStructures(): ParameterStructures; +} +/** + * End marker interface for request and notification types. + */ +export interface _EM { + _$endMarker$_: number; +} +/** + * Classes to type request response pairs + */ +export declare class RequestType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P, R, E, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class RequestType1 extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, R, E, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class RequestType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, P9, R, E, _EM] | undefined; + constructor(method: string); +} +/** + * Notification Message + */ +export interface NotificationMessage extends Message { + /** + * The method to be invoked. + */ + method: string; + /** + * The notification's params. + */ + params?: [] | object; +} +export declare class NotificationType

extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class NotificationType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [_EM] | undefined; + constructor(method: string); +} +export declare class NotificationType1 extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class NotificationType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, P9, _EM] | undefined; + constructor(method: string); +} +/** + * Tests if the given message is a request message + */ +export declare function isRequestMessage(message: Message | undefined): message is RequestMessage; +/** + * Tests if the given message is a notification message + */ +export declare function isNotificationMessage(message: Message | undefined): message is NotificationMessage; +/** + * Tests if the given message is a response message + */ +export declare function isResponseMessage(message: Message | undefined): message is ResponseMessage; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messages.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messages.js" index d4a8a4193b128520ccc6f16b7e093e95518a7d94..b0666d619a45cce7051ef6a55497b9adf8304395 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messages.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/messages.js" @@ -1,3 +1,282 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6d1077754af7321be09f1a70cfbcc978d0af4731a980df5296a20fad29b5b4ce -size 9727 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isResponseMessage = exports.isNotificationMessage = exports.isRequestMessage = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType = exports.RequestType0 = exports.AbstractMessageSignature = exports.ParameterStructures = exports.ResponseError = exports.ErrorCodes = void 0; +const is = require("./is"); +/** + * Predefined error codes. + */ +var ErrorCodes; +(function (ErrorCodes) { + // Defined by JSON RPC + ErrorCodes.ParseError = -32700; + ErrorCodes.InvalidRequest = -32600; + ErrorCodes.MethodNotFound = -32601; + ErrorCodes.InvalidParams = -32602; + ErrorCodes.InternalError = -32603; + /** + * This is the start range of JSON RPC reserved error codes. + * It doesn't denote a real error code. No application error codes should + * be defined between the start and end range. For backwards + * compatibility the `ServerNotInitialized` and the `UnknownErrorCode` + * are left in the range. + * + * @since 3.16.0 + */ + ErrorCodes.jsonrpcReservedErrorRangeStart = -32099; + /** @deprecated use jsonrpcReservedErrorRangeStart */ + ErrorCodes.serverErrorStart = ErrorCodes.jsonrpcReservedErrorRangeStart; + ErrorCodes.MessageWriteError = -32099; + ErrorCodes.MessageReadError = -32098; + ErrorCodes.ServerNotInitialized = -32002; + ErrorCodes.UnknownErrorCode = -32001; + /** + * This is the end range of JSON RPC reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + ErrorCodes.jsonrpcReservedErrorRangeEnd = -32000; + /** @deprecated use jsonrpcReservedErrorRangeEnd */ + ErrorCodes.serverErrorEnd = ErrorCodes.jsonrpcReservedErrorRangeEnd; +})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {})); +/** + * An error object return in a response in case a request + * has failed. + */ +class ResponseError extends Error { + constructor(code, message, data) { + super(message); + this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode; + this.data = data; + Object.setPrototypeOf(this, ResponseError.prototype); + } + toJson() { + return { + code: this.code, + message: this.message, + data: this.data, + }; + } +} +exports.ResponseError = ResponseError; +class ParameterStructures { + constructor(kind) { + this.kind = kind; + } + static is(value) { + return value === ParameterStructures.auto || value === ParameterStructures.byName || value === ParameterStructures.byPosition; + } + toString() { + return this.kind; + } +} +exports.ParameterStructures = ParameterStructures; +/** + * The parameter structure is automatically inferred on the number of parameters + * and the parameter type in case of a single param. + */ +ParameterStructures.auto = new ParameterStructures('auto'); +/** + * Forces `byPosition` parameter structure. This is useful if you have a single + * parameter which has a literal type. + */ +ParameterStructures.byPosition = new ParameterStructures('byPosition'); +/** + * Forces `byName` parameter structure. This is only useful when having a single + * parameter. The library will report errors if used with a different number of + * parameters. + */ +ParameterStructures.byName = new ParameterStructures('byName'); +/** + * An abstract implementation of a MessageType. + */ +class AbstractMessageSignature { + constructor(method, numberOfParams) { + this.method = method; + this.numberOfParams = numberOfParams; + } + get parameterStructures() { + return ParameterStructures.auto; + } +} +exports.AbstractMessageSignature = AbstractMessageSignature; +/** + * Classes to type request response pairs + */ +class RequestType0 extends AbstractMessageSignature { + constructor(method) { + super(method, 0); + } +} +exports.RequestType0 = RequestType0; +class RequestType extends AbstractMessageSignature { + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.RequestType = RequestType; +class RequestType1 extends AbstractMessageSignature { + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.RequestType1 = RequestType1; +class RequestType2 extends AbstractMessageSignature { + constructor(method) { + super(method, 2); + } +} +exports.RequestType2 = RequestType2; +class RequestType3 extends AbstractMessageSignature { + constructor(method) { + super(method, 3); + } +} +exports.RequestType3 = RequestType3; +class RequestType4 extends AbstractMessageSignature { + constructor(method) { + super(method, 4); + } +} +exports.RequestType4 = RequestType4; +class RequestType5 extends AbstractMessageSignature { + constructor(method) { + super(method, 5); + } +} +exports.RequestType5 = RequestType5; +class RequestType6 extends AbstractMessageSignature { + constructor(method) { + super(method, 6); + } +} +exports.RequestType6 = RequestType6; +class RequestType7 extends AbstractMessageSignature { + constructor(method) { + super(method, 7); + } +} +exports.RequestType7 = RequestType7; +class RequestType8 extends AbstractMessageSignature { + constructor(method) { + super(method, 8); + } +} +exports.RequestType8 = RequestType8; +class RequestType9 extends AbstractMessageSignature { + constructor(method) { + super(method, 9); + } +} +exports.RequestType9 = RequestType9; +class NotificationType extends AbstractMessageSignature { + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.NotificationType = NotificationType; +class NotificationType0 extends AbstractMessageSignature { + constructor(method) { + super(method, 0); + } +} +exports.NotificationType0 = NotificationType0; +class NotificationType1 extends AbstractMessageSignature { + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.NotificationType1 = NotificationType1; +class NotificationType2 extends AbstractMessageSignature { + constructor(method) { + super(method, 2); + } +} +exports.NotificationType2 = NotificationType2; +class NotificationType3 extends AbstractMessageSignature { + constructor(method) { + super(method, 3); + } +} +exports.NotificationType3 = NotificationType3; +class NotificationType4 extends AbstractMessageSignature { + constructor(method) { + super(method, 4); + } +} +exports.NotificationType4 = NotificationType4; +class NotificationType5 extends AbstractMessageSignature { + constructor(method) { + super(method, 5); + } +} +exports.NotificationType5 = NotificationType5; +class NotificationType6 extends AbstractMessageSignature { + constructor(method) { + super(method, 6); + } +} +exports.NotificationType6 = NotificationType6; +class NotificationType7 extends AbstractMessageSignature { + constructor(method) { + super(method, 7); + } +} +exports.NotificationType7 = NotificationType7; +class NotificationType8 extends AbstractMessageSignature { + constructor(method) { + super(method, 8); + } +} +exports.NotificationType8 = NotificationType8; +class NotificationType9 extends AbstractMessageSignature { + constructor(method) { + super(method, 9); + } +} +exports.NotificationType9 = NotificationType9; +/** + * Tests if the given message is a request message + */ +function isRequestMessage(message) { + const candidate = message; + return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id)); +} +exports.isRequestMessage = isRequestMessage; +/** + * Tests if the given message is a notification message + */ +function isNotificationMessage(message) { + const candidate = message; + return candidate && is.string(candidate.method) && message.id === void 0; +} +exports.isNotificationMessage = isNotificationMessage; +/** + * Tests if the given message is a response message + */ +function isResponseMessage(message) { + const candidate = message; + return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null); +} +exports.isResponseMessage = isResponseMessage; +//# sourceMappingURL=messages.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/ral.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/ral.d.ts" index 163dbc2c60356cb94d1691a70b8d2a26df8d559d..158c83dc0162f6c8e954defcefb472637916c1b6 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/ral.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/ral.d.ts" @@ -1,3 +1,80 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9686c9ade71de53d81ee3e41ff7450d08bd08fff4f545af39e37eeda228745d6 -size 2906 +import type { Disposable } from './disposable'; +import type { ContentTypeEncoder, ContentTypeDecoder } from './encoding'; +interface _MessageBuffer { + readonly encoding: RAL.MessageBufferEncoding; + /** + * Append data to the message buffer. + * + * @param chunk the data to append. + */ + append(chunk: Uint8Array | string): void; + /** + * Tries to read the headers from the buffer + * + * @returns the header properties or undefined in not enough data can be read. + */ + tryReadHeaders(): Map | undefined; + /** + * Tries to read the body of the given length. + * + * @param length the amount of bytes to read. + * @returns the data or undefined int less data is available. + */ + tryReadBody(length: number): Uint8Array | undefined; +} +declare type _MessageBufferEncoding = 'ascii' | 'utf-8'; +interface _ReadableStream { + onData(listener: (data: Uint8Array) => void): Disposable; + onClose(listener: () => void): Disposable; + onError(listener: (error: any) => void): Disposable; + onEnd(listener: () => void): Disposable; +} +interface _WritableStream { + onClose(listener: () => void): Disposable; + onError(listener: (error: any) => void): Disposable; + onEnd(listener: () => void): Disposable; + write(data: Uint8Array): Promise; + write(data: string, encoding: _MessageBufferEncoding): Promise; + end(): void; +} +interface _DuplexStream extends _ReadableStream, _WritableStream { +} +interface _TimeoutHandle { + _timerBrand: undefined; +} +interface _ImmediateHandle { + _immediateBrand: undefined; +} +interface RAL { + readonly applicationJson: { + readonly encoder: ContentTypeEncoder; + readonly decoder: ContentTypeDecoder; + }; + readonly messageBuffer: { + create(encoding: RAL.MessageBufferEncoding): RAL.MessageBuffer; + }; + readonly console: { + info(message?: any, ...optionalParams: any[]): void; + log(message?: any, ...optionalParams: any[]): void; + warn(message?: any, ...optionalParams: any[]): void; + error(message?: any, ...optionalParams: any[]): void; + }; + readonly timer: { + setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): RAL.TimeoutHandle; + clearTimeout(handle: RAL.TimeoutHandle): void; + setImmediate(callback: (...args: any[]) => void, ...args: any[]): RAL.ImmediateHandle; + clearImmediate(handle: RAL.ImmediateHandle): void; + }; +} +declare function RAL(): RAL; +declare namespace RAL { + type MessageBuffer = _MessageBuffer; + type MessageBufferEncoding = _MessageBufferEncoding; + type ReadableStream = _ReadableStream; + type WritableStream = _WritableStream; + type DuplexStream = _DuplexStream; + type TimeoutHandle = _TimeoutHandle; + type ImmediateHandle = _ImmediateHandle; + function install(ral: RAL): void; +} +export default RAL; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/ral.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/ral.js" index 3fa9dd24e36fa0dc1fd9e8fd4be79fbb084f9536..717c59e3e234c85e057c2e83ab7ae7f62b272283 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/ral.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/ral.js" @@ -1,3 +1,24 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c58dd0ce47a02b8b15ab7ca519a9ded1aff10fe5d885e4ebb741b9b4c5b72859 -size 865 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +let _ral; +function RAL() { + if (_ral === undefined) { + throw new Error(`No runtime abstraction layer installed`); + } + return _ral; +} +(function (RAL) { + function install(ral) { + if (ral === undefined) { + throw new Error(`No runtime abstraction layer provided`); + } + _ral = ral; + } + RAL.install = install; +})(RAL || (RAL = {})); +exports.default = RAL; +//# sourceMappingURL=ral.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts" index 4c391f1034ab8c430240f5b1008c37ce2d048bbd..1261daab59d0723e9adb787406f701cb2f9ac50b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts" @@ -1,3 +1,10 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e861653b284114109a695dd061a427b7bb09ce01dbe1c2d3e753fc342919faaf -size 272 +export declare class Semaphore { + private _capacity; + private _active; + private _waiting; + constructor(capacity?: number); + lock(thunk: () => T | PromiseLike): Promise; + get active(): number; + private runNext; + private doRunNext; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/semaphore.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/semaphore.js" index 7a6b0f76fbb852db0c495665f27c8e85d5b149f5..8844bef39c32bfcf933d7ee501b1d7ababddc2d5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/semaphore.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/common/semaphore.js" @@ -1,3 +1,69 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1b20362351a14003e79c3a405b866f9e21a99960762fa1f32c354f0ceeb25217 -size 2229 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Semaphore = void 0; +const ral_1 = require("./ral"); +class Semaphore { + constructor(capacity = 1) { + if (capacity <= 0) { + throw new Error('Capacity must be greater than 0'); + } + this._capacity = capacity; + this._active = 0; + this._waiting = []; + } + lock(thunk) { + return new Promise((resolve, reject) => { + this._waiting.push({ thunk, resolve, reject }); + this.runNext(); + }); + } + get active() { + return this._active; + } + runNext() { + if (this._waiting.length === 0 || this._active === this._capacity) { + return; + } + ral_1.default().timer.setImmediate(() => this.doRunNext()); + } + doRunNext() { + if (this._waiting.length === 0 || this._active === this._capacity) { + return; + } + const next = this._waiting.shift(); + this._active++; + if (this._active > this._capacity) { + throw new Error(`To many thunks active`); + } + try { + const result = next.thunk(); + if (result instanceof Promise) { + result.then((value) => { + this._active--; + next.resolve(value); + this.runNext(); + }, (err) => { + this._active--; + next.reject(err); + this.runNext(); + }); + } + else { + this._active--; + next.resolve(result); + this.runNext(); + } + } + catch (err) { + this._active--; + next.reject(err); + this.runNext(); + } + } +} +exports.Semaphore = Semaphore; +//# sourceMappingURL=semaphore.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/node/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/node/main.d.ts" index fa30be94274c802001c3651d4b9951a68b1942e7..11a6efcc60f6a609cda9544be956c57b0164fb6f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/node/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/node/main.d.ts" @@ -1,3 +1,46 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ddccf0a48338cac642e93bfdb563494dad6e05b70ef0e6e3605a454db88ca57e -size 2890 +/// +import RAL from '../common/ral'; +import { AbstractMessageReader, DataCallback, AbstractMessageWriter, Message, ReadableStreamMessageReader, WriteableStreamMessageWriter, MessageWriterOptions, MessageReaderOptions, MessageReader, MessageWriter, ConnectionStrategy, ConnectionOptions, MessageConnection, Logger, Disposable } from '../common/api'; +import { ChildProcess } from 'child_process'; +import { Socket } from 'net'; +export * from '../common/api'; +export declare class IPCMessageReader extends AbstractMessageReader { + private process; + constructor(process: NodeJS.Process | ChildProcess); + listen(callback: DataCallback): Disposable; +} +export declare class IPCMessageWriter extends AbstractMessageWriter implements MessageWriter { + private process; + private errorCount; + constructor(process: NodeJS.Process | ChildProcess); + write(msg: Message): Promise; + private handleError; + end(): void; +} +export declare class SocketMessageReader extends ReadableStreamMessageReader { + constructor(socket: Socket, encoding?: RAL.MessageBufferEncoding); +} +export declare class SocketMessageWriter extends WriteableStreamMessageWriter { + private socket; + constructor(socket: Socket, options?: RAL.MessageBufferEncoding | MessageWriterOptions); + dispose(): void; +} +export declare class StreamMessageReader extends ReadableStreamMessageReader { + constructor(readble: NodeJS.ReadableStream, encoding?: RAL.MessageBufferEncoding | MessageReaderOptions); +} +export declare class StreamMessageWriter extends WriteableStreamMessageWriter { + constructor(writable: NodeJS.WritableStream, options?: RAL.MessageBufferEncoding | MessageWriterOptions); +} +export declare function generateRandomPipeName(): string; +export interface PipeTransport { + onConnected(): Promise<[MessageReader, MessageWriter]>; +} +export declare function createClientPipeTransport(pipeName: string, encoding?: RAL.MessageBufferEncoding): Promise; +export declare function createServerPipeTransport(pipeName: string, encoding?: RAL.MessageBufferEncoding): [MessageReader, MessageWriter]; +export interface SocketTransport { + onConnected(): Promise<[MessageReader, MessageWriter]>; +} +export declare function createClientSocketTransport(port: number, encoding?: RAL.MessageBufferEncoding): Promise; +export declare function createServerSocketTransport(port: number, encoding?: RAL.MessageBufferEncoding): [MessageReader, MessageWriter]; +export declare function createMessageConnection(reader: MessageReader, writer: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; +export declare function createMessageConnection(inputStream: NodeJS.ReadableStream, outputStream: NodeJS.WritableStream, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/node/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/node/main.js" index dd9928d1d3a82c1a50c43dc60a4091434cf25ee0..2ab9f0080e184af653ec6b8c75360cce64506dff 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/node/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/node/main.js" @@ -1,3 +1,213 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a897fbd858f947116169061a2788f18fcb9158364040b3e3a4243a523cc391e -size 8355 +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createMessageConnection = exports.createServerSocketTransport = exports.createClientSocketTransport = exports.createServerPipeTransport = exports.createClientPipeTransport = exports.generateRandomPipeName = exports.StreamMessageWriter = exports.StreamMessageReader = exports.SocketMessageWriter = exports.SocketMessageReader = exports.IPCMessageWriter = exports.IPCMessageReader = void 0; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +const ril_1 = require("./ril"); +// Install the node runtime abstract. +ril_1.default.install(); +const api_1 = require("../common/api"); +const path = require("path"); +const os = require("os"); +const crypto_1 = require("crypto"); +const net_1 = require("net"); +__exportStar(require("../common/api"), exports); +class IPCMessageReader extends api_1.AbstractMessageReader { + constructor(process) { + super(); + this.process = process; + let eventEmitter = this.process; + eventEmitter.on('error', (error) => this.fireError(error)); + eventEmitter.on('close', () => this.fireClose()); + } + listen(callback) { + this.process.on('message', callback); + return api_1.Disposable.create(() => this.process.off('message', callback)); + } +} +exports.IPCMessageReader = IPCMessageReader; +class IPCMessageWriter extends api_1.AbstractMessageWriter { + constructor(process) { + super(); + this.process = process; + this.errorCount = 0; + let eventEmitter = this.process; + eventEmitter.on('error', (error) => this.fireError(error)); + eventEmitter.on('close', () => this.fireClose); + } + write(msg) { + try { + if (typeof this.process.send === 'function') { + this.process.send(msg, undefined, undefined, (error) => { + if (error) { + this.errorCount++; + this.handleError(error, msg); + } + else { + this.errorCount = 0; + } + }); + } + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.IPCMessageWriter = IPCMessageWriter; +class SocketMessageReader extends api_1.ReadableStreamMessageReader { + constructor(socket, encoding = 'utf-8') { + super(ril_1.default().stream.asReadableStream(socket), encoding); + } +} +exports.SocketMessageReader = SocketMessageReader; +class SocketMessageWriter extends api_1.WriteableStreamMessageWriter { + constructor(socket, options) { + super(ril_1.default().stream.asWritableStream(socket), options); + this.socket = socket; + } + dispose() { + super.dispose(); + this.socket.destroy(); + } +} +exports.SocketMessageWriter = SocketMessageWriter; +class StreamMessageReader extends api_1.ReadableStreamMessageReader { + constructor(readble, encoding) { + super(ril_1.default().stream.asReadableStream(readble), encoding); + } +} +exports.StreamMessageReader = StreamMessageReader; +class StreamMessageWriter extends api_1.WriteableStreamMessageWriter { + constructor(writable, options) { + super(ril_1.default().stream.asWritableStream(writable), options); + } +} +exports.StreamMessageWriter = StreamMessageWriter; +const XDG_RUNTIME_DIR = process.env['XDG_RUNTIME_DIR']; +const safeIpcPathLengths = new Map([ + ['linux', 107], + ['darwin', 103] +]); +function generateRandomPipeName() { + const randomSuffix = crypto_1.randomBytes(21).toString('hex'); + if (process.platform === 'win32') { + return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`; + } + let result; + if (XDG_RUNTIME_DIR) { + result = path.join(XDG_RUNTIME_DIR, `vscode-ipc-${randomSuffix}.sock`); + } + else { + result = path.join(os.tmpdir(), `vscode-${randomSuffix}.sock`); + } + const limit = safeIpcPathLengths.get(process.platform); + if (limit !== undefined && result.length >= limit) { + ril_1.default().console.warn(`WARNING: IPC handle "${result}" is longer than ${limit} characters.`); + } + return result; +} +exports.generateRandomPipeName = generateRandomPipeName; +function createClientPipeTransport(pipeName, encoding = 'utf-8') { + let connectResolve; + const connected = new Promise((resolve, _reject) => { + connectResolve = resolve; + }); + return new Promise((resolve, reject) => { + let server = net_1.createServer((socket) => { + server.close(); + connectResolve([ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]); + }); + server.on('error', reject); + server.listen(pipeName, () => { + server.removeListener('error', reject); + resolve({ + onConnected: () => { return connected; } + }); + }); + }); +} +exports.createClientPipeTransport = createClientPipeTransport; +function createServerPipeTransport(pipeName, encoding = 'utf-8') { + const socket = net_1.createConnection(pipeName); + return [ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]; +} +exports.createServerPipeTransport = createServerPipeTransport; +function createClientSocketTransport(port, encoding = 'utf-8') { + let connectResolve; + const connected = new Promise((resolve, _reject) => { + connectResolve = resolve; + }); + return new Promise((resolve, reject) => { + const server = net_1.createServer((socket) => { + server.close(); + connectResolve([ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]); + }); + server.on('error', reject); + server.listen(port, '127.0.0.1', () => { + server.removeListener('error', reject); + resolve({ + onConnected: () => { return connected; } + }); + }); + }); +} +exports.createClientSocketTransport = createClientSocketTransport; +function createServerSocketTransport(port, encoding = 'utf-8') { + const socket = net_1.createConnection(port, '127.0.0.1'); + return [ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]; +} +exports.createServerSocketTransport = createServerSocketTransport; +function isReadableStream(value) { + const candidate = value; + return candidate.read !== undefined && candidate.addListener !== undefined; +} +function isWritableStream(value) { + const candidate = value; + return candidate.write !== undefined && candidate.addListener !== undefined; +} +function createMessageConnection(input, output, logger, options) { + if (!logger) { + logger = api_1.NullLogger; + } + const reader = isReadableStream(input) ? new StreamMessageReader(input) : input; + const writer = isWritableStream(output) ? new StreamMessageWriter(output) : output; + if (api_1.ConnectionStrategy.is(options)) { + options = { connectionStrategy: options }; + } + return api_1.createMessageConnection(reader, writer, logger, options); +} +exports.createMessageConnection = createMessageConnection; +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/node/ril.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/node/ril.d.ts" index c9a073167417b4e25d880c40ae43697d26e59302..b7d4dd6d524dc201306b3a7c58effc9bd2ca8f0f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/node/ril.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/node/ril.d.ts" @@ -1,3 +1,13 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9e97d604ca927ee80dab05257f7aaf9b2c90ef98537649ed987257acc36ce444 -size 409 +/// +import RAL from '../common/ral'; +interface RIL extends RAL { + readonly stream: { + readonly asReadableStream: (stream: NodeJS.ReadableStream) => RAL.ReadableStream; + readonly asWritableStream: (stream: NodeJS.WritableStream) => RAL.WritableStream; + }; +} +declare function RIL(): RIL; +declare namespace RIL { + function install(): void; +} +export default RIL; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/node/ril.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/node/ril.js" index 2bae1d9f2778a8fb2a0f9b7ce894c32b1d30d097..bfa6c50ca671df54c5810362a813dd46b2b51bc9 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/node/ril.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/lib/node/ril.js" @@ -1,3 +1,164 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2f25e4e8777cbe89504c1e2f3dfb73d63ca57b09a35572c074509b4f1371f01b -size 5438 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +const ral_1 = require("../common/ral"); +const util_1 = require("util"); +const disposable_1 = require("../common/disposable"); +const messageBuffer_1 = require("../common/messageBuffer"); +class MessageBuffer extends messageBuffer_1.AbstractMessageBuffer { + constructor(encoding = 'utf-8') { + super(encoding); + } + emptyBuffer() { + return MessageBuffer.emptyBuffer; + } + fromString(value, encoding) { + return Buffer.from(value, encoding); + } + toString(value, encoding) { + if (value instanceof Buffer) { + return value.toString(encoding); + } + else { + return new util_1.TextDecoder(encoding).decode(value); + } + } + asNative(buffer, length) { + if (length === undefined) { + return buffer instanceof Buffer ? buffer : Buffer.from(buffer); + } + else { + return buffer instanceof Buffer ? buffer.slice(0, length) : Buffer.from(buffer, 0, length); + } + } + allocNative(length) { + return Buffer.allocUnsafe(length); + } +} +MessageBuffer.emptyBuffer = Buffer.allocUnsafe(0); +class ReadableStreamWrapper { + constructor(stream) { + this.stream = stream; + } + onClose(listener) { + this.stream.on('close', listener); + return disposable_1.Disposable.create(() => this.stream.off('close', listener)); + } + onError(listener) { + this.stream.on('error', listener); + return disposable_1.Disposable.create(() => this.stream.off('error', listener)); + } + onEnd(listener) { + this.stream.on('end', listener); + return disposable_1.Disposable.create(() => this.stream.off('end', listener)); + } + onData(listener) { + this.stream.on('data', listener); + return disposable_1.Disposable.create(() => this.stream.off('data', listener)); + } +} +class WritableStreamWrapper { + constructor(stream) { + this.stream = stream; + } + onClose(listener) { + this.stream.on('close', listener); + return disposable_1.Disposable.create(() => this.stream.off('close', listener)); + } + onError(listener) { + this.stream.on('error', listener); + return disposable_1.Disposable.create(() => this.stream.off('error', listener)); + } + onEnd(listener) { + this.stream.on('end', listener); + return disposable_1.Disposable.create(() => this.stream.off('end', listener)); + } + write(data, encoding) { + return new Promise((resolve, reject) => { + const callback = (error) => { + if (error === undefined || error === null) { + resolve(); + } + else { + reject(error); + } + }; + if (typeof data === 'string') { + this.stream.write(data, encoding, callback); + } + else { + this.stream.write(data, callback); + } + }); + } + end() { + this.stream.end(); + } +} +const _ril = Object.freeze({ + messageBuffer: Object.freeze({ + create: (encoding) => new MessageBuffer(encoding) + }), + applicationJson: Object.freeze({ + encoder: Object.freeze({ + name: 'application/json', + encode: (msg, options) => { + try { + return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset)); + } + catch (err) { + return Promise.reject(err); + } + } + }), + decoder: Object.freeze({ + name: 'application/json', + decode: (buffer, options) => { + try { + if (buffer instanceof Buffer) { + return Promise.resolve(JSON.parse(buffer.toString(options.charset))); + } + else { + return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer))); + } + } + catch (err) { + return Promise.reject(err); + } + } + }) + }), + stream: Object.freeze({ + asReadableStream: (stream) => new ReadableStreamWrapper(stream), + asWritableStream: (stream) => new WritableStreamWrapper(stream) + }), + console: console, + timer: Object.freeze({ + setTimeout(callback, ms, ...args) { + return setTimeout(callback, ms, ...args); + }, + clearTimeout(handle) { + clearTimeout(handle); + }, + setImmediate(callback, ...args) { + return setImmediate(callback, ...args); + }, + clearImmediate(handle) { + clearImmediate(handle); + } + }) +}); +function RIL() { + return _ril; +} +(function (RIL) { + function install() { + ral_1.default.install(_ril); + } + RIL.install = install; +})(RIL || (RIL = {})); +exports.default = RIL; +//# sourceMappingURL=ril.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/node.cmd" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/node.cmd" index d6820389cf905e2639588cfaf3d1dd49787060d0..791e6e36ca158adb27a1ca664413568656ce2781 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/node.cmd" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/node.cmd" @@ -1,3 +1,5 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fad7474018db5e3ef38b97374d82fb3b5c56a16aee423f482b6732800007f533 -size 213 +@echo off +REM This file is necessary to ensure that under Windows we don't +REM run the node.js file in the Windows Script Host when using +REM node in packakge.json scripts. See also PATHEXT setting +node.exe %* \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/node.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/node.d.ts" index d4501421d4bd489c9190700a07b50dd52678f01e..b4c4fcd723edbd7b4ea066a4059cf8393e46aa88 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/node.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/node.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c98df0145d99011af92c397fa787fc39d42cc04019614ab5581febe71fb32e1 -size 382 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/node/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/node.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/node.js" index 6ca9fea0ab31ba44f19549c8fa3b28a055f235c0..388e3197ebb862634cda424e9d707896b40627da 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/node.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/node.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20ed9d05087fa65ed99369c32ebaad6d2714c56d38b6b58e660ec428d1280054 -size 408 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/node/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/package.json" index e24243571ff0983059603bbc4a113334d2bd28e5..8c7becfc3e7b87b671154e9874b6e35e23d259b2 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/package.json" @@ -1,3 +1,41 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0f7ea2a036d6235d2efcf67bed0b5f8134e21effb046f8d8668eee93a9580f35 -size 1641 +{ + "name": "vscode-jsonrpc", + "description": "A json rpc implementation over streams", + "version": "6.0.0", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-languageserver-node.git", + "directory": "jsonrpc" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "engines": { + "node": ">=8.0.0 || >=10.0.0" + }, + "main": "./lib/node/main.js", + "browser": { + "./lib/node/main.js": "./lib/browser/main.js" + }, + "typings": "./lib/common/api.d.ts", + "devDependencies": { + "@types/msgpack-lite": "^0.1.7", + "msgpack-lite": "^0.1.26" + }, + "scripts": { + "prepublishOnly": "git clean -xfd . && npm install && npm run clean && npm run compile && npm test", + "postpublish": "node ../build/npm/post-publish.js", + "preversion": "npm test", + "compile": "node ../build/bin/tsc -b ./tsconfig.json", + "watch": "node ../build/bin/tsc -b ./tsconfig-watch.json -w", + "clean": "node ../node_modules/rimraf/bin.js lib && node ../node_modules/rimraf/bin.js dist", + "test": "npm run test:node && npm run test:browser", + "test:node": "node ../node_modules/mocha/bin/_mocha", + "test:browser": "npm run webpack:test:silent && node ../build/bin/runBrowserTests.js http://127.0.0.1:8080/jsonrpc/src/browser/test/", + "webpack": "node ../build/bin/webpack --mode none --config ./webpack.config.js", + "webpack:test": "node ../build/bin/webpack --mode none --config ./src/browser/test/webpack.config.js", + "webpack:test:silent": "node ../build/bin/webpack --no-stats --mode none --config ./src/browser/test/webpack.config.js" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/thirdpartynotices.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/thirdpartynotices.txt" index 9f22dd2ce855c97a711eb0b9fd9508f896d5b434..4a6720c56007725ff92b2afbb16808abc275c6fb 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/thirdpartynotices.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/thirdpartynotices.txt" @@ -1,3 +1,31 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f9661c59edfab635ee8cb37adee78d2b197d9397eb7efd070ad08a2a2a31afbe -size 1816 +THIRD-PARTY SOFTWARE NOTICES AND INFORMATION +For Microsoft vscode-jsonrpc + +This project incorporates material from the project(s) listed below (collectively, “Third Party Code”). +Microsoft is not the original author of the Third Party Code. The original copyright notice and license +under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed +to you under their original license terms set forth below. Microsoft reserves all other rights not expressly +granted, whether by implication, estoppel or otherwise. + +1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped) + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/typings/thenable.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/typings/thenable.d.ts" index 71628bfa09bffea0029445a98311b0929f940987..8c4d2eeacd7b7de01db59e651d7eb4990b2ac605 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/typings/thenable.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-jsonrpc/typings/thenable.d.ts" @@ -1,3 +1,5 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:65b9243c80068ec9696b1fbdd23c9acf80d51df02f97b2d7a0514312b0a9fe7d -size 398 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +interface Thenable extends PromiseLike { } \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/License.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/License.txt" index 71c73d0cbbb244fd8977b1334dae3ac9800e0c19..a07e3ae825f86b6d1f966659954bffc0768bef66 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/License.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/License.txt" @@ -1,3 +1,11 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec9ee83580841e8eb687aca9867f221503809ba6426c7f876ede17d91b9fcfd0 -size 1095 +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/README.md" index 4885ed3bebdd0ae2a21363e6833bb8e577b31925..8926a7bd9bfbb6b7b771bfb813aeaa58e7b86c7c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/README.md" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4e10ac36b8c9754e0ec0f7f59f732bd168d7606a4168ef1edf8f6fba545902ae -size 1380 +# VSCode Language Server - Protocol Module + +[![NPM Version](https://img.shields.io/npm/v/vscode-languageserver-protocol.svg)](https://npmjs.org/package/vscode-languageclient) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-languageserver-protocol.svg)](https://npmjs.org/package/vscode-languageclient) +[![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-node) + +This npm module is a tool independent implementation of the language server protocol and can be used in any type of node application. Please note that the protocol is versioned using the LSP specification version number. Since the protocol depends on the `vscode-jsonrpc` version a a breaking change on that dependencies might not be reflected in a major version change of this module. Changing the major version number in these cases was more confusing this it would result in a version mismatch between the protocol and the LSP specification. + +See [here](https://github.com/Microsoft/language-server-protocol) for a detailed documentation on the language server protocol. + +## History + +For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md) + +## License +[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt) diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/browser.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/browser.d.ts" index 0898e728f1aa9ab8ecda68d04096c898e91dbe6a..e628f1b5caf549c4b58cead28e5ca6a1d682acf8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/browser.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/browser.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99170b7257d895bb2594d7db9c255a4b0029a1363fe5e89849fda830b5c997ce -size 385 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/browser/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/browser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/browser.js" index da29a4f6ec2636f4c79c022c589b7adc67c91530..f5caebf0011feb56821400f3e85f752c80778192 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/browser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/browser.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9406802db032558d3cd8bde9f68d20c067f3a7eca251ad7d0e4473da8d457ada -size 411 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/browser/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/browser/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/browser/main.d.ts" index e4a45e968b64e31c5705e782f97a78d36f3f1fc3..9452eeaefbb9801b1ba901b571acf017b1910659 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/browser/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/browser/main.d.ts" @@ -1,3 +1,4 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:59ba6326cca505253577e9c34a601031793081c6e2b21b08ee73921fc1ecbeb3 -size 383 +import { MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, ProtocolConnection } from '../common/api'; +export * from 'vscode-jsonrpc/browser'; +export * from '../common/api'; +export declare function createProtocolConnection(reader: MessageReader, writer: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/browser/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/browser/main.js" index 48878e746938c13c553b9ae450a659233bcda2bb..b3d8e5b78f5f638da176068bf0082c0f25a0c7c7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/browser/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/browser/main.js" @@ -1,3 +1,28 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:16c182c4c1d71bdae3d0b6a5197a4edb98abdb04e7186ab73d014b9d3c1c4a10 -size 1526 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createProtocolConnection = void 0; +const browser_1 = require("vscode-jsonrpc/browser"); +__exportStar(require("vscode-jsonrpc/browser"), exports); +__exportStar(require("../common/api"), exports); +function createProtocolConnection(reader, writer, logger, options) { + return (0, browser_1.createMessageConnection)(reader, writer, logger, options); +} +exports.createProtocolConnection = createProtocolConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts" index ccbd1757ce7d245e4cc03ebfb304fb44beb170ca..0bd4ecfa61a187ec35ef61fd70f1641b722bc5a4 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts" @@ -1,3 +1,58 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:08724e39439dbc02bdba9768f84736ed132bb02a04fbce0a2cdfc91f42e90505 -size 1922 +import type { integer } from 'vscode-languageserver-types'; +export * from 'vscode-jsonrpc'; +export * from 'vscode-languageserver-types'; +export * from './messages'; +export * from './protocol'; +export { ProtocolConnection, createProtocolConnection } from './connection'; +export declare namespace LSPErrorCodes { + /** + * This is the start range of LSP reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + const lspReservedErrorRangeStart: integer; + /** + * A request failed but it was syntactically correct, e.g the + * method name was known and the parameters were valid. The error + * message should contain human readable information about why + * the request failed. + * + * @since 3.17.0 + */ + const RequestFailed: integer; + /** + * The server cancelled the request. This error code should + * only be used for requests that explicitly support being + * server cancellable. + * + * @since 3.17.0 + */ + const ServerCancelled: integer; + /** + * The server detected that the content of a document got + * modified outside normal conditions. A server should + * NOT send this error code if it detects a content change + * in it unprocessed messages. The result even computed + * on an older state might still be useful for the client. + * + * If a client decides that a result is not of any use anymore + * the client should cancel the request. + */ + const ContentModified: integer; + /** + * The client has canceled a request and a server as detected + * the cancel. + */ + const RequestCancelled: integer; + /** + * This is the end range of LSP reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + const lspReservedErrorRangeEnd: integer; +} +export type LSPErrorCodes = integer; +export declare namespace Proposed { +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/api.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/api.js" index ed32e3c951c72ae1d30c7f2ee7e4055959ba8d70..aa345234949958a503a043201b8a30bd01195770 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/api.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/api.js" @@ -1,3 +1,77 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:00bef35b536b5e0546b5f46d9ae4e5cf4ab1bd8401ab9b86680ab9f251da0aa3 -size 3269 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LSPErrorCodes = exports.createProtocolConnection = void 0; +__exportStar(require("vscode-jsonrpc"), exports); +__exportStar(require("vscode-languageserver-types"), exports); +__exportStar(require("./messages"), exports); +__exportStar(require("./protocol"), exports); +var connection_1 = require("./connection"); +Object.defineProperty(exports, "createProtocolConnection", { enumerable: true, get: function () { return connection_1.createProtocolConnection; } }); +var LSPErrorCodes; +(function (LSPErrorCodes) { + /** + * This is the start range of LSP reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + LSPErrorCodes.lspReservedErrorRangeStart = -32899; + /** + * A request failed but it was syntactically correct, e.g the + * method name was known and the parameters were valid. The error + * message should contain human readable information about why + * the request failed. + * + * @since 3.17.0 + */ + LSPErrorCodes.RequestFailed = -32803; + /** + * The server cancelled the request. This error code should + * only be used for requests that explicitly support being + * server cancellable. + * + * @since 3.17.0 + */ + LSPErrorCodes.ServerCancelled = -32802; + /** + * The server detected that the content of a document got + * modified outside normal conditions. A server should + * NOT send this error code if it detects a content change + * in it unprocessed messages. The result even computed + * on an older state might still be useful for the client. + * + * If a client decides that a result is not of any use anymore + * the client should cancel the request. + */ + LSPErrorCodes.ContentModified = -32801; + /** + * The client has canceled a request and a server as detected + * the cancel. + */ + LSPErrorCodes.RequestCancelled = -32800; + /** + * This is the end range of LSP reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + LSPErrorCodes.lspReservedErrorRangeEnd = -32800; +})(LSPErrorCodes || (exports.LSPErrorCodes = LSPErrorCodes = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts" index 1635e0ecfb46d398d4d074588322acdfd27eefd6..5d89ede052275d887324f52149656626ad1c86c9 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts" @@ -1,3 +1,187 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c0c205fec8b10f3ad0e65af65dd20ea7cf633df0964c84305e375ccdc4f5557e -size 8129 +import { Message, NotificationMessage, CancellationToken, RequestHandler0, RequestHandler, GenericRequestHandler, NotificationHandler0, NotificationHandler, GenericNotificationHandler, ProgressType, Trace, Tracer, TraceOptions, Disposable, Event, MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, RequestType0, RequestType, NotificationType0, NotificationType } from 'vscode-jsonrpc'; +import { ProtocolRequestType, ProtocolRequestType0, ProtocolNotificationType, ProtocolNotificationType0 } from './messages'; +export interface ProtocolConnection { + /** + * Sends a request and returns a promise resolving to the result of the request. + * + * @param type The type of request to sent. + * @param token An optional cancellation token. + * @returns A promise resolving to the request's result. + */ + sendRequest(type: ProtocolRequestType0, token?: CancellationToken): Promise; + sendRequest(type: RequestType0, token?: CancellationToken): Promise; + /** + * Sends a request and returns a promise resolving to the result of the request. + * + * @param type The type of request to sent. + * @param params The request's parameter. + * @param token An optional cancellation token. + * @returns A promise resolving to the request's result. + */ + sendRequest(type: ProtocolRequestType, params: P, token?: CancellationToken): Promise; + sendRequest(type: RequestType, params: P, token?: CancellationToken): Promise; + /** + * Sends a request and returns a promise resolving to the result of the request. + * + * @param method the method name. + * @param token An optional cancellation token. + * @returns A promise resolving to the request's result. + */ + sendRequest(method: string, token?: CancellationToken): Promise; + /** + * Sends a request and returns a promise resolving to the result of the request. + * + * @param method the method name. + * @param params The request's parameter. + * @param token An optional cancellation token. + * @returns A promise resolving to the request's result. + */ + sendRequest(method: string, param: any, token?: CancellationToken): Promise; + /** + * Installs a request handler. + * + * @param type The request type to install the handler for. + * @param handler The actual handler. + * @returns A disposable to remove the handler. + */ + onRequest(type: ProtocolRequestType0, handler: RequestHandler0): Disposable; + onRequest(type: RequestType0, handler: RequestHandler0): Disposable; + /** + * Installs a request handler. + * + * @param type The request type to install the handler for. + * @param handler The actual handler. + * @returns A disposable to remove the handler. + */ + onRequest(type: ProtocolRequestType, handler: RequestHandler): Disposable; + onRequest(type: RequestType, handler: RequestHandler): Disposable; + /** + * Installs a request handler. + * + * @param methods the message method name to install a handler for. + * @param handler The actual handler. + * @returns A disposable to remove the handler. + */ + onRequest(method: string, handler: GenericRequestHandler): Disposable; + /** + * Returns true if the connection has a pending response. + * Otherwise false is returned. + */ + hasPendingResponse(): boolean; + /** + * Sends a notification. + * + * @param type the notification's type to send. + * @returns A promise that resolves when the notification is written to the + * network layer. + */ + sendNotification(type: NotificationType0): Promise; + sendNotification(type: ProtocolNotificationType0): Promise; + /** + * Sends a notification. + * + * @param type the notification's type to send. + * @param params the notification's parameters. + * @returns A promise that resolves when the notification is written to the + * network layer. + */ + sendNotification(type: ProtocolNotificationType, params?: P): Promise; + sendNotification

(type: NotificationType

, params?: P): Promise; + /** + * Sends a notification. + * + * @param method the notification's method name. + * @returns A promise that resolves when the notification is written to the + * network layer. + */ + sendNotification(method: string): Promise; + /** + * Sends a notification. + * + * @param method the notification's method name. + * @param params the notification's parameters. + * @returns A promise that resolves when the notification is written to the + * network layer. + */ + sendNotification(method: string, params: any): Promise; + /** + * Installs a notification handler. + * + * @param type The notification type to install the handler for. + * @param handler The actual handler. + * @returns A disposable to remove the handler. + */ + onNotification(type: ProtocolNotificationType0, handler: NotificationHandler0): Disposable; + onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable; + /** + * Installs a notification handler. + * + * @param type The notification type to install the handler for. + * @param handler The actual handler. + * @returns A disposable to remove the handler. + */ + onNotification(type: ProtocolNotificationType, handler: NotificationHandler

): Disposable; + onNotification

(type: NotificationType

, handler: NotificationHandler

): Disposable; + /** + * Installs a notification handler. + * + * @param methods The message method name to install the handler for. + * @param handler The actual handler. + * @returns A disposable to remove the handler. + */ + onNotification(method: string, handler: GenericNotificationHandler): Disposable; + /** + * Installs a progress handler for a given token. + * @param type the progress type + * @param token the token + * @param handler the handler + * @returns A disposable to remove the handler. + */ + onProgress

(type: ProgressType

, token: string | number, handler: NotificationHandler

): Disposable; + /** + * Sends progress. + * @param type the progress type + * @param token the token to use + * @param value the progress value + * @returns A promise that resolves when the progress is written to the + * network layer. + */ + sendProgress

(type: ProgressType

, token: string | number, value: P): Promise; + /** + * Enables tracing mode for the connection. + * @returns A promise that resolves when the trace value is written to the + * network layer. + */ + trace(value: Trace, tracer: Tracer, sendNotification?: boolean): Promise; + trace(value: Trace, tracer: Tracer, traceOptions?: TraceOptions): Promise; + /** + * An event emitter firing when an error occurs on the connection. + */ + onError: Event<[Error, Message | undefined, number | undefined]>; + /** + * An event emitter firing when the connection got closed. + */ + onClose: Event; + /** + * An event emitter firing when the connection receives a notification that is not + * handled. + */ + onUnhandledNotification: Event; + /** + * An event emitter firing when the connection got disposed. + */ + onDispose: Event; + /** + * Ends the connection. + */ + end(): void; + /** + * Actively disposes the connection. + */ + dispose(): void; + /** + * Turns the connection into listening mode + */ + listen(): void; +} +export declare function createProtocolConnection(input: MessageReader, output: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/connection.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/connection.js" index 392453fcf3aaba7d4bb3fdaca321147538c4d5d9..eb3e86fa636da129056397ae7b9ba01a71457d52 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/connection.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/connection.js" @@ -1,3 +1,15 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b230398b4b9685fb946607ecebaab2c9c739d1002ebf4cee524dffb80f9c306d -size 859 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createProtocolConnection = void 0; +const vscode_jsonrpc_1 = require("vscode-jsonrpc"); +function createProtocolConnection(input, output, logger, options) { + if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) { + options = { connectionStrategy: options }; + } + return (0, vscode_jsonrpc_1.createMessageConnection)(input, output, logger, options); +} +exports.createProtocolConnection = createProtocolConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts" index fa2b9b9da9b1b7556e49cb674a93bf04b7dbd338..cc66a5de494f628d8fa1e3e0496fe340fcb95730 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts" @@ -1,3 +1,51 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5bf947093bfad8e98456c28106a9db37d9276261a7b82fa04f4dc8119bab7f8e -size 2038 +import { RequestType, RequestType0, NotificationType, NotificationType0, ProgressType, _EM } from 'vscode-jsonrpc'; +export declare enum MessageDirection { + clientToServer = "clientToServer", + serverToClient = "serverToClient", + both = "both" +} +export declare class RegistrationType { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly ____: [RO, _EM] | undefined; + readonly method: string; + constructor(method: string); +} +export declare class ProtocolRequestType0 extends RequestType0 implements ProgressType, RegistrationType { + /** + * Clients must not use these properties. They are here to ensure correct typing. + * in TypeScript + */ + readonly __: [PR, _EM] | undefined; + readonly ___: [PR, RO, _EM] | undefined; + readonly ____: [RO, _EM] | undefined; + readonly _pr: PR | undefined; + constructor(method: string); +} +export declare class ProtocolRequestType extends RequestType implements ProgressType, RegistrationType { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly __: [PR, _EM] | undefined; + readonly ___: [PR, RO, _EM] | undefined; + readonly ____: [RO, _EM] | undefined; + readonly _pr: PR | undefined; + constructor(method: string); +} +export declare class ProtocolNotificationType0 extends NotificationType0 implements RegistrationType { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly ___: [RO, _EM] | undefined; + readonly ____: [RO, _EM] | undefined; + constructor(method: string); +} +export declare class ProtocolNotificationType extends NotificationType

implements RegistrationType { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly ___: [RO, _EM] | undefined; + readonly ____: [RO, _EM] | undefined; + constructor(method: string); +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/messages.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/messages.js" index 01019fa7b29a8484aad306be25ea5c782dbf8b22..de7f2755fa369b9b543b0b0ba447d81f62f12fe3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/messages.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/messages.js" @@ -1,3 +1,44 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:749bf2ac16a8af924e924a95fc51a7b888756cf1e66497137b521e6aba540011 -size 1923 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProtocolNotificationType = exports.ProtocolNotificationType0 = exports.ProtocolRequestType = exports.ProtocolRequestType0 = exports.RegistrationType = exports.MessageDirection = void 0; +const vscode_jsonrpc_1 = require("vscode-jsonrpc"); +var MessageDirection; +(function (MessageDirection) { + MessageDirection["clientToServer"] = "clientToServer"; + MessageDirection["serverToClient"] = "serverToClient"; + MessageDirection["both"] = "both"; +})(MessageDirection || (exports.MessageDirection = MessageDirection = {})); +class RegistrationType { + constructor(method) { + this.method = method; + } +} +exports.RegistrationType = RegistrationType; +class ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 { + constructor(method) { + super(method); + } +} +exports.ProtocolRequestType0 = ProtocolRequestType0; +class ProtocolRequestType extends vscode_jsonrpc_1.RequestType { + constructor(method) { + super(method, vscode_jsonrpc_1.ParameterStructures.byName); + } +} +exports.ProtocolRequestType = ProtocolRequestType; +class ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 { + constructor(method) { + super(method); + } +} +exports.ProtocolNotificationType0 = ProtocolNotificationType0; +class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType { + constructor(method) { + super(method, vscode_jsonrpc_1.ParameterStructures.byName); + } +} +exports.ProtocolNotificationType = ProtocolNotificationType; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.d.ts" index a9755173b4bb6da2a9126864f68f2b7288ece072..cb0ff5c3b541f646105198ee23ac0fc3d805023e 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.d.ts" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881 -size 11 +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.js" index 160c45283073a62f48db4c482da2ff70d4b0b80e..afae3b51d76c65de4387571d0b920018a5b3d753 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.js" @@ -1,3 +1,43 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0270b54cea45b7fdf27d450e19d7c258c78c40924bf209ecb62ad682237f201d -size 2303 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) TypeFox, Microsoft and others. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +const vscode_jsonrpc_1 = require("vscode-jsonrpc"); +const messages_1 = require("./messages"); +const api_1 = require("./api"); +// This file is used to define the $ notification partly specified in JSON-RPC +// so that we generate proper data for them in the meta model. +// @ts-ignore 6196 +var SetTraceNotification; +(function (SetTraceNotification) { + SetTraceNotification.method = '$/setTrace'; + SetTraceNotification.messageDirection = messages_1.MessageDirection.clientToServer; + SetTraceNotification.type = new messages_1.ProtocolNotificationType(SetTraceNotification.method); +})(SetTraceNotification || (SetTraceNotification = {})); +// @ts-ignore 6196 +var LogTraceNotification; +(function (LogTraceNotification) { + LogTraceNotification.method = '$/logTrace'; + LogTraceNotification.messageDirection = messages_1.MessageDirection.serverToClient; + LogTraceNotification.type = new messages_1.ProtocolNotificationType(LogTraceNotification.method); +})(LogTraceNotification || (LogTraceNotification = {})); +// @ts-ignore 6196 +const $ErrorCodes = vscode_jsonrpc_1.ErrorCodes; +// @ts-ignore 6196 +const $LSPErrorCodes = api_1.LSPErrorCodes; +// @ts-ignore 6196 +var CancelNotification; +(function (CancelNotification) { + CancelNotification.method = '$/cancelRequest'; + CancelNotification.messageDirection = messages_1.MessageDirection.both; + CancelNotification.type = new messages_1.ProtocolNotificationType(CancelNotification.method); +})(CancelNotification || (CancelNotification = {})); +// @ts-ignore 6196 +var ProgressNotification; +(function (ProgressNotification) { + ProgressNotification.method = '$/progress'; + ProgressNotification.messageDirection = messages_1.MessageDirection.both; + ProgressNotification.type = new messages_1.ProtocolNotificationType(ProgressNotification.method); +})(ProgressNotification || (ProgressNotification = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts" index 5483a83238126669f0a6f1d6772c14307c112fac..3882714af41416a29a3c9406431a2943daa1c4b6 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts" @@ -1,3 +1,86 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:29a456c61c3d93e36f5eba4c0ed567d7896a9c08a38b537c3fc192a99d03b348 -size 3505 +import { RequestHandler } from 'vscode-jsonrpc'; +import { CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +/** + * @since 3.16.0 + */ +export interface CallHierarchyClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + * return value for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; +} +/** + * Call hierarchy options used during static registration. + * + * @since 3.16.0 + */ +export interface CallHierarchyOptions extends WorkDoneProgressOptions { +} +/** + * Call hierarchy options used during static or dynamic registration. + * + * @since 3.16.0 + */ +export interface CallHierarchyRegistrationOptions extends TextDocumentRegistrationOptions, CallHierarchyOptions, StaticRegistrationOptions { +} +/** + * The parameter of a `textDocument/prepareCallHierarchy` request. + * + * @since 3.16.0 + */ +export interface CallHierarchyPrepareParams extends TextDocumentPositionParams, WorkDoneProgressParams { +} +/** + * A request to result a `CallHierarchyItem` in a document at a given position. + * Can be used as an input to an incoming or outgoing call hierarchy. + * + * @since 3.16.0 + */ +export declare namespace CallHierarchyPrepareRequest { + const method: 'textDocument/prepareCallHierarchy'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * The parameter of a `callHierarchy/incomingCalls` request. + * + * @since 3.16.0 + */ +export interface CallHierarchyIncomingCallsParams extends WorkDoneProgressParams, PartialResultParams { + item: CallHierarchyItem; +} +/** + * A request to resolve the incoming calls for a given `CallHierarchyItem`. + * + * @since 3.16.0 + */ +export declare namespace CallHierarchyIncomingCallsRequest { + const method: 'callHierarchy/incomingCalls'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * The parameter of a `callHierarchy/outgoingCalls` request. + * + * @since 3.16.0 + */ +export interface CallHierarchyOutgoingCallsParams extends WorkDoneProgressParams, PartialResultParams { + item: CallHierarchyItem; +} +/** + * A request to resolve the outgoing calls for a given `CallHierarchyItem`. + * + * @since 3.16.0 + */ +export declare namespace CallHierarchyOutgoingCallsRequest { + const method: 'callHierarchy/outgoingCalls'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js" index f8bb373d9436f1d77e7c841e5a4cc0d02ed2c32d..b654fa63a5be388d15c8180f5256869b64084c5a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js" @@ -1,3 +1,42 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:97a0be06fe7f0b92e65a1a9279173ffe096bf3b4d3d28307ca7cdf48d62c7541 -size 2497 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) TypeFox, Microsoft and others. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.CallHierarchyPrepareRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to result a `CallHierarchyItem` in a document at a given position. + * Can be used as an input to an incoming or outgoing call hierarchy. + * + * @since 3.16.0 + */ +var CallHierarchyPrepareRequest; +(function (CallHierarchyPrepareRequest) { + CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy'; + CallHierarchyPrepareRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method); +})(CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = CallHierarchyPrepareRequest = {})); +/** + * A request to resolve the incoming calls for a given `CallHierarchyItem`. + * + * @since 3.16.0 + */ +var CallHierarchyIncomingCallsRequest; +(function (CallHierarchyIncomingCallsRequest) { + CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls'; + CallHierarchyIncomingCallsRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method); +})(CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = CallHierarchyIncomingCallsRequest = {})); +/** + * A request to resolve the outgoing calls for a given `CallHierarchyItem`. + * + * @since 3.16.0 + */ +var CallHierarchyOutgoingCallsRequest; +(function (CallHierarchyOutgoingCallsRequest) { + CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls'; + CallHierarchyOutgoingCallsRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method); +})(CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = CallHierarchyOutgoingCallsRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts" index 18a867d8f2840d81664950694f667932b004e577..adbf45a969c7d612a9311be32b24d5c97da5d936 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts" @@ -1,3 +1,66 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:33e11cee43184a95afe9a450f7dde6bd2b6a03fc9643f898268e8594c266554a -size 2900 +import { RequestHandler } from 'vscode-jsonrpc'; +import { TextDocumentIdentifier, Range, Color, ColorInformation, ColorPresentation } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +export interface DocumentColorClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `DocumentColorRegistrationOptions` return value + * for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; +} +export interface DocumentColorOptions extends WorkDoneProgressOptions { +} +export interface DocumentColorRegistrationOptions extends TextDocumentRegistrationOptions, StaticRegistrationOptions, DocumentColorOptions { +} +/** + * Parameters for a {@link DocumentColorRequest}. + */ +export interface DocumentColorParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; +} +/** + * A request to list all color symbols found in a given text document. The request's + * parameter is of type {@link DocumentColorParams} the + * response is of type {@link ColorInformation ColorInformation[]} or a Thenable + * that resolves to such. + */ +export declare namespace DocumentColorRequest { + const method: 'textDocument/documentColor'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * Parameters for a {@link ColorPresentationRequest}. + */ +export interface ColorPresentationParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The color to request presentations for. + */ + color: Color; + /** + * The range where the color would be inserted. Serves as a context. + */ + range: Range; +} +/** + * A request to list all presentation for a color. The request's + * parameter is of type {@link ColorPresentationParams} the + * response is of type {@link ColorInformation ColorInformation[]} or a Thenable + * that resolves to such. + */ +export declare namespace ColorPresentationRequest { + const method: 'textDocument/colorPresentation'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js" index 93183ad2fdcc9977555de0822ef80510c8c31920..ed43a32ad802c7514ba87191e38744c8d70e5ba0 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js" @@ -1,3 +1,32 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b9b50911781d46cc22a9f6143675411c84e45250a533959ea5097380865d782a -size 1875 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ColorPresentationRequest = exports.DocumentColorRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to list all color symbols found in a given text document. The request's + * parameter is of type {@link DocumentColorParams} the + * response is of type {@link ColorInformation ColorInformation[]} or a Thenable + * that resolves to such. + */ +var DocumentColorRequest; +(function (DocumentColorRequest) { + DocumentColorRequest.method = 'textDocument/documentColor'; + DocumentColorRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method); +})(DocumentColorRequest || (exports.DocumentColorRequest = DocumentColorRequest = {})); +/** + * A request to list all presentation for a color. The request's + * parameter is of type {@link ColorPresentationParams} the + * response is of type {@link ColorInformation ColorInformation[]} or a Thenable + * that resolves to such. + */ +var ColorPresentationRequest; +(function (ColorPresentationRequest) { + ColorPresentationRequest.method = 'textDocument/colorPresentation'; + ColorPresentationRequest.messageDirection = messages_1.MessageDirection.clientToServer; + ColorPresentationRequest.type = new messages_1.ProtocolRequestType(ColorPresentationRequest.method); +})(ColorPresentationRequest || (exports.ColorPresentationRequest = ColorPresentationRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts" index e71bd0a515616858a78713452294095cb0ca8843..20249481b0761d2ade350d347dcd06f4ad210a01 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts" @@ -1,3 +1,35 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:00f191fd642e8130d5b77fb11f76f4762eb86ac1cbe9b89b4ff63ab95be58baa -size 1503 +import { RequestHandler, HandlerResult, CancellationToken } from 'vscode-jsonrpc'; +import { LSPAny, URI } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +/** + * The 'workspace/configuration' request is sent from the server to the client to fetch a certain + * configuration setting. + * + * This pull model replaces the old push model were the client signaled configuration change via an + * event. If the server still needs to react to configuration changes (since the server caches the + * result of `workspace/configuration` requests) the server should register for an empty configuration + * change event and empty the cache if such an event is received. + */ +export declare namespace ConfigurationRequest { + const method: 'workspace/configuration'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; + type MiddlewareSignature = (params: ConfigurationParams, token: CancellationToken, next: HandlerSignature) => HandlerResult; +} +export interface ConfigurationItem { + /** + * The scope to get the configuration section for. + */ + scopeUri?: URI; + /** + * The configuration section asked for. + */ + section?: string; +} +/** + * The parameters of a configuration request. + */ +export interface ConfigurationParams { + items: ConfigurationItem[]; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js" index f0384598e8682154f9452372e76649e7807b0fef..3489a6c52456189da308808fc79437a4bafc1d63 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js" @@ -1,3 +1,24 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:22552e95594bf2fb8b8feba72733473c7ef5e2a7a0c0f1357a6b7dfbd6dec5fb -size 1444 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ConfigurationRequest = void 0; +const messages_1 = require("./messages"); +//---- Get Configuration request ---- +/** + * The 'workspace/configuration' request is sent from the server to the client to fetch a certain + * configuration setting. + * + * This pull model replaces the old push model were the client signaled configuration change via an + * event. If the server still needs to react to configuration changes (since the server caches the + * result of `workspace/configuration` requests) the server should register for an empty configuration + * change event and empty the cache if such an event is received. + */ +var ConfigurationRequest; +(function (ConfigurationRequest) { + ConfigurationRequest.method = 'workspace/configuration'; + ConfigurationRequest.messageDirection = messages_1.MessageDirection.serverToClient; + ConfigurationRequest.type = new messages_1.ProtocolRequestType(ConfigurationRequest.method); +})(ConfigurationRequest || (exports.ConfigurationRequest = ConfigurationRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts" index 448ffc6e48ce7d16ce5656b8eb64437c0b289b1a..23898d9cf9b46710ade3646854bab39fdb847c27 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts" @@ -1,3 +1,3252 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2f3aa6fb84e6955886902a6a8818e4bff9c79b97356773bd6ac2ff3993c097a2 -size 114553 +import { ProgressToken, RequestHandler, TraceValues } from 'vscode-jsonrpc'; +import { MessageDirection, ProtocolRequestType, ProtocolRequestType0, ProtocolNotificationType, ProtocolNotificationType0 } from './messages'; +import { Position, Range, Location, LocationLink, Diagnostic, Command, TextEdit, WorkspaceEdit, DocumentUri, TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, CompletionItem, CompletionList, Hover, SignatureHelp, Definition, ReferenceContext, DocumentHighlight, SymbolInformation, CodeLens, CodeActionContext, FormattingOptions, DocumentLink, MarkupKind, SymbolKind, CompletionItemKind, CodeAction, CodeActionKind, DocumentSymbol, CompletionItemTag, DiagnosticTag, SymbolTag, uinteger, integer, InsertTextMode, LSPAny, WorkspaceSymbol, URI, WorkspaceFolder } from 'vscode-languageserver-types'; +import { ImplementationRequest, ImplementationClientCapabilities, ImplementationOptions, ImplementationRegistrationOptions, ImplementationParams } from './protocol.implementation'; +import { TypeDefinitionRequest, TypeDefinitionClientCapabilities, TypeDefinitionOptions, TypeDefinitionRegistrationOptions, TypeDefinitionParams } from './protocol.typeDefinition'; +import { WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFoldersChangeEvent, WorkspaceFoldersInitializeParams, WorkspaceFoldersServerCapabilities } from './protocol.workspaceFolder'; +import { ConfigurationRequest, ConfigurationParams, ConfigurationItem } from './protocol.configuration'; +import { DocumentColorRequest, ColorPresentationRequest, DocumentColorOptions, DocumentColorParams, ColorPresentationParams, DocumentColorClientCapabilities, DocumentColorRegistrationOptions } from './protocol.colorProvider'; +import { FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeRegistrationOptions, FoldingRangeRefreshRequest, FoldingRangeWorkspaceClientCapabilities } from './protocol.foldingRange'; +import { DeclarationClientCapabilities, DeclarationRequest, DeclarationOptions, DeclarationRegistrationOptions, DeclarationParams } from './protocol.declaration'; +import { SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeRequest, SelectionRangeParams, SelectionRangeRegistrationOptions } from './protocol.selectionRange'; +import { WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, WorkDoneProgress, WorkDoneProgressCreateParams, WorkDoneProgressCreateRequest, WorkDoneProgressCancelParams, WorkDoneProgressCancelNotification } from './protocol.progress'; +import { CallHierarchyClientCapabilities, CallHierarchyOptions, CallHierarchyRegistrationOptions, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCallsRequest, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCallsRequest, CallHierarchyPrepareParams, CallHierarchyPrepareRequest } from './protocol.callHierarchy'; +import { SemanticTokensPartialResult, SemanticTokensDeltaPartialResult, TokenFormat, SemanticTokensClientCapabilities, SemanticTokensOptions, SemanticTokensRegistrationOptions, SemanticTokensParams, SemanticTokensRequest, SemanticTokensDeltaParams, SemanticTokensDeltaRequest, SemanticTokensRangeParams, SemanticTokensRangeRequest, SemanticTokensRefreshRequest, SemanticTokensWorkspaceClientCapabilities, SemanticTokensRegistrationType } from './protocol.semanticTokens'; +import { ShowDocumentParams, ShowDocumentResult, ShowDocumentRequest, ShowDocumentClientCapabilities } from './protocol.showDocument'; +import { LinkedEditingRangeClientCapabilities, LinkedEditingRanges, LinkedEditingRangeOptions, LinkedEditingRangeParams, LinkedEditingRangeRegistrationOptions, LinkedEditingRangeRequest } from './protocol.linkedEditingRange'; +import { FileOperationOptions, FileOperationClientCapabilities, FileOperationRegistrationOptions, FileOperationPatternOptions, FileOperationPatternKind, DidCreateFilesNotification, CreateFilesParams, FileCreate, WillCreateFilesRequest, DidRenameFilesNotification, RenameFilesParams, FileRename, WillRenameFilesRequest, DidDeleteFilesNotification, DeleteFilesParams, FileDelete, WillDeleteFilesRequest } from './protocol.fileOperations'; +import { UniquenessLevel, MonikerKind, Moniker, MonikerClientCapabilities, MonikerOptions, MonikerRegistrationOptions, MonikerParams, MonikerRequest } from './protocol.moniker'; +import { TypeHierarchyClientCapabilities, TypeHierarchyOptions, TypeHierarchyRegistrationOptions, TypeHierarchyPrepareParams, TypeHierarchyPrepareRequest, TypeHierarchySubtypesParams, TypeHierarchySubtypesRequest, TypeHierarchySupertypesParams, TypeHierarchySupertypesRequest } from './protocol.typeHierarchy'; +import { InlineValueClientCapabilities, InlineValueOptions, InlineValueRegistrationOptions, InlineValueWorkspaceClientCapabilities, InlineValueParams, InlineValueRequest, InlineValueRefreshRequest } from './protocol.inlineValue'; +import { InlayHintClientCapabilities, InlayHintOptions, InlayHintRegistrationOptions, InlayHintWorkspaceClientCapabilities, InlayHintParams, InlayHintRequest, InlayHintResolveRequest, InlayHintRefreshRequest } from './protocol.inlayHint'; +import { DiagnosticClientCapabilities, DiagnosticOptions, DiagnosticRegistrationOptions, DiagnosticServerCancellationData, DocumentDiagnosticParams, DocumentDiagnosticReportKind, FullDocumentDiagnosticReport, RelatedFullDocumentDiagnosticReport, UnchangedDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DocumentDiagnosticRequest, PreviousResultId, WorkspaceDiagnosticParams, WorkspaceFullDocumentDiagnosticReport, WorkspaceUnchangedDocumentDiagnosticReport, WorkspaceDocumentDiagnosticReport, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult, WorkspaceDiagnosticRequest, DiagnosticRefreshRequest, DiagnosticWorkspaceClientCapabilities } from './protocol.diagnostic'; +import { NotebookDocumentSyncClientCapabilities, NotebookCellKind, ExecutionSummary, NotebookCell, NotebookDocument, NotebookDocumentIdentifier, VersionedNotebookDocumentIdentifier, NotebookDocumentSyncOptions, NotebookDocumentSyncRegistrationOptions, NotebookDocumentSyncRegistrationType, DidOpenNotebookDocumentParams, DidOpenNotebookDocumentNotification, NotebookCellArrayChange, NotebookDocumentChangeEvent, DidChangeNotebookDocumentParams, DidChangeNotebookDocumentNotification, DidSaveNotebookDocumentParams, DidSaveNotebookDocumentNotification, DidCloseNotebookDocumentParams, DidCloseNotebookDocumentNotification } from './protocol.notebook'; +import { InlineCompletionClientCapabilities, InlineCompletionOptions, InlineCompletionParams, InlineCompletionRegistrationOptions, InlineCompletionRequest } from './protocol.inlineCompletion'; +/** + * A document filter denotes a document by different properties like + * the {@link TextDocument.languageId language}, the {@link Uri.scheme scheme} of + * its resource, or a glob-pattern that is applied to the {@link TextDocument.fileName path}. + * + * Glob patterns can have the following syntax: + * - `*` to match one or more characters in a path segment + * - `?` to match on one character in a path segment + * - `**` to match any number of path segments, including none + * - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files) + * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`) + * + * @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }` + * @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }` + * + * @since 3.17.0 + */ +export type TextDocumentFilter = { + /** A language id, like `typescript`. */ + language: string; + /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */ + scheme?: string; + /** A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. */ + pattern?: string; +} | { + /** A language id, like `typescript`. */ + language?: string; + /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */ + scheme: string; + /** A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. */ + pattern?: string; +} | { + /** A language id, like `typescript`. */ + language?: string; + /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */ + scheme?: string; + /** A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. */ + pattern: string; +}; +/** + * The TextDocumentFilter namespace provides helper functions to work with + * {@link TextDocumentFilter} literals. + * + * @since 3.17.0 + */ +export declare namespace TextDocumentFilter { + function is(value: any): value is TextDocumentFilter; +} +/** + * A notebook document filter denotes a notebook document by + * different properties. The properties will be match + * against the notebook's URI (same as with documents) + * + * @since 3.17.0 + */ +export type NotebookDocumentFilter = { + /** The type of the enclosing notebook. */ + notebookType: string; + /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */ + scheme?: string; + /** A glob pattern. */ + pattern?: string; +} | { + /** The type of the enclosing notebook. */ + notebookType?: string; + /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.*/ + scheme: string; + /** A glob pattern. */ + pattern?: string; +} | { + /** The type of the enclosing notebook. */ + notebookType?: string; + /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */ + scheme?: string; + /** A glob pattern. */ + pattern: string; +}; +/** + * The NotebookDocumentFilter namespace provides helper functions to work with + * {@link NotebookDocumentFilter} literals. + * + * @since 3.17.0 + */ +export declare namespace NotebookDocumentFilter { + function is(value: any): value is NotebookDocumentFilter; +} +/** + * A notebook cell text document filter denotes a cell text + * document by different properties. + * + * @since 3.17.0 + */ +export type NotebookCellTextDocumentFilter = { + /** + * A filter that matches against the notebook + * containing the notebook cell. If a string + * value is provided it matches against the + * notebook type. '*' matches every notebook. + */ + notebook: string | NotebookDocumentFilter; + /** + * A language id like `python`. + * + * Will be matched against the language id of the + * notebook cell document. '*' matches every language. + */ + language?: string; +}; +/** + * The NotebookCellTextDocumentFilter namespace provides helper functions to work with + * {@link NotebookCellTextDocumentFilter} literals. + * + * @since 3.17.0 + */ +export declare namespace NotebookCellTextDocumentFilter { + function is(value: any): value is NotebookCellTextDocumentFilter; +} +/** + * A document filter describes a top level text document or + * a notebook cell document. + * + * @since 3.17.0 - proposed support for NotebookCellTextDocumentFilter. + */ +export type DocumentFilter = TextDocumentFilter | NotebookCellTextDocumentFilter; +/** + * A document selector is the combination of one or many document filters. + * + * @sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`; + * + * The use of a string as a document filter is deprecated @since 3.16.0. + */ +export type DocumentSelector = (string | DocumentFilter)[]; +/** + * The DocumentSelector namespace provides helper functions to work with + * {@link DocumentSelector}s. + */ +export declare namespace DocumentSelector { + function is(value: any[] | undefined | null): value is DocumentSelector; +} +/** + * General parameters to register for a notification or to register a provider. + */ +export interface Registration { + /** + * The id used to register the request. The id can be used to deregister + * the request again. + */ + id: string; + /** + * The method / capability to register for. + */ + method: string; + /** + * Options necessary for the registration. + */ + registerOptions?: LSPAny; +} +export interface RegistrationParams { + registrations: Registration[]; +} +/** + * The `client/registerCapability` request is sent from the server to the client to register a new capability + * handler on the client side. + */ +export declare namespace RegistrationRequest { + const method: 'client/registerCapability'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * General parameters to unregister a request or notification. + */ +export interface Unregistration { + /** + * The id used to unregister the request or notification. Usually an id + * provided during the register request. + */ + id: string; + /** + * The method to unregister for. + */ + method: string; +} +export interface UnregistrationParams { + unregisterations: Unregistration[]; +} +/** + * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability + * handler on the client side. + */ +export declare namespace UnregistrationRequest { + const method: 'client/unregisterCapability'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +export interface WorkDoneProgressParams { + /** + * An optional token that a server can use to report work done progress. + */ + workDoneToken?: ProgressToken; +} +export interface PartialResultParams { + /** + * An optional token that a server can use to report partial results (e.g. streaming) to + * the client. + */ + partialResultToken?: ProgressToken; +} +/** + * A parameter literal used in requests to pass a text document and a position inside that + * document. + */ +export interface TextDocumentPositionParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The position inside the text document. + */ + position: Position; +} +/** + * The kind of resource operations supported by the client. + */ +export type ResourceOperationKind = 'create' | 'rename' | 'delete'; +export declare namespace ResourceOperationKind { + /** + * Supports creating new files and folders. + */ + const Create: ResourceOperationKind; + /** + * Supports renaming existing files and folders. + */ + const Rename: ResourceOperationKind; + /** + * Supports deleting existing files and folders. + */ + const Delete: ResourceOperationKind; +} +export type FailureHandlingKind = 'abort' | 'transactional' | 'undo' | 'textOnlyTransactional'; +export declare namespace FailureHandlingKind { + /** + * Applying the workspace change is simply aborted if one of the changes provided + * fails. All operations executed before the failing operation stay executed. + */ + const Abort: FailureHandlingKind; + /** + * All operations are executed transactional. That means they either all + * succeed or no changes at all are applied to the workspace. + */ + const Transactional: FailureHandlingKind; + /** + * If the workspace edit contains only textual file changes they are executed transactional. + * If resource changes (create, rename or delete file) are part of the change the failure + * handling strategy is abort. + */ + const TextOnlyTransactional: FailureHandlingKind; + /** + * The client tries to undo the operations already executed. But there is no + * guarantee that this is succeeding. + */ + const Undo: FailureHandlingKind; +} +/** + * Workspace specific client capabilities. + */ +export interface WorkspaceClientCapabilities { + /** + * The client supports applying batch edits + * to the workspace by supporting the request + * 'workspace/applyEdit' + */ + applyEdit?: boolean; + /** + * Capabilities specific to `WorkspaceEdit`s. + */ + workspaceEdit?: WorkspaceEditClientCapabilities; + /** + * Capabilities specific to the `workspace/didChangeConfiguration` notification. + */ + didChangeConfiguration?: DidChangeConfigurationClientCapabilities; + /** + * Capabilities specific to the `workspace/didChangeWatchedFiles` notification. + */ + didChangeWatchedFiles?: DidChangeWatchedFilesClientCapabilities; + /** + * Capabilities specific to the `workspace/symbol` request. + */ + symbol?: WorkspaceSymbolClientCapabilities; + /** + * Capabilities specific to the `workspace/executeCommand` request. + */ + executeCommand?: ExecuteCommandClientCapabilities; + /** + * The client has support for workspace folders. + * + * @since 3.6.0 + */ + workspaceFolders?: boolean; + /** + * The client supports `workspace/configuration` requests. + * + * @since 3.6.0 + */ + configuration?: boolean; + /** + * Capabilities specific to the semantic token requests scoped to the + * workspace. + * + * @since 3.16.0. + */ + semanticTokens?: SemanticTokensWorkspaceClientCapabilities; + /** + * Capabilities specific to the code lens requests scoped to the + * workspace. + * + * @since 3.16.0. + */ + codeLens?: CodeLensWorkspaceClientCapabilities; + /** + * The client has support for file notifications/requests for user operations on files. + * + * Since 3.16.0 + */ + fileOperations?: FileOperationClientCapabilities; + /** + * Capabilities specific to the inline values requests scoped to the + * workspace. + * + * @since 3.17.0. + */ + inlineValue?: InlineValueWorkspaceClientCapabilities; + /** + * Capabilities specific to the inlay hint requests scoped to the + * workspace. + * + * @since 3.17.0. + */ + inlayHint?: InlayHintWorkspaceClientCapabilities; + /** + * Capabilities specific to the diagnostic requests scoped to the + * workspace. + * + * @since 3.17.0. + */ + diagnostics?: DiagnosticWorkspaceClientCapabilities; + /** + * Capabilities specific to the folding range requests scoped to the workspace. + * + * @since 3.18.0 + * @proposed + */ + foldingRange?: FoldingRangeWorkspaceClientCapabilities; +} +/** + * Text document specific client capabilities. + */ +export interface TextDocumentClientCapabilities { + /** + * Defines which synchronization capabilities the client supports. + */ + synchronization?: TextDocumentSyncClientCapabilities; + /** + * Capabilities specific to the `textDocument/completion` request. + */ + completion?: CompletionClientCapabilities; + /** + * Capabilities specific to the `textDocument/hover` request. + */ + hover?: HoverClientCapabilities; + /** + * Capabilities specific to the `textDocument/signatureHelp` request. + */ + signatureHelp?: SignatureHelpClientCapabilities; + /** + * Capabilities specific to the `textDocument/declaration` request. + * + * @since 3.14.0 + */ + declaration?: DeclarationClientCapabilities; + /** + * Capabilities specific to the `textDocument/definition` request. + */ + definition?: DefinitionClientCapabilities; + /** + * Capabilities specific to the `textDocument/typeDefinition` request. + * + * @since 3.6.0 + */ + typeDefinition?: TypeDefinitionClientCapabilities; + /** + * Capabilities specific to the `textDocument/implementation` request. + * + * @since 3.6.0 + */ + implementation?: ImplementationClientCapabilities; + /** + * Capabilities specific to the `textDocument/references` request. + */ + references?: ReferenceClientCapabilities; + /** + * Capabilities specific to the `textDocument/documentHighlight` request. + */ + documentHighlight?: DocumentHighlightClientCapabilities; + /** + * Capabilities specific to the `textDocument/documentSymbol` request. + */ + documentSymbol?: DocumentSymbolClientCapabilities; + /** + * Capabilities specific to the `textDocument/codeAction` request. + */ + codeAction?: CodeActionClientCapabilities; + /** + * Capabilities specific to the `textDocument/codeLens` request. + */ + codeLens?: CodeLensClientCapabilities; + /** + * Capabilities specific to the `textDocument/documentLink` request. + */ + documentLink?: DocumentLinkClientCapabilities; + /** + * Capabilities specific to the `textDocument/documentColor` and the + * `textDocument/colorPresentation` request. + * + * @since 3.6.0 + */ + colorProvider?: DocumentColorClientCapabilities; + /** + * Capabilities specific to the `textDocument/formatting` request. + */ + formatting?: DocumentFormattingClientCapabilities; + /** + * Capabilities specific to the `textDocument/rangeFormatting` request. + */ + rangeFormatting?: DocumentRangeFormattingClientCapabilities; + /** + * Capabilities specific to the `textDocument/onTypeFormatting` request. + */ + onTypeFormatting?: DocumentOnTypeFormattingClientCapabilities; + /** + * Capabilities specific to the `textDocument/rename` request. + */ + rename?: RenameClientCapabilities; + /** + * Capabilities specific to the `textDocument/foldingRange` request. + * + * @since 3.10.0 + */ + foldingRange?: FoldingRangeClientCapabilities; + /** + * Capabilities specific to the `textDocument/selectionRange` request. + * + * @since 3.15.0 + */ + selectionRange?: SelectionRangeClientCapabilities; + /** + * Capabilities specific to the `textDocument/publishDiagnostics` notification. + */ + publishDiagnostics?: PublishDiagnosticsClientCapabilities; + /** + * Capabilities specific to the various call hierarchy requests. + * + * @since 3.16.0 + */ + callHierarchy?: CallHierarchyClientCapabilities; + /** + * Capabilities specific to the various semantic token request. + * + * @since 3.16.0 + */ + semanticTokens?: SemanticTokensClientCapabilities; + /** + * Capabilities specific to the `textDocument/linkedEditingRange` request. + * + * @since 3.16.0 + */ + linkedEditingRange?: LinkedEditingRangeClientCapabilities; + /** + * Client capabilities specific to the `textDocument/moniker` request. + * + * @since 3.16.0 + */ + moniker?: MonikerClientCapabilities; + /** + * Capabilities specific to the various type hierarchy requests. + * + * @since 3.17.0 + */ + typeHierarchy?: TypeHierarchyClientCapabilities; + /** + * Capabilities specific to the `textDocument/inlineValue` request. + * + * @since 3.17.0 + */ + inlineValue?: InlineValueClientCapabilities; + /** + * Capabilities specific to the `textDocument/inlayHint` request. + * + * @since 3.17.0 + */ + inlayHint?: InlayHintClientCapabilities; + /** + * Capabilities specific to the diagnostic pull model. + * + * @since 3.17.0 + */ + diagnostic?: DiagnosticClientCapabilities; + /** + * Client capabilities specific to inline completions. + * + * @since 3.18.0 + * @proposed + */ + inlineCompletion?: InlineCompletionClientCapabilities; +} +export interface WindowClientCapabilities { + /** + * It indicates whether the client supports server initiated + * progress using the `window/workDoneProgress/create` request. + * + * The capability also controls Whether client supports handling + * of progress notifications. If set servers are allowed to report a + * `workDoneProgress` property in the request specific server + * capabilities. + * + * @since 3.15.0 + */ + workDoneProgress?: boolean; + /** + * Capabilities specific to the showMessage request. + * + * @since 3.16.0 + */ + showMessage?: ShowMessageRequestClientCapabilities; + /** + * Capabilities specific to the showDocument request. + * + * @since 3.16.0 + */ + showDocument?: ShowDocumentClientCapabilities; +} +/** + * Client capabilities specific to regular expressions. + * + * @since 3.16.0 + */ +export interface RegularExpressionsClientCapabilities { + /** + * The engine's name. + */ + engine: string; + /** + * The engine's version. + */ + version?: string; +} +/** + * Client capabilities specific to the used markdown parser. + * + * @since 3.16.0 + */ +export interface MarkdownClientCapabilities { + /** + * The name of the parser. + */ + parser: string; + /** + * The version of the parser. + */ + version?: string; + /** + * A list of HTML tags that the client allows / supports in + * Markdown. + * + * @since 3.17.0 + */ + allowedTags?: string[]; +} +/** + * A set of predefined position encoding kinds. + * + * @since 3.17.0 + */ +export declare namespace PositionEncodingKind { + /** + * Character offsets count UTF-8 code units (e.g. bytes). + */ + const UTF8: PositionEncodingKind; + /** + * Character offsets count UTF-16 code units. + * + * This is the default and must always be supported + * by servers + */ + const UTF16: PositionEncodingKind; + /** + * Character offsets count UTF-32 code units. + * + * Implementation note: these are the same as Unicode codepoints, + * so this `PositionEncodingKind` may also be used for an + * encoding-agnostic representation of character offsets. + */ + const UTF32: PositionEncodingKind; +} +/** + * A type indicating how positions are encoded, + * specifically what column offsets mean. + * + * @since 3.17.0 + */ +export type PositionEncodingKind = string; +/** + * General client capabilities. + * + * @since 3.16.0 + */ +export interface GeneralClientCapabilities { + /** + * Client capability that signals how the client + * handles stale requests (e.g. a request + * for which the client will not process the response + * anymore since the information is outdated). + * + * @since 3.17.0 + */ + staleRequestSupport?: { + /** + * The client will actively cancel the request. + */ + cancel: boolean; + /** + * The list of requests for which the client + * will retry the request if it receives a + * response with error code `ContentModified` + */ + retryOnContentModified: string[]; + }; + /** + * Client capabilities specific to regular expressions. + * + * @since 3.16.0 + */ + regularExpressions?: RegularExpressionsClientCapabilities; + /** + * Client capabilities specific to the client's markdown parser. + * + * @since 3.16.0 + */ + markdown?: MarkdownClientCapabilities; + /** + * The position encodings supported by the client. Client and server + * have to agree on the same position encoding to ensure that offsets + * (e.g. character position in a line) are interpreted the same on both + * sides. + * + * To keep the protocol backwards compatible the following applies: if + * the value 'utf-16' is missing from the array of position encodings + * servers can assume that the client supports UTF-16. UTF-16 is + * therefore a mandatory encoding. + * + * If omitted it defaults to ['utf-16']. + * + * Implementation considerations: since the conversion from one encoding + * into another requires the content of the file / line the conversion + * is best done where the file is read which is usually on the server + * side. + * + * @since 3.17.0 + */ + positionEncodings?: PositionEncodingKind[]; +} +/** + * Capabilities specific to the notebook document support. + * + * @since 3.17.0 + */ +export interface NotebookDocumentClientCapabilities { + /** + * Capabilities specific to notebook document synchronization + * + * @since 3.17.0 + */ + synchronization: NotebookDocumentSyncClientCapabilities; +} +/** + * Defines the capabilities provided by the client. + */ +export interface ClientCapabilities { + /** + * Workspace specific client capabilities. + */ + workspace?: WorkspaceClientCapabilities; + /** + * Text document specific client capabilities. + */ + textDocument?: TextDocumentClientCapabilities; + /** + * Capabilities specific to the notebook document support. + * + * @since 3.17.0 + */ + notebookDocument?: NotebookDocumentClientCapabilities; + /** + * Window specific client capabilities. + */ + window?: WindowClientCapabilities; + /** + * General client capabilities. + * + * @since 3.16.0 + */ + general?: GeneralClientCapabilities; + /** + * Experimental client capabilities. + */ + experimental?: LSPAny; +} +/** + * Static registration options to be returned in the initialize + * request. + */ +export interface StaticRegistrationOptions { + /** + * The id used to register the request. The id can be used to deregister + * the request again. See also Registration#id. + */ + id?: string; +} +/** + * The StaticRegistrationOptions namespace provides helper functions to work with + * {@link StaticRegistrationOptions} literals. + */ +export declare namespace StaticRegistrationOptions { + function hasId(value: object): value is { + id: string; + }; +} +/** + * General text document registration options. + */ +export interface TextDocumentRegistrationOptions { + /** + * A document selector to identify the scope of the registration. If set to null + * the document selector provided on the client side will be used. + */ + documentSelector: DocumentSelector | null; +} +/** + * The TextDocumentRegistrationOptions namespace provides helper functions to work with + * {@link TextDocumentRegistrationOptions} literals. + */ +export declare namespace TextDocumentRegistrationOptions { + function is(value: any): value is TextDocumentRegistrationOptions; +} +/** + * Save options. + */ +export interface SaveOptions { + /** + * The client is supposed to include the content on save. + */ + includeText?: boolean; +} +export interface WorkDoneProgressOptions { + workDoneProgress?: boolean; +} +/** + * The WorkDoneProgressOptions namespace provides helper functions to work with + * {@link WorkDoneProgressOptions} literals. + */ +export declare namespace WorkDoneProgressOptions { + function is(value: any): value is WorkDoneProgressOptions; + function hasWorkDoneProgress(value: any): value is { + workDoneProgress: boolean; + }; +} +/** + * Defines the capabilities provided by a language + * server. + */ +export interface ServerCapabilities { + /** + * The position encoding the server picked from the encodings offered + * by the client via the client capability `general.positionEncodings`. + * + * If the client didn't provide any position encodings the only valid + * value that a server can return is 'utf-16'. + * + * If omitted it defaults to 'utf-16'. + * + * @since 3.17.0 + */ + positionEncoding?: PositionEncodingKind; + /** + * Defines how text documents are synced. Is either a detailed structure + * defining each notification or for backwards compatibility the + * TextDocumentSyncKind number. + */ + textDocumentSync?: TextDocumentSyncOptions | TextDocumentSyncKind; + /** + * Defines how notebook documents are synced. + * + * @since 3.17.0 + */ + notebookDocumentSync?: NotebookDocumentSyncOptions | NotebookDocumentSyncRegistrationOptions; + /** + * The server provides completion support. + */ + completionProvider?: CompletionOptions; + /** + * The server provides hover support. + */ + hoverProvider?: boolean | HoverOptions; + /** + * The server provides signature help support. + */ + signatureHelpProvider?: SignatureHelpOptions; + /** + * The server provides Goto Declaration support. + */ + declarationProvider?: boolean | DeclarationOptions | DeclarationRegistrationOptions; + /** + * The server provides goto definition support. + */ + definitionProvider?: boolean | DefinitionOptions; + /** + * The server provides Goto Type Definition support. + */ + typeDefinitionProvider?: boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions; + /** + * The server provides Goto Implementation support. + */ + implementationProvider?: boolean | ImplementationOptions | ImplementationRegistrationOptions; + /** + * The server provides find references support. + */ + referencesProvider?: boolean | ReferenceOptions; + /** + * The server provides document highlight support. + */ + documentHighlightProvider?: boolean | DocumentHighlightOptions; + /** + * The server provides document symbol support. + */ + documentSymbolProvider?: boolean | DocumentSymbolOptions; + /** + * The server provides code actions. CodeActionOptions may only be + * specified if the client states that it supports + * `codeActionLiteralSupport` in its initial `initialize` request. + */ + codeActionProvider?: boolean | CodeActionOptions; + /** + * The server provides code lens. + */ + codeLensProvider?: CodeLensOptions; + /** + * The server provides document link support. + */ + documentLinkProvider?: DocumentLinkOptions; + /** + * The server provides color provider support. + */ + colorProvider?: boolean | DocumentColorOptions | DocumentColorRegistrationOptions; + /** + * The server provides workspace symbol support. + */ + workspaceSymbolProvider?: boolean | WorkspaceSymbolOptions; + /** + * The server provides document formatting. + */ + documentFormattingProvider?: boolean | DocumentFormattingOptions; + /** + * The server provides document range formatting. + */ + documentRangeFormattingProvider?: boolean | DocumentRangeFormattingOptions; + /** + * The server provides document formatting on typing. + */ + documentOnTypeFormattingProvider?: DocumentOnTypeFormattingOptions; + /** + * The server provides rename support. RenameOptions may only be + * specified if the client states that it supports + * `prepareSupport` in its initial `initialize` request. + */ + renameProvider?: boolean | RenameOptions; + /** + * The server provides folding provider support. + */ + foldingRangeProvider?: boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions; + /** + * The server provides selection range support. + */ + selectionRangeProvider?: boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions; + /** + * The server provides execute command support. + */ + executeCommandProvider?: ExecuteCommandOptions; + /** + * The server provides call hierarchy support. + * + * @since 3.16.0 + */ + callHierarchyProvider?: boolean | CallHierarchyOptions | CallHierarchyRegistrationOptions; + /** + * The server provides linked editing range support. + * + * @since 3.16.0 + */ + linkedEditingRangeProvider?: boolean | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions; + /** + * The server provides semantic tokens support. + * + * @since 3.16.0 + */ + semanticTokensProvider?: SemanticTokensOptions | SemanticTokensRegistrationOptions; + /** + * The server provides moniker support. + * + * @since 3.16.0 + */ + monikerProvider?: boolean | MonikerOptions | MonikerRegistrationOptions; + /** + * The server provides type hierarchy support. + * + * @since 3.17.0 + */ + typeHierarchyProvider?: boolean | TypeHierarchyOptions | TypeHierarchyRegistrationOptions; + /** + * The server provides inline values. + * + * @since 3.17.0 + */ + inlineValueProvider?: boolean | InlineValueOptions | InlineValueRegistrationOptions; + /** + * The server provides inlay hints. + * + * @since 3.17.0 + */ + inlayHintProvider?: boolean | InlayHintOptions | InlayHintRegistrationOptions; + /** + * The server has support for pull model diagnostics. + * + * @since 3.17.0 + */ + diagnosticProvider?: DiagnosticOptions | DiagnosticRegistrationOptions; + /** + * Inline completion options used during static registration. + * + * @since 3.18.0 + * @proposed + */ + inlineCompletionProvider?: boolean | InlineCompletionOptions; + /** + * Workspace specific server capabilities. + */ + workspace?: { + /** + * The server supports workspace folder. + * + * @since 3.6.0 + */ + workspaceFolders?: WorkspaceFoldersServerCapabilities; + /** + * The server is interested in notifications/requests for operations on files. + * + * @since 3.16.0 + */ + fileOperations?: FileOperationOptions; + }; + /** + * Experimental server capabilities. + */ + experimental?: T; +} +/** + * The initialize request is sent from the client to the server. + * It is sent once as the request after starting up the server. + * The requests parameter is of type {@link InitializeParams} + * the response if of type {@link InitializeResult} of a Thenable that + * resolves to such. + */ +export declare namespace InitializeRequest { + const method: 'initialize'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType, never, InitializeError, void>; +} +/** + * The initialize parameters + */ +export interface _InitializeParams extends WorkDoneProgressParams { + /** + * The process Id of the parent process that started + * the server. + * + * Is `null` if the process has not been started by another process. + * If the parent process is not alive then the server should exit. + */ + processId: integer | null; + /** + * Information about the client + * + * @since 3.15.0 + */ + clientInfo?: { + /** + * The name of the client as defined by the client. + */ + name: string; + /** + * The client's version as defined by the client. + */ + version?: string; + }; + /** + * The locale the client is currently showing the user interface + * in. This must not necessarily be the locale of the operating + * system. + * + * Uses IETF language tags as the value's syntax + * (See https://en.wikipedia.org/wiki/IETF_language_tag) + * + * @since 3.16.0 + */ + locale?: string; + /** + * The rootPath of the workspace. Is null + * if no folder is open. + * + * @deprecated in favour of rootUri. + */ + rootPath?: string | null; + /** + * The rootUri of the workspace. Is null if no + * folder is open. If both `rootPath` and `rootUri` are set + * `rootUri` wins. + * + * @deprecated in favour of workspaceFolders. + */ + rootUri: DocumentUri | null; + /** + * The capabilities provided by the client (editor or tool) + */ + capabilities: ClientCapabilities; + /** + * User provided initialization options. + */ + initializationOptions?: LSPAny; + /** + * The initial trace setting. If omitted trace is disabled ('off'). + */ + trace?: TraceValues; +} +export type InitializeParams = _InitializeParams & WorkspaceFoldersInitializeParams; +/** + * The result returned from an initialize request. + */ +export interface InitializeResult { + /** + * The capabilities the language server provides. + */ + capabilities: ServerCapabilities; + /** + * Information about the server. + * + * @since 3.15.0 + */ + serverInfo?: { + /** + * The name of the server as defined by the server. + */ + name: string; + /** + * The server's version as defined by the server. + */ + version?: string; + }; + /** + * Custom initialization results. + */ + [custom: string]: LSPAny | ServerCapabilities | undefined; /** undefined is needed since serverInfo is optional */ +} +/** + * Known error codes for an `InitializeErrorCodes`; + */ +export declare namespace InitializeErrorCodes { + /** + * If the protocol version provided by the client can't be handled by the server. + * + * @deprecated This initialize error got replaced by client capabilities. There is + * no version handshake in version 3.0x + */ + const unknownProtocolVersion: 1; +} +export type InitializeErrorCodes = 1; +/** + * The data type of the ResponseError if the + * initialize request fails. + */ +export interface InitializeError { + /** + * Indicates whether the client execute the following retry logic: + * (1) show the message provided by the ResponseError to the user + * (2) user selects retry or cancel + * (3) if user selected retry the initialize method is sent again. + */ + retry: boolean; +} +export interface InitializedParams { +} +/** + * The initialized notification is sent from the client to the + * server after the client is fully initialized and the server + * is allowed to send requests from the server to the client. + */ +export declare namespace InitializedNotification { + const method: 'initialized'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * A shutdown request is sent from the client to the server. + * It is sent once when the client decides to shutdown the + * server. The only notification that is sent after a shutdown request + * is the exit event. + */ +export declare namespace ShutdownRequest { + const method: 'shutdown'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType0; +} +/** + * The exit event is sent from the client to the server to + * ask the server to exit its process. + */ +export declare namespace ExitNotification { + const method: 'exit'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType0; +} +export interface DidChangeConfigurationClientCapabilities { + /** + * Did change configuration notification supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * The configuration change notification is sent from the client to the server + * when the client's configuration has changed. The notification contains + * the changed configuration as defined by the language client. + */ +export declare namespace DidChangeConfigurationNotification { + const method: 'workspace/didChangeConfiguration'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +export interface DidChangeConfigurationRegistrationOptions { + section?: string | string[]; +} +/** + * The parameters of a change configuration notification. + */ +export interface DidChangeConfigurationParams { + /** + * The actual changed settings + */ + settings: LSPAny; +} +/** + * The message type + */ +export declare namespace MessageType { + /** + * An error message. + */ + const Error = 1; + /** + * A warning message. + */ + const Warning = 2; + /** + * An information message. + */ + const Info = 3; + /** + * A log message. + */ + const Log = 4; + /** + * A debug message. + * + * @since 3.18.0 + */ + const Debug = 5; +} +export type MessageType = 1 | 2 | 3 | 4 | 5; +/** + * The parameters of a notification message. + */ +export interface ShowMessageParams { + /** + * The message type. See {@link MessageType} + */ + type: MessageType; + /** + * The actual message. + */ + message: string; +} +/** + * The show message notification is sent from a server to a client to ask + * the client to display a particular message in the user interface. + */ +export declare namespace ShowMessageNotification { + const method: 'window/showMessage'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * Show message request client capabilities + */ +export interface ShowMessageRequestClientCapabilities { + /** + * Capabilities specific to the `MessageActionItem` type. + */ + messageActionItem?: { + /** + * Whether the client supports additional attributes which + * are preserved and send back to the server in the + * request's response. + */ + additionalPropertiesSupport?: boolean; + }; +} +export interface MessageActionItem { + /** + * A short title like 'Retry', 'Open Log' etc. + */ + title: string; + /** + * Additional attributes that the client preserves and + * sends back to the server. This depends on the client + * capability window.messageActionItem.additionalPropertiesSupport + */ + [key: string]: string | boolean | integer | object; +} +export interface ShowMessageRequestParams { + /** + * The message type. See {@link MessageType} + */ + type: MessageType; + /** + * The actual message. + */ + message: string; + /** + * The message action items to present. + */ + actions?: MessageActionItem[]; +} +/** + * The show message request is sent from the server to the client to show a message + * and a set of options actions to the user. + */ +export declare namespace ShowMessageRequest { + const method: 'window/showMessageRequest'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * The log message notification is sent from the server to the client to ask + * the client to log a particular message. + */ +export declare namespace LogMessageNotification { + const method: 'window/logMessage'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * The log message parameters. + */ +export interface LogMessageParams { + /** + * The message type. See {@link MessageType} + */ + type: MessageType; + /** + * The actual message. + */ + message: string; +} +/** + * The telemetry event notification is sent from the server to the client to ask + * the client to log telemetry data. + */ +export declare namespace TelemetryEventNotification { + const method: 'telemetry/event'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +export interface TextDocumentSyncClientCapabilities { + /** + * Whether text document synchronization supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * The client supports sending will save notifications. + */ + willSave?: boolean; + /** + * The client supports sending a will save request and + * waits for a response providing text edits which will + * be applied to the document before it is saved. + */ + willSaveWaitUntil?: boolean; + /** + * The client supports did save notifications. + */ + didSave?: boolean; +} +/** + * Defines how the host (editor) should sync + * document changes to the language server. + */ +export declare namespace TextDocumentSyncKind { + /** + * Documents should not be synced at all. + */ + const None = 0; + /** + * Documents are synced by always sending the full content + * of the document. + */ + const Full = 1; + /** + * Documents are synced by sending the full content on open. + * After that only incremental updates to the document are + * send. + */ + const Incremental = 2; +} +export type TextDocumentSyncKind = 0 | 1 | 2; +export interface TextDocumentSyncOptions { + /** + * Open and close notifications are sent to the server. If omitted open close notification should not + * be sent. + */ + openClose?: boolean; + /** + * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full + * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None. + */ + change?: TextDocumentSyncKind; + /** + * If present will save notifications are sent to the server. If omitted the notification should not be + * sent. + */ + willSave?: boolean; + /** + * If present will save wait until requests are sent to the server. If omitted the request should not be + * sent. + */ + willSaveWaitUntil?: boolean; + /** + * If present save notifications are sent to the server. If omitted the notification should not be + * sent. + */ + save?: boolean | SaveOptions; +} +/** + * The parameters sent in an open text document notification + */ +export interface DidOpenTextDocumentParams { + /** + * The document that was opened. + */ + textDocument: TextDocumentItem; +} +/** + * The document open notification is sent from the client to the server to signal + * newly opened text documents. The document's truth is now managed by the client + * and the server must not try to read the document's truth using the document's + * uri. Open in this sense means it is managed by the client. It doesn't necessarily + * mean that its content is presented in an editor. An open notification must not + * be sent more than once without a corresponding close notification send before. + * This means open and close notification must be balanced and the max open count + * is one. + */ +export declare namespace DidOpenTextDocumentNotification { + const method: 'textDocument/didOpen'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * An event describing a change to a text document. If only a text is provided + * it is considered to be the full content of the document. + */ +export type TextDocumentContentChangeEvent = { + /** + * The range of the document that changed. + */ + range: Range; + /** + * The optional length of the range that got replaced. + * + * @deprecated use range instead. + */ + rangeLength?: uinteger; + /** + * The new text for the provided range. + */ + text: string; +} | { + /** + * The new text of the whole document. + */ + text: string; +}; +export declare namespace TextDocumentContentChangeEvent { + /** + * Checks whether the information describes a delta event. + */ + function isIncremental(event: TextDocumentContentChangeEvent): event is { + range: Range; + rangeLength?: uinteger; + text: string; + }; + /** + * Checks whether the information describes a full replacement event. + */ + function isFull(event: TextDocumentContentChangeEvent): event is { + text: string; + }; +} +/** + * The change text document notification's parameters. + */ +export interface DidChangeTextDocumentParams { + /** + * The document that did change. The version number points + * to the version after all provided content changes have + * been applied. + */ + textDocument: VersionedTextDocumentIdentifier; + /** + * The actual content changes. The content changes describe single state changes + * to the document. So if there are two content changes c1 (at array index 0) and + * c2 (at array index 1) for a document in state S then c1 moves the document from + * S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed + * on the state S'. + * + * To mirror the content of a document using change events use the following approach: + * - start with the same initial content + * - apply the 'textDocument/didChange' notifications in the order you receive them. + * - apply the `TextDocumentContentChangeEvent`s in a single notification in the order + * you receive them. + */ + contentChanges: TextDocumentContentChangeEvent[]; +} +/** + * Describe options to be used when registered for text document change events. + */ +export interface TextDocumentChangeRegistrationOptions extends TextDocumentRegistrationOptions { + /** + * How documents are synced to the server. + */ + syncKind: TextDocumentSyncKind; +} +/** + * The document change notification is sent from the client to the server to signal + * changes to a text document. + */ +export declare namespace DidChangeTextDocumentNotification { + const method: 'textDocument/didChange'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * The parameters sent in a close text document notification + */ +export interface DidCloseTextDocumentParams { + /** + * The document that was closed. + */ + textDocument: TextDocumentIdentifier; +} +/** + * The document close notification is sent from the client to the server when + * the document got closed in the client. The document's truth now exists where + * the document's uri points to (e.g. if the document's uri is a file uri the + * truth now exists on disk). As with the open notification the close notification + * is about managing the document's content. Receiving a close notification + * doesn't mean that the document was open in an editor before. A close + * notification requires a previous open notification to be sent. + */ +export declare namespace DidCloseTextDocumentNotification { + const method: 'textDocument/didClose'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * The parameters sent in a save text document notification + */ +export interface DidSaveTextDocumentParams { + /** + * The document that was saved. + */ + textDocument: TextDocumentIdentifier; + /** + * Optional the content when saved. Depends on the includeText value + * when the save notification was requested. + */ + text?: string; +} +/** + * Save registration options. + */ +export interface TextDocumentSaveRegistrationOptions extends TextDocumentRegistrationOptions, SaveOptions { +} +/** + * The document save notification is sent from the client to the server when + * the document got saved in the client. + */ +export declare namespace DidSaveTextDocumentNotification { + const method: 'textDocument/didSave'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * Represents reasons why a text document is saved. + */ +export declare namespace TextDocumentSaveReason { + /** + * Manually triggered, e.g. by the user pressing save, by starting debugging, + * or by an API call. + */ + const Manual: 1; + /** + * Automatic after a delay. + */ + const AfterDelay: 2; + /** + * When the editor lost focus. + */ + const FocusOut: 3; +} +export type TextDocumentSaveReason = 1 | 2 | 3; +/** + * The parameters sent in a will save text document notification. + */ +export interface WillSaveTextDocumentParams { + /** + * The document that will be saved. + */ + textDocument: TextDocumentIdentifier; + /** + * The 'TextDocumentSaveReason'. + */ + reason: TextDocumentSaveReason; +} +/** + * A document will save notification is sent from the client to the server before + * the document is actually saved. + */ +export declare namespace WillSaveTextDocumentNotification { + const method: 'textDocument/willSave'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * A document will save request is sent from the client to the server before + * the document is actually saved. The request can return an array of TextEdits + * which will be applied to the text document before it is saved. Please note that + * clients might drop results if computing the text edits took too long or if a + * server constantly fails on this request. This is done to keep the save fast and + * reliable. + */ +export declare namespace WillSaveTextDocumentWaitUntilRequest { + const method: 'textDocument/willSaveWaitUntil'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +export interface DidChangeWatchedFilesClientCapabilities { + /** + * Did change watched files notification supports dynamic registration. Please note + * that the current protocol doesn't support static configuration for file changes + * from the server side. + */ + dynamicRegistration?: boolean; + /** + * Whether the client has support for {@link RelativePattern relative pattern} + * or not. + * + * @since 3.17.0 + */ + relativePatternSupport?: boolean; +} +/** + * The watched files notification is sent from the client to the server when + * the client detects changes to file watched by the language client. + */ +export declare namespace DidChangeWatchedFilesNotification { + const method: 'workspace/didChangeWatchedFiles'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * The watched files change notification's parameters. + */ +export interface DidChangeWatchedFilesParams { + /** + * The actual file events. + */ + changes: FileEvent[]; +} +/** + * The file event type + */ +export declare namespace FileChangeType { + /** + * The file got created. + */ + const Created = 1; + /** + * The file got changed. + */ + const Changed = 2; + /** + * The file got deleted. + */ + const Deleted = 3; +} +export type FileChangeType = 1 | 2 | 3; +/** + * An event describing a file change. + */ +export interface FileEvent { + /** + * The file's uri. + */ + uri: DocumentUri; + /** + * The change type. + */ + type: FileChangeType; +} +/** + * Describe options to be used when registered for text document change events. + */ +export interface DidChangeWatchedFilesRegistrationOptions { + /** + * The watchers to register. + */ + watchers: FileSystemWatcher[]; +} +/** + * The glob pattern to watch relative to the base path. Glob patterns can have the following syntax: + * - `*` to match one or more characters in a path segment + * - `?` to match on one character in a path segment + * - `**` to match any number of path segments, including none + * - `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files) + * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`) + * + * @since 3.17.0 + */ +export type Pattern = string; +/** + * A relative pattern is a helper to construct glob patterns that are matched + * relatively to a base URI. The common value for a `baseUri` is a workspace + * folder root, but it can be another absolute URI as well. + * + * @since 3.17.0 + */ +export interface RelativePattern { + /** + * A workspace folder or a base URI to which this pattern will be matched + * against relatively. + */ + baseUri: WorkspaceFolder | URI; + /** + * The actual glob pattern; + */ + pattern: Pattern; +} +export declare namespace RelativePattern { + function is(value: any): value is RelativePattern; +} +/** + * The glob pattern. Either a string pattern or a relative pattern. + * + * @since 3.17.0 + */ +export type GlobPattern = Pattern | RelativePattern; +export interface FileSystemWatcher { + /** + * The glob pattern to watch. See {@link GlobPattern glob pattern} for more detail. + * + * @since 3.17.0 support for relative patterns. + */ + globPattern: GlobPattern; + /** + * The kind of events of interest. If omitted it defaults + * to WatchKind.Create | WatchKind.Change | WatchKind.Delete + * which is 7. + */ + kind?: WatchKind; +} +export declare namespace WatchKind { + /** + * Interested in create events. + */ + const Create: 1; + /** + * Interested in change events + */ + const Change: 2; + /** + * Interested in delete events + */ + const Delete: 4; +} +export type WatchKind = uinteger; +/** + * The publish diagnostic client capabilities. + */ +export interface PublishDiagnosticsClientCapabilities { + /** + * Whether the clients accepts diagnostics with related information. + */ + relatedInformation?: boolean; + /** + * Client supports the tag property to provide meta data about a diagnostic. + * Clients supporting tags have to handle unknown tags gracefully. + * + * @since 3.15.0 + */ + tagSupport?: { + /** + * The tags supported by the client. + */ + valueSet: DiagnosticTag[]; + }; + /** + * Whether the client interprets the version property of the + * `textDocument/publishDiagnostics` notification's parameter. + * + * @since 3.15.0 + */ + versionSupport?: boolean; + /** + * Client supports a codeDescription property + * + * @since 3.16.0 + */ + codeDescriptionSupport?: boolean; + /** + * Whether code action supports the `data` property which is + * preserved between a `textDocument/publishDiagnostics` and + * `textDocument/codeAction` request. + * + * @since 3.16.0 + */ + dataSupport?: boolean; +} +/** + * The publish diagnostic notification's parameters. + */ +export interface PublishDiagnosticsParams { + /** + * The URI for which diagnostic information is reported. + */ + uri: DocumentUri; + /** + * Optional the version number of the document the diagnostics are published for. + * + * @since 3.15.0 + */ + version?: integer; + /** + * An array of diagnostic information items. + */ + diagnostics: Diagnostic[]; +} +/** + * Diagnostics notification are sent from the server to the client to signal + * results of validation runs. + */ +export declare namespace PublishDiagnosticsNotification { + const method: 'textDocument/publishDiagnostics'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; +} +/** + * Completion client capabilities + */ +export interface CompletionClientCapabilities { + /** + * Whether completion supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * The client supports the following `CompletionItem` specific + * capabilities. + */ + completionItem?: { + /** + * Client supports snippets as insert text. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Placeholders with equal identifiers are linked, + * that is typing in one will update others too. + */ + snippetSupport?: boolean; + /** + * Client supports commit characters on a completion item. + */ + commitCharactersSupport?: boolean; + /** + * Client supports the following content formats for the documentation + * property. The order describes the preferred format of the client. + */ + documentationFormat?: MarkupKind[]; + /** + * Client supports the deprecated property on a completion item. + */ + deprecatedSupport?: boolean; + /** + * Client supports the preselect property on a completion item. + */ + preselectSupport?: boolean; + /** + * Client supports the tag property on a completion item. Clients supporting + * tags have to handle unknown tags gracefully. Clients especially need to + * preserve unknown tags when sending a completion item back to the server in + * a resolve call. + * + * @since 3.15.0 + */ + tagSupport?: { + /** + * The tags supported by the client. + */ + valueSet: CompletionItemTag[]; + }; + /** + * Client support insert replace edit to control different behavior if a + * completion item is inserted in the text or should replace text. + * + * @since 3.16.0 + */ + insertReplaceSupport?: boolean; + /** + * Indicates which properties a client can resolve lazily on a completion + * item. Before version 3.16.0 only the predefined properties `documentation` + * and `details` could be resolved lazily. + * + * @since 3.16.0 + */ + resolveSupport?: { + /** + * The properties that a client can resolve lazily. + */ + properties: string[]; + }; + /** + * The client supports the `insertTextMode` property on + * a completion item to override the whitespace handling mode + * as defined by the client (see `insertTextMode`). + * + * @since 3.16.0 + */ + insertTextModeSupport?: { + valueSet: InsertTextMode[]; + }; + /** + * The client has support for completion item label + * details (see also `CompletionItemLabelDetails`). + * + * @since 3.17.0 + */ + labelDetailsSupport?: boolean; + }; + completionItemKind?: { + /** + * The completion item kind values the client supports. When this + * property exists the client also guarantees that it will + * handle values outside its set gracefully and falls back + * to a default value when unknown. + * + * If this property is not present the client only supports + * the completion items kinds from `Text` to `Reference` as defined in + * the initial version of the protocol. + */ + valueSet?: CompletionItemKind[]; + }; + /** + * Defines how the client handles whitespace and indentation + * when accepting a completion item that uses multi line + * text in either `insertText` or `textEdit`. + * + * @since 3.17.0 + */ + insertTextMode?: InsertTextMode; + /** + * The client supports to send additional context information for a + * `textDocument/completion` request. + */ + contextSupport?: boolean; + /** + * The client supports the following `CompletionList` specific + * capabilities. + * + * @since 3.17.0 + */ + completionList?: { + /** + * The client supports the following itemDefaults on + * a completion list. + * + * The value lists the supported property names of the + * `CompletionList.itemDefaults` object. If omitted + * no properties are supported. + * + * @since 3.17.0 + */ + itemDefaults?: string[]; + }; +} +/** + * How a completion was triggered + */ +export declare namespace CompletionTriggerKind { + /** + * Completion was triggered by typing an identifier (24x7 code + * complete), manual invocation (e.g Ctrl+Space) or via API. + */ + const Invoked: 1; + /** + * Completion was triggered by a trigger character specified by + * the `triggerCharacters` properties of the `CompletionRegistrationOptions`. + */ + const TriggerCharacter: 2; + /** + * Completion was re-triggered as current completion list is incomplete + */ + const TriggerForIncompleteCompletions: 3; +} +export type CompletionTriggerKind = 1 | 2 | 3; +/** + * Contains additional information about the context in which a completion request is triggered. + */ +export interface CompletionContext { + /** + * How the completion was triggered. + */ + triggerKind: CompletionTriggerKind; + /** + * The trigger character (a single character) that has trigger code complete. + * Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter` + */ + triggerCharacter?: string; +} +/** + * Completion parameters + */ +export interface CompletionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { + /** + * The completion context. This is only available it the client specifies + * to send this using the client capability `textDocument.completion.contextSupport === true` + */ + context?: CompletionContext; +} +/** + * Completion options. + */ +export interface CompletionOptions extends WorkDoneProgressOptions { + /** + * Most tools trigger completion request automatically without explicitly requesting + * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user + * starts to type an identifier. For example if the user types `c` in a JavaScript file + * code complete will automatically pop up present `console` besides others as a + * completion item. Characters that make up identifiers don't need to be listed here. + * + * If code complete should automatically be trigger on characters not being valid inside + * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`. + */ + triggerCharacters?: string[]; + /** + * The list of all possible characters that commit a completion. This field can be used + * if clients don't support individual commit characters per completion item. See + * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport` + * + * If a server provides both `allCommitCharacters` and commit characters on an individual + * completion item the ones on the completion item win. + * + * @since 3.2.0 + */ + allCommitCharacters?: string[]; + /** + * The server provides support to resolve additional + * information for a completion item. + */ + resolveProvider?: boolean; + /** + * The server supports the following `CompletionItem` specific + * capabilities. + * + * @since 3.17.0 + */ + completionItem?: { + /** + * The server has support for completion item label + * details (see also `CompletionItemLabelDetails`) when + * receiving a completion item in a resolve call. + * + * @since 3.17.0 + */ + labelDetailsSupport?: boolean; + }; +} +/** + * Registration options for a {@link CompletionRequest}. + */ +export interface CompletionRegistrationOptions extends TextDocumentRegistrationOptions, CompletionOptions { +} +/** + * Request to request completion at a given text document position. The request's + * parameter is of type {@link TextDocumentPosition} the response + * is of type {@link CompletionItem CompletionItem[]} or {@link CompletionList} + * or a Thenable that resolves to such. + * + * The request can delay the computation of the {@link CompletionItem.detail `detail`} + * and {@link CompletionItem.documentation `documentation`} properties to the `completionItem/resolve` + * request. However, properties that are needed for the initial sorting and filtering, like `sortText`, + * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve. + */ +export declare namespace CompletionRequest { + const method: 'textDocument/completion'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Request to resolve additional information for a given completion item.The request's + * parameter is of type {@link CompletionItem} the response + * is of type {@link CompletionItem} or a Thenable that resolves to such. + */ +export declare namespace CompletionResolveRequest { + const method: 'completionItem/resolve'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +export interface HoverClientCapabilities { + /** + * Whether hover supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Client supports the following content formats for the content + * property. The order describes the preferred format of the client. + */ + contentFormat?: MarkupKind[]; +} +/** + * Hover options. + */ +export interface HoverOptions extends WorkDoneProgressOptions { +} +/** + * Parameters for a {@link HoverRequest}. + */ +export interface HoverParams extends TextDocumentPositionParams, WorkDoneProgressParams { +} +/** + * Registration options for a {@link HoverRequest}. + */ +export interface HoverRegistrationOptions extends TextDocumentRegistrationOptions, HoverOptions { +} +/** + * Request to request hover information at a given text document position. The request's + * parameter is of type {@link TextDocumentPosition} the response is of + * type {@link Hover} or a Thenable that resolves to such. + */ +export declare namespace HoverRequest { + const method: 'textDocument/hover'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Client Capabilities for a {@link SignatureHelpRequest}. + */ +export interface SignatureHelpClientCapabilities { + /** + * Whether signature help supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * The client supports the following `SignatureInformation` + * specific properties. + */ + signatureInformation?: { + /** + * Client supports the following content formats for the documentation + * property. The order describes the preferred format of the client. + */ + documentationFormat?: MarkupKind[]; + /** + * Client capabilities specific to parameter information. + */ + parameterInformation?: { + /** + * The client supports processing label offsets instead of a + * simple label string. + * + * @since 3.14.0 + */ + labelOffsetSupport?: boolean; + }; + /** + * The client supports the `activeParameter` property on `SignatureInformation` + * literal. + * + * @since 3.16.0 + */ + activeParameterSupport?: boolean; + }; + /** + * The client supports to send additional context information for a + * `textDocument/signatureHelp` request. A client that opts into + * contextSupport will also support the `retriggerCharacters` on + * `SignatureHelpOptions`. + * + * @since 3.15.0 + */ + contextSupport?: boolean; +} +/** + * Server Capabilities for a {@link SignatureHelpRequest}. + */ +export interface SignatureHelpOptions extends WorkDoneProgressOptions { + /** + * List of characters that trigger signature help automatically. + */ + triggerCharacters?: string[]; + /** + * List of characters that re-trigger signature help. + * + * These trigger characters are only active when signature help is already showing. All trigger characters + * are also counted as re-trigger characters. + * + * @since 3.15.0 + */ + retriggerCharacters?: string[]; +} +/** + * How a signature help was triggered. + * + * @since 3.15.0 + */ +export declare namespace SignatureHelpTriggerKind { + /** + * Signature help was invoked manually by the user or by a command. + */ + const Invoked: 1; + /** + * Signature help was triggered by a trigger character. + */ + const TriggerCharacter: 2; + /** + * Signature help was triggered by the cursor moving or by the document content changing. + */ + const ContentChange: 3; +} +export type SignatureHelpTriggerKind = 1 | 2 | 3; +/** + * Additional information about the context in which a signature help request was triggered. + * + * @since 3.15.0 + */ +export interface SignatureHelpContext { + /** + * Action that caused signature help to be triggered. + */ + triggerKind: SignatureHelpTriggerKind; + /** + * Character that caused signature help to be triggered. + * + * This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter` + */ + triggerCharacter?: string; + /** + * `true` if signature help was already showing when it was triggered. + * + * Retriggers occurs when the signature help is already active and can be caused by actions such as + * typing a trigger character, a cursor move, or document content changes. + */ + isRetrigger: boolean; + /** + * The currently active `SignatureHelp`. + * + * The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on + * the user navigating through available signatures. + */ + activeSignatureHelp?: SignatureHelp; +} +/** + * Parameters for a {@link SignatureHelpRequest}. + */ +export interface SignatureHelpParams extends TextDocumentPositionParams, WorkDoneProgressParams { + /** + * The signature help context. This is only available if the client specifies + * to send this using the client capability `textDocument.signatureHelp.contextSupport === true` + * + * @since 3.15.0 + */ + context?: SignatureHelpContext; +} +/** + * Registration options for a {@link SignatureHelpRequest}. + */ +export interface SignatureHelpRegistrationOptions extends TextDocumentRegistrationOptions, SignatureHelpOptions { +} +export declare namespace SignatureHelpRequest { + const method: 'textDocument/signatureHelp'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Client Capabilities for a {@link DefinitionRequest}. + */ +export interface DefinitionClientCapabilities { + /** + * Whether definition supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * The client supports additional metadata in the form of definition links. + * + * @since 3.14.0 + */ + linkSupport?: boolean; +} +/** + * Server Capabilities for a {@link DefinitionRequest}. + */ +export interface DefinitionOptions extends WorkDoneProgressOptions { +} +/** + * Parameters for a {@link DefinitionRequest}. + */ +export interface DefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * Registration options for a {@link DefinitionRequest}. + */ +export interface DefinitionRegistrationOptions extends TextDocumentRegistrationOptions, DefinitionOptions { +} +/** + * A request to resolve the definition location of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPosition} + * the response is of either type {@link Definition} or a typed array of + * {@link DefinitionLink} or a Thenable that resolves to such. + */ +export declare namespace DefinitionRequest { + const method: 'textDocument/definition'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Client Capabilities for a {@link ReferencesRequest}. + */ +export interface ReferenceClientCapabilities { + /** + * Whether references supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * Parameters for a {@link ReferencesRequest}. + */ +export interface ReferenceParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { + context: ReferenceContext; +} +/** + * Reference options. + */ +export interface ReferenceOptions extends WorkDoneProgressOptions { +} +/** + * Registration options for a {@link ReferencesRequest}. + */ +export interface ReferenceRegistrationOptions extends TextDocumentRegistrationOptions, ReferenceOptions { +} +/** + * A request to resolve project-wide references for the symbol denoted + * by the given text document position. The request's parameter is of + * type {@link ReferenceParams} the response is of type + * {@link Location Location[]} or a Thenable that resolves to such. + */ +export declare namespace ReferencesRequest { + const method: 'textDocument/references'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Client Capabilities for a {@link DocumentHighlightRequest}. + */ +export interface DocumentHighlightClientCapabilities { + /** + * Whether document highlight supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * Parameters for a {@link DocumentHighlightRequest}. + */ +export interface DocumentHighlightParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * Provider options for a {@link DocumentHighlightRequest}. + */ +export interface DocumentHighlightOptions extends WorkDoneProgressOptions { +} +/** + * Registration options for a {@link DocumentHighlightRequest}. + */ +export interface DocumentHighlightRegistrationOptions extends TextDocumentRegistrationOptions, DocumentHighlightOptions { +} +/** + * Request to resolve a {@link DocumentHighlight} for a given + * text document position. The request's parameter is of type {@link TextDocumentPosition} + * the request response is an array of type {@link DocumentHighlight} + * or a Thenable that resolves to such. + */ +export declare namespace DocumentHighlightRequest { + const method: 'textDocument/documentHighlight'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Client Capabilities for a {@link DocumentSymbolRequest}. + */ +export interface DocumentSymbolClientCapabilities { + /** + * Whether document symbol supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Specific capabilities for the `SymbolKind` in the + * `textDocument/documentSymbol` request. + */ + symbolKind?: { + /** + * The symbol kind values the client supports. When this + * property exists the client also guarantees that it will + * handle values outside its set gracefully and falls back + * to a default value when unknown. + * + * If this property is not present the client only supports + * the symbol kinds from `File` to `Array` as defined in + * the initial version of the protocol. + */ + valueSet?: SymbolKind[]; + }; + /** + * The client supports hierarchical document symbols. + */ + hierarchicalDocumentSymbolSupport?: boolean; + /** + * The client supports tags on `SymbolInformation`. Tags are supported on + * `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. + * Clients supporting tags have to handle unknown tags gracefully. + * + * @since 3.16.0 + */ + tagSupport?: { + /** + * The tags supported by the client. + */ + valueSet: SymbolTag[]; + }; + /** + * The client supports an additional label presented in the UI when + * registering a document symbol provider. + * + * @since 3.16.0 + */ + labelSupport?: boolean; +} +/** + * Parameters for a {@link DocumentSymbolRequest}. + */ +export interface DocumentSymbolParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; +} +/** + * Provider options for a {@link DocumentSymbolRequest}. + */ +export interface DocumentSymbolOptions extends WorkDoneProgressOptions { + /** + * A human-readable string that is shown when multiple outlines trees + * are shown for the same document. + * + * @since 3.16.0 + */ + label?: string; +} +/** + * Registration options for a {@link DocumentSymbolRequest}. + */ +export interface DocumentSymbolRegistrationOptions extends TextDocumentRegistrationOptions, DocumentSymbolOptions { +} +/** + * A request to list all symbols found in a given text document. The request's + * parameter is of type {@link TextDocumentIdentifier} the + * response is of type {@link SymbolInformation SymbolInformation[]} or a Thenable + * that resolves to such. + */ +export declare namespace DocumentSymbolRequest { + const method: 'textDocument/documentSymbol'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * The Client Capabilities of a {@link CodeActionRequest}. + */ +export interface CodeActionClientCapabilities { + /** + * Whether code action supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * The client support code action literals of type `CodeAction` as a valid + * response of the `textDocument/codeAction` request. If the property is not + * set the request can only return `Command` literals. + * + * @since 3.8.0 + */ + codeActionLiteralSupport?: { + /** + * The code action kind is support with the following value + * set. + */ + codeActionKind: { + /** + * The code action kind values the client supports. When this + * property exists the client also guarantees that it will + * handle values outside its set gracefully and falls back + * to a default value when unknown. + */ + valueSet: CodeActionKind[]; + }; + }; + /** + * Whether code action supports the `isPreferred` property. + * + * @since 3.15.0 + */ + isPreferredSupport?: boolean; + /** + * Whether code action supports the `disabled` property. + * + * @since 3.16.0 + */ + disabledSupport?: boolean; + /** + * Whether code action supports the `data` property which is + * preserved between a `textDocument/codeAction` and a + * `codeAction/resolve` request. + * + * @since 3.16.0 + */ + dataSupport?: boolean; + /** + * Whether the client supports resolving additional code action + * properties via a separate `codeAction/resolve` request. + * + * @since 3.16.0 + */ + resolveSupport?: { + /** + * The properties that a client can resolve lazily. + */ + properties: string[]; + }; + /** + * Whether the client honors the change annotations in + * text edits and resource operations returned via the + * `CodeAction#edit` property by for example presenting + * the workspace edit in the user interface and asking + * for confirmation. + * + * @since 3.16.0 + */ + honorsChangeAnnotations?: boolean; +} +/** + * The parameters of a {@link CodeActionRequest}. + */ +export interface CodeActionParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The document in which the command was invoked. + */ + textDocument: TextDocumentIdentifier; + /** + * The range for which the command was invoked. + */ + range: Range; + /** + * Context carrying additional information. + */ + context: CodeActionContext; +} +/** + * Provider options for a {@link CodeActionRequest}. + */ +export interface CodeActionOptions extends WorkDoneProgressOptions { + /** + * CodeActionKinds that this server may return. + * + * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server + * may list out every specific kind they provide. + */ + codeActionKinds?: CodeActionKind[]; + /** + * The server provides support to resolve additional + * information for a code action. + * + * @since 3.16.0 + */ + resolveProvider?: boolean; +} +/** + * Registration options for a {@link CodeActionRequest}. + */ +export interface CodeActionRegistrationOptions extends TextDocumentRegistrationOptions, CodeActionOptions { +} +/** + * A request to provide commands for the given text document and range. + */ +export declare namespace CodeActionRequest { + const method: 'textDocument/codeAction'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Request to resolve additional information for a given code action.The request's + * parameter is of type {@link CodeAction} the response + * is of type {@link CodeAction} or a Thenable that resolves to such. + */ +export declare namespace CodeActionResolveRequest { + const method: 'codeAction/resolve'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Client capabilities for a {@link WorkspaceSymbolRequest}. + */ +export interface WorkspaceSymbolClientCapabilities { + /** + * Symbol request supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request. + */ + symbolKind?: { + /** + * The symbol kind values the client supports. When this + * property exists the client also guarantees that it will + * handle values outside its set gracefully and falls back + * to a default value when unknown. + * + * If this property is not present the client only supports + * the symbol kinds from `File` to `Array` as defined in + * the initial version of the protocol. + */ + valueSet?: SymbolKind[]; + }; + /** + * The client supports tags on `SymbolInformation`. + * Clients supporting tags have to handle unknown tags gracefully. + * + * @since 3.16.0 + */ + tagSupport?: { + /** + * The tags supported by the client. + */ + valueSet: SymbolTag[]; + }; + /** + * The client support partial workspace symbols. The client will send the + * request `workspaceSymbol/resolve` to the server to resolve additional + * properties. + * + * @since 3.17.0 + */ + resolveSupport?: { + /** + * The properties that a client can resolve lazily. Usually + * `location.range` + */ + properties: string[]; + }; +} +/** + * The parameters of a {@link WorkspaceSymbolRequest}. + */ +export interface WorkspaceSymbolParams extends WorkDoneProgressParams, PartialResultParams { + /** + * A query string to filter symbols by. Clients may send an empty + * string here to request all symbols. + */ + query: string; +} +/** + * Server capabilities for a {@link WorkspaceSymbolRequest}. + */ +export interface WorkspaceSymbolOptions extends WorkDoneProgressOptions { + /** + * The server provides support to resolve additional + * information for a workspace symbol. + * + * @since 3.17.0 + */ + resolveProvider?: boolean; +} +/** + * Registration options for a {@link WorkspaceSymbolRequest}. + */ +export interface WorkspaceSymbolRegistrationOptions extends WorkspaceSymbolOptions { +} +/** + * A request to list project-wide symbols matching the query string given + * by the {@link WorkspaceSymbolParams}. The response is + * of type {@link SymbolInformation SymbolInformation[]} or a Thenable that + * resolves to such. + * + * @since 3.17.0 - support for WorkspaceSymbol in the returned data. Clients + * need to advertise support for WorkspaceSymbols via the client capability + * `workspace.symbol.resolveSupport`. + * + */ +export declare namespace WorkspaceSymbolRequest { + const method: 'workspace/symbol'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * A request to resolve the range inside the workspace + * symbol's location. + * + * @since 3.17.0 + */ +export declare namespace WorkspaceSymbolResolveRequest { + const method: 'workspaceSymbol/resolve'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * The client capabilities of a {@link CodeLensRequest}. + */ +export interface CodeLensClientCapabilities { + /** + * Whether code lens supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * @since 3.16.0 + */ +export interface CodeLensWorkspaceClientCapabilities { + /** + * Whether the client implementation supports a refresh request sent from the + * server to the client. + * + * Note that this event is global and will force the client to refresh all + * code lenses currently shown. It should be used with absolute care and is + * useful for situation where a server for example detect a project wide + * change that requires such a calculation. + */ + refreshSupport?: boolean; +} +/** + * The parameters of a {@link CodeLensRequest}. + */ +export interface CodeLensParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The document to request code lens for. + */ + textDocument: TextDocumentIdentifier; +} +/** + * Code Lens provider options of a {@link CodeLensRequest}. + */ +export interface CodeLensOptions extends WorkDoneProgressOptions { + /** + * Code lens has a resolve provider as well. + */ + resolveProvider?: boolean; +} +/** + * Registration options for a {@link CodeLensRequest}. + */ +export interface CodeLensRegistrationOptions extends TextDocumentRegistrationOptions, CodeLensOptions { +} +/** + * A request to provide code lens for the given text document. + */ +export declare namespace CodeLensRequest { + const method: 'textDocument/codeLens'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * A request to resolve a command for a given code lens. + */ +export declare namespace CodeLensResolveRequest { + const method: 'codeLens/resolve'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * A request to refresh all code actions + * + * @since 3.16.0 + */ +export declare namespace CodeLensRefreshRequest { + const method: `workspace/codeLens/refresh`; + const messageDirection: MessageDirection; + const type: ProtocolRequestType0; +} +/** + * The client capabilities of a {@link DocumentLinkRequest}. + */ +export interface DocumentLinkClientCapabilities { + /** + * Whether document link supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Whether the client supports the `tooltip` property on `DocumentLink`. + * + * @since 3.15.0 + */ + tooltipSupport?: boolean; +} +/** + * The parameters of a {@link DocumentLinkRequest}. + */ +export interface DocumentLinkParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The document to provide document links for. + */ + textDocument: TextDocumentIdentifier; +} +/** + * Provider options for a {@link DocumentLinkRequest}. + */ +export interface DocumentLinkOptions extends WorkDoneProgressOptions { + /** + * Document links have a resolve provider as well. + */ + resolveProvider?: boolean; +} +/** + * Registration options for a {@link DocumentLinkRequest}. + */ +export interface DocumentLinkRegistrationOptions extends TextDocumentRegistrationOptions, DocumentLinkOptions { +} +/** + * A request to provide document links + */ +export declare namespace DocumentLinkRequest { + const method: 'textDocument/documentLink'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Request to resolve additional information for a given document link. The request's + * parameter is of type {@link DocumentLink} the response + * is of type {@link DocumentLink} or a Thenable that resolves to such. + */ +export declare namespace DocumentLinkResolveRequest { + const method: 'documentLink/resolve'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Client capabilities of a {@link DocumentFormattingRequest}. + */ +export interface DocumentFormattingClientCapabilities { + /** + * Whether formatting supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * The parameters of a {@link DocumentFormattingRequest}. + */ +export interface DocumentFormattingParams extends WorkDoneProgressParams { + /** + * The document to format. + */ + textDocument: TextDocumentIdentifier; + /** + * The format options. + */ + options: FormattingOptions; +} +/** + * Provider options for a {@link DocumentFormattingRequest}. + */ +export interface DocumentFormattingOptions extends WorkDoneProgressOptions { +} +/** + * Registration options for a {@link DocumentFormattingRequest}. + */ +export interface DocumentFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentFormattingOptions { +} +/** + * A request to format a whole document. + */ +export declare namespace DocumentFormattingRequest { + const method: 'textDocument/formatting'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Client capabilities of a {@link DocumentRangeFormattingRequest}. + */ +export interface DocumentRangeFormattingClientCapabilities { + /** + * Whether range formatting supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Whether the client supports formatting multiple ranges at once. + * + * @since 3.18.0 + * @proposed + */ + rangesSupport?: boolean; +} +/** + * The parameters of a {@link DocumentRangeFormattingRequest}. + */ +export interface DocumentRangeFormattingParams extends WorkDoneProgressParams { + /** + * The document to format. + */ + textDocument: TextDocumentIdentifier; + /** + * The range to format + */ + range: Range; + /** + * The format options + */ + options: FormattingOptions; +} +/** + * The parameters of a {@link DocumentRangesFormattingRequest}. + * + * @since 3.18.0 + * @proposed + */ +export interface DocumentRangesFormattingParams extends WorkDoneProgressParams { + /** + * The document to format. + */ + textDocument: TextDocumentIdentifier; + /** + * The ranges to format + */ + ranges: Range[]; + /** + * The format options + */ + options: FormattingOptions; +} +/** + * Provider options for a {@link DocumentRangeFormattingRequest}. + */ +export interface DocumentRangeFormattingOptions extends WorkDoneProgressOptions { + /** + * Whether the server supports formatting multiple ranges at once. + * + * @since 3.18.0 + * @proposed + */ + rangesSupport?: boolean; +} +/** + * Registration options for a {@link DocumentRangeFormattingRequest}. + */ +export interface DocumentRangeFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentRangeFormattingOptions { +} +/** + * A request to format a range in a document. + */ +export declare namespace DocumentRangeFormattingRequest { + const method: 'textDocument/rangeFormatting'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * A request to format ranges in a document. + * + * @since 3.18.0 + * @proposed + */ +export declare namespace DocumentRangesFormattingRequest { + const method: 'textDocument/rangesFormatting'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * Client capabilities of a {@link DocumentOnTypeFormattingRequest}. + */ +export interface DocumentOnTypeFormattingClientCapabilities { + /** + * Whether on type formatting supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * The parameters of a {@link DocumentOnTypeFormattingRequest}. + */ +export interface DocumentOnTypeFormattingParams { + /** + * The document to format. + */ + textDocument: TextDocumentIdentifier; + /** + * The position around which the on type formatting should happen. + * This is not necessarily the exact position where the character denoted + * by the property `ch` got typed. + */ + position: Position; + /** + * The character that has been typed that triggered the formatting + * on type request. That is not necessarily the last character that + * got inserted into the document since the client could auto insert + * characters as well (e.g. like automatic brace completion). + */ + ch: string; + /** + * The formatting options. + */ + options: FormattingOptions; +} +/** + * Provider options for a {@link DocumentOnTypeFormattingRequest}. + */ +export interface DocumentOnTypeFormattingOptions { + /** + * A character on which formatting should be triggered, like `{`. + */ + firstTriggerCharacter: string; + /** + * More trigger characters. + */ + moreTriggerCharacter?: string[]; +} +/** + * Registration options for a {@link DocumentOnTypeFormattingRequest}. + */ +export interface DocumentOnTypeFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentOnTypeFormattingOptions { +} +/** + * A request to format a document on type. + */ +export declare namespace DocumentOnTypeFormattingRequest { + const method: 'textDocument/onTypeFormatting'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +export declare namespace PrepareSupportDefaultBehavior { + /** + * The client's default behavior is to select the identifier + * according the to language's syntax rule. + */ + const Identifier: 1; +} +export type PrepareSupportDefaultBehavior = 1; +export interface RenameClientCapabilities { + /** + * Whether rename supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Client supports testing for validity of rename operations + * before execution. + * + * @since 3.12.0 + */ + prepareSupport?: boolean; + /** + * Client supports the default behavior result. + * + * The value indicates the default behavior used by the + * client. + * + * @since 3.16.0 + */ + prepareSupportDefaultBehavior?: PrepareSupportDefaultBehavior; + /** + * Whether the client honors the change annotations in + * text edits and resource operations returned via the + * rename request's workspace edit by for example presenting + * the workspace edit in the user interface and asking + * for confirmation. + * + * @since 3.16.0 + */ + honorsChangeAnnotations?: boolean; +} +/** + * The parameters of a {@link RenameRequest}. + */ +export interface RenameParams extends WorkDoneProgressParams { + /** + * The document to rename. + */ + textDocument: TextDocumentIdentifier; + /** + * The position at which this request was sent. + */ + position: Position; + /** + * The new name of the symbol. If the given name is not valid the + * request must return a {@link ResponseError} with an + * appropriate message set. + */ + newName: string; +} +/** + * Provider options for a {@link RenameRequest}. + */ +export interface RenameOptions extends WorkDoneProgressOptions { + /** + * Renames should be checked and tested before being executed. + * + * @since version 3.12.0 + */ + prepareProvider?: boolean; +} +/** + * Registration options for a {@link RenameRequest}. + */ +export interface RenameRegistrationOptions extends TextDocumentRegistrationOptions, RenameOptions { +} +/** + * A request to rename a symbol. + */ +export declare namespace RenameRequest { + const method: 'textDocument/rename'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +export interface PrepareRenameParams extends TextDocumentPositionParams, WorkDoneProgressParams { +} +export type PrepareRenameResult = Range | { + range: Range; + placeholder: string; +} | { + defaultBehavior: boolean; +}; +/** + * A request to test and perform the setup necessary for a rename. + * + * @since 3.16 - support for default behavior + */ +export declare namespace PrepareRenameRequest { + const method: 'textDocument/prepareRename'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +/** + * The client capabilities of a {@link ExecuteCommandRequest}. + */ +export interface ExecuteCommandClientCapabilities { + /** + * Execute command supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * The parameters of a {@link ExecuteCommandRequest}. + */ +export interface ExecuteCommandParams extends WorkDoneProgressParams { + /** + * The identifier of the actual command handler. + */ + command: string; + /** + * Arguments that the command should be invoked with. + */ + arguments?: LSPAny[]; +} +/** + * The server capabilities of a {@link ExecuteCommandRequest}. + */ +export interface ExecuteCommandOptions extends WorkDoneProgressOptions { + /** + * The commands to be executed on the server + */ + commands: string[]; +} +/** + * Registration options for a {@link ExecuteCommandRequest}. + */ +export interface ExecuteCommandRegistrationOptions extends ExecuteCommandOptions { +} +/** + * A request send from the client to the server to execute a command. The request might return + * a workspace edit which the client will apply to the workspace. + */ +export declare namespace ExecuteCommandRequest { + const method: 'workspace/executeCommand'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +export interface WorkspaceEditClientCapabilities { + /** + * The client supports versioned document changes in `WorkspaceEdit`s + */ + documentChanges?: boolean; + /** + * The resource operations the client supports. Clients should at least + * support 'create', 'rename' and 'delete' files and folders. + * + * @since 3.13.0 + */ + resourceOperations?: ResourceOperationKind[]; + /** + * The failure handling strategy of a client if applying the workspace edit + * fails. + * + * @since 3.13.0 + */ + failureHandling?: FailureHandlingKind; + /** + * Whether the client normalizes line endings to the client specific + * setting. + * If set to `true` the client will normalize line ending characters + * in a workspace edit to the client-specified new line + * character. + * + * @since 3.16.0 + */ + normalizesLineEndings?: boolean; + /** + * Whether the client in general supports change annotations on text edits, + * create file, rename file and delete file changes. + * + * @since 3.16.0 + */ + changeAnnotationSupport?: { + /** + * Whether the client groups edits with equal labels into tree nodes, + * for instance all edits labelled with "Changes in Strings" would + * be a tree node. + */ + groupsOnLabel?: boolean; + }; +} +/** + * The parameters passed via an apply workspace edit request. + */ +export interface ApplyWorkspaceEditParams { + /** + * An optional label of the workspace edit. This label is + * presented in the user interface for example on an undo + * stack to undo the workspace edit. + */ + label?: string; + /** + * The edits to apply. + */ + edit: WorkspaceEdit; +} +/** + * The result returned from the apply workspace edit request. + * + * @since 3.17 renamed from ApplyWorkspaceEditResponse + */ +export interface ApplyWorkspaceEditResult { + /** + * Indicates whether the edit was applied or not. + */ + applied: boolean; + /** + * An optional textual description for why the edit was not applied. + * This may be used by the server for diagnostic logging or to provide + * a suitable error for a request that triggered the edit. + */ + failureReason?: string; + /** + * Depending on the client's failure handling strategy `failedChange` might + * contain the index of the change that failed. This property is only available + * if the client signals a `failureHandlingStrategy` in its client capabilities. + */ + failedChange?: uinteger; +} +/** + * @deprecated Use ApplyWorkspaceEditResult instead. + */ +export type ApplyWorkspaceEditResponse = ApplyWorkspaceEditResult; +/** + * A request sent from the server to the client to modified certain resources. + */ +export declare namespace ApplyWorkspaceEditRequest { + const method: 'workspace/applyEdit'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} +export { ImplementationRequest, ImplementationParams, ImplementationRegistrationOptions, ImplementationOptions, TypeDefinitionRequest, TypeDefinitionParams, TypeDefinitionRegistrationOptions, TypeDefinitionOptions, WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFoldersChangeEvent, ConfigurationRequest, ConfigurationParams, ConfigurationItem, DocumentColorRequest, ColorPresentationRequest, DocumentColorOptions, DocumentColorParams, ColorPresentationParams, DocumentColorRegistrationOptions, FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeRegistrationOptions, FoldingRangeRefreshRequest, DeclarationClientCapabilities, DeclarationRequest, DeclarationParams, DeclarationRegistrationOptions, DeclarationOptions, SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeParams, SelectionRangeRequest, SelectionRangeRegistrationOptions, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, WorkDoneProgress, WorkDoneProgressCreateParams, WorkDoneProgressCreateRequest, WorkDoneProgressCancelParams, WorkDoneProgressCancelNotification, CallHierarchyClientCapabilities, CallHierarchyOptions, CallHierarchyRegistrationOptions, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCallsRequest, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCallsRequest, CallHierarchyPrepareParams, CallHierarchyPrepareRequest, SemanticTokensPartialResult, SemanticTokensDeltaPartialResult, TokenFormat, SemanticTokensClientCapabilities, SemanticTokensOptions, SemanticTokensRegistrationOptions, SemanticTokensParams, SemanticTokensRequest, SemanticTokensDeltaParams, SemanticTokensDeltaRequest, SemanticTokensRangeParams, SemanticTokensRangeRequest, SemanticTokensRefreshRequest, SemanticTokensRegistrationType, ShowDocumentParams, ShowDocumentRequest, ShowDocumentResult, ShowDocumentClientCapabilities, LinkedEditingRangeClientCapabilities, LinkedEditingRanges, LinkedEditingRangeOptions, LinkedEditingRangeParams, LinkedEditingRangeRegistrationOptions, LinkedEditingRangeRequest, FileOperationOptions, FileOperationClientCapabilities, FileOperationRegistrationOptions, FileOperationPatternOptions, FileOperationPatternKind, DidCreateFilesNotification, CreateFilesParams, FileCreate, WillCreateFilesRequest, DidRenameFilesNotification, RenameFilesParams, FileRename, WillRenameFilesRequest, DidDeleteFilesNotification, DeleteFilesParams, FileDelete, WillDeleteFilesRequest, UniquenessLevel, MonikerKind, Moniker, MonikerClientCapabilities, MonikerOptions, MonikerRegistrationOptions, MonikerParams, MonikerRequest, TypeHierarchyClientCapabilities, TypeHierarchyOptions, TypeHierarchyRegistrationOptions, TypeHierarchyPrepareParams, TypeHierarchyPrepareRequest, TypeHierarchySubtypesParams, TypeHierarchySubtypesRequest, TypeHierarchySupertypesParams, TypeHierarchySupertypesRequest, InlineValueClientCapabilities, InlineValueOptions, InlineValueRegistrationOptions, InlineValueWorkspaceClientCapabilities, InlineValueParams, InlineValueRequest, InlineValueRefreshRequest, InlayHintClientCapabilities, InlayHintOptions, InlayHintRegistrationOptions, InlayHintWorkspaceClientCapabilities, InlayHintParams, InlayHintRequest, InlayHintResolveRequest, InlayHintRefreshRequest, DiagnosticClientCapabilities, DiagnosticOptions, DiagnosticRegistrationOptions, DiagnosticServerCancellationData, DocumentDiagnosticParams, DocumentDiagnosticReportKind, FullDocumentDiagnosticReport, RelatedFullDocumentDiagnosticReport, UnchangedDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DocumentDiagnosticRequest, PreviousResultId, WorkspaceDiagnosticParams, WorkspaceFullDocumentDiagnosticReport, WorkspaceUnchangedDocumentDiagnosticReport, WorkspaceDocumentDiagnosticReport, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult, WorkspaceDiagnosticRequest, DiagnosticRefreshRequest, NotebookDocumentSyncClientCapabilities, NotebookCellKind, ExecutionSummary, NotebookCell, NotebookDocument, NotebookDocumentIdentifier, VersionedNotebookDocumentIdentifier, NotebookDocumentSyncOptions, NotebookDocumentSyncRegistrationOptions, NotebookDocumentSyncRegistrationType, DidOpenNotebookDocumentParams, DidOpenNotebookDocumentNotification, NotebookCellArrayChange, NotebookDocumentChangeEvent, DidChangeNotebookDocumentParams, DidChangeNotebookDocumentNotification, DidSaveNotebookDocumentParams, DidSaveNotebookDocumentNotification, DidCloseNotebookDocumentParams, DidCloseNotebookDocumentNotification, InlineCompletionClientCapabilities, InlineCompletionOptions, InlineCompletionParams, InlineCompletionRegistrationOptions, InlineCompletionRequest }; +export { DocumentColorOptions as ColorProviderOptions, DocumentColorOptions as ColorOptions, FoldingRangeOptions as FoldingRangeProviderOptions, SelectionRangeOptions as SelectionRangeProviderOptions, DocumentColorRegistrationOptions as ColorRegistrationOptions }; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts" index f48f83714b3b9cfdd49f75d11d97a7bafd60b9f6..8c8609c86aa716a3eb998fbaa024b42bde42f551 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts" @@ -1,3 +1,37 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f8d1db1f521b60c8d9fd9b49d230ce6981ff7468c63e6ac27f82ed7b67500e67 -size 1932 +import { RequestHandler } from 'vscode-jsonrpc'; +import { Declaration, DeclarationLink, Location, LocationLink } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +/** + * @since 3.14.0 + */ +export interface DeclarationClientCapabilities { + /** + * Whether declaration supports dynamic registration. If this is set to `true` + * the client supports the new `DeclarationRegistrationOptions` return value + * for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; + /** + * The client supports additional metadata in the form of declaration links. + */ + linkSupport?: boolean; +} +export interface DeclarationOptions extends WorkDoneProgressOptions { +} +export interface DeclarationRegistrationOptions extends DeclarationOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions { +} +export interface DeclarationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * A request to resolve the type definition locations of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPositionParams} + * the response is of type {@link Declaration} or a typed array of {@link DeclarationLink} + * or a Thenable that resolves to such. + */ +export declare namespace DeclarationRequest { + const method: 'textDocument/declaration'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js" index 16d1e4e102e739ca8ff2f05b1826a2072fce1846..1e3f05a7fcaa8bb2a9a4aec9969ee9482762bf1b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js" @@ -1,3 +1,22 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:09401a8ad7075385bebc0f56e0a107404dd1669c6a7f4fb58d7d7033f2a72c68 -size 1284 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DeclarationRequest = void 0; +const messages_1 = require("./messages"); +// @ts-ignore: to avoid inlining LocationLink as dynamic import +let __noDynamicImport; +/** + * A request to resolve the type definition locations of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPositionParams} + * the response is of type {@link Declaration} or a typed array of {@link DeclarationLink} + * or a Thenable that resolves to such. + */ +var DeclarationRequest; +(function (DeclarationRequest) { + DeclarationRequest.method = 'textDocument/declaration'; + DeclarationRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method); +})(DeclarationRequest || (exports.DeclarationRequest = DeclarationRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts" index 7b17f2807633a34c10770b5c6cc5ca3d4c71bf2a..1ded18751da310084579bf18c4c182d735abfbb7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts" @@ -1,3 +1,341 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ddf3f680de453b300dd1c47e136b8ade3857d2c357635efeb0f9977d81d1e96d -size 10614 +import { RequestHandler0, RequestHandler, ProgressType } from 'vscode-jsonrpc'; +import { TextDocumentIdentifier, Diagnostic, DocumentUri, integer } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType0, ProtocolRequestType } from './messages'; +import type { PartialResultParams, StaticRegistrationOptions, WorkDoneProgressParams, TextDocumentRegistrationOptions, WorkDoneProgressOptions } from './protocol'; +/** + * Client capabilities specific to diagnostic pull requests. + * + * @since 3.17.0 + */ +export type DiagnosticClientCapabilities = { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + * return value for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; + /** + * Whether the clients supports related documents for document diagnostic pulls. + */ + relatedDocumentSupport?: boolean; +}; +/** + * Workspace client capabilities specific to diagnostic pull requests. + * + * @since 3.17.0 + */ +export type DiagnosticWorkspaceClientCapabilities = { + /** + * Whether the client implementation supports a refresh request sent from + * the server to the client. + * + * Note that this event is global and will force the client to refresh all + * pulled diagnostics currently shown. It should be used with absolute care and + * is useful for situation where a server for example detects a project wide + * change that requires such a calculation. + */ + refreshSupport?: boolean; +}; +/** + * Diagnostic options. + * + * @since 3.17.0 + */ +export type DiagnosticOptions = WorkDoneProgressOptions & { + /** + * An optional identifier under which the diagnostics are + * managed by the client. + */ + identifier?: string; + /** + * Whether the language has inter file dependencies meaning that + * editing code in one file can result in a different diagnostic + * set in another file. Inter file dependencies are common for + * most programming languages and typically uncommon for linters. + */ + interFileDependencies: boolean; + /** + * The server provides support for workspace diagnostics as well. + */ + workspaceDiagnostics: boolean; +}; +/** + * Diagnostic registration options. + * + * @since 3.17.0 + */ +export type DiagnosticRegistrationOptions = TextDocumentRegistrationOptions & DiagnosticOptions & StaticRegistrationOptions; +export type $DiagnosticServerCapabilities = { + diagnosticProvider?: DiagnosticOptions; +}; +/** + * Cancellation data returned from a diagnostic request. + * + * @since 3.17.0 + */ +export type DiagnosticServerCancellationData = { + retriggerRequest: boolean; +}; +/** + * @since 3.17.0 + */ +export declare namespace DiagnosticServerCancellationData { + function is(value: any): value is DiagnosticServerCancellationData; +} +/** + * Parameters of the document diagnostic request. + * + * @since 3.17.0 + */ +export type DocumentDiagnosticParams = WorkDoneProgressParams & PartialResultParams & { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The additional identifier provided during registration. + */ + identifier?: string; + /** + * The result id of a previous response if provided. + */ + previousResultId?: string; +}; +/** + * The document diagnostic report kinds. + * + * @since 3.17.0 + */ +export declare namespace DocumentDiagnosticReportKind { + /** + * A diagnostic report with a full + * set of problems. + */ + const Full = "full"; + /** + * A report indicating that the last + * returned report is still accurate. + */ + const Unchanged = "unchanged"; +} +export type DocumentDiagnosticReportKind = 'full' | 'unchanged'; +/** + * A diagnostic report with a full set of problems. + * + * @since 3.17.0 + */ +export type FullDocumentDiagnosticReport = { + /** + * A full document diagnostic report. + */ + kind: typeof DocumentDiagnosticReportKind.Full; + /** + * An optional result id. If provided it will + * be sent on the next diagnostic request for the + * same document. + */ + resultId?: string; + /** + * The actual items. + */ + items: Diagnostic[]; +}; +/** + * A full diagnostic report with a set of related documents. + * + * @since 3.17.0 + */ +export type RelatedFullDocumentDiagnosticReport = FullDocumentDiagnosticReport & { + /** + * Diagnostics of related documents. This information is useful + * in programming languages where code in a file A can generate + * diagnostics in a file B which A depends on. An example of + * such a language is C/C++ where marco definitions in a file + * a.cpp and result in errors in a header file b.hpp. + * + * @since 3.17.0 + */ + relatedDocuments?: { + [uri: DocumentUri]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; + }; +}; +/** + * A diagnostic report indicating that the last returned + * report is still accurate. + * + * @since 3.17.0 + */ +export type UnchangedDocumentDiagnosticReport = { + /** + * A document diagnostic report indicating + * no changes to the last result. A server can + * only return `unchanged` if result ids are + * provided. + */ + kind: typeof DocumentDiagnosticReportKind.Unchanged; + /** + * A result id which will be sent on the next + * diagnostic request for the same document. + */ + resultId: string; +}; +/** + * An unchanged diagnostic report with a set of related documents. + * + * @since 3.17.0 + */ +export type RelatedUnchangedDocumentDiagnosticReport = UnchangedDocumentDiagnosticReport & { + /** + * Diagnostics of related documents. This information is useful + * in programming languages where code in a file A can generate + * diagnostics in a file B which A depends on. An example of + * such a language is C/C++ where marco definitions in a file + * a.cpp and result in errors in a header file b.hpp. + * + * @since 3.17.0 + */ + relatedDocuments?: { + [uri: DocumentUri]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; + }; +}; +/** + * The result of a document diagnostic pull request. A report can + * either be a full report containing all diagnostics for the + * requested document or an unchanged report indicating that nothing + * has changed in terms of diagnostics in comparison to the last + * pull request. + * + * @since 3.17.0 + */ +export type DocumentDiagnosticReport = RelatedFullDocumentDiagnosticReport | RelatedUnchangedDocumentDiagnosticReport; +/** + * A partial result for a document diagnostic report. + * + * @since 3.17.0 + */ +export type DocumentDiagnosticReportPartialResult = { + relatedDocuments: { + [uri: DocumentUri]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; + }; +}; +/** + * The document diagnostic request definition. + * + * @since 3.17.0 + */ +export declare namespace DocumentDiagnosticRequest { + const method: 'textDocument/diagnostic'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + const partialResult: ProgressType; + type HandlerSignature = RequestHandler; +} +/** + * A previous result id in a workspace pull request. + * + * @since 3.17.0 + */ +export type PreviousResultId = { + /** + * The URI for which the client knowns a + * result id. + */ + uri: DocumentUri; + /** + * The value of the previous result id. + */ + value: string; +}; +/** + * Parameters of the workspace diagnostic request. + * + * @since 3.17.0 + */ +export type WorkspaceDiagnosticParams = WorkDoneProgressParams & PartialResultParams & { + /** + * The additional identifier provided during registration. + */ + identifier?: string; + /** + * The currently known diagnostic reports with their + * previous result ids. + */ + previousResultIds: PreviousResultId[]; +}; +/** + * A full document diagnostic report for a workspace diagnostic result. + * + * @since 3.17.0 + */ +export type WorkspaceFullDocumentDiagnosticReport = FullDocumentDiagnosticReport & { + /** + * The URI for which diagnostic information is reported. + */ + uri: DocumentUri; + /** + * The version number for which the diagnostics are reported. + * If the document is not marked as open `null` can be provided. + */ + version: integer | null; +}; +/** + * An unchanged document diagnostic report for a workspace diagnostic result. + * + * @since 3.17.0 + */ +export type WorkspaceUnchangedDocumentDiagnosticReport = UnchangedDocumentDiagnosticReport & { + /** + * The URI for which diagnostic information is reported. + */ + uri: DocumentUri; + /** + * The version number for which the diagnostics are reported. + * If the document is not marked as open `null` can be provided. + */ + version: integer | null; +}; +/** + * A workspace diagnostic document report. + * + * @since 3.17.0 + */ +export type WorkspaceDocumentDiagnosticReport = WorkspaceFullDocumentDiagnosticReport | WorkspaceUnchangedDocumentDiagnosticReport; +/** + * A workspace diagnostic report. + * + * @since 3.17.0 + */ +export type WorkspaceDiagnosticReport = { + items: WorkspaceDocumentDiagnosticReport[]; +}; +/** + * A partial result for a workspace diagnostic report. + * + * @since 3.17.0 + */ +export type WorkspaceDiagnosticReportPartialResult = { + items: WorkspaceDocumentDiagnosticReport[]; +}; +/** + * The workspace diagnostic request definition. + * + * @since 3.17.0 + */ +export declare namespace WorkspaceDiagnosticRequest { + const method: 'workspace/diagnostic'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + const partialResult: ProgressType; + type HandlerSignature = RequestHandler; +} +/** + * The diagnostic refresh request definition. + * + * @since 3.17.0 + */ +export declare namespace DiagnosticRefreshRequest { + const method: `workspace/diagnostic/refresh`; + const messageDirection: MessageDirection; + const type: ProtocolRequestType0; + type HandlerSignature = RequestHandler0; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js" index 8ff3aad71ffc5ed237486a0a4ea6e09081427d52..0171619070c2ade7b59d424fbed7d14aac564c45 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js" @@ -1,3 +1,74 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b84b5c65f0603de770ce37aa8d4e8a989f1c6c67c34cc1e57b2d6a47da3a6d8b -size 3422 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = void 0; +const vscode_jsonrpc_1 = require("vscode-jsonrpc"); +const Is = require("./utils/is"); +const messages_1 = require("./messages"); +/** + * @since 3.17.0 + */ +var DiagnosticServerCancellationData; +(function (DiagnosticServerCancellationData) { + function is(value) { + const candidate = value; + return candidate && Is.boolean(candidate.retriggerRequest); + } + DiagnosticServerCancellationData.is = is; +})(DiagnosticServerCancellationData || (exports.DiagnosticServerCancellationData = DiagnosticServerCancellationData = {})); +/** + * The document diagnostic report kinds. + * + * @since 3.17.0 + */ +var DocumentDiagnosticReportKind; +(function (DocumentDiagnosticReportKind) { + /** + * A diagnostic report with a full + * set of problems. + */ + DocumentDiagnosticReportKind.Full = 'full'; + /** + * A report indicating that the last + * returned report is still accurate. + */ + DocumentDiagnosticReportKind.Unchanged = 'unchanged'; +})(DocumentDiagnosticReportKind || (exports.DocumentDiagnosticReportKind = DocumentDiagnosticReportKind = {})); +/** + * The document diagnostic request definition. + * + * @since 3.17.0 + */ +var DocumentDiagnosticRequest; +(function (DocumentDiagnosticRequest) { + DocumentDiagnosticRequest.method = 'textDocument/diagnostic'; + DocumentDiagnosticRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentDiagnosticRequest.type = new messages_1.ProtocolRequestType(DocumentDiagnosticRequest.method); + DocumentDiagnosticRequest.partialResult = new vscode_jsonrpc_1.ProgressType(); +})(DocumentDiagnosticRequest || (exports.DocumentDiagnosticRequest = DocumentDiagnosticRequest = {})); +/** + * The workspace diagnostic request definition. + * + * @since 3.17.0 + */ +var WorkspaceDiagnosticRequest; +(function (WorkspaceDiagnosticRequest) { + WorkspaceDiagnosticRequest.method = 'workspace/diagnostic'; + WorkspaceDiagnosticRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WorkspaceDiagnosticRequest.type = new messages_1.ProtocolRequestType(WorkspaceDiagnosticRequest.method); + WorkspaceDiagnosticRequest.partialResult = new vscode_jsonrpc_1.ProgressType(); +})(WorkspaceDiagnosticRequest || (exports.WorkspaceDiagnosticRequest = WorkspaceDiagnosticRequest = {})); +/** + * The diagnostic refresh request definition. + * + * @since 3.17.0 + */ +var DiagnosticRefreshRequest; +(function (DiagnosticRefreshRequest) { + DiagnosticRefreshRequest.method = `workspace/diagnostic/refresh`; + DiagnosticRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + DiagnosticRefreshRequest.type = new messages_1.ProtocolRequestType0(DiagnosticRefreshRequest.method); +})(DiagnosticRefreshRequest || (exports.DiagnosticRefreshRequest = DiagnosticRefreshRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts" index 7d5b973524e96a3493d16c1e039a28c11d0f6db6..f3571c4fb2e626fd46091f9537a05a211a619b72 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts" @@ -1,3 +1,306 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:77afb3c5f47b721ab94b2b2faace898f0b4e1e4f7cec679baeaa2f9a6f530079 -size 9608 +import { NotificationHandler, RequestHandler } from 'vscode-jsonrpc'; +import { WorkspaceEdit } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolNotificationType, ProtocolRequestType } from './messages'; +/** + * Options for notifications/requests for user operations on files. + * + * @since 3.16.0 + */ +export interface FileOperationOptions { + /** + * The server is interested in receiving didCreateFiles notifications. + */ + didCreate?: FileOperationRegistrationOptions; + /** + * The server is interested in receiving willCreateFiles requests. + */ + willCreate?: FileOperationRegistrationOptions; + /** + * The server is interested in receiving didRenameFiles notifications. + */ + didRename?: FileOperationRegistrationOptions; + /** + * The server is interested in receiving willRenameFiles requests. + */ + willRename?: FileOperationRegistrationOptions; + /** + * The server is interested in receiving didDeleteFiles file notifications. + */ + didDelete?: FileOperationRegistrationOptions; + /** + * The server is interested in receiving willDeleteFiles file requests. + */ + willDelete?: FileOperationRegistrationOptions; +} +/** + * The options to register for file operations. + * + * @since 3.16.0 + */ +export interface FileOperationRegistrationOptions { + /** + * The actual filters. + */ + filters: FileOperationFilter[]; +} +/** + * A pattern kind describing if a glob pattern matches a file a folder or + * both. + * + * @since 3.16.0 + */ +export declare namespace FileOperationPatternKind { + /** + * The pattern matches a file only. + */ + const file: 'file'; + /** + * The pattern matches a folder only. + */ + const folder: 'folder'; +} +export type FileOperationPatternKind = 'file' | 'folder'; +/** + * Matching options for the file operation pattern. + * + * @since 3.16.0 + */ +export interface FileOperationPatternOptions { + /** + * The pattern should be matched ignoring casing. + */ + ignoreCase?: boolean; +} +/** + * A pattern to describe in which file operation requests or notifications + * the server is interested in receiving. + * + * @since 3.16.0 + */ +interface FileOperationPattern { + /** + * The glob pattern to match. Glob patterns can have the following syntax: + * - `*` to match one or more characters in a path segment + * - `?` to match on one character in a path segment + * - `**` to match any number of path segments, including none + * - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files) + * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`) + */ + glob: string; + /** + * Whether to match files or folders with this pattern. + * + * Matches both if undefined. + */ + matches?: FileOperationPatternKind; + /** + * Additional options used during matching. + */ + options?: FileOperationPatternOptions; +} +/** + * A filter to describe in which file operation requests or notifications + * the server is interested in receiving. + * + * @since 3.16.0 + */ +export interface FileOperationFilter { + /** + * A Uri scheme like `file` or `untitled`. + */ + scheme?: string; + /** + * The actual file operation pattern. + */ + pattern: FileOperationPattern; +} +/** + * Capabilities relating to events from file operations by the user in the client. + * + * These events do not come from the file system, they come from user operations + * like renaming a file in the UI. + * + * @since 3.16.0 + */ +export interface FileOperationClientCapabilities { + /** + * Whether the client supports dynamic registration for file requests/notifications. + */ + dynamicRegistration?: boolean; + /** + * The client has support for sending didCreateFiles notifications. + */ + didCreate?: boolean; + /** + * The client has support for sending willCreateFiles requests. + */ + willCreate?: boolean; + /** + * The client has support for sending didRenameFiles notifications. + */ + didRename?: boolean; + /** + * The client has support for sending willRenameFiles requests. + */ + willRename?: boolean; + /** + * The client has support for sending didDeleteFiles notifications. + */ + didDelete?: boolean; + /** + * The client has support for sending willDeleteFiles requests. + */ + willDelete?: boolean; +} +/** + * The parameters sent in notifications/requests for user-initiated creation of + * files. + * + * @since 3.16.0 + */ +export interface CreateFilesParams { + /** + * An array of all files/folders created in this operation. + */ + files: FileCreate[]; +} +/** + * Represents information on a file/folder create. + * + * @since 3.16.0 + */ +export interface FileCreate { + /** + * A file:// URI for the location of the file/folder being created. + */ + uri: string; +} +/** + * The parameters sent in notifications/requests for user-initiated renames of + * files. + * + * @since 3.16.0 + */ +export interface RenameFilesParams { + /** + * An array of all files/folders renamed in this operation. When a folder is renamed, only + * the folder will be included, and not its children. + */ + files: FileRename[]; +} +/** + * Represents information on a file/folder rename. + * + * @since 3.16.0 + */ +export interface FileRename { + /** + * A file:// URI for the original location of the file/folder being renamed. + */ + oldUri: string; + /** + * A file:// URI for the new location of the file/folder being renamed. + */ + newUri: string; +} +/** + * The parameters sent in notifications/requests for user-initiated deletes of + * files. + * + * @since 3.16.0 + */ +export interface DeleteFilesParams { + /** + * An array of all files/folders deleted in this operation. + */ + files: FileDelete[]; +} +/** + * Represents information on a file/folder delete. + * + * @since 3.16.0 + */ +export interface FileDelete { + /** + * A file:// URI for the location of the file/folder being deleted. + */ + uri: string; +} +/** + * The will create files request is sent from the client to the server before files are actually + * created as long as the creation is triggered from within the client. + * + * The request can return a `WorkspaceEdit` which will be applied to workspace before the + * files are created. Hence the `WorkspaceEdit` can not manipulate the content of the file + * to be created. + * + * @since 3.16.0 + */ +export declare namespace WillCreateFilesRequest { + const method: 'workspace/willCreateFiles'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * The did create files notification is sent from the client to the server when + * files were created from within the client. + * + * @since 3.16.0 + */ +export declare namespace DidCreateFilesNotification { + const method: 'workspace/didCreateFiles'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + type HandlerSignature = NotificationHandler; +} +/** + * The will rename files request is sent from the client to the server before files are actually + * renamed as long as the rename is triggered from within the client. + * + * @since 3.16.0 + */ +export declare namespace WillRenameFilesRequest { + const method: 'workspace/willRenameFiles'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * The did rename files notification is sent from the client to the server when + * files were renamed from within the client. + * + * @since 3.16.0 + */ +export declare namespace DidRenameFilesNotification { + const method: 'workspace/didRenameFiles'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + type HandlerSignature = NotificationHandler; +} +/** + * The will delete files request is sent from the client to the server before files are actually + * deleted as long as the deletion is triggered from within the client. + * + * @since 3.16.0 + */ +export declare namespace DidDeleteFilesNotification { + const method: 'workspace/didDeleteFiles'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + type HandlerSignature = NotificationHandler; +} +/** + * The did delete files notification is sent from the client to the server when + * files were deleted from within the client. + * + * @since 3.16.0 + */ +export declare namespace WillDeleteFilesRequest { + const method: 'workspace/willDeleteFiles'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js" index 9f992748276563635f8f9a74d272e8a43bd4daf7..e85e52a034e86312a825135ddcc5e503f2f4f55e 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js" @@ -1,3 +1,101 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:daba5d474d73127f5ee5335d717f04169a5cb8b228ac401e83c9a2798315ed5f -size 5071 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.DidRenameFilesNotification = exports.WillRenameFilesRequest = exports.DidCreateFilesNotification = exports.WillCreateFilesRequest = exports.FileOperationPatternKind = void 0; +const messages_1 = require("./messages"); +/** + * A pattern kind describing if a glob pattern matches a file a folder or + * both. + * + * @since 3.16.0 + */ +var FileOperationPatternKind; +(function (FileOperationPatternKind) { + /** + * The pattern matches a file only. + */ + FileOperationPatternKind.file = 'file'; + /** + * The pattern matches a folder only. + */ + FileOperationPatternKind.folder = 'folder'; +})(FileOperationPatternKind || (exports.FileOperationPatternKind = FileOperationPatternKind = {})); +/** + * The will create files request is sent from the client to the server before files are actually + * created as long as the creation is triggered from within the client. + * + * The request can return a `WorkspaceEdit` which will be applied to workspace before the + * files are created. Hence the `WorkspaceEdit` can not manipulate the content of the file + * to be created. + * + * @since 3.16.0 + */ +var WillCreateFilesRequest; +(function (WillCreateFilesRequest) { + WillCreateFilesRequest.method = 'workspace/willCreateFiles'; + WillCreateFilesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WillCreateFilesRequest.type = new messages_1.ProtocolRequestType(WillCreateFilesRequest.method); +})(WillCreateFilesRequest || (exports.WillCreateFilesRequest = WillCreateFilesRequest = {})); +/** + * The did create files notification is sent from the client to the server when + * files were created from within the client. + * + * @since 3.16.0 + */ +var DidCreateFilesNotification; +(function (DidCreateFilesNotification) { + DidCreateFilesNotification.method = 'workspace/didCreateFiles'; + DidCreateFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidCreateFilesNotification.type = new messages_1.ProtocolNotificationType(DidCreateFilesNotification.method); +})(DidCreateFilesNotification || (exports.DidCreateFilesNotification = DidCreateFilesNotification = {})); +/** + * The will rename files request is sent from the client to the server before files are actually + * renamed as long as the rename is triggered from within the client. + * + * @since 3.16.0 + */ +var WillRenameFilesRequest; +(function (WillRenameFilesRequest) { + WillRenameFilesRequest.method = 'workspace/willRenameFiles'; + WillRenameFilesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WillRenameFilesRequest.type = new messages_1.ProtocolRequestType(WillRenameFilesRequest.method); +})(WillRenameFilesRequest || (exports.WillRenameFilesRequest = WillRenameFilesRequest = {})); +/** + * The did rename files notification is sent from the client to the server when + * files were renamed from within the client. + * + * @since 3.16.0 + */ +var DidRenameFilesNotification; +(function (DidRenameFilesNotification) { + DidRenameFilesNotification.method = 'workspace/didRenameFiles'; + DidRenameFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidRenameFilesNotification.type = new messages_1.ProtocolNotificationType(DidRenameFilesNotification.method); +})(DidRenameFilesNotification || (exports.DidRenameFilesNotification = DidRenameFilesNotification = {})); +/** + * The will delete files request is sent from the client to the server before files are actually + * deleted as long as the deletion is triggered from within the client. + * + * @since 3.16.0 + */ +var DidDeleteFilesNotification; +(function (DidDeleteFilesNotification) { + DidDeleteFilesNotification.method = 'workspace/didDeleteFiles'; + DidDeleteFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidDeleteFilesNotification.type = new messages_1.ProtocolNotificationType(DidDeleteFilesNotification.method); +})(DidDeleteFilesNotification || (exports.DidDeleteFilesNotification = DidDeleteFilesNotification = {})); +/** + * The did delete files notification is sent from the client to the server when + * files were deleted from within the client. + * + * @since 3.16.0 + */ +var WillDeleteFilesRequest; +(function (WillDeleteFilesRequest) { + WillDeleteFilesRequest.method = 'workspace/willDeleteFiles'; + WillDeleteFilesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WillDeleteFilesRequest.type = new messages_1.ProtocolRequestType(WillDeleteFilesRequest.method); +})(WillDeleteFilesRequest || (exports.WillDeleteFilesRequest = WillDeleteFilesRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts" index 772cc8bbfc312e59adc0b92845a76d57bc4219cd..89c898db7f22ebddfa747a07846ef2c9c38b4462 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts" @@ -1,3 +1,109 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:45f441bf74e920f6909ca6874037fdd10f06644c341b99fd7cfd041ea565ce1f -size 4069 +import { RequestHandler, RequestHandler0 } from 'vscode-jsonrpc'; +import { TextDocumentIdentifier, uinteger, FoldingRange, FoldingRangeKind } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType, ProtocolRequestType0 } from './messages'; +import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +export interface FoldingRangeClientCapabilities { + /** + * Whether implementation supports dynamic registration for folding range + * providers. If this is set to `true` the client supports the new + * `FoldingRangeRegistrationOptions` return value for the corresponding + * server capability as well. + */ + dynamicRegistration?: boolean; + /** + * The maximum number of folding ranges that the client prefers to receive + * per document. The value serves as a hint, servers are free to follow the + * limit. + */ + rangeLimit?: uinteger; + /** + * If set, the client signals that it only supports folding complete lines. + * If set, client will ignore specified `startCharacter` and `endCharacter` + * properties in a FoldingRange. + */ + lineFoldingOnly?: boolean; + /** + * Specific options for the folding range kind. + * + * @since 3.17.0 + */ + foldingRangeKind?: { + /** + * The folding range kind values the client supports. When this + * property exists the client also guarantees that it will + * handle values outside its set gracefully and falls back + * to a default value when unknown. + */ + valueSet?: FoldingRangeKind[]; + }; + /** + * Specific options for the folding range. + * + * @since 3.17.0 + */ + foldingRange?: { + /** + * If set, the client signals that it supports setting collapsedText on + * folding ranges to display custom labels instead of the default text. + * + * @since 3.17.0 + */ + collapsedText?: boolean; + }; +} +/** + * Client workspace capabilities specific to folding ranges + * + * @since 3.18.0 + * @proposed + */ +export interface FoldingRangeWorkspaceClientCapabilities { + /** + * Whether the client implementation supports a refresh request sent from the + * server to the client. + * + * Note that this event is global and will force the client to refresh all + * folding ranges currently shown. It should be used with absolute care and is + * useful for situation where a server for example detects a project wide + * change that requires such a calculation. + * + * @since 3.18.0 + * @proposed + */ + refreshSupport?: boolean; +} +export interface FoldingRangeOptions extends WorkDoneProgressOptions { +} +export interface FoldingRangeRegistrationOptions extends TextDocumentRegistrationOptions, FoldingRangeOptions, StaticRegistrationOptions { +} +/** + * Parameters for a {@link FoldingRangeRequest}. + */ +export interface FoldingRangeParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; +} +/** + * A request to provide folding ranges in a document. The request's + * parameter is of type {@link FoldingRangeParams}, the + * response is of type {@link FoldingRangeList} or a Thenable + * that resolves to such. + */ +export declare namespace FoldingRangeRequest { + const method: 'textDocument/foldingRange'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * @since 3.18.0 + * @proposed + */ +export declare namespace FoldingRangeRefreshRequest { + const method: `workspace/foldingRange/refresh`; + const messageDirection: MessageDirection; + const type: ProtocolRequestType0; + type HandlerSignature = RequestHandler0; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js" index bc770a6ae7f62557c8162296f3b26260ea1c7830..846d0575cea0e9cf69f77fdc80f94b5f6b393182 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js" @@ -1,3 +1,30 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d8836bd17fa7fc6554cd2825d8a77cd0522f97e162c1426b67294a76ec7ecf2d -size 1649 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FoldingRangeRefreshRequest = exports.FoldingRangeRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to provide folding ranges in a document. The request's + * parameter is of type {@link FoldingRangeParams}, the + * response is of type {@link FoldingRangeList} or a Thenable + * that resolves to such. + */ +var FoldingRangeRequest; +(function (FoldingRangeRequest) { + FoldingRangeRequest.method = 'textDocument/foldingRange'; + FoldingRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer; + FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method); +})(FoldingRangeRequest || (exports.FoldingRangeRequest = FoldingRangeRequest = {})); +/** + * @since 3.18.0 + * @proposed + */ +var FoldingRangeRefreshRequest; +(function (FoldingRangeRefreshRequest) { + FoldingRangeRefreshRequest.method = `workspace/foldingRange/refresh`; + FoldingRangeRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + FoldingRangeRefreshRequest.type = new messages_1.ProtocolRequestType0(FoldingRangeRefreshRequest.method); +})(FoldingRangeRefreshRequest || (exports.FoldingRangeRefreshRequest = FoldingRangeRefreshRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts" index 3bc6cbc2855781689a3519aaf6f639d6c265a6f5..119e20962744bc92a5118176a381d6070bdee11c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts" @@ -1,3 +1,38 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bac171d09621591ee5fcddc28e031b348b0e038d12cc1ca2cf99cbaa27479999 -size 1940 +import { RequestHandler } from 'vscode-jsonrpc'; +import { Definition, DefinitionLink, Location, LocationLink } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +/** + * @since 3.6.0 + */ +export interface ImplementationClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `ImplementationRegistrationOptions` return value + * for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; + /** + * The client supports additional metadata in the form of definition links. + * + * @since 3.14.0 + */ + linkSupport?: boolean; +} +export interface ImplementationOptions extends WorkDoneProgressOptions { +} +export interface ImplementationRegistrationOptions extends TextDocumentRegistrationOptions, ImplementationOptions, StaticRegistrationOptions { +} +export interface ImplementationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * A request to resolve the implementation locations of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPositionParams} + * the response is of type {@link Definition} or a Thenable that resolves to such. + */ +export declare namespace ImplementationRequest { + const method: 'textDocument/implementation'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js" index 5ca347de5df812fff6621eef672fbea2cbac304d..9715ee841f04c696cb518d036f71bb9aa6f73407 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js" @@ -1,3 +1,21 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:79b56dfe6e27810c419237690641848225218b45258775ead61f5313214a3798 -size 1268 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ImplementationRequest = void 0; +const messages_1 = require("./messages"); +// @ts-ignore: to avoid inlining LocationLink as dynamic import +let __noDynamicImport; +/** + * A request to resolve the implementation locations of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPositionParams} + * the response is of type {@link Definition} or a Thenable that resolves to such. + */ +var ImplementationRequest; +(function (ImplementationRequest) { + ImplementationRequest.method = 'textDocument/implementation'; + ImplementationRequest.messageDirection = messages_1.MessageDirection.clientToServer; + ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method); +})(ImplementationRequest || (exports.ImplementationRequest = ImplementationRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.d.ts" index 371d1ae600b81bbb5a288632d92093f65ac35521..287481a51198c5958db85afdda5755272f43fefe 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.d.ts" @@ -1,3 +1,110 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:656106ddbe4e00bd32af2c46abb1a8c9abbb8679fbf29adc637c053620286034 -size 3673 +import { RequestHandler, RequestHandler0 } from 'vscode-jsonrpc'; +import { Range, TextDocumentIdentifier, InlayHint } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType, ProtocolRequestType0 } from './messages'; +import type { StaticRegistrationOptions, TextDocumentRegistrationOptions, WorkDoneProgressOptions, WorkDoneProgressParams } from './protocol'; +/** + * Inlay hint client capabilities. + * + * @since 3.17.0 + */ +export type InlayHintClientCapabilities = { + /** + * Whether inlay hints support dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Indicates which properties a client can resolve lazily on an inlay + * hint. + */ + resolveSupport?: { + /** + * The properties that a client can resolve lazily. + */ + properties: string[]; + }; +}; +/** + * Client workspace capabilities specific to inlay hints. + * + * @since 3.17.0 + */ +export type InlayHintWorkspaceClientCapabilities = { + /** + * Whether the client implementation supports a refresh request sent from + * the server to the client. + * + * Note that this event is global and will force the client to refresh all + * inlay hints currently shown. It should be used with absolute care and + * is useful for situation where a server for example detects a project wide + * change that requires such a calculation. + */ + refreshSupport?: boolean; +}; +/** + * Inlay hint options used during static registration. + * + * @since 3.17.0 + */ +export type InlayHintOptions = WorkDoneProgressOptions & { + /** + * The server provides support to resolve additional + * information for an inlay hint item. + */ + resolveProvider?: boolean; +}; +/** + * Inlay hint options used during static or dynamic registration. + * + * @since 3.17.0 + */ +export type InlayHintRegistrationOptions = InlayHintOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions; +/** + * A parameter literal used in inlay hint requests. + * + * @since 3.17.0 + */ +export type InlayHintParams = WorkDoneProgressParams & { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The document range for which inlay hints should be computed. + */ + range: Range; +}; +/** + * A request to provide inlay hints in a document. The request's parameter is of + * type {@link InlayHintsParams}, the response is of type + * {@link InlayHint InlayHint[]} or a Thenable that resolves to such. + * + * @since 3.17.0 + */ +export declare namespace InlayHintRequest { + const method: 'textDocument/inlayHint'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * A request to resolve additional properties for an inlay hint. + * The request's parameter is of type {@link InlayHint}, the response is + * of type {@link InlayHint} or a Thenable that resolves to such. + * + * @since 3.17.0 + */ +export declare namespace InlayHintResolveRequest { + const method: 'inlayHint/resolve'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * @since 3.17.0 + */ +export declare namespace InlayHintRefreshRequest { + const method: `workspace/inlayHint/refresh`; + const messageDirection: MessageDirection; + const type: ProtocolRequestType0; + type HandlerSignature = RequestHandler0; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js" index 14958750ec3558f33bdc0fe9e2e5a43a5e58eb78..b1e915ae7971e19a004dded0675a030a6c01809a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js" @@ -1,3 +1,43 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8280db098391a468bf82117cd14536be14aac082d822c66e77c16ac6634e80d0 -size 2269 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to provide inlay hints in a document. The request's parameter is of + * type {@link InlayHintsParams}, the response is of type + * {@link InlayHint InlayHint[]} or a Thenable that resolves to such. + * + * @since 3.17.0 + */ +var InlayHintRequest; +(function (InlayHintRequest) { + InlayHintRequest.method = 'textDocument/inlayHint'; + InlayHintRequest.messageDirection = messages_1.MessageDirection.clientToServer; + InlayHintRequest.type = new messages_1.ProtocolRequestType(InlayHintRequest.method); +})(InlayHintRequest || (exports.InlayHintRequest = InlayHintRequest = {})); +/** + * A request to resolve additional properties for an inlay hint. + * The request's parameter is of type {@link InlayHint}, the response is + * of type {@link InlayHint} or a Thenable that resolves to such. + * + * @since 3.17.0 + */ +var InlayHintResolveRequest; +(function (InlayHintResolveRequest) { + InlayHintResolveRequest.method = 'inlayHint/resolve'; + InlayHintResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + InlayHintResolveRequest.type = new messages_1.ProtocolRequestType(InlayHintResolveRequest.method); +})(InlayHintResolveRequest || (exports.InlayHintResolveRequest = InlayHintResolveRequest = {})); +/** + * @since 3.17.0 + */ +var InlayHintRefreshRequest; +(function (InlayHintRefreshRequest) { + InlayHintRefreshRequest.method = `workspace/inlayHint/refresh`; + InlayHintRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + InlayHintRefreshRequest.type = new messages_1.ProtocolRequestType0(InlayHintRefreshRequest.method); +})(InlayHintRefreshRequest || (exports.InlayHintRefreshRequest = InlayHintRefreshRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.d.ts" index a78f32faa7b942424d5756aa1c752f0a838a5ce8..56a37679a4197fe37fce22c060c20ec7216f83a3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.d.ts" @@ -1,3 +1,57 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7d40ae7bd3141e4fbad1572e9461e44eb631f3c3db8429d78a26ac7359d6e4e5 -size 2200 +import { InlineCompletionItem, InlineCompletionContext, InlineCompletionList } from 'vscode-languageserver-types'; +import { RequestHandler } from 'vscode-jsonrpc'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { TextDocumentRegistrationOptions, WorkDoneProgressOptions, StaticRegistrationOptions, WorkDoneProgressParams, TextDocumentPositionParams } from './protocol'; +/** + * Client capabilities specific to inline completions. + * + * @since 3.18.0 + * @proposed + */ +export type InlineCompletionClientCapabilities = { + /** + * Whether implementation supports dynamic registration for inline completion providers. + */ + dynamicRegistration?: boolean; +}; +/** + * Inline completion options used during static registration. + * + * @since 3.18.0 + * @proposed + */ +export type InlineCompletionOptions = WorkDoneProgressOptions; +/** + * Inline completion options used during static or dynamic registration. + * + * @since 3.18.0 + * @proposed + */ +export type InlineCompletionRegistrationOptions = InlineCompletionOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions; +/** + * A parameter literal used in inline completion requests. + * + * @since 3.18.0 + * @proposed + */ +export type InlineCompletionParams = WorkDoneProgressParams & TextDocumentPositionParams & { + /** + * Additional information about the context in which inline completions were + * requested. + */ + context: InlineCompletionContext; +}; +/** + * A request to provide inline completions in a document. The request's parameter is of + * type {@link InlineCompletionParams}, the response is of type + * {@link InlineCompletion InlineCompletion[]} or a Thenable that resolves to such. + * + * @since 3.18.0 + * @proposed + */ +export declare namespace InlineCompletionRequest { + const method: 'textDocument/inlineCompletion'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js" index 6204b96aacb024656a32ef757ff8cce51af3d7e1..8b92cd45ddc021adb5ca85f250720368e7e2f13d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js" @@ -1,3 +1,22 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bfeda404f7a717423cdc7f477062671ed4fc7a9f4d938fc5a4dd7a5241ed1c2f -size 1218 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InlineCompletionRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to provide inline completions in a document. The request's parameter is of + * type {@link InlineCompletionParams}, the response is of type + * {@link InlineCompletion InlineCompletion[]} or a Thenable that resolves to such. + * + * @since 3.18.0 + * @proposed + */ +var InlineCompletionRequest; +(function (InlineCompletionRequest) { + InlineCompletionRequest.method = 'textDocument/inlineCompletion'; + InlineCompletionRequest.messageDirection = messages_1.MessageDirection.clientToServer; + InlineCompletionRequest.type = new messages_1.ProtocolRequestType(InlineCompletionRequest.method); +})(InlineCompletionRequest || (exports.InlineCompletionRequest = InlineCompletionRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.d.ts" index 83a79a2fdf1789a3c9971f07dea0e15a4ae9dfac..c835a2979c1cd383d5319419f65ccec8b8bf4aa3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.d.ts" @@ -1,3 +1,86 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6ae49bf0bdc093ec209b0d2ae86a903be5813093dc25f612b9f84d85c3d43ba4 -size 3015 +import { TextDocumentIdentifier, Range, InlineValue, InlineValueContext } from 'vscode-languageserver-types'; +import { RequestHandler, RequestHandler0 } from 'vscode-jsonrpc'; +import { MessageDirection, ProtocolRequestType, ProtocolRequestType0 } from './messages'; +import type { TextDocumentRegistrationOptions, WorkDoneProgressOptions, StaticRegistrationOptions, WorkDoneProgressParams } from './protocol'; +/** + * Client capabilities specific to inline values. + * + * @since 3.17.0 + */ +export type InlineValueClientCapabilities = { + /** + * Whether implementation supports dynamic registration for inline value providers. + */ + dynamicRegistration?: boolean; +}; +/** + * Client workspace capabilities specific to inline values. + * + * @since 3.17.0 + */ +export type InlineValueWorkspaceClientCapabilities = { + /** + * Whether the client implementation supports a refresh request sent from the + * server to the client. + * + * Note that this event is global and will force the client to refresh all + * inline values currently shown. It should be used with absolute care and is + * useful for situation where a server for example detects a project wide + * change that requires such a calculation. + */ + refreshSupport?: boolean; +}; +/** + * Inline value options used during static registration. + * + * @since 3.17.0 + */ +export type InlineValueOptions = WorkDoneProgressOptions; +/** + * Inline value options used during static or dynamic registration. + * + * @since 3.17.0 + */ +export type InlineValueRegistrationOptions = InlineValueOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions; +/** + * A parameter literal used in inline value requests. + * + * @since 3.17.0 + */ +export type InlineValueParams = WorkDoneProgressParams & { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The document range for which inline values should be computed. + */ + range: Range; + /** + * Additional information about the context in which inline values were + * requested. + */ + context: InlineValueContext; +}; +/** + * A request to provide inline values in a document. The request's parameter is of + * type {@link InlineValueParams}, the response is of type + * {@link InlineValue InlineValue[]} or a Thenable that resolves to such. + * + * @since 3.17.0 + */ +export declare namespace InlineValueRequest { + const method: 'textDocument/inlineValue'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * @since 3.17.0 + */ +export declare namespace InlineValueRefreshRequest { + const method: `workspace/inlineValue/refresh`; + const messageDirection: MessageDirection; + const type: ProtocolRequestType0; + type HandlerSignature = RequestHandler0; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js" index 634b3e4342d76661e633b01a534cd17c32ba2a0c..8e81b66cf2bbea42d07d21e2a22ced05a3dc7ea3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js" @@ -1,3 +1,30 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6d5358d073b4b1031ebae006447b57ee09cff71cfaaaa671f2dfa1096ad0d5da -size 1638 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InlineValueRefreshRequest = exports.InlineValueRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to provide inline values in a document. The request's parameter is of + * type {@link InlineValueParams}, the response is of type + * {@link InlineValue InlineValue[]} or a Thenable that resolves to such. + * + * @since 3.17.0 + */ +var InlineValueRequest; +(function (InlineValueRequest) { + InlineValueRequest.method = 'textDocument/inlineValue'; + InlineValueRequest.messageDirection = messages_1.MessageDirection.clientToServer; + InlineValueRequest.type = new messages_1.ProtocolRequestType(InlineValueRequest.method); +})(InlineValueRequest || (exports.InlineValueRequest = InlineValueRequest = {})); +/** + * @since 3.17.0 + */ +var InlineValueRefreshRequest; +(function (InlineValueRefreshRequest) { + InlineValueRefreshRequest.method = `workspace/inlineValue/refresh`; + InlineValueRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + InlineValueRefreshRequest.type = new messages_1.ProtocolRequestType0(InlineValueRefreshRequest.method); +})(InlineValueRefreshRequest || (exports.InlineValueRefreshRequest = InlineValueRefreshRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.js" index 59e39a57948786a098489f36e48a1578529cb7af..7da60f0ddd7c1dd77e39ba4bf944d0244f8990df 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.js" @@ -1,3 +1,943 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:59436f2d4524bb6aa39205e0f20729e1a3ecdd6abaeb999ec2f719481374266e -size 55991 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WorkspaceSymbolRequest = exports.CodeActionResolveRequest = exports.CodeActionRequest = exports.DocumentSymbolRequest = exports.DocumentHighlightRequest = exports.ReferencesRequest = exports.DefinitionRequest = exports.SignatureHelpRequest = exports.SignatureHelpTriggerKind = exports.HoverRequest = exports.CompletionResolveRequest = exports.CompletionRequest = exports.CompletionTriggerKind = exports.PublishDiagnosticsNotification = exports.WatchKind = exports.RelativePattern = exports.FileChangeType = exports.DidChangeWatchedFilesNotification = exports.WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentNotification = exports.TextDocumentSaveReason = exports.DidSaveTextDocumentNotification = exports.DidCloseTextDocumentNotification = exports.DidChangeTextDocumentNotification = exports.TextDocumentContentChangeEvent = exports.DidOpenTextDocumentNotification = exports.TextDocumentSyncKind = exports.TelemetryEventNotification = exports.LogMessageNotification = exports.ShowMessageRequest = exports.ShowMessageNotification = exports.MessageType = exports.DidChangeConfigurationNotification = exports.ExitNotification = exports.ShutdownRequest = exports.InitializedNotification = exports.InitializeErrorCodes = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.PositionEncodingKind = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.NotebookCellTextDocumentFilter = exports.NotebookDocumentFilter = exports.TextDocumentFilter = void 0; +exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRefreshRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangesFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = exports.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = exports.CodeLensRequest = exports.WorkspaceSymbolResolveRequest = void 0; +exports.InlineCompletionRequest = exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = exports.InlineValueRefreshRequest = exports.InlineValueRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchySubtypesRequest = exports.TypeHierarchyPrepareRequest = void 0; +const messages_1 = require("./messages"); +const vscode_languageserver_types_1 = require("vscode-languageserver-types"); +const Is = require("./utils/is"); +const protocol_implementation_1 = require("./protocol.implementation"); +Object.defineProperty(exports, "ImplementationRequest", { enumerable: true, get: function () { return protocol_implementation_1.ImplementationRequest; } }); +const protocol_typeDefinition_1 = require("./protocol.typeDefinition"); +Object.defineProperty(exports, "TypeDefinitionRequest", { enumerable: true, get: function () { return protocol_typeDefinition_1.TypeDefinitionRequest; } }); +const protocol_workspaceFolder_1 = require("./protocol.workspaceFolder"); +Object.defineProperty(exports, "WorkspaceFoldersRequest", { enumerable: true, get: function () { return protocol_workspaceFolder_1.WorkspaceFoldersRequest; } }); +Object.defineProperty(exports, "DidChangeWorkspaceFoldersNotification", { enumerable: true, get: function () { return protocol_workspaceFolder_1.DidChangeWorkspaceFoldersNotification; } }); +const protocol_configuration_1 = require("./protocol.configuration"); +Object.defineProperty(exports, "ConfigurationRequest", { enumerable: true, get: function () { return protocol_configuration_1.ConfigurationRequest; } }); +const protocol_colorProvider_1 = require("./protocol.colorProvider"); +Object.defineProperty(exports, "DocumentColorRequest", { enumerable: true, get: function () { return protocol_colorProvider_1.DocumentColorRequest; } }); +Object.defineProperty(exports, "ColorPresentationRequest", { enumerable: true, get: function () { return protocol_colorProvider_1.ColorPresentationRequest; } }); +const protocol_foldingRange_1 = require("./protocol.foldingRange"); +Object.defineProperty(exports, "FoldingRangeRequest", { enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRequest; } }); +Object.defineProperty(exports, "FoldingRangeRefreshRequest", { enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRefreshRequest; } }); +const protocol_declaration_1 = require("./protocol.declaration"); +Object.defineProperty(exports, "DeclarationRequest", { enumerable: true, get: function () { return protocol_declaration_1.DeclarationRequest; } }); +const protocol_selectionRange_1 = require("./protocol.selectionRange"); +Object.defineProperty(exports, "SelectionRangeRequest", { enumerable: true, get: function () { return protocol_selectionRange_1.SelectionRangeRequest; } }); +const protocol_progress_1 = require("./protocol.progress"); +Object.defineProperty(exports, "WorkDoneProgress", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgress; } }); +Object.defineProperty(exports, "WorkDoneProgressCreateRequest", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCreateRequest; } }); +Object.defineProperty(exports, "WorkDoneProgressCancelNotification", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCancelNotification; } }); +const protocol_callHierarchy_1 = require("./protocol.callHierarchy"); +Object.defineProperty(exports, "CallHierarchyIncomingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyIncomingCallsRequest; } }); +Object.defineProperty(exports, "CallHierarchyOutgoingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest; } }); +Object.defineProperty(exports, "CallHierarchyPrepareRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyPrepareRequest; } }); +const protocol_semanticTokens_1 = require("./protocol.semanticTokens"); +Object.defineProperty(exports, "TokenFormat", { enumerable: true, get: function () { return protocol_semanticTokens_1.TokenFormat; } }); +Object.defineProperty(exports, "SemanticTokensRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRequest; } }); +Object.defineProperty(exports, "SemanticTokensDeltaRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensDeltaRequest; } }); +Object.defineProperty(exports, "SemanticTokensRangeRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRangeRequest; } }); +Object.defineProperty(exports, "SemanticTokensRefreshRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRefreshRequest; } }); +Object.defineProperty(exports, "SemanticTokensRegistrationType", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRegistrationType; } }); +const protocol_showDocument_1 = require("./protocol.showDocument"); +Object.defineProperty(exports, "ShowDocumentRequest", { enumerable: true, get: function () { return protocol_showDocument_1.ShowDocumentRequest; } }); +const protocol_linkedEditingRange_1 = require("./protocol.linkedEditingRange"); +Object.defineProperty(exports, "LinkedEditingRangeRequest", { enumerable: true, get: function () { return protocol_linkedEditingRange_1.LinkedEditingRangeRequest; } }); +const protocol_fileOperations_1 = require("./protocol.fileOperations"); +Object.defineProperty(exports, "FileOperationPatternKind", { enumerable: true, get: function () { return protocol_fileOperations_1.FileOperationPatternKind; } }); +Object.defineProperty(exports, "DidCreateFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidCreateFilesNotification; } }); +Object.defineProperty(exports, "WillCreateFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillCreateFilesRequest; } }); +Object.defineProperty(exports, "DidRenameFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidRenameFilesNotification; } }); +Object.defineProperty(exports, "WillRenameFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillRenameFilesRequest; } }); +Object.defineProperty(exports, "DidDeleteFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidDeleteFilesNotification; } }); +Object.defineProperty(exports, "WillDeleteFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillDeleteFilesRequest; } }); +const protocol_moniker_1 = require("./protocol.moniker"); +Object.defineProperty(exports, "UniquenessLevel", { enumerable: true, get: function () { return protocol_moniker_1.UniquenessLevel; } }); +Object.defineProperty(exports, "MonikerKind", { enumerable: true, get: function () { return protocol_moniker_1.MonikerKind; } }); +Object.defineProperty(exports, "MonikerRequest", { enumerable: true, get: function () { return protocol_moniker_1.MonikerRequest; } }); +const protocol_typeHierarchy_1 = require("./protocol.typeHierarchy"); +Object.defineProperty(exports, "TypeHierarchyPrepareRequest", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchyPrepareRequest; } }); +Object.defineProperty(exports, "TypeHierarchySubtypesRequest", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchySubtypesRequest; } }); +Object.defineProperty(exports, "TypeHierarchySupertypesRequest", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchySupertypesRequest; } }); +const protocol_inlineValue_1 = require("./protocol.inlineValue"); +Object.defineProperty(exports, "InlineValueRequest", { enumerable: true, get: function () { return protocol_inlineValue_1.InlineValueRequest; } }); +Object.defineProperty(exports, "InlineValueRefreshRequest", { enumerable: true, get: function () { return protocol_inlineValue_1.InlineValueRefreshRequest; } }); +const protocol_inlayHint_1 = require("./protocol.inlayHint"); +Object.defineProperty(exports, "InlayHintRequest", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintRequest; } }); +Object.defineProperty(exports, "InlayHintResolveRequest", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintResolveRequest; } }); +Object.defineProperty(exports, "InlayHintRefreshRequest", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintRefreshRequest; } }); +const protocol_diagnostic_1 = require("./protocol.diagnostic"); +Object.defineProperty(exports, "DiagnosticServerCancellationData", { enumerable: true, get: function () { return protocol_diagnostic_1.DiagnosticServerCancellationData; } }); +Object.defineProperty(exports, "DocumentDiagnosticReportKind", { enumerable: true, get: function () { return protocol_diagnostic_1.DocumentDiagnosticReportKind; } }); +Object.defineProperty(exports, "DocumentDiagnosticRequest", { enumerable: true, get: function () { return protocol_diagnostic_1.DocumentDiagnosticRequest; } }); +Object.defineProperty(exports, "WorkspaceDiagnosticRequest", { enumerable: true, get: function () { return protocol_diagnostic_1.WorkspaceDiagnosticRequest; } }); +Object.defineProperty(exports, "DiagnosticRefreshRequest", { enumerable: true, get: function () { return protocol_diagnostic_1.DiagnosticRefreshRequest; } }); +const protocol_notebook_1 = require("./protocol.notebook"); +Object.defineProperty(exports, "NotebookCellKind", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCellKind; } }); +Object.defineProperty(exports, "ExecutionSummary", { enumerable: true, get: function () { return protocol_notebook_1.ExecutionSummary; } }); +Object.defineProperty(exports, "NotebookCell", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCell; } }); +Object.defineProperty(exports, "NotebookDocument", { enumerable: true, get: function () { return protocol_notebook_1.NotebookDocument; } }); +Object.defineProperty(exports, "NotebookDocumentSyncRegistrationType", { enumerable: true, get: function () { return protocol_notebook_1.NotebookDocumentSyncRegistrationType; } }); +Object.defineProperty(exports, "DidOpenNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidOpenNotebookDocumentNotification; } }); +Object.defineProperty(exports, "NotebookCellArrayChange", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCellArrayChange; } }); +Object.defineProperty(exports, "DidChangeNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidChangeNotebookDocumentNotification; } }); +Object.defineProperty(exports, "DidSaveNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidSaveNotebookDocumentNotification; } }); +Object.defineProperty(exports, "DidCloseNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidCloseNotebookDocumentNotification; } }); +const protocol_inlineCompletion_1 = require("./protocol.inlineCompletion"); +Object.defineProperty(exports, "InlineCompletionRequest", { enumerable: true, get: function () { return protocol_inlineCompletion_1.InlineCompletionRequest; } }); +// @ts-ignore: to avoid inlining LocationLink as dynamic import +let __noDynamicImport; +/** + * The TextDocumentFilter namespace provides helper functions to work with + * {@link TextDocumentFilter} literals. + * + * @since 3.17.0 + */ +var TextDocumentFilter; +(function (TextDocumentFilter) { + function is(value) { + const candidate = value; + return Is.string(candidate) || (Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern)); + } + TextDocumentFilter.is = is; +})(TextDocumentFilter || (exports.TextDocumentFilter = TextDocumentFilter = {})); +/** + * The NotebookDocumentFilter namespace provides helper functions to work with + * {@link NotebookDocumentFilter} literals. + * + * @since 3.17.0 + */ +var NotebookDocumentFilter; +(function (NotebookDocumentFilter) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && (Is.string(candidate.notebookType) || Is.string(candidate.scheme) || Is.string(candidate.pattern)); + } + NotebookDocumentFilter.is = is; +})(NotebookDocumentFilter || (exports.NotebookDocumentFilter = NotebookDocumentFilter = {})); +/** + * The NotebookCellTextDocumentFilter namespace provides helper functions to work with + * {@link NotebookCellTextDocumentFilter} literals. + * + * @since 3.17.0 + */ +var NotebookCellTextDocumentFilter; +(function (NotebookCellTextDocumentFilter) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) + && (Is.string(candidate.notebook) || NotebookDocumentFilter.is(candidate.notebook)) + && (candidate.language === undefined || Is.string(candidate.language)); + } + NotebookCellTextDocumentFilter.is = is; +})(NotebookCellTextDocumentFilter || (exports.NotebookCellTextDocumentFilter = NotebookCellTextDocumentFilter = {})); +/** + * The DocumentSelector namespace provides helper functions to work with + * {@link DocumentSelector}s. + */ +var DocumentSelector; +(function (DocumentSelector) { + function is(value) { + if (!Array.isArray(value)) { + return false; + } + for (let elem of value) { + if (!Is.string(elem) && !TextDocumentFilter.is(elem) && !NotebookCellTextDocumentFilter.is(elem)) { + return false; + } + } + return true; + } + DocumentSelector.is = is; +})(DocumentSelector || (exports.DocumentSelector = DocumentSelector = {})); +/** + * The `client/registerCapability` request is sent from the server to the client to register a new capability + * handler on the client side. + */ +var RegistrationRequest; +(function (RegistrationRequest) { + RegistrationRequest.method = 'client/registerCapability'; + RegistrationRequest.messageDirection = messages_1.MessageDirection.serverToClient; + RegistrationRequest.type = new messages_1.ProtocolRequestType(RegistrationRequest.method); +})(RegistrationRequest || (exports.RegistrationRequest = RegistrationRequest = {})); +/** + * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability + * handler on the client side. + */ +var UnregistrationRequest; +(function (UnregistrationRequest) { + UnregistrationRequest.method = 'client/unregisterCapability'; + UnregistrationRequest.messageDirection = messages_1.MessageDirection.serverToClient; + UnregistrationRequest.type = new messages_1.ProtocolRequestType(UnregistrationRequest.method); +})(UnregistrationRequest || (exports.UnregistrationRequest = UnregistrationRequest = {})); +var ResourceOperationKind; +(function (ResourceOperationKind) { + /** + * Supports creating new files and folders. + */ + ResourceOperationKind.Create = 'create'; + /** + * Supports renaming existing files and folders. + */ + ResourceOperationKind.Rename = 'rename'; + /** + * Supports deleting existing files and folders. + */ + ResourceOperationKind.Delete = 'delete'; +})(ResourceOperationKind || (exports.ResourceOperationKind = ResourceOperationKind = {})); +var FailureHandlingKind; +(function (FailureHandlingKind) { + /** + * Applying the workspace change is simply aborted if one of the changes provided + * fails. All operations executed before the failing operation stay executed. + */ + FailureHandlingKind.Abort = 'abort'; + /** + * All operations are executed transactional. That means they either all + * succeed or no changes at all are applied to the workspace. + */ + FailureHandlingKind.Transactional = 'transactional'; + /** + * If the workspace edit contains only textual file changes they are executed transactional. + * If resource changes (create, rename or delete file) are part of the change the failure + * handling strategy is abort. + */ + FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional'; + /** + * The client tries to undo the operations already executed. But there is no + * guarantee that this is succeeding. + */ + FailureHandlingKind.Undo = 'undo'; +})(FailureHandlingKind || (exports.FailureHandlingKind = FailureHandlingKind = {})); +/** + * A set of predefined position encoding kinds. + * + * @since 3.17.0 + */ +var PositionEncodingKind; +(function (PositionEncodingKind) { + /** + * Character offsets count UTF-8 code units (e.g. bytes). + */ + PositionEncodingKind.UTF8 = 'utf-8'; + /** + * Character offsets count UTF-16 code units. + * + * This is the default and must always be supported + * by servers + */ + PositionEncodingKind.UTF16 = 'utf-16'; + /** + * Character offsets count UTF-32 code units. + * + * Implementation note: these are the same as Unicode codepoints, + * so this `PositionEncodingKind` may also be used for an + * encoding-agnostic representation of character offsets. + */ + PositionEncodingKind.UTF32 = 'utf-32'; +})(PositionEncodingKind || (exports.PositionEncodingKind = PositionEncodingKind = {})); +/** + * The StaticRegistrationOptions namespace provides helper functions to work with + * {@link StaticRegistrationOptions} literals. + */ +var StaticRegistrationOptions; +(function (StaticRegistrationOptions) { + function hasId(value) { + const candidate = value; + return candidate && Is.string(candidate.id) && candidate.id.length > 0; + } + StaticRegistrationOptions.hasId = hasId; +})(StaticRegistrationOptions || (exports.StaticRegistrationOptions = StaticRegistrationOptions = {})); +/** + * The TextDocumentRegistrationOptions namespace provides helper functions to work with + * {@link TextDocumentRegistrationOptions} literals. + */ +var TextDocumentRegistrationOptions; +(function (TextDocumentRegistrationOptions) { + function is(value) { + const candidate = value; + return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector)); + } + TextDocumentRegistrationOptions.is = is; +})(TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = TextDocumentRegistrationOptions = {})); +/** + * The WorkDoneProgressOptions namespace provides helper functions to work with + * {@link WorkDoneProgressOptions} literals. + */ +var WorkDoneProgressOptions; +(function (WorkDoneProgressOptions) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress)); + } + WorkDoneProgressOptions.is = is; + function hasWorkDoneProgress(value) { + const candidate = value; + return candidate && Is.boolean(candidate.workDoneProgress); + } + WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress; +})(WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = WorkDoneProgressOptions = {})); +/** + * The initialize request is sent from the client to the server. + * It is sent once as the request after starting up the server. + * The requests parameter is of type {@link InitializeParams} + * the response if of type {@link InitializeResult} of a Thenable that + * resolves to such. + */ +var InitializeRequest; +(function (InitializeRequest) { + InitializeRequest.method = 'initialize'; + InitializeRequest.messageDirection = messages_1.MessageDirection.clientToServer; + InitializeRequest.type = new messages_1.ProtocolRequestType(InitializeRequest.method); +})(InitializeRequest || (exports.InitializeRequest = InitializeRequest = {})); +/** + * Known error codes for an `InitializeErrorCodes`; + */ +var InitializeErrorCodes; +(function (InitializeErrorCodes) { + /** + * If the protocol version provided by the client can't be handled by the server. + * + * @deprecated This initialize error got replaced by client capabilities. There is + * no version handshake in version 3.0x + */ + InitializeErrorCodes.unknownProtocolVersion = 1; +})(InitializeErrorCodes || (exports.InitializeErrorCodes = InitializeErrorCodes = {})); +/** + * The initialized notification is sent from the client to the + * server after the client is fully initialized and the server + * is allowed to send requests from the server to the client. + */ +var InitializedNotification; +(function (InitializedNotification) { + InitializedNotification.method = 'initialized'; + InitializedNotification.messageDirection = messages_1.MessageDirection.clientToServer; + InitializedNotification.type = new messages_1.ProtocolNotificationType(InitializedNotification.method); +})(InitializedNotification || (exports.InitializedNotification = InitializedNotification = {})); +//---- Shutdown Method ---- +/** + * A shutdown request is sent from the client to the server. + * It is sent once when the client decides to shutdown the + * server. The only notification that is sent after a shutdown request + * is the exit event. + */ +var ShutdownRequest; +(function (ShutdownRequest) { + ShutdownRequest.method = 'shutdown'; + ShutdownRequest.messageDirection = messages_1.MessageDirection.clientToServer; + ShutdownRequest.type = new messages_1.ProtocolRequestType0(ShutdownRequest.method); +})(ShutdownRequest || (exports.ShutdownRequest = ShutdownRequest = {})); +//---- Exit Notification ---- +/** + * The exit event is sent from the client to the server to + * ask the server to exit its process. + */ +var ExitNotification; +(function (ExitNotification) { + ExitNotification.method = 'exit'; + ExitNotification.messageDirection = messages_1.MessageDirection.clientToServer; + ExitNotification.type = new messages_1.ProtocolNotificationType0(ExitNotification.method); +})(ExitNotification || (exports.ExitNotification = ExitNotification = {})); +/** + * The configuration change notification is sent from the client to the server + * when the client's configuration has changed. The notification contains + * the changed configuration as defined by the language client. + */ +var DidChangeConfigurationNotification; +(function (DidChangeConfigurationNotification) { + DidChangeConfigurationNotification.method = 'workspace/didChangeConfiguration'; + DidChangeConfigurationNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType(DidChangeConfigurationNotification.method); +})(DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = DidChangeConfigurationNotification = {})); +//---- Message show and log notifications ---- +/** + * The message type + */ +var MessageType; +(function (MessageType) { + /** + * An error message. + */ + MessageType.Error = 1; + /** + * A warning message. + */ + MessageType.Warning = 2; + /** + * An information message. + */ + MessageType.Info = 3; + /** + * A log message. + */ + MessageType.Log = 4; + /** + * A debug message. + * + * @since 3.18.0 + */ + MessageType.Debug = 5; +})(MessageType || (exports.MessageType = MessageType = {})); +/** + * The show message notification is sent from a server to a client to ask + * the client to display a particular message in the user interface. + */ +var ShowMessageNotification; +(function (ShowMessageNotification) { + ShowMessageNotification.method = 'window/showMessage'; + ShowMessageNotification.messageDirection = messages_1.MessageDirection.serverToClient; + ShowMessageNotification.type = new messages_1.ProtocolNotificationType(ShowMessageNotification.method); +})(ShowMessageNotification || (exports.ShowMessageNotification = ShowMessageNotification = {})); +/** + * The show message request is sent from the server to the client to show a message + * and a set of options actions to the user. + */ +var ShowMessageRequest; +(function (ShowMessageRequest) { + ShowMessageRequest.method = 'window/showMessageRequest'; + ShowMessageRequest.messageDirection = messages_1.MessageDirection.serverToClient; + ShowMessageRequest.type = new messages_1.ProtocolRequestType(ShowMessageRequest.method); +})(ShowMessageRequest || (exports.ShowMessageRequest = ShowMessageRequest = {})); +/** + * The log message notification is sent from the server to the client to ask + * the client to log a particular message. + */ +var LogMessageNotification; +(function (LogMessageNotification) { + LogMessageNotification.method = 'window/logMessage'; + LogMessageNotification.messageDirection = messages_1.MessageDirection.serverToClient; + LogMessageNotification.type = new messages_1.ProtocolNotificationType(LogMessageNotification.method); +})(LogMessageNotification || (exports.LogMessageNotification = LogMessageNotification = {})); +//---- Telemetry notification +/** + * The telemetry event notification is sent from the server to the client to ask + * the client to log telemetry data. + */ +var TelemetryEventNotification; +(function (TelemetryEventNotification) { + TelemetryEventNotification.method = 'telemetry/event'; + TelemetryEventNotification.messageDirection = messages_1.MessageDirection.serverToClient; + TelemetryEventNotification.type = new messages_1.ProtocolNotificationType(TelemetryEventNotification.method); +})(TelemetryEventNotification || (exports.TelemetryEventNotification = TelemetryEventNotification = {})); +/** + * Defines how the host (editor) should sync + * document changes to the language server. + */ +var TextDocumentSyncKind; +(function (TextDocumentSyncKind) { + /** + * Documents should not be synced at all. + */ + TextDocumentSyncKind.None = 0; + /** + * Documents are synced by always sending the full content + * of the document. + */ + TextDocumentSyncKind.Full = 1; + /** + * Documents are synced by sending the full content on open. + * After that only incremental updates to the document are + * send. + */ + TextDocumentSyncKind.Incremental = 2; +})(TextDocumentSyncKind || (exports.TextDocumentSyncKind = TextDocumentSyncKind = {})); +/** + * The document open notification is sent from the client to the server to signal + * newly opened text documents. The document's truth is now managed by the client + * and the server must not try to read the document's truth using the document's + * uri. Open in this sense means it is managed by the client. It doesn't necessarily + * mean that its content is presented in an editor. An open notification must not + * be sent more than once without a corresponding close notification send before. + * This means open and close notification must be balanced and the max open count + * is one. + */ +var DidOpenTextDocumentNotification; +(function (DidOpenTextDocumentNotification) { + DidOpenTextDocumentNotification.method = 'textDocument/didOpen'; + DidOpenTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method); +})(DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = DidOpenTextDocumentNotification = {})); +var TextDocumentContentChangeEvent; +(function (TextDocumentContentChangeEvent) { + /** + * Checks whether the information describes a delta event. + */ + function isIncremental(event) { + let candidate = event; + return candidate !== undefined && candidate !== null && + typeof candidate.text === 'string' && candidate.range !== undefined && + (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number'); + } + TextDocumentContentChangeEvent.isIncremental = isIncremental; + /** + * Checks whether the information describes a full replacement event. + */ + function isFull(event) { + let candidate = event; + return candidate !== undefined && candidate !== null && + typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined; + } + TextDocumentContentChangeEvent.isFull = isFull; +})(TextDocumentContentChangeEvent || (exports.TextDocumentContentChangeEvent = TextDocumentContentChangeEvent = {})); +/** + * The document change notification is sent from the client to the server to signal + * changes to a text document. + */ +var DidChangeTextDocumentNotification; +(function (DidChangeTextDocumentNotification) { + DidChangeTextDocumentNotification.method = 'textDocument/didChange'; + DidChangeTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method); +})(DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = DidChangeTextDocumentNotification = {})); +/** + * The document close notification is sent from the client to the server when + * the document got closed in the client. The document's truth now exists where + * the document's uri points to (e.g. if the document's uri is a file uri the + * truth now exists on disk). As with the open notification the close notification + * is about managing the document's content. Receiving a close notification + * doesn't mean that the document was open in an editor before. A close + * notification requires a previous open notification to be sent. + */ +var DidCloseTextDocumentNotification; +(function (DidCloseTextDocumentNotification) { + DidCloseTextDocumentNotification.method = 'textDocument/didClose'; + DidCloseTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method); +})(DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = DidCloseTextDocumentNotification = {})); +/** + * The document save notification is sent from the client to the server when + * the document got saved in the client. + */ +var DidSaveTextDocumentNotification; +(function (DidSaveTextDocumentNotification) { + DidSaveTextDocumentNotification.method = 'textDocument/didSave'; + DidSaveTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method); +})(DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = DidSaveTextDocumentNotification = {})); +/** + * Represents reasons why a text document is saved. + */ +var TextDocumentSaveReason; +(function (TextDocumentSaveReason) { + /** + * Manually triggered, e.g. by the user pressing save, by starting debugging, + * or by an API call. + */ + TextDocumentSaveReason.Manual = 1; + /** + * Automatic after a delay. + */ + TextDocumentSaveReason.AfterDelay = 2; + /** + * When the editor lost focus. + */ + TextDocumentSaveReason.FocusOut = 3; +})(TextDocumentSaveReason || (exports.TextDocumentSaveReason = TextDocumentSaveReason = {})); +/** + * A document will save notification is sent from the client to the server before + * the document is actually saved. + */ +var WillSaveTextDocumentNotification; +(function (WillSaveTextDocumentNotification) { + WillSaveTextDocumentNotification.method = 'textDocument/willSave'; + WillSaveTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method); +})(WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = WillSaveTextDocumentNotification = {})); +/** + * A document will save request is sent from the client to the server before + * the document is actually saved. The request can return an array of TextEdits + * which will be applied to the text document before it is saved. Please note that + * clients might drop results if computing the text edits took too long or if a + * server constantly fails on this request. This is done to keep the save fast and + * reliable. + */ +var WillSaveTextDocumentWaitUntilRequest; +(function (WillSaveTextDocumentWaitUntilRequest) { + WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil'; + WillSaveTextDocumentWaitUntilRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method); +})(WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = WillSaveTextDocumentWaitUntilRequest = {})); +/** + * The watched files notification is sent from the client to the server when + * the client detects changes to file watched by the language client. + */ +var DidChangeWatchedFilesNotification; +(function (DidChangeWatchedFilesNotification) { + DidChangeWatchedFilesNotification.method = 'workspace/didChangeWatchedFiles'; + DidChangeWatchedFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType(DidChangeWatchedFilesNotification.method); +})(DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = DidChangeWatchedFilesNotification = {})); +/** + * The file event type + */ +var FileChangeType; +(function (FileChangeType) { + /** + * The file got created. + */ + FileChangeType.Created = 1; + /** + * The file got changed. + */ + FileChangeType.Changed = 2; + /** + * The file got deleted. + */ + FileChangeType.Deleted = 3; +})(FileChangeType || (exports.FileChangeType = FileChangeType = {})); +var RelativePattern; +(function (RelativePattern) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && (vscode_languageserver_types_1.URI.is(candidate.baseUri) || vscode_languageserver_types_1.WorkspaceFolder.is(candidate.baseUri)) && Is.string(candidate.pattern); + } + RelativePattern.is = is; +})(RelativePattern || (exports.RelativePattern = RelativePattern = {})); +var WatchKind; +(function (WatchKind) { + /** + * Interested in create events. + */ + WatchKind.Create = 1; + /** + * Interested in change events + */ + WatchKind.Change = 2; + /** + * Interested in delete events + */ + WatchKind.Delete = 4; +})(WatchKind || (exports.WatchKind = WatchKind = {})); +/** + * Diagnostics notification are sent from the server to the client to signal + * results of validation runs. + */ +var PublishDiagnosticsNotification; +(function (PublishDiagnosticsNotification) { + PublishDiagnosticsNotification.method = 'textDocument/publishDiagnostics'; + PublishDiagnosticsNotification.messageDirection = messages_1.MessageDirection.serverToClient; + PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType(PublishDiagnosticsNotification.method); +})(PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = PublishDiagnosticsNotification = {})); +/** + * How a completion was triggered + */ +var CompletionTriggerKind; +(function (CompletionTriggerKind) { + /** + * Completion was triggered by typing an identifier (24x7 code + * complete), manual invocation (e.g Ctrl+Space) or via API. + */ + CompletionTriggerKind.Invoked = 1; + /** + * Completion was triggered by a trigger character specified by + * the `triggerCharacters` properties of the `CompletionRegistrationOptions`. + */ + CompletionTriggerKind.TriggerCharacter = 2; + /** + * Completion was re-triggered as current completion list is incomplete + */ + CompletionTriggerKind.TriggerForIncompleteCompletions = 3; +})(CompletionTriggerKind || (exports.CompletionTriggerKind = CompletionTriggerKind = {})); +/** + * Request to request completion at a given text document position. The request's + * parameter is of type {@link TextDocumentPosition} the response + * is of type {@link CompletionItem CompletionItem[]} or {@link CompletionList} + * or a Thenable that resolves to such. + * + * The request can delay the computation of the {@link CompletionItem.detail `detail`} + * and {@link CompletionItem.documentation `documentation`} properties to the `completionItem/resolve` + * request. However, properties that are needed for the initial sorting and filtering, like `sortText`, + * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve. + */ +var CompletionRequest; +(function (CompletionRequest) { + CompletionRequest.method = 'textDocument/completion'; + CompletionRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method); +})(CompletionRequest || (exports.CompletionRequest = CompletionRequest = {})); +/** + * Request to resolve additional information for a given completion item.The request's + * parameter is of type {@link CompletionItem} the response + * is of type {@link CompletionItem} or a Thenable that resolves to such. + */ +var CompletionResolveRequest; +(function (CompletionResolveRequest) { + CompletionResolveRequest.method = 'completionItem/resolve'; + CompletionResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method); +})(CompletionResolveRequest || (exports.CompletionResolveRequest = CompletionResolveRequest = {})); +/** + * Request to request hover information at a given text document position. The request's + * parameter is of type {@link TextDocumentPosition} the response is of + * type {@link Hover} or a Thenable that resolves to such. + */ +var HoverRequest; +(function (HoverRequest) { + HoverRequest.method = 'textDocument/hover'; + HoverRequest.messageDirection = messages_1.MessageDirection.clientToServer; + HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method); +})(HoverRequest || (exports.HoverRequest = HoverRequest = {})); +/** + * How a signature help was triggered. + * + * @since 3.15.0 + */ +var SignatureHelpTriggerKind; +(function (SignatureHelpTriggerKind) { + /** + * Signature help was invoked manually by the user or by a command. + */ + SignatureHelpTriggerKind.Invoked = 1; + /** + * Signature help was triggered by a trigger character. + */ + SignatureHelpTriggerKind.TriggerCharacter = 2; + /** + * Signature help was triggered by the cursor moving or by the document content changing. + */ + SignatureHelpTriggerKind.ContentChange = 3; +})(SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = SignatureHelpTriggerKind = {})); +var SignatureHelpRequest; +(function (SignatureHelpRequest) { + SignatureHelpRequest.method = 'textDocument/signatureHelp'; + SignatureHelpRequest.messageDirection = messages_1.MessageDirection.clientToServer; + SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method); +})(SignatureHelpRequest || (exports.SignatureHelpRequest = SignatureHelpRequest = {})); +/** + * A request to resolve the definition location of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPosition} + * the response is of either type {@link Definition} or a typed array of + * {@link DefinitionLink} or a Thenable that resolves to such. + */ +var DefinitionRequest; +(function (DefinitionRequest) { + DefinitionRequest.method = 'textDocument/definition'; + DefinitionRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method); +})(DefinitionRequest || (exports.DefinitionRequest = DefinitionRequest = {})); +/** + * A request to resolve project-wide references for the symbol denoted + * by the given text document position. The request's parameter is of + * type {@link ReferenceParams} the response is of type + * {@link Location Location[]} or a Thenable that resolves to such. + */ +var ReferencesRequest; +(function (ReferencesRequest) { + ReferencesRequest.method = 'textDocument/references'; + ReferencesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method); +})(ReferencesRequest || (exports.ReferencesRequest = ReferencesRequest = {})); +/** + * Request to resolve a {@link DocumentHighlight} for a given + * text document position. The request's parameter is of type {@link TextDocumentPosition} + * the request response is an array of type {@link DocumentHighlight} + * or a Thenable that resolves to such. + */ +var DocumentHighlightRequest; +(function (DocumentHighlightRequest) { + DocumentHighlightRequest.method = 'textDocument/documentHighlight'; + DocumentHighlightRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method); +})(DocumentHighlightRequest || (exports.DocumentHighlightRequest = DocumentHighlightRequest = {})); +/** + * A request to list all symbols found in a given text document. The request's + * parameter is of type {@link TextDocumentIdentifier} the + * response is of type {@link SymbolInformation SymbolInformation[]} or a Thenable + * that resolves to such. + */ +var DocumentSymbolRequest; +(function (DocumentSymbolRequest) { + DocumentSymbolRequest.method = 'textDocument/documentSymbol'; + DocumentSymbolRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method); +})(DocumentSymbolRequest || (exports.DocumentSymbolRequest = DocumentSymbolRequest = {})); +/** + * A request to provide commands for the given text document and range. + */ +var CodeActionRequest; +(function (CodeActionRequest) { + CodeActionRequest.method = 'textDocument/codeAction'; + CodeActionRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method); +})(CodeActionRequest || (exports.CodeActionRequest = CodeActionRequest = {})); +/** + * Request to resolve additional information for a given code action.The request's + * parameter is of type {@link CodeAction} the response + * is of type {@link CodeAction} or a Thenable that resolves to such. + */ +var CodeActionResolveRequest; +(function (CodeActionResolveRequest) { + CodeActionResolveRequest.method = 'codeAction/resolve'; + CodeActionResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CodeActionResolveRequest.type = new messages_1.ProtocolRequestType(CodeActionResolveRequest.method); +})(CodeActionResolveRequest || (exports.CodeActionResolveRequest = CodeActionResolveRequest = {})); +/** + * A request to list project-wide symbols matching the query string given + * by the {@link WorkspaceSymbolParams}. The response is + * of type {@link SymbolInformation SymbolInformation[]} or a Thenable that + * resolves to such. + * + * @since 3.17.0 - support for WorkspaceSymbol in the returned data. Clients + * need to advertise support for WorkspaceSymbols via the client capability + * `workspace.symbol.resolveSupport`. + * + */ +var WorkspaceSymbolRequest; +(function (WorkspaceSymbolRequest) { + WorkspaceSymbolRequest.method = 'workspace/symbol'; + WorkspaceSymbolRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method); +})(WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = WorkspaceSymbolRequest = {})); +/** + * A request to resolve the range inside the workspace + * symbol's location. + * + * @since 3.17.0 + */ +var WorkspaceSymbolResolveRequest; +(function (WorkspaceSymbolResolveRequest) { + WorkspaceSymbolResolveRequest.method = 'workspaceSymbol/resolve'; + WorkspaceSymbolResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WorkspaceSymbolResolveRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolResolveRequest.method); +})(WorkspaceSymbolResolveRequest || (exports.WorkspaceSymbolResolveRequest = WorkspaceSymbolResolveRequest = {})); +/** + * A request to provide code lens for the given text document. + */ +var CodeLensRequest; +(function (CodeLensRequest) { + CodeLensRequest.method = 'textDocument/codeLens'; + CodeLensRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CodeLensRequest.type = new messages_1.ProtocolRequestType(CodeLensRequest.method); +})(CodeLensRequest || (exports.CodeLensRequest = CodeLensRequest = {})); +/** + * A request to resolve a command for a given code lens. + */ +var CodeLensResolveRequest; +(function (CodeLensResolveRequest) { + CodeLensResolveRequest.method = 'codeLens/resolve'; + CodeLensResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CodeLensResolveRequest.type = new messages_1.ProtocolRequestType(CodeLensResolveRequest.method); +})(CodeLensResolveRequest || (exports.CodeLensResolveRequest = CodeLensResolveRequest = {})); +/** + * A request to refresh all code actions + * + * @since 3.16.0 + */ +var CodeLensRefreshRequest; +(function (CodeLensRefreshRequest) { + CodeLensRefreshRequest.method = `workspace/codeLens/refresh`; + CodeLensRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + CodeLensRefreshRequest.type = new messages_1.ProtocolRequestType0(CodeLensRefreshRequest.method); +})(CodeLensRefreshRequest || (exports.CodeLensRefreshRequest = CodeLensRefreshRequest = {})); +/** + * A request to provide document links + */ +var DocumentLinkRequest; +(function (DocumentLinkRequest) { + DocumentLinkRequest.method = 'textDocument/documentLink'; + DocumentLinkRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method); +})(DocumentLinkRequest || (exports.DocumentLinkRequest = DocumentLinkRequest = {})); +/** + * Request to resolve additional information for a given document link. The request's + * parameter is of type {@link DocumentLink} the response + * is of type {@link DocumentLink} or a Thenable that resolves to such. + */ +var DocumentLinkResolveRequest; +(function (DocumentLinkResolveRequest) { + DocumentLinkResolveRequest.method = 'documentLink/resolve'; + DocumentLinkResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType(DocumentLinkResolveRequest.method); +})(DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = DocumentLinkResolveRequest = {})); +/** + * A request to format a whole document. + */ +var DocumentFormattingRequest; +(function (DocumentFormattingRequest) { + DocumentFormattingRequest.method = 'textDocument/formatting'; + DocumentFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method); +})(DocumentFormattingRequest || (exports.DocumentFormattingRequest = DocumentFormattingRequest = {})); +/** + * A request to format a range in a document. + */ +var DocumentRangeFormattingRequest; +(function (DocumentRangeFormattingRequest) { + DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting'; + DocumentRangeFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method); +})(DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = DocumentRangeFormattingRequest = {})); +/** + * A request to format ranges in a document. + * + * @since 3.18.0 + * @proposed + */ +var DocumentRangesFormattingRequest; +(function (DocumentRangesFormattingRequest) { + DocumentRangesFormattingRequest.method = 'textDocument/rangesFormatting'; + DocumentRangesFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentRangesFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangesFormattingRequest.method); +})(DocumentRangesFormattingRequest || (exports.DocumentRangesFormattingRequest = DocumentRangesFormattingRequest = {})); +/** + * A request to format a document on type. + */ +var DocumentOnTypeFormattingRequest; +(function (DocumentOnTypeFormattingRequest) { + DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting'; + DocumentOnTypeFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method); +})(DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = DocumentOnTypeFormattingRequest = {})); +//---- Rename ---------------------------------------------- +var PrepareSupportDefaultBehavior; +(function (PrepareSupportDefaultBehavior) { + /** + * The client's default behavior is to select the identifier + * according the to language's syntax rule. + */ + PrepareSupportDefaultBehavior.Identifier = 1; +})(PrepareSupportDefaultBehavior || (exports.PrepareSupportDefaultBehavior = PrepareSupportDefaultBehavior = {})); +/** + * A request to rename a symbol. + */ +var RenameRequest; +(function (RenameRequest) { + RenameRequest.method = 'textDocument/rename'; + RenameRequest.messageDirection = messages_1.MessageDirection.clientToServer; + RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method); +})(RenameRequest || (exports.RenameRequest = RenameRequest = {})); +/** + * A request to test and perform the setup necessary for a rename. + * + * @since 3.16 - support for default behavior + */ +var PrepareRenameRequest; +(function (PrepareRenameRequest) { + PrepareRenameRequest.method = 'textDocument/prepareRename'; + PrepareRenameRequest.messageDirection = messages_1.MessageDirection.clientToServer; + PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method); +})(PrepareRenameRequest || (exports.PrepareRenameRequest = PrepareRenameRequest = {})); +/** + * A request send from the client to the server to execute a command. The request might return + * a workspace edit which the client will apply to the workspace. + */ +var ExecuteCommandRequest; +(function (ExecuteCommandRequest) { + ExecuteCommandRequest.method = 'workspace/executeCommand'; + ExecuteCommandRequest.messageDirection = messages_1.MessageDirection.clientToServer; + ExecuteCommandRequest.type = new messages_1.ProtocolRequestType(ExecuteCommandRequest.method); +})(ExecuteCommandRequest || (exports.ExecuteCommandRequest = ExecuteCommandRequest = {})); +/** + * A request sent from the server to the client to modified certain resources. + */ +var ApplyWorkspaceEditRequest; +(function (ApplyWorkspaceEditRequest) { + ApplyWorkspaceEditRequest.method = 'workspace/applyEdit'; + ApplyWorkspaceEditRequest.messageDirection = messages_1.MessageDirection.serverToClient; + ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit'); +})(ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = ApplyWorkspaceEditRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts" index 69579fadc79c2538c502e05bf3422aaf9dbe881d..d3297a52bec777aa5fb80a68541c4ab58f3ea659 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts" @@ -1,3 +1,52 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:818d9a0841c884447fbd61b934c6743aea1fa6f1c0159ef44ef55b8f02b9120f -size 2176 +import { RequestHandler } from 'vscode-jsonrpc'; +import { Range } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { StaticRegistrationOptions, TextDocumentPositionParams, TextDocumentRegistrationOptions, WorkDoneProgressOptions, WorkDoneProgressParams } from './protocol'; +/** + * Client capabilities for the linked editing range request. + * + * @since 3.16.0 + */ +export interface LinkedEditingRangeClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + * return value for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; +} +export interface LinkedEditingRangeParams extends TextDocumentPositionParams, WorkDoneProgressParams { +} +export interface LinkedEditingRangeOptions extends WorkDoneProgressOptions { +} +export interface LinkedEditingRangeRegistrationOptions extends TextDocumentRegistrationOptions, LinkedEditingRangeOptions, StaticRegistrationOptions { +} +/** + * The result of a linked editing range request. + * + * @since 3.16.0 + */ +export interface LinkedEditingRanges { + /** + * A list of ranges that can be edited together. The ranges must have + * identical length and contain identical text content. The ranges cannot overlap. + */ + ranges: Range[]; + /** + * An optional word pattern (regular expression) that describes valid contents for + * the given ranges. If no pattern is provided, the client configuration's word + * pattern will be used. + */ + wordPattern?: string; +} +/** + * A request to provide ranges that can be edited together. + * + * @since 3.16.0 + */ +export declare namespace LinkedEditingRangeRequest { + const method: 'textDocument/linkedEditingRange'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js" index 9bc06894b55d3d74c9bbc891203837720be2ff11..f4351229b9e41ac82fbfa75cd618ae619c6945b3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js" @@ -1,3 +1,19 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fdf8ed295232ae94f41eb2f3921b69766f7a149e5eaf0858353cd8a9d345f6e5 -size 1051 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LinkedEditingRangeRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to provide ranges that can be edited together. + * + * @since 3.16.0 + */ +var LinkedEditingRangeRequest; +(function (LinkedEditingRangeRequest) { + LinkedEditingRangeRequest.method = 'textDocument/linkedEditingRange'; + LinkedEditingRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer; + LinkedEditingRangeRequest.type = new messages_1.ProtocolRequestType(LinkedEditingRangeRequest.method); +})(LinkedEditingRangeRequest || (exports.LinkedEditingRangeRequest = LinkedEditingRangeRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts" index cf15fb346c7048e9263a381110cbe502473b83ea..7bbdddc2c265fe7d7ca0d4a015e5e96b9662cd1c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts" @@ -1,3 +1,106 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:80ca6e12029d689b45326d13816c8374a1b3804a57e67940da2a2e9ed0689917 -size 3316 +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { WorkDoneProgressOptions, WorkDoneProgressParams, PartialResultParams, TextDocumentRegistrationOptions, TextDocumentPositionParams } from './protocol'; +/** + * Moniker uniqueness level to define scope of the moniker. + * + * @since 3.16.0 + */ +export declare namespace UniquenessLevel { + /** + * The moniker is only unique inside a document + */ + const document = "document"; + /** + * The moniker is unique inside a project for which a dump got created + */ + const project = "project"; + /** + * The moniker is unique inside the group to which a project belongs + */ + const group = "group"; + /** + * The moniker is unique inside the moniker scheme. + */ + const scheme = "scheme"; + /** + * The moniker is globally unique + */ + const global = "global"; +} +export type UniquenessLevel = 'document' | 'project' | 'group' | 'scheme' | 'global'; +/** + * The moniker kind. + * + * @since 3.16.0 + */ +export declare namespace MonikerKind { + /** + * The moniker represent a symbol that is imported into a project + */ + const $import = "import"; + /** + * The moniker represents a symbol that is exported from a project + */ + const $export = "export"; + /** + * The moniker represents a symbol that is local to a project (e.g. a local + * variable of a function, a class not visible outside the project, ...) + */ + const local = "local"; +} +export type MonikerKind = 'import' | 'export' | 'local'; +/** + * Moniker definition to match LSIF 0.5 moniker definition. + * + * @since 3.16.0 + */ +export interface Moniker { + /** + * The scheme of the moniker. For example tsc or .Net + */ + scheme: string; + /** + * The identifier of the moniker. The value is opaque in LSIF however + * schema owners are allowed to define the structure if they want. + */ + identifier: string; + /** + * The scope in which the moniker is unique + */ + unique: UniquenessLevel; + /** + * The moniker kind if known. + */ + kind?: MonikerKind; +} +/** + * Client capabilities specific to the moniker request. + * + * @since 3.16.0 + */ +export interface MonikerClientCapabilities { + /** + * Whether moniker supports dynamic registration. If this is set to `true` + * the client supports the new `MonikerRegistrationOptions` return value + * for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; +} +export interface MonikerServerCapabilities { +} +export interface MonikerOptions extends WorkDoneProgressOptions { +} +export interface MonikerRegistrationOptions extends TextDocumentRegistrationOptions, MonikerOptions { +} +export interface MonikerParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * A request to get the moniker of a symbol at a given text document position. + * The request parameter is of type {@link TextDocumentPositionParams}. + * The response is of type {@link Moniker Moniker[]} or `null`. + */ +export declare namespace MonikerRequest { + const method: 'textDocument/moniker'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js" index 669596a21628e2c0af91cbb18ecb17857bcecb21..d437a306894900ae3ebe7f01f0e3340ba9443200 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js" @@ -1,3 +1,68 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:699d94f47df5644f638b7bef6693def4c9c633a42dc17c895661b4a7ea1f2dcf -size 2500 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = void 0; +const messages_1 = require("./messages"); +/** + * Moniker uniqueness level to define scope of the moniker. + * + * @since 3.16.0 + */ +var UniquenessLevel; +(function (UniquenessLevel) { + /** + * The moniker is only unique inside a document + */ + UniquenessLevel.document = 'document'; + /** + * The moniker is unique inside a project for which a dump got created + */ + UniquenessLevel.project = 'project'; + /** + * The moniker is unique inside the group to which a project belongs + */ + UniquenessLevel.group = 'group'; + /** + * The moniker is unique inside the moniker scheme. + */ + UniquenessLevel.scheme = 'scheme'; + /** + * The moniker is globally unique + */ + UniquenessLevel.global = 'global'; +})(UniquenessLevel || (exports.UniquenessLevel = UniquenessLevel = {})); +/** + * The moniker kind. + * + * @since 3.16.0 + */ +var MonikerKind; +(function (MonikerKind) { + /** + * The moniker represent a symbol that is imported into a project + */ + MonikerKind.$import = 'import'; + /** + * The moniker represents a symbol that is exported from a project + */ + MonikerKind.$export = 'export'; + /** + * The moniker represents a symbol that is local to a project (e.g. a local + * variable of a function, a class not visible outside the project, ...) + */ + MonikerKind.local = 'local'; +})(MonikerKind || (exports.MonikerKind = MonikerKind = {})); +/** + * A request to get the moniker of a symbol at a given text document position. + * The request parameter is of type {@link TextDocumentPositionParams}. + * The response is of type {@link Moniker Moniker[]} or `null`. + */ +var MonikerRequest; +(function (MonikerRequest) { + MonikerRequest.method = 'textDocument/moniker'; + MonikerRequest.messageDirection = messages_1.MessageDirection.clientToServer; + MonikerRequest.type = new messages_1.ProtocolRequestType(MonikerRequest.method); +})(MonikerRequest || (exports.MonikerRequest = MonikerRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts" index 003c473597e21d79597737a5ea03c45a68dd452d..a7bae600386032441ede1645f4154dae463ab0ef 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts" @@ -1,3 +1,400 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dfc345d92b6d08863b239b8d025ea513df322af74e221d62f4bdbe217d08f69d -size 11786 +import { URI, integer, DocumentUri, uinteger, TextDocumentItem, TextDocumentIdentifier, VersionedTextDocumentIdentifier, LSPObject } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolNotificationType, RegistrationType } from './messages'; +import type { StaticRegistrationOptions, NotebookDocumentFilter, TextDocumentContentChangeEvent } from './protocol'; +/** + * Notebook specific client capabilities. + * + * @since 3.17.0 + */ +export type NotebookDocumentSyncClientCapabilities = { + /** + * Whether implementation supports dynamic registration. If this is + * set to `true` the client supports the new + * `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + * return value for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; + /** + * The client supports sending execution summary data per cell. + */ + executionSummarySupport?: boolean; +}; +/** + * A notebook cell kind. + * + * @since 3.17.0 + */ +export declare namespace NotebookCellKind { + /** + * A markup-cell is formatted source that is used for display. + */ + const Markup: 1; + /** + * A code-cell is source code. + */ + const Code: 2; + function is(value: any): value is NotebookCellKind; +} +export type NotebookCellKind = 1 | 2; +export type ExecutionSummary = { + /** + * A strict monotonically increasing value + * indicating the execution order of a cell + * inside a notebook. + */ + executionOrder: uinteger; + /** + * Whether the execution was successful or + * not if known by the client. + */ + success?: boolean; +}; +export declare namespace ExecutionSummary { + function create(executionOrder: number, success?: boolean): ExecutionSummary; + function is(value: any): value is ExecutionSummary; + function equals(one: ExecutionSummary | undefined, other: ExecutionSummary | undefined): boolean; +} +/** + * A notebook cell. + * + * A cell's document URI must be unique across ALL notebook + * cells and can therefore be used to uniquely identify a + * notebook cell or the cell's text document. + * + * @since 3.17.0 + */ +export type NotebookCell = { + /** + * The cell's kind + */ + kind: NotebookCellKind; + /** + * The URI of the cell's text document + * content. + */ + document: DocumentUri; + /** + * Additional metadata stored with the cell. + * + * Note: should always be an object literal (e.g. LSPObject) + */ + metadata?: LSPObject; + /** + * Additional execution summary information + * if supported by the client. + */ + executionSummary?: ExecutionSummary; +}; +export declare namespace NotebookCell { + function create(kind: NotebookCellKind, document: DocumentUri): NotebookCell; + function is(value: any): value is NotebookCell; + function diff(one: NotebookCell, two: NotebookCell): Set; +} +/** + * A notebook document. + * + * @since 3.17.0 + */ +export type NotebookDocument = { + /** + * The notebook document's uri. + */ + uri: URI; + /** + * The type of the notebook. + */ + notebookType: string; + /** + * The version number of this document (it will increase after each + * change, including undo/redo). + */ + version: integer; + /** + * Additional metadata stored with the notebook + * document. + * + * Note: should always be an object literal (e.g. LSPObject) + */ + metadata?: LSPObject; + /** + * The cells of a notebook. + */ + cells: NotebookCell[]; +}; +export declare namespace NotebookDocument { + function create(uri: URI, notebookType: string, version: integer, cells: NotebookCell[]): NotebookDocument; + function is(value: any): value is NotebookDocument; +} +/** + * A literal to identify a notebook document in the client. + * + * @since 3.17.0 + */ +export type NotebookDocumentIdentifier = { + /** + * The notebook document's uri. + */ + uri: URI; +}; +/** + * A versioned notebook document identifier. + * + * @since 3.17.0 + */ +export type VersionedNotebookDocumentIdentifier = { + /** + * The version number of this notebook document. + */ + version: integer; + /** + * The notebook document's uri. + */ + uri: URI; +}; +/** + * Options specific to a notebook plus its cells + * to be synced to the server. + * + * If a selector provides a notebook document + * filter but no cell selector all cells of a + * matching notebook document will be synced. + * + * If a selector provides no notebook document + * filter but only a cell selector all notebook + * document that contain at least one matching + * cell will be synced. + * + * @since 3.17.0 + */ +export type NotebookDocumentSyncOptions = { + /** + * The notebooks to be synced + */ + notebookSelector: ({ + /** + * The notebook to be synced If a string + * value is provided it matches against the + * notebook type. '*' matches every notebook. + */ + notebook: string | NotebookDocumentFilter; + /** + * The cells of the matching notebook to be synced. + */ + cells?: { + language: string; + }[]; + } | { + /** + * The notebook to be synced If a string + * value is provided it matches against the + * notebook type. '*' matches every notebook. + */ + notebook?: string | NotebookDocumentFilter; + /** + * The cells of the matching notebook to be synced. + */ + cells: { + language: string; + }[]; + })[]; + /** + * Whether save notification should be forwarded to + * the server. Will only be honored if mode === `notebook`. + */ + save?: boolean; +}; +/** + * Registration options specific to a notebook. + * + * @since 3.17.0 + */ +export type NotebookDocumentSyncRegistrationOptions = NotebookDocumentSyncOptions & StaticRegistrationOptions; +export declare namespace NotebookDocumentSyncRegistrationType { + const method: 'notebookDocument/sync'; + const messageDirection: MessageDirection; + const type: RegistrationType; +} +/** + * The params sent in an open notebook document notification. + * + * @since 3.17.0 + */ +export type DidOpenNotebookDocumentParams = { + /** + * The notebook document that got opened. + */ + notebookDocument: NotebookDocument; + /** + * The text documents that represent the content + * of a notebook cell. + */ + cellTextDocuments: TextDocumentItem[]; +}; +/** + * A notification sent when a notebook opens. + * + * @since 3.17.0 + */ +export declare namespace DidOpenNotebookDocumentNotification { + const method: 'notebookDocument/didOpen'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method; +} +/** + * A change describing how to move a `NotebookCell` + * array from state S to S'. + * + * @since 3.17.0 + */ +export type NotebookCellArrayChange = { + /** + * The start oftest of the cell that changed. + */ + start: uinteger; + /** + * The deleted cells + */ + deleteCount: uinteger; + /** + * The new cells, if any + */ + cells?: NotebookCell[]; +}; +export declare namespace NotebookCellArrayChange { + function is(value: any): value is NotebookCellArrayChange; + function create(start: uinteger, deleteCount: uinteger, cells?: NotebookCell[]): NotebookCellArrayChange; +} +/** + * A change event for a notebook document. + * + * @since 3.17.0 + */ +export type NotebookDocumentChangeEvent = { + /** + * The changed meta data if any. + * + * Note: should always be an object literal (e.g. LSPObject) + */ + metadata?: LSPObject; + /** + * Changes to cells + */ + cells?: { + /** + * Changes to the cell structure to add or + * remove cells. + */ + structure?: { + /** + * The change to the cell array. + */ + array: NotebookCellArrayChange; + /** + * Additional opened cell text documents. + */ + didOpen?: TextDocumentItem[]; + /** + * Additional closed cell text documents. + */ + didClose?: TextDocumentIdentifier[]; + }; + /** + * Changes to notebook cells properties like its + * kind, execution summary or metadata. + */ + data?: NotebookCell[]; + /** + * Changes to the text content of notebook cells. + */ + textContent?: { + document: VersionedTextDocumentIdentifier; + changes: TextDocumentContentChangeEvent[]; + }[]; + }; +}; +/** + * The params sent in a change notebook document notification. + * + * @since 3.17.0 + */ +export type DidChangeNotebookDocumentParams = { + /** + * The notebook document that did change. The version number points + * to the version after all provided changes have been applied. If + * only the text document content of a cell changes the notebook version + * doesn't necessarily have to change. + */ + notebookDocument: VersionedNotebookDocumentIdentifier; + /** + * The actual changes to the notebook document. + * + * The changes describe single state changes to the notebook document. + * So if there are two changes c1 (at array index 0) and c2 (at array + * index 1) for a notebook in state S then c1 moves the notebook from + * S to S' and c2 from S' to S''. So c1 is computed on the state S and + * c2 is computed on the state S'. + * + * To mirror the content of a notebook using change events use the following approach: + * - start with the same initial content + * - apply the 'notebookDocument/didChange' notifications in the order you receive them. + * - apply the `NotebookChangeEvent`s in a single notification in the order + * you receive them. + */ + change: NotebookDocumentChangeEvent; +}; +export declare namespace DidChangeNotebookDocumentNotification { + const method: 'notebookDocument/didChange'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method; +} +/** + * The params sent in a save notebook document notification. + * + * @since 3.17.0 + */ +export type DidSaveNotebookDocumentParams = { + /** + * The notebook document that got saved. + */ + notebookDocument: NotebookDocumentIdentifier; +}; +/** + * A notification sent when a notebook document is saved. + * + * @since 3.17.0 + */ +export declare namespace DidSaveNotebookDocumentNotification { + const method: 'notebookDocument/didSave'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method; +} +/** + * The params sent in a close notebook document notification. + * + * @since 3.17.0 + */ +export type DidCloseNotebookDocumentParams = { + /** + * The notebook document that got closed. + */ + notebookDocument: NotebookDocumentIdentifier; + /** + * The text documents that represent the content + * of a notebook cell that got closed. + */ + cellTextDocuments: TextDocumentIdentifier[]; +}; +/** + * A notification sent when a notebook closes. + * + * @since 3.17.0 + */ +export declare namespace DidCloseNotebookDocumentNotification { + const method: 'notebookDocument/didClose'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js" index 8cf370c77178070bf115d87af67d6e75d7db5deb..29ff6caeb083266e93a5833096802c37e692e4ca 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js" @@ -1,3 +1,214 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ba47b70c1635748d3609a70328cf8b9d40e4e5caf3612d09b7899779b0fa020d -size 10070 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = void 0; +const vscode_languageserver_types_1 = require("vscode-languageserver-types"); +const Is = require("./utils/is"); +const messages_1 = require("./messages"); +/** + * A notebook cell kind. + * + * @since 3.17.0 + */ +var NotebookCellKind; +(function (NotebookCellKind) { + /** + * A markup-cell is formatted source that is used for display. + */ + NotebookCellKind.Markup = 1; + /** + * A code-cell is source code. + */ + NotebookCellKind.Code = 2; + function is(value) { + return value === 1 || value === 2; + } + NotebookCellKind.is = is; +})(NotebookCellKind || (exports.NotebookCellKind = NotebookCellKind = {})); +var ExecutionSummary; +(function (ExecutionSummary) { + function create(executionOrder, success) { + const result = { executionOrder }; + if (success === true || success === false) { + result.success = success; + } + return result; + } + ExecutionSummary.create = create; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && vscode_languageserver_types_1.uinteger.is(candidate.executionOrder) && (candidate.success === undefined || Is.boolean(candidate.success)); + } + ExecutionSummary.is = is; + function equals(one, other) { + if (one === other) { + return true; + } + if (one === null || one === undefined || other === null || other === undefined) { + return false; + } + return one.executionOrder === other.executionOrder && one.success === other.success; + } + ExecutionSummary.equals = equals; +})(ExecutionSummary || (exports.ExecutionSummary = ExecutionSummary = {})); +var NotebookCell; +(function (NotebookCell) { + function create(kind, document) { + return { kind, document }; + } + NotebookCell.create = create; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && NotebookCellKind.is(candidate.kind) && vscode_languageserver_types_1.DocumentUri.is(candidate.document) && + (candidate.metadata === undefined || Is.objectLiteral(candidate.metadata)); + } + NotebookCell.is = is; + function diff(one, two) { + const result = new Set(); + if (one.document !== two.document) { + result.add('document'); + } + if (one.kind !== two.kind) { + result.add('kind'); + } + if (one.executionSummary !== two.executionSummary) { + result.add('executionSummary'); + } + if ((one.metadata !== undefined || two.metadata !== undefined) && !equalsMetadata(one.metadata, two.metadata)) { + result.add('metadata'); + } + if ((one.executionSummary !== undefined || two.executionSummary !== undefined) && !ExecutionSummary.equals(one.executionSummary, two.executionSummary)) { + result.add('executionSummary'); + } + return result; + } + NotebookCell.diff = diff; + function equalsMetadata(one, other) { + if (one === other) { + return true; + } + if (one === null || one === undefined || other === null || other === undefined) { + return false; + } + if (typeof one !== typeof other) { + return false; + } + if (typeof one !== 'object') { + return false; + } + const oneArray = Array.isArray(one); + const otherArray = Array.isArray(other); + if (oneArray !== otherArray) { + return false; + } + if (oneArray && otherArray) { + if (one.length !== other.length) { + return false; + } + for (let i = 0; i < one.length; i++) { + if (!equalsMetadata(one[i], other[i])) { + return false; + } + } + } + if (Is.objectLiteral(one) && Is.objectLiteral(other)) { + const oneKeys = Object.keys(one); + const otherKeys = Object.keys(other); + if (oneKeys.length !== otherKeys.length) { + return false; + } + oneKeys.sort(); + otherKeys.sort(); + if (!equalsMetadata(oneKeys, otherKeys)) { + return false; + } + for (let i = 0; i < oneKeys.length; i++) { + const prop = oneKeys[i]; + if (!equalsMetadata(one[prop], other[prop])) { + return false; + } + } + } + return true; + } +})(NotebookCell || (exports.NotebookCell = NotebookCell = {})); +var NotebookDocument; +(function (NotebookDocument) { + function create(uri, notebookType, version, cells) { + return { uri, notebookType, version, cells }; + } + NotebookDocument.create = create; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.uri) && vscode_languageserver_types_1.integer.is(candidate.version) && Is.typedArray(candidate.cells, NotebookCell.is); + } + NotebookDocument.is = is; +})(NotebookDocument || (exports.NotebookDocument = NotebookDocument = {})); +var NotebookDocumentSyncRegistrationType; +(function (NotebookDocumentSyncRegistrationType) { + NotebookDocumentSyncRegistrationType.method = 'notebookDocument/sync'; + NotebookDocumentSyncRegistrationType.messageDirection = messages_1.MessageDirection.clientToServer; + NotebookDocumentSyncRegistrationType.type = new messages_1.RegistrationType(NotebookDocumentSyncRegistrationType.method); +})(NotebookDocumentSyncRegistrationType || (exports.NotebookDocumentSyncRegistrationType = NotebookDocumentSyncRegistrationType = {})); +/** + * A notification sent when a notebook opens. + * + * @since 3.17.0 + */ +var DidOpenNotebookDocumentNotification; +(function (DidOpenNotebookDocumentNotification) { + DidOpenNotebookDocumentNotification.method = 'notebookDocument/didOpen'; + DidOpenNotebookDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidOpenNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenNotebookDocumentNotification.method); + DidOpenNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method; +})(DidOpenNotebookDocumentNotification || (exports.DidOpenNotebookDocumentNotification = DidOpenNotebookDocumentNotification = {})); +var NotebookCellArrayChange; +(function (NotebookCellArrayChange) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && vscode_languageserver_types_1.uinteger.is(candidate.start) && vscode_languageserver_types_1.uinteger.is(candidate.deleteCount) && (candidate.cells === undefined || Is.typedArray(candidate.cells, NotebookCell.is)); + } + NotebookCellArrayChange.is = is; + function create(start, deleteCount, cells) { + const result = { start, deleteCount }; + if (cells !== undefined) { + result.cells = cells; + } + return result; + } + NotebookCellArrayChange.create = create; +})(NotebookCellArrayChange || (exports.NotebookCellArrayChange = NotebookCellArrayChange = {})); +var DidChangeNotebookDocumentNotification; +(function (DidChangeNotebookDocumentNotification) { + DidChangeNotebookDocumentNotification.method = 'notebookDocument/didChange'; + DidChangeNotebookDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidChangeNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeNotebookDocumentNotification.method); + DidChangeNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method; +})(DidChangeNotebookDocumentNotification || (exports.DidChangeNotebookDocumentNotification = DidChangeNotebookDocumentNotification = {})); +/** + * A notification sent when a notebook document is saved. + * + * @since 3.17.0 + */ +var DidSaveNotebookDocumentNotification; +(function (DidSaveNotebookDocumentNotification) { + DidSaveNotebookDocumentNotification.method = 'notebookDocument/didSave'; + DidSaveNotebookDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidSaveNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveNotebookDocumentNotification.method); + DidSaveNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method; +})(DidSaveNotebookDocumentNotification || (exports.DidSaveNotebookDocumentNotification = DidSaveNotebookDocumentNotification = {})); +/** + * A notification sent when a notebook closes. + * + * @since 3.17.0 + */ +var DidCloseNotebookDocumentNotification; +(function (DidCloseNotebookDocumentNotification) { + DidCloseNotebookDocumentNotification.method = 'notebookDocument/didClose'; + DidCloseNotebookDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidCloseNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseNotebookDocumentNotification.method); + DidCloseNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method; +})(DidCloseNotebookDocumentNotification || (exports.DidCloseNotebookDocumentNotification = DidCloseNotebookDocumentNotification = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts" index eab8fcb7423949ac5676954dbf75c1b4307ce25b..1e08fb5f63ca5bec45638c97c4cbd54fcb4c315c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts" @@ -1,3 +1,107 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:96c0c4b30165eaedb3ade3b4e9f491113a1816c448d67fff542b2793bf565b04 -size 4220 +import { NotificationHandler, RequestHandler, ProgressType, ProgressToken } from 'vscode-jsonrpc'; +import { uinteger } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType, ProtocolNotificationType } from './messages'; +export interface WorkDoneProgressBegin { + kind: 'begin'; + /** + * Mandatory title of the progress operation. Used to briefly inform about + * the kind of operation being performed. + * + * Examples: "Indexing" or "Linking dependencies". + */ + title: string; + /** + * Controls if a cancel button should show to allow the user to cancel the + * long running operation. Clients that don't support cancellation are allowed + * to ignore the setting. + */ + cancellable?: boolean; + /** + * Optional, more detailed associated progress message. Contains + * complementary information to the `title`. + * + * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". + * If unset, the previous progress message (if any) is still valid. + */ + message?: string; + /** + * Optional progress percentage to display (value 100 is considered 100%). + * If not provided infinite progress is assumed and clients are allowed + * to ignore the `percentage` value in subsequent in report notifications. + * + * The value should be steadily rising. Clients are free to ignore values + * that are not following this rule. The value range is [0, 100]. + */ + percentage?: uinteger; +} +export interface WorkDoneProgressReport { + kind: 'report'; + /** + * Controls enablement state of a cancel button. + * + * Clients that don't support cancellation or don't support controlling the button's + * enablement state are allowed to ignore the property. + */ + cancellable?: boolean; + /** + * Optional, more detailed associated progress message. Contains + * complementary information to the `title`. + * + * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". + * If unset, the previous progress message (if any) is still valid. + */ + message?: string; + /** + * Optional progress percentage to display (value 100 is considered 100%). + * If not provided infinite progress is assumed and clients are allowed + * to ignore the `percentage` value in subsequent in report notifications. + * + * The value should be steadily rising. Clients are free to ignore values + * that are not following this rule. The value range is [0, 100] + */ + percentage?: uinteger; +} +export interface WorkDoneProgressEnd { + kind: 'end'; + /** + * Optional, a final message indicating to for example indicate the outcome + * of the operation. + */ + message?: string; +} +export declare namespace WorkDoneProgress { + const type: ProgressType; + function is(value: ProgressType): value is typeof type; +} +export interface WorkDoneProgressCreateParams { + /** + * The token to be used to report progress. + */ + token: ProgressToken; +} +/** + * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress + * reporting from the server. + */ +export declare namespace WorkDoneProgressCreateRequest { + const method: 'window/workDoneProgress/create'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +export interface WorkDoneProgressCancelParams { + /** + * The token to be used to report progress. + */ + token: ProgressToken; +} +/** + * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress + * initiated on the server side. + */ +export declare namespace WorkDoneProgressCancelNotification { + const method: 'window/workDoneProgress/cancel'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + type HandlerSignature = NotificationHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js" index 2e3b239ee63abe014e58393b52d7b2f2bf4d5de5..0942da58ed6a21b3b4ab436e8a3d46e0a7c7f08f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js" @@ -1,3 +1,37 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b221eff10e410b1e452b98e0b5dbdeca9efc777dc1edc1c6ea90d3950a24dc60 -size 2259 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = void 0; +const vscode_jsonrpc_1 = require("vscode-jsonrpc"); +const messages_1 = require("./messages"); +var WorkDoneProgress; +(function (WorkDoneProgress) { + WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType(); + function is(value) { + return value === WorkDoneProgress.type; + } + WorkDoneProgress.is = is; +})(WorkDoneProgress || (exports.WorkDoneProgress = WorkDoneProgress = {})); +/** + * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress + * reporting from the server. + */ +var WorkDoneProgressCreateRequest; +(function (WorkDoneProgressCreateRequest) { + WorkDoneProgressCreateRequest.method = 'window/workDoneProgress/create'; + WorkDoneProgressCreateRequest.messageDirection = messages_1.MessageDirection.serverToClient; + WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType(WorkDoneProgressCreateRequest.method); +})(WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = WorkDoneProgressCreateRequest = {})); +/** + * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress + * initiated on the server side. + */ +var WorkDoneProgressCancelNotification; +(function (WorkDoneProgressCancelNotification) { + WorkDoneProgressCancelNotification.method = 'window/workDoneProgress/cancel'; + WorkDoneProgressCancelNotification.messageDirection = messages_1.MessageDirection.clientToServer; + WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType(WorkDoneProgressCancelNotification.method); +})(WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = WorkDoneProgressCancelNotification = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts" index 34b943dc09897aa548f959ea7481369434a600a4..db45ae7d31a6a0d9298d29533f672aff995d7248 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts" @@ -1,3 +1,41 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b5d49f459d2efc77cff4ab27d929aa67d0c9121bc20763d84942c7fca2cc7b8f -size 1916 +import { RequestHandler } from 'vscode-jsonrpc'; +import { TextDocumentIdentifier, Position, SelectionRange } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { TextDocumentRegistrationOptions, WorkDoneProgressOptions, StaticRegistrationOptions, WorkDoneProgressParams, PartialResultParams } from './protocol'; +export interface SelectionRangeClientCapabilities { + /** + * Whether implementation supports dynamic registration for selection range providers. If this is set to `true` + * the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server + * capability as well. + */ + dynamicRegistration?: boolean; +} +export interface SelectionRangeOptions extends WorkDoneProgressOptions { +} +export interface SelectionRangeRegistrationOptions extends SelectionRangeOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions { +} +/** + * A parameter literal used in selection range requests. + */ +export interface SelectionRangeParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The positions inside the text document. + */ + positions: Position[]; +} +/** + * A request to provide selection ranges in a document. The request's + * parameter is of type {@link SelectionRangeParams}, the + * response is of type {@link SelectionRange SelectionRange[]} or a Thenable + * that resolves to such. + */ +export declare namespace SelectionRangeRequest { + const method: 'textDocument/selectionRange'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js" index 0a2fddf0508218c3b215a070b69ef7006cf3ccf6..eddb4c0003501485483a7046b7c374ec11038b9d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js" @@ -1,3 +1,20 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7c64653cdda9575a929711913e474014ba60b5cb53219476546601cfa4518c7a -size 1158 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SelectionRangeRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to provide selection ranges in a document. The request's + * parameter is of type {@link SelectionRangeParams}, the + * response is of type {@link SelectionRange SelectionRange[]} or a Thenable + * that resolves to such. + */ +var SelectionRangeRequest; +(function (SelectionRangeRequest) { + SelectionRangeRequest.method = 'textDocument/selectionRange'; + SelectionRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer; + SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method); +})(SelectionRangeRequest || (exports.SelectionRangeRequest = SelectionRangeRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts" index ec17d49932117a1c2398b4ba237845427fbe8c3f..b171a43d10a4b4a7530d9b1c0cf9f8966e62a5ee 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts" @@ -1,3 +1,223 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9381d5bdf7197cc4f732243e22762d27508daf7fcab0fff7339fe4660c11f382 -size 7986 +import { TextDocumentIdentifier, Range, uinteger, SemanticTokensEdit, SemanticTokensLegend, SemanticTokens, SemanticTokensDelta } from 'vscode-languageserver-types'; +import { RequestHandler0, RequestHandler } from 'vscode-jsonrpc'; +import { MessageDirection, ProtocolRequestType, ProtocolRequestType0, RegistrationType } from './messages'; +import type { PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions } from './protocol'; +/** + * @since 3.16.0 + */ +export interface SemanticTokensPartialResult { + data: uinteger[]; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensDeltaPartialResult { + edits: SemanticTokensEdit[]; +} +export declare namespace TokenFormat { + const Relative: 'relative'; +} +export type TokenFormat = 'relative'; +/** + * @since 3.16.0 + */ +export interface SemanticTokensClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + * return value for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; + /** + * Which requests the client supports and might send to the server + * depending on the server's capability. Please note that clients might not + * show semantic tokens or degrade some of the user experience if a range + * or full request is advertised by the client but not provided by the + * server. If for example the client capability `requests.full` and + * `request.range` are both set to true but the server only provides a + * range provider the client might not render a minimap correctly or might + * even decide to not show any semantic tokens at all. + */ + requests: { + /** + * The client will send the `textDocument/semanticTokens/range` request if + * the server provides a corresponding handler. + */ + range?: boolean | {}; + /** + * The client will send the `textDocument/semanticTokens/full` request if + * the server provides a corresponding handler. + */ + full?: boolean | { + /** + * The client will send the `textDocument/semanticTokens/full/delta` request if + * the server provides a corresponding handler. + */ + delta?: boolean; + }; + }; + /** + * The token types that the client supports. + */ + tokenTypes: string[]; + /** + * The token modifiers that the client supports. + */ + tokenModifiers: string[]; + /** + * The token formats the clients supports. + */ + formats: TokenFormat[]; + /** + * Whether the client supports tokens that can overlap each other. + */ + overlappingTokenSupport?: boolean; + /** + * Whether the client supports tokens that can span multiple lines. + */ + multilineTokenSupport?: boolean; + /** + * Whether the client allows the server to actively cancel a + * semantic token request, e.g. supports returning + * LSPErrorCodes.ServerCancelled. If a server does the client + * needs to retrigger the request. + * + * @since 3.17.0 + */ + serverCancelSupport?: boolean; + /** + * Whether the client uses semantic tokens to augment existing + * syntax tokens. If set to `true` client side created syntax + * tokens and semantic tokens are both used for colorization. If + * set to `false` the client only uses the returned semantic tokens + * for colorization. + * + * If the value is `undefined` then the client behavior is not + * specified. + * + * @since 3.17.0 + */ + augmentsSyntaxTokens?: boolean; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensOptions extends WorkDoneProgressOptions { + /** + * The legend used by the server + */ + legend: SemanticTokensLegend; + /** + * Server supports providing semantic tokens for a specific range + * of a document. + */ + range?: boolean | {}; + /** + * Server supports providing semantic tokens for a full document. + */ + full?: boolean | { + /** + * The server supports deltas for full documents. + */ + delta?: boolean; + }; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensRegistrationOptions extends TextDocumentRegistrationOptions, SemanticTokensOptions, StaticRegistrationOptions { +} +export declare namespace SemanticTokensRegistrationType { + const method: 'textDocument/semanticTokens'; + const type: RegistrationType; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokensRequest { + const method: 'textDocument/semanticTokens/full'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + const registrationMethod: typeof SemanticTokensRegistrationType.method; + type HandlerSignature = RequestHandler; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensDeltaParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The result id of a previous response. The result Id can either point to a full response + * or a delta response depending on what was received last. + */ + previousResultId: string; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokensDeltaRequest { + const method: 'textDocument/semanticTokens/full/delta'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + const registrationMethod: typeof SemanticTokensRegistrationType.method; + type HandlerSignature = RequestHandler; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensRangeParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The range the semantic tokens are requested for. + */ + range: Range; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokensRangeRequest { + const method: 'textDocument/semanticTokens/range'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + const registrationMethod: typeof SemanticTokensRegistrationType.method; + type HandlerSignature = RequestHandler; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensWorkspaceClientCapabilities { + /** + * Whether the client implementation supports a refresh request sent from + * the server to the client. + * + * Note that this event is global and will force the client to refresh all + * semantic tokens currently shown. It should be used with absolute care + * and is useful for situation where a server for example detects a project + * wide change that requires such a calculation. + */ + refreshSupport?: boolean; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokensRefreshRequest { + const method: `workspace/semanticTokens/refresh`; + const messageDirection: MessageDirection; + const type: ProtocolRequestType0; + type HandlerSignature = RequestHandler0; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js" index f16a8cd34843520d45ed28a6d19095a5da36f84e..9ce0712a11e7af3944061dea102165d9ce6d6613 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js" @@ -1,3 +1,57 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5377897acf8d7703d304cc5ec5fe3aa446a9f588fbef714cd61b2e04cad08c01 -size 3443 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.SemanticTokensRegistrationType = exports.TokenFormat = void 0; +const messages_1 = require("./messages"); +//------- 'textDocument/semanticTokens' ----- +var TokenFormat; +(function (TokenFormat) { + TokenFormat.Relative = 'relative'; +})(TokenFormat || (exports.TokenFormat = TokenFormat = {})); +var SemanticTokensRegistrationType; +(function (SemanticTokensRegistrationType) { + SemanticTokensRegistrationType.method = 'textDocument/semanticTokens'; + SemanticTokensRegistrationType.type = new messages_1.RegistrationType(SemanticTokensRegistrationType.method); +})(SemanticTokensRegistrationType || (exports.SemanticTokensRegistrationType = SemanticTokensRegistrationType = {})); +/** + * @since 3.16.0 + */ +var SemanticTokensRequest; +(function (SemanticTokensRequest) { + SemanticTokensRequest.method = 'textDocument/semanticTokens/full'; + SemanticTokensRequest.messageDirection = messages_1.MessageDirection.clientToServer; + SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method); + SemanticTokensRequest.registrationMethod = SemanticTokensRegistrationType.method; +})(SemanticTokensRequest || (exports.SemanticTokensRequest = SemanticTokensRequest = {})); +/** + * @since 3.16.0 + */ +var SemanticTokensDeltaRequest; +(function (SemanticTokensDeltaRequest) { + SemanticTokensDeltaRequest.method = 'textDocument/semanticTokens/full/delta'; + SemanticTokensDeltaRequest.messageDirection = messages_1.MessageDirection.clientToServer; + SemanticTokensDeltaRequest.type = new messages_1.ProtocolRequestType(SemanticTokensDeltaRequest.method); + SemanticTokensDeltaRequest.registrationMethod = SemanticTokensRegistrationType.method; +})(SemanticTokensDeltaRequest || (exports.SemanticTokensDeltaRequest = SemanticTokensDeltaRequest = {})); +/** + * @since 3.16.0 + */ +var SemanticTokensRangeRequest; +(function (SemanticTokensRangeRequest) { + SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range'; + SemanticTokensRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer; + SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method); + SemanticTokensRangeRequest.registrationMethod = SemanticTokensRegistrationType.method; +})(SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = SemanticTokensRangeRequest = {})); +/** + * @since 3.16.0 + */ +var SemanticTokensRefreshRequest; +(function (SemanticTokensRefreshRequest) { + SemanticTokensRefreshRequest.method = `workspace/semanticTokens/refresh`; + SemanticTokensRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + SemanticTokensRefreshRequest.type = new messages_1.ProtocolRequestType0(SemanticTokensRefreshRequest.method); +})(SemanticTokensRefreshRequest || (exports.SemanticTokensRefreshRequest = SemanticTokensRefreshRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts" index 48bfbefdfa6a60c8656dc90ba29cad2e23a415b4..0475e75b076d2604a9b97fca1fe00dc410b4edac 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts" @@ -1,3 +1,72 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a61f7b50171225629903175e062d3f43225e6eba24eb2e50f88ca05fb441aa6 -size 2202 +import { HandlerResult, RequestHandler } from 'vscode-jsonrpc'; +import { Range, URI } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +/** + * Client capabilities for the showDocument request. + * + * @since 3.16.0 + */ +export interface ShowDocumentClientCapabilities { + /** + * The client has support for the showDocument + * request. + */ + support: boolean; +} +/** + * Params to show a resource in the UI. + * + * @since 3.16.0 + */ +export interface ShowDocumentParams { + /** + * The uri to show. + */ + uri: URI; + /** + * Indicates to show the resource in an external program. + * To show, for example, `https://code.visualstudio.com/` + * in the default WEB browser set `external` to `true`. + */ + external?: boolean; + /** + * An optional property to indicate whether the editor + * showing the document should take focus or not. + * Clients might ignore this property if an external + * program is started. + */ + takeFocus?: boolean; + /** + * An optional selection range if the document is a text + * document. Clients might ignore the property if an + * external program is started or the file is not a text + * file. + */ + selection?: Range; +} +/** + * The result of a showDocument request. + * + * @since 3.16.0 + */ +export interface ShowDocumentResult { + /** + * A boolean indicating if the show was successful. + */ + success: boolean; +} +/** + * A request to show a document. This request might open an + * external program depending on the value of the URI to open. + * For example a request to open `https://code.visualstudio.com/` + * will very likely open the URI in a WEB browser. + * + * @since 3.16.0 +*/ +export declare namespace ShowDocumentRequest { + const method: 'window/showDocument'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; + type MiddlewareSignature = (params: ShowDocumentParams, next: HandlerSignature) => HandlerResult; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js" index 8bf7e2c82ff1b902f6fe33ecb572a35d0d2a9543..1c9fed6a7e2de73067a7b61c98b87e15d9ec6b0f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js" @@ -1,3 +1,22 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7aa2daf8ad5de78b1476926e4ab6b658974cc37a4982a21b0d561809181b5df6 -size 1156 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ShowDocumentRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to show a document. This request might open an + * external program depending on the value of the URI to open. + * For example a request to open `https://code.visualstudio.com/` + * will very likely open the URI in a WEB browser. + * + * @since 3.16.0 +*/ +var ShowDocumentRequest; +(function (ShowDocumentRequest) { + ShowDocumentRequest.method = 'window/showDocument'; + ShowDocumentRequest.messageDirection = messages_1.MessageDirection.serverToClient; + ShowDocumentRequest.type = new messages_1.ProtocolRequestType(ShowDocumentRequest.method); +})(ShowDocumentRequest || (exports.ShowDocumentRequest = ShowDocumentRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts" index d91233cb62fcc441dfa4ebae066082f46f8a28fd..1ce7edaa71968875391e5dcefc7c02303bdf3b12 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts" @@ -1,3 +1,38 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eec5fe9863d12133a6b4803b62741054a3481fc0fcbf2be6bf26c681935cdfdc -size 1939 +import { RequestHandler } from 'vscode-jsonrpc'; +import { Definition, DefinitionLink, LocationLink, Location } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +/** + * Since 3.6.0 + */ +export interface TypeDefinitionClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `TypeDefinitionRegistrationOptions` return value + * for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; + /** + * The client supports additional metadata in the form of definition links. + * + * Since 3.14.0 + */ + linkSupport?: boolean; +} +export interface TypeDefinitionOptions extends WorkDoneProgressOptions { +} +export interface TypeDefinitionRegistrationOptions extends TextDocumentRegistrationOptions, TypeDefinitionOptions, StaticRegistrationOptions { +} +export interface TypeDefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * A request to resolve the type definition locations of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPositionParams} + * the response is of type {@link Definition} or a Thenable that resolves to such. + */ +export declare namespace TypeDefinitionRequest { + const method: 'textDocument/typeDefinition'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js" index ce3077e0de3fd9e6668fc66b5152fbcb48b84ba2..fa3c7f22fdef053d054aeba8345b0934ed394565 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js" @@ -1,3 +1,21 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:217939c6b9ff65f57b493297ed123f79f8599995b40ac2ccdf6f222da18830f0 -size 1268 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypeDefinitionRequest = void 0; +const messages_1 = require("./messages"); +// @ts-ignore: to avoid inlining LocatioLink as dynamic import +let __noDynamicImport; +/** + * A request to resolve the type definition locations of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPositionParams} + * the response is of type {@link Definition} or a Thenable that resolves to such. + */ +var TypeDefinitionRequest; +(function (TypeDefinitionRequest) { + TypeDefinitionRequest.method = 'textDocument/typeDefinition'; + TypeDefinitionRequest.messageDirection = messages_1.MessageDirection.clientToServer; + TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method); +})(TypeDefinitionRequest || (exports.TypeDefinitionRequest = TypeDefinitionRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.d.ts" index 2e85399d1b4b49caf96eb51f76c0adbe3550214d..2b0d04318339a6768dbec12daea229ceb133b99c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.d.ts" @@ -1,3 +1,83 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:daad4c291d7d4ab0ca94693295f33533c6fc44c9ab31806a949367207c4b27fe -size 3291 +import { RequestHandler } from 'vscode-jsonrpc'; +import { TypeHierarchyItem } from 'vscode-languageserver-types'; +import { MessageDirection, ProtocolRequestType } from './messages'; +import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +/** + * @since 3.17.0 + */ +export type TypeHierarchyClientCapabilities = { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + * return value for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; +}; +/** + * Type hierarchy options used during static registration. + * + * @since 3.17.0 + */ +export type TypeHierarchyOptions = WorkDoneProgressOptions; +/** + * Type hierarchy options used during static or dynamic registration. + * + * @since 3.17.0 + */ +export type TypeHierarchyRegistrationOptions = TextDocumentRegistrationOptions & TypeHierarchyOptions & StaticRegistrationOptions; +/** + * The parameter of a `textDocument/prepareTypeHierarchy` request. + * + * @since 3.17.0 + */ +export type TypeHierarchyPrepareParams = TextDocumentPositionParams & WorkDoneProgressParams; +/** + * A request to result a `TypeHierarchyItem` in a document at a given position. + * Can be used as an input to a subtypes or supertypes type hierarchy. + * + * @since 3.17.0 + */ +export declare namespace TypeHierarchyPrepareRequest { + const method: 'textDocument/prepareTypeHierarchy'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * The parameter of a `typeHierarchy/supertypes` request. + * + * @since 3.17.0 + */ +export type TypeHierarchySupertypesParams = WorkDoneProgressParams & PartialResultParams & { + item: TypeHierarchyItem; +}; +/** + * A request to resolve the supertypes for a given `TypeHierarchyItem`. + * + * @since 3.17.0 + */ +export declare namespace TypeHierarchySupertypesRequest { + const method: 'typeHierarchy/supertypes'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * The parameter of a `typeHierarchy/subtypes` request. + * + * @since 3.17.0 + */ +export type TypeHierarchySubtypesParams = WorkDoneProgressParams & PartialResultParams & { + item: TypeHierarchyItem; +}; +/** + * A request to resolve the subtypes for a given `TypeHierarchyItem`. + * + * @since 3.17.0 + */ +export declare namespace TypeHierarchySubtypesRequest { + const method: 'typeHierarchy/subtypes'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js" index a8f4386f98fef9040d14d28020b2a531e37c102e..dcc2f999e6d675c217ded0f1fc85e2d4c0ec1bb7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js" @@ -1,3 +1,42 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:74a73fc3bd417f76c040849e9ecc3e532d072afdafaa1977379fff8711522e41 -size 2400 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) TypeFox, Microsoft and others. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypeHierarchySubtypesRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchyPrepareRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to result a `TypeHierarchyItem` in a document at a given position. + * Can be used as an input to a subtypes or supertypes type hierarchy. + * + * @since 3.17.0 + */ +var TypeHierarchyPrepareRequest; +(function (TypeHierarchyPrepareRequest) { + TypeHierarchyPrepareRequest.method = 'textDocument/prepareTypeHierarchy'; + TypeHierarchyPrepareRequest.messageDirection = messages_1.MessageDirection.clientToServer; + TypeHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(TypeHierarchyPrepareRequest.method); +})(TypeHierarchyPrepareRequest || (exports.TypeHierarchyPrepareRequest = TypeHierarchyPrepareRequest = {})); +/** + * A request to resolve the supertypes for a given `TypeHierarchyItem`. + * + * @since 3.17.0 + */ +var TypeHierarchySupertypesRequest; +(function (TypeHierarchySupertypesRequest) { + TypeHierarchySupertypesRequest.method = 'typeHierarchy/supertypes'; + TypeHierarchySupertypesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + TypeHierarchySupertypesRequest.type = new messages_1.ProtocolRequestType(TypeHierarchySupertypesRequest.method); +})(TypeHierarchySupertypesRequest || (exports.TypeHierarchySupertypesRequest = TypeHierarchySupertypesRequest = {})); +/** + * A request to resolve the subtypes for a given `TypeHierarchyItem`. + * + * @since 3.17.0 + */ +var TypeHierarchySubtypesRequest; +(function (TypeHierarchySubtypesRequest) { + TypeHierarchySubtypesRequest.method = 'typeHierarchy/subtypes'; + TypeHierarchySubtypesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + TypeHierarchySubtypesRequest.type = new messages_1.ProtocolRequestType(TypeHierarchySubtypesRequest.method); +})(TypeHierarchySubtypesRequest || (exports.TypeHierarchySubtypesRequest = TypeHierarchySubtypesRequest = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.d.ts" index 1023cdb32acf5f73c50c06b617ceb74969fe2275..3a5e89ac1ab8f60e0dcc420965780953d687a49a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.d.ts" @@ -1,3 +1,74 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:05f6b2b3bef27dfc0e2464197510d08f275f2464363b441def7f309cbf42f51d -size 2899 +import { WorkspaceFolder } from 'vscode-languageserver-types'; +import { RequestHandler0, NotificationHandler, HandlerResult, CancellationToken } from 'vscode-jsonrpc'; +import { MessageDirection, ProtocolRequestType0, ProtocolNotificationType } from './messages'; +export interface WorkspaceFoldersInitializeParams { + /** + * The workspace folders configured in the client when the server starts. + * + * This property is only available if the client supports workspace folders. + * It can be `null` if the client supports workspace folders but none are + * configured. + * + * @since 3.6.0 + */ + workspaceFolders?: WorkspaceFolder[] | null; +} +export interface WorkspaceFoldersServerCapabilities { + /** + * The server has support for workspace folders + */ + supported?: boolean; + /** + * Whether the server wants to receive workspace folder + * change notifications. + * + * If a string is provided the string is treated as an ID + * under which the notification is registered on the client + * side. The ID can be used to unregister for these events + * using the `client/unregisterCapability` request. + */ + changeNotifications?: string | boolean; +} +/** + * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders. + */ +export declare namespace WorkspaceFoldersRequest { + const method: 'workspace/workspaceFolders'; + const messageDirection: MessageDirection; + const type: ProtocolRequestType0; + type HandlerSignature = RequestHandler0; + type MiddlewareSignature = (token: CancellationToken, next: HandlerSignature) => HandlerResult; +} +/** + * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace + * folder configuration changes. + */ +export declare namespace DidChangeWorkspaceFoldersNotification { + const method: 'workspace/didChangeWorkspaceFolders'; + const messageDirection: MessageDirection; + const type: ProtocolNotificationType; + type HandlerSignature = NotificationHandler; + type MiddlewareSignature = (params: DidChangeWorkspaceFoldersParams, next: HandlerSignature) => void; +} +/** + * The parameters of a `workspace/didChangeWorkspaceFolders` notification. + */ +export interface DidChangeWorkspaceFoldersParams { + /** + * The actual workspace folder change event. + */ + event: WorkspaceFoldersChangeEvent; +} +/** + * The workspace folder change event. + */ +export interface WorkspaceFoldersChangeEvent { + /** + * The array of added workspace folders + */ + added: WorkspaceFolder[]; + /** + * The array of the removed workspace folders + */ + removed: WorkspaceFolder[]; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js" index 1c294b5c15926cd0bfe8a3b50ed90c4acd14cf56..b5aef519797a93668b0edf0ef2e24b48b2f9bdb3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js" @@ -1,3 +1,27 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5342621209c458b684ca4df20529f6200db9110b38a607120a7e34132703465a -size 1825 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = void 0; +const messages_1 = require("./messages"); +/** + * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders. + */ +var WorkspaceFoldersRequest; +(function (WorkspaceFoldersRequest) { + WorkspaceFoldersRequest.method = 'workspace/workspaceFolders'; + WorkspaceFoldersRequest.messageDirection = messages_1.MessageDirection.serverToClient; + WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0(WorkspaceFoldersRequest.method); +})(WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = WorkspaceFoldersRequest = {})); +/** + * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace + * folder configuration changes. + */ +var DidChangeWorkspaceFoldersNotification; +(function (DidChangeWorkspaceFoldersNotification) { + DidChangeWorkspaceFoldersNotification.method = 'workspace/didChangeWorkspaceFolders'; + DidChangeWorkspaceFoldersNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType(DidChangeWorkspaceFoldersNotification.method); +})(DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = DidChangeWorkspaceFoldersNotification = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/utils/is.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/utils/is.d.ts" index e2651b0bf450668ca327da059dfa56728e734fb7..e486414296582e8ec316818c46d076a993d34b77 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/utils/is.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/utils/is.d.ts" @@ -1,3 +1,9 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d7a48988ed49ecb85bf47987be5652cdf9cbca8d9ce336642a2a3350a368ab2f -size 598 +export declare function boolean(value: any): value is boolean; +export declare function string(value: any): value is string; +export declare function number(value: any): value is number; +export declare function error(value: any): value is Error; +export declare function func(value: any): value is Function; +export declare function array(value: any): value is T[]; +export declare function stringArray(value: any): value is string[]; +export declare function typedArray(value: any, check: (value: any) => boolean): value is T[]; +export declare function objectLiteral(value: any): value is object; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js" index 33a51f97b7df49dbe4c046461b324759121416aa..2ba4e8484543c2bf1bb00f3336197035e8a0f531 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js" @@ -1,3 +1,46 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:48d411e47ba4e27a0a36a06b7f5237856045163dab1a06ffb9db1dca5dc4b996 -size 1814 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.objectLiteral = exports.typedArray = exports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0; +function boolean(value) { + return value === true || value === false; +} +exports.boolean = boolean; +function string(value) { + return typeof value === 'string' || value instanceof String; +} +exports.string = string; +function number(value) { + return typeof value === 'number' || value instanceof Number; +} +exports.number = number; +function error(value) { + return value instanceof Error; +} +exports.error = error; +function func(value) { + return typeof value === 'function'; +} +exports.func = func; +function array(value) { + return Array.isArray(value); +} +exports.array = array; +function stringArray(value) { + return array(value) && value.every(elem => string(elem)); +} +exports.stringArray = stringArray; +function typedArray(value, check) { + return Array.isArray(value) && value.every(check); +} +exports.typedArray = typedArray; +function objectLiteral(value) { + // Strictly speaking class instances pass this check as well. Since the LSP + // doesn't use classes we ignore this for now. If we do we need to add something + // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null` + return value !== null && typeof value === 'object'; +} +exports.objectLiteral = objectLiteral; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts" index 5603ef6a8c1b3655d4262d25c46657b5035c11fc..06e8b5f84c9b3b40a177dcb064b2b1f01adadb65 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d789022bf705385490fe89811bc7850225c207f37dd706ada2509eb1d8f31f12 -size 608 +/// +import { MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, ProtocolConnection } from '../common/api'; +export * from 'vscode-jsonrpc/node'; +export * from '../common/api'; +export declare function createProtocolConnection(input: MessageReader, output: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection; +export declare function createProtocolConnection(input: NodeJS.ReadableStream, output: NodeJS.WritableStream, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/node/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/node/main.js" index c29c1dfd84385a9b92831a2625e6ea08f92999fd..ecc68b31babcf2c3ae810b397ee15a7e9b7a9f93 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/node/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/lib/node/main.js" @@ -1,3 +1,28 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cc35a5ff1df065eae9ca4b1c2504ac7af6f0c50c9c8b3bfee510718f7249e688 -size 1512 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createProtocolConnection = void 0; +const node_1 = require("vscode-jsonrpc/node"); +__exportStar(require("vscode-jsonrpc/node"), exports); +__exportStar(require("../common/api"), exports); +function createProtocolConnection(input, output, logger, options) { + return (0, node_1.createMessageConnection)(input, output, logger, options); +} +exports.createProtocolConnection = createProtocolConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/metaModel.schema.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/metaModel.schema.json" index 3c919f3adff90c963070ca37eed216286162516c..2d8f47d61544d2b49b27ea81e62222722775d76e 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/metaModel.schema.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/metaModel.schema.json" @@ -1,3 +1,783 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ff1a28440feb03a40b9a6cbde40bab06c129f321962c675292ff3f63aa53ef47 -size 21796 +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "AndType": { + "additionalProperties": false, + "description": "Represents an `and`type (e.g. TextDocumentParams & WorkDoneProgressParams`).", + "properties": { + "items": { + "items": { + "$ref": "#/definitions/Type" + }, + "type": "array" + }, + "kind": { + "const": "and", + "type": "string" + } + }, + "required": [ + "kind", + "items" + ], + "type": "object" + }, + "ArrayType": { + "additionalProperties": false, + "description": "Represents an array type (e.g. `TextDocument[]`).", + "properties": { + "element": { + "$ref": "#/definitions/Type" + }, + "kind": { + "const": "array", + "type": "string" + } + }, + "required": [ + "kind", + "element" + ], + "type": "object" + }, + "BaseType": { + "additionalProperties": false, + "description": "Represents a base type like `string` or `DocumentUri`.", + "properties": { + "kind": { + "const": "base", + "type": "string" + }, + "name": { + "$ref": "#/definitions/BaseTypes" + } + }, + "required": [ + "kind", + "name" + ], + "type": "object" + }, + "BaseTypes": { + "enum": [ + "URI", + "DocumentUri", + "integer", + "uinteger", + "decimal", + "RegExp", + "string", + "boolean", + "null" + ], + "type": "string" + }, + "BooleanLiteralType": { + "additionalProperties": false, + "description": "Represents a boolean literal type (e.g. `kind: true`).", + "properties": { + "kind": { + "const": "booleanLiteral", + "type": "string" + }, + "value": { + "type": "boolean" + } + }, + "required": [ + "kind", + "value" + ], + "type": "object" + }, + "Enumeration": { + "additionalProperties": false, + "description": "Defines an enumeration.", + "properties": { + "deprecated": { + "description": "Whether the enumeration is deprecated or not. If deprecated the property contains the deprecation message.", + "type": "string" + }, + "documentation": { + "description": "An optional documentation.", + "type": "string" + }, + "name": { + "description": "The name of the enumeration.", + "type": "string" + }, + "proposed": { + "description": "Whether this is a proposed enumeration. If omitted, the enumeration is final.", + "type": "boolean" + }, + "since": { + "description": "Since when (release number) this enumeration is available. Is undefined if not known.", + "type": "string" + }, + "supportsCustomValues": { + "description": "Whether the enumeration supports custom values (e.g. values which are not part of the set defined in `values`). If omitted no custom values are supported.", + "type": "boolean" + }, + "type": { + "$ref": "#/definitions/EnumerationType", + "description": "The type of the elements." + }, + "values": { + "description": "The enum values.", + "items": { + "$ref": "#/definitions/EnumerationEntry" + }, + "type": "array" + } + }, + "required": [ + "name", + "type", + "values" + ], + "type": "object" + }, + "EnumerationEntry": { + "additionalProperties": false, + "description": "Defines an enumeration entry.", + "properties": { + "deprecated": { + "description": "Whether the enum entry is deprecated or not. If deprecated the property contains the deprecation message.", + "type": "string" + }, + "documentation": { + "description": "An optional documentation.", + "type": "string" + }, + "name": { + "description": "The name of the enum item.", + "type": "string" + }, + "proposed": { + "description": "Whether this is a proposed enumeration entry. If omitted, the enumeration entry is final.", + "type": "boolean" + }, + "since": { + "description": "Since when (release number) this enumeration entry is available. Is undefined if not known.", + "type": "string" + }, + "value": { + "description": "The value.", + "type": [ + "string", + "number" + ] + } + }, + "required": [ + "name", + "value" + ], + "type": "object" + }, + "EnumerationType": { + "additionalProperties": false, + "properties": { + "kind": { + "const": "base", + "type": "string" + }, + "name": { + "enum": [ + "string", + "integer", + "uinteger" + ], + "type": "string" + } + }, + "required": [ + "kind", + "name" + ], + "type": "object" + }, + "IntegerLiteralType": { + "additionalProperties": false, + "properties": { + "kind": { + "const": "integerLiteral", + "description": "Represents an integer literal type (e.g. `kind: 1`).", + "type": "string" + }, + "value": { + "type": "number" + } + }, + "required": [ + "kind", + "value" + ], + "type": "object" + }, + "MapKeyType": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "base", + "type": "string" + }, + "name": { + "enum": [ + "URI", + "DocumentUri", + "string", + "integer" + ], + "type": "string" + } + }, + "required": [ + "kind", + "name" + ], + "type": "object" + }, + { + "$ref": "#/definitions/ReferenceType" + } + ], + "description": "Represents a type that can be used as a key in a map type. If a reference type is used then the type must either resolve to a `string` or `integer` type. (e.g. `type ChangeAnnotationIdentifier === string`)." + }, + "MapType": { + "additionalProperties": false, + "description": "Represents a JSON object map (e.g. `interface Map { [key: K] => V; }`).", + "properties": { + "key": { + "$ref": "#/definitions/MapKeyType" + }, + "kind": { + "const": "map", + "type": "string" + }, + "value": { + "$ref": "#/definitions/Type" + } + }, + "required": [ + "kind", + "key", + "value" + ], + "type": "object" + }, + "MessageDirection": { + "description": "Indicates in which direction a message is sent in the protocol.", + "enum": [ + "clientToServer", + "serverToClient", + "both" + ], + "type": "string" + }, + "MetaData": { + "additionalProperties": false, + "properties": { + "version": { + "description": "The protocol version.", + "type": "string" + } + }, + "required": [ + "version" + ], + "type": "object" + }, + "MetaModel": { + "additionalProperties": false, + "description": "The actual meta model.", + "properties": { + "enumerations": { + "description": "The enumerations.", + "items": { + "$ref": "#/definitions/Enumeration" + }, + "type": "array" + }, + "metaData": { + "$ref": "#/definitions/MetaData", + "description": "Additional meta data." + }, + "notifications": { + "description": "The notifications.", + "items": { + "$ref": "#/definitions/Notification" + }, + "type": "array" + }, + "requests": { + "description": "The requests.", + "items": { + "$ref": "#/definitions/Request" + }, + "type": "array" + }, + "structures": { + "description": "The structures.", + "items": { + "$ref": "#/definitions/Structure" + }, + "type": "array" + }, + "typeAliases": { + "description": "The type aliases.", + "items": { + "$ref": "#/definitions/TypeAlias" + }, + "type": "array" + } + }, + "required": [ + "metaData", + "requests", + "notifications", + "structures", + "enumerations", + "typeAliases" + ], + "type": "object" + }, + "Notification": { + "additionalProperties": false, + "description": "Represents a LSP notification", + "properties": { + "deprecated": { + "description": "Whether the notification is deprecated or not. If deprecated the property contains the deprecation message.", + "type": "string" + }, + "documentation": { + "description": "An optional documentation;", + "type": "string" + }, + "messageDirection": { + "$ref": "#/definitions/MessageDirection", + "description": "The direction in which this notification is sent in the protocol." + }, + "method": { + "description": "The request's method name.", + "type": "string" + }, + "params": { + "anyOf": [ + { + "$ref": "#/definitions/Type" + }, + { + "items": { + "$ref": "#/definitions/Type" + }, + "type": "array" + } + ], + "description": "The parameter type(s) if any." + }, + "proposed": { + "description": "Whether this is a proposed notification. If omitted the notification is final.", + "type": "boolean" + }, + "registrationMethod": { + "description": "Optional a dynamic registration method if it different from the request's method.", + "type": "string" + }, + "registrationOptions": { + "$ref": "#/definitions/Type", + "description": "Optional registration options if the notification supports dynamic registration." + }, + "since": { + "description": "Since when (release number) this notification is available. Is undefined if not known.", + "type": "string" + } + }, + "required": [ + "method", + "messageDirection" + ], + "type": "object" + }, + "OrType": { + "additionalProperties": false, + "description": "Represents an `or` type (e.g. `Location | LocationLink`).", + "properties": { + "items": { + "items": { + "$ref": "#/definitions/Type" + }, + "type": "array" + }, + "kind": { + "const": "or", + "type": "string" + } + }, + "required": [ + "kind", + "items" + ], + "type": "object" + }, + "Property": { + "additionalProperties": false, + "description": "Represents an object property.", + "properties": { + "deprecated": { + "description": "Whether the property is deprecated or not. If deprecated the property contains the deprecation message.", + "type": "string" + }, + "documentation": { + "description": "An optional documentation.", + "type": "string" + }, + "name": { + "description": "The property name;", + "type": "string" + }, + "optional": { + "description": "Whether the property is optional. If omitted, the property is mandatory.", + "type": "boolean" + }, + "proposed": { + "description": "Whether this is a proposed property. If omitted, the structure is final.", + "type": "boolean" + }, + "since": { + "description": "Since when (release number) this property is available. Is undefined if not known.", + "type": "string" + }, + "type": { + "$ref": "#/definitions/Type", + "description": "The type of the property" + } + }, + "required": [ + "name", + "type" + ], + "type": "object" + }, + "ReferenceType": { + "additionalProperties": false, + "description": "Represents a reference to another type (e.g. `TextDocument`). This is either a `Structure`, a `Enumeration` or a `TypeAlias` in the same meta model.", + "properties": { + "kind": { + "const": "reference", + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "kind", + "name" + ], + "type": "object" + }, + "Request": { + "additionalProperties": false, + "description": "Represents a LSP request", + "properties": { + "deprecated": { + "description": "Whether the request is deprecated or not. If deprecated the property contains the deprecation message.", + "type": "string" + }, + "documentation": { + "description": "An optional documentation;", + "type": "string" + }, + "errorData": { + "$ref": "#/definitions/Type", + "description": "An optional error data type." + }, + "messageDirection": { + "$ref": "#/definitions/MessageDirection", + "description": "The direction in which this request is sent in the protocol." + }, + "method": { + "description": "The request's method name.", + "type": "string" + }, + "params": { + "anyOf": [ + { + "$ref": "#/definitions/Type" + }, + { + "items": { + "$ref": "#/definitions/Type" + }, + "type": "array" + } + ], + "description": "The parameter type(s) if any." + }, + "partialResult": { + "$ref": "#/definitions/Type", + "description": "Optional partial result type if the request supports partial result reporting." + }, + "proposed": { + "description": "Whether this is a proposed feature. If omitted the feature is final.", + "type": "boolean" + }, + "registrationMethod": { + "description": "Optional a dynamic registration method if it different from the request's method.", + "type": "string" + }, + "registrationOptions": { + "$ref": "#/definitions/Type", + "description": "Optional registration options if the request supports dynamic registration." + }, + "result": { + "$ref": "#/definitions/Type", + "description": "The result type." + }, + "since": { + "description": "Since when (release number) this request is available. Is undefined if not known.", + "type": "string" + } + }, + "required": [ + "method", + "result", + "messageDirection" + ], + "type": "object" + }, + "StringLiteralType": { + "additionalProperties": false, + "description": "Represents a string literal type (e.g. `kind: 'rename'`).", + "properties": { + "kind": { + "const": "stringLiteral", + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "kind", + "value" + ], + "type": "object" + }, + "Structure": { + "additionalProperties": false, + "description": "Defines the structure of an object literal.", + "properties": { + "deprecated": { + "description": "Whether the structure is deprecated or not. If deprecated the property contains the deprecation message.", + "type": "string" + }, + "documentation": { + "description": "An optional documentation;", + "type": "string" + }, + "extends": { + "description": "Structures extended from. This structures form a polymorphic type hierarchy.", + "items": { + "$ref": "#/definitions/Type" + }, + "type": "array" + }, + "mixins": { + "description": "Structures to mix in. The properties of these structures are `copied` into this structure. Mixins don't form a polymorphic type hierarchy in LSP.", + "items": { + "$ref": "#/definitions/Type" + }, + "type": "array" + }, + "name": { + "description": "The name of the structure.", + "type": "string" + }, + "properties": { + "description": "The properties.", + "items": { + "$ref": "#/definitions/Property" + }, + "type": "array" + }, + "proposed": { + "description": "Whether this is a proposed structure. If omitted, the structure is final.", + "type": "boolean" + }, + "since": { + "description": "Since when (release number) this structure is available. Is undefined if not known.", + "type": "string" + } + }, + "required": [ + "name", + "properties" + ], + "type": "object" + }, + "StructureLiteral": { + "additionalProperties": false, + "description": "Defines an unnamed structure of an object literal.", + "properties": { + "deprecated": { + "description": "Whether the literal is deprecated or not. If deprecated the property contains the deprecation message.", + "type": "string" + }, + "documentation": { + "description": "An optional documentation.", + "type": "string" + }, + "properties": { + "description": "The properties.", + "items": { + "$ref": "#/definitions/Property" + }, + "type": "array" + }, + "proposed": { + "description": "Whether this is a proposed structure. If omitted, the structure is final.", + "type": "boolean" + }, + "since": { + "description": "Since when (release number) this structure is available. Is undefined if not known.", + "type": "string" + } + }, + "required": [ + "properties" + ], + "type": "object" + }, + "StructureLiteralType": { + "additionalProperties": false, + "description": "Represents a literal structure (e.g. `property: { start: uinteger; end: uinteger; }`).", + "properties": { + "kind": { + "const": "literal", + "type": "string" + }, + "value": { + "$ref": "#/definitions/StructureLiteral" + } + }, + "required": [ + "kind", + "value" + ], + "type": "object" + }, + "TupleType": { + "additionalProperties": false, + "description": "Represents a `tuple` type (e.g. `[integer, integer]`).", + "properties": { + "items": { + "items": { + "$ref": "#/definitions/Type" + }, + "type": "array" + }, + "kind": { + "const": "tuple", + "type": "string" + } + }, + "required": [ + "kind", + "items" + ], + "type": "object" + }, + "Type": { + "anyOf": [ + { + "$ref": "#/definitions/BaseType" + }, + { + "$ref": "#/definitions/ReferenceType" + }, + { + "$ref": "#/definitions/ArrayType" + }, + { + "$ref": "#/definitions/MapType" + }, + { + "$ref": "#/definitions/AndType" + }, + { + "$ref": "#/definitions/OrType" + }, + { + "$ref": "#/definitions/TupleType" + }, + { + "$ref": "#/definitions/StructureLiteralType" + }, + { + "$ref": "#/definitions/StringLiteralType" + }, + { + "$ref": "#/definitions/IntegerLiteralType" + }, + { + "$ref": "#/definitions/BooleanLiteralType" + } + ] + }, + "TypeAlias": { + "additionalProperties": false, + "description": "Defines a type alias. (e.g. `type Definition = Location | LocationLink`)", + "properties": { + "deprecated": { + "description": "Whether the type alias is deprecated or not. If deprecated the property contains the deprecation message.", + "type": "string" + }, + "documentation": { + "description": "An optional documentation.", + "type": "string" + }, + "name": { + "description": "The name of the type alias.", + "type": "string" + }, + "proposed": { + "description": "Whether this is a proposed type alias. If omitted, the type alias is final.", + "type": "boolean" + }, + "since": { + "description": "Since when (release number) this structure is available. Is undefined if not known.", + "type": "string" + }, + "type": { + "$ref": "#/definitions/Type", + "description": "The aliased type." + } + }, + "required": [ + "name", + "type" + ], + "type": "object" + }, + "TypeKind": { + "enum": [ + "base", + "reference", + "array", + "map", + "and", + "or", + "tuple", + "literal", + "stringLiteral", + "integerLiteral", + "booleanLiteral" + ], + "type": "string" + } + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node.cmd" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node.cmd" index d6820389cf905e2639588cfaf3d1dd49787060d0..791e6e36ca158adb27a1ca664413568656ce2781 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node.cmd" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node.cmd" @@ -1,3 +1,5 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fad7474018db5e3ef38b97374d82fb3b5c56a16aee423f482b6732800007f533 -size 213 +@echo off +REM This file is necessary to ensure that under Windows we don't +REM run the node.js file in the Windows Script Host when using +REM node in packakge.json scripts. See also PATHEXT setting +node.exe %* \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node.d.ts" index d4501421d4bd489c9190700a07b50dd52678f01e..b4c4fcd723edbd7b4ea066a4059cf8393e46aa88 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c98df0145d99011af92c397fa787fc39d42cc04019614ab5581febe71fb32e1 -size 382 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/node/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node.js" index 6ca9fea0ab31ba44f19549c8fa3b28a055f235c0..388e3197ebb862634cda424e9d707896b40627da 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20ed9d05087fa65ed99369c32ebaad6d2714c56d38b6b58e660ec428d1280054 -size 408 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/node/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/License.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/License.txt" index 71c73d0cbbb244fd8977b1334dae3ac9800e0c19..a07e3ae825f86b6d1f966659954bffc0768bef66 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/License.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/License.txt" @@ -1,3 +1,11 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec9ee83580841e8eb687aca9867f221503809ba6426c7f876ede17d91b9fcfd0 -size 1095 +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/README.md" index fef97e44f309bb1b9e7ea607970ae6d06f11a1db..d5e63cee70b4da2a941802d6ab01127946221faf 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/README.md" @@ -1,3 +1,69 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9b5b0275c492c1a45d9b199b666c9bb1499a69b2f480a2b6d22bdd710f5ae0f8 -size 2205 +# VSCode JSON RPC + +[![NPM Version](https://img.shields.io/npm/v/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc) +[![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-node) + +This npm module implements the base messaging protocol spoken between a VSCode language server and a VSCode language client. + +The npm module can also be used standalone to establish a [JSON-RPC](http://www.jsonrpc.org/) channel between +a client and a server. Below an example how to setup a JSON-RPC connection. First the client side. + +```ts +import * as cp from 'child_process'; +import * as rpc from 'vscode-jsonrpc/node'; + +let childProcess = cp.spawn(...); + +// Use stdin and stdout for communication: +let connection = rpc.createMessageConnection( + new rpc.StreamMessageReader(childProcess.stdout), + new rpc.StreamMessageWriter(childProcess.stdin)); + +let notification = new rpc.NotificationType('testNotification'); + +connection.listen(); + +connection.sendNotification(notification, 'Hello World'); +``` + +The server side looks very symmetrical: + +```ts +import * as rpc from 'vscode-jsonrpc/node'; + + +let connection = rpc.createMessageConnection( + new rpc.StreamMessageReader(process.stdin), + new rpc.StreamMessageWriter(process.stdout)); + +let notification = new rpc.NotificationType('testNotification'); +connection.onNotification(notification, (param: string) => { + console.log(param); // This prints Hello World +}); + +connection.listen(); +``` + +# History + +### 5.0.0 + +- add progress support +- move JS target to ES2017 + +### 4.0.0 + +- move JS target to ES6. + +### 3.0.0: + +- converted the NPM module to use TypeScript 2.0.3. +- added strict null support. +- support for passing more than one parameter to a request or notification. +- Breaking changes: + - due to the use of TypeScript 2.0.3 and differences in d.ts generation users of the new version need to move to + TypeScript 2.0.3 as well. + +## License +[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt) diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.d.ts" index 0898e728f1aa9ab8ecda68d04096c898e91dbe6a..e628f1b5caf549c4b58cead28e5ca6a1d682acf8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99170b7257d895bb2594d7db9c255a4b0029a1363fe5e89849fda830b5c997ce -size 385 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/browser/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.js" index da29a4f6ec2636f4c79c022c589b7adc67c91530..f5caebf0011feb56821400f3e85f752c80778192 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9406802db032558d3cd8bde9f68d20c067f3a7eca251ad7d0e4473da8d457ada -size 411 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/browser/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.d.ts" index ca1cbfd35ff41135a2b709846ea28452a3fb53b5..05d994f7bc7586b82e024d5cdce1194910308801 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.d.ts" @@ -1,3 +1,17 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fbbdb0baaade3505088d8eeaee2e57468ccd5fb08189cb5dfc58ec9c571f3191 -size 994 +import { AbstractMessageReader, DataCallback, AbstractMessageWriter, Message, Disposable, ConnectionStrategy, ConnectionOptions, MessageReader, MessageWriter, Logger, MessageConnection } from '../common/api'; +export * from '../common/api'; +export declare class BrowserMessageReader extends AbstractMessageReader implements MessageReader { + private _onData; + private _messageListener; + constructor(port: MessagePort | Worker | DedicatedWorkerGlobalScope); + listen(callback: DataCallback): Disposable; +} +export declare class BrowserMessageWriter extends AbstractMessageWriter implements MessageWriter { + private port; + private errorCount; + constructor(port: MessagePort | Worker | DedicatedWorkerGlobalScope); + write(msg: Message): Promise; + private handleError; + end(): void; +} +export declare function createMessageConnection(reader: MessageReader, writer: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.js" index 1538a888b1666e2e20bf0f5e03ebb346fb1a34f5..7367be5115795fdc0b75ce3bbb54398d5915136a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.js" @@ -1,3 +1,76 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b8a81be90adb2c0ee8309509685068c74b96870ffba6e8dc664a8ce94fadc168 -size 2964 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createMessageConnection = exports.BrowserMessageWriter = exports.BrowserMessageReader = void 0; +const ril_1 = require("./ril"); +// Install the browser runtime abstract. +ril_1.default.install(); +const api_1 = require("../common/api"); +__exportStar(require("../common/api"), exports); +class BrowserMessageReader extends api_1.AbstractMessageReader { + constructor(port) { + super(); + this._onData = new api_1.Emitter(); + this._messageListener = (event) => { + this._onData.fire(event.data); + }; + port.addEventListener('error', (event) => this.fireError(event)); + port.onmessage = this._messageListener; + } + listen(callback) { + return this._onData.event(callback); + } +} +exports.BrowserMessageReader = BrowserMessageReader; +class BrowserMessageWriter extends api_1.AbstractMessageWriter { + constructor(port) { + super(); + this.port = port; + this.errorCount = 0; + port.addEventListener('error', (event) => this.fireError(event)); + } + write(msg) { + try { + this.port.postMessage(msg); + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.BrowserMessageWriter = BrowserMessageWriter; +function createMessageConnection(reader, writer, logger, options) { + if (logger === undefined) { + logger = api_1.NullLogger; + } + if (api_1.ConnectionStrategy.is(options)) { + options = { connectionStrategy: options }; + } + return (0, api_1.createMessageConnection)(reader, writer, logger, options); +} +exports.createMessageConnection = createMessageConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts" index d2f8d6ba693933c232f3d7f7fcb042682b32faf4..5a5a82c5f9d6d9b0d71c97320f56ef81b94681b6 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts" @@ -1,3 +1,12 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a9994d282573b31ac3b09bb94c88868edd6530c06d77e99379d4fd9e91d90dc6 -size 358 +import { RAL } from '../common/api'; +interface RIL extends RAL { + readonly stream: { + readonly asReadableStream: (stream: WebSocket) => RAL.ReadableStream; + readonly asWritableStream: (stream: WebSocket) => RAL.WritableStream; + }; +} +declare function RIL(): RIL; +declare namespace RIL { + function install(): void; +} +export default RIL; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.js" index c085fca48e924a527b1121bfc96b8e88c2cfd788..8991868a2474a41f2c01d366721ed499fb7ec699 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.js" @@ -1,3 +1,156 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e636b0a5c6513a6adb5b1a7814128904a39c6fe285019dbfa75d9c44cdb4d262 -size 5643 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +const api_1 = require("../common/api"); +class MessageBuffer extends api_1.AbstractMessageBuffer { + constructor(encoding = 'utf-8') { + super(encoding); + this.asciiDecoder = new TextDecoder('ascii'); + } + emptyBuffer() { + return MessageBuffer.emptyBuffer; + } + fromString(value, _encoding) { + return (new TextEncoder()).encode(value); + } + toString(value, encoding) { + if (encoding === 'ascii') { + return this.asciiDecoder.decode(value); + } + else { + return (new TextDecoder(encoding)).decode(value); + } + } + asNative(buffer, length) { + if (length === undefined) { + return buffer; + } + else { + return buffer.slice(0, length); + } + } + allocNative(length) { + return new Uint8Array(length); + } +} +MessageBuffer.emptyBuffer = new Uint8Array(0); +class ReadableStreamWrapper { + constructor(socket) { + this.socket = socket; + this._onData = new api_1.Emitter(); + this._messageListener = (event) => { + const blob = event.data; + blob.arrayBuffer().then((buffer) => { + this._onData.fire(new Uint8Array(buffer)); + }, () => { + (0, api_1.RAL)().console.error(`Converting blob to array buffer failed.`); + }); + }; + this.socket.addEventListener('message', this._messageListener); + } + onClose(listener) { + this.socket.addEventListener('close', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('close', listener)); + } + onError(listener) { + this.socket.addEventListener('error', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('error', listener)); + } + onEnd(listener) { + this.socket.addEventListener('end', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('end', listener)); + } + onData(listener) { + return this._onData.event(listener); + } +} +class WritableStreamWrapper { + constructor(socket) { + this.socket = socket; + } + onClose(listener) { + this.socket.addEventListener('close', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('close', listener)); + } + onError(listener) { + this.socket.addEventListener('error', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('error', listener)); + } + onEnd(listener) { + this.socket.addEventListener('end', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('end', listener)); + } + write(data, encoding) { + if (typeof data === 'string') { + if (encoding !== undefined && encoding !== 'utf-8') { + throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${encoding}`); + } + this.socket.send(data); + } + else { + this.socket.send(data); + } + return Promise.resolve(); + } + end() { + this.socket.close(); + } +} +const _textEncoder = new TextEncoder(); +const _ril = Object.freeze({ + messageBuffer: Object.freeze({ + create: (encoding) => new MessageBuffer(encoding) + }), + applicationJson: Object.freeze({ + encoder: Object.freeze({ + name: 'application/json', + encode: (msg, options) => { + if (options.charset !== 'utf-8') { + throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${options.charset}`); + } + return Promise.resolve(_textEncoder.encode(JSON.stringify(msg, undefined, 0))); + } + }), + decoder: Object.freeze({ + name: 'application/json', + decode: (buffer, options) => { + if (!(buffer instanceof Uint8Array)) { + throw new Error(`In a Browser environments only Uint8Arrays are supported.`); + } + return Promise.resolve(JSON.parse(new TextDecoder(options.charset).decode(buffer))); + } + }) + }), + stream: Object.freeze({ + asReadableStream: (socket) => new ReadableStreamWrapper(socket), + asWritableStream: (socket) => new WritableStreamWrapper(socket) + }), + console: console, + timer: Object.freeze({ + setTimeout(callback, ms, ...args) { + const handle = setTimeout(callback, ms, ...args); + return { dispose: () => clearTimeout(handle) }; + }, + setImmediate(callback, ...args) { + const handle = setTimeout(callback, 0, ...args); + return { dispose: () => clearTimeout(handle) }; + }, + setInterval(callback, ms, ...args) { + const handle = setInterval(callback, ms, ...args); + return { dispose: () => clearInterval(handle) }; + }, + }) +}); +function RIL() { + return _ril; +} +(function (RIL) { + function install() { + api_1.RAL.install(_ril); + } + RIL.install = install; +})(RIL || (RIL = {})); +exports.default = RIL; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.d.ts" index ff554ba0cf438efb9175d0ec3cfa344eca283097..85f49e0b2372725ecf6d927414d673e1fa5ad79d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.d.ts" @@ -1,3 +1,14 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d576ef1b6aa804d0f0e8dfb3f6149b576788b598054aa2e15d5a7f7f52faf371 -size 4440 +/// +import { Message, MessageSignature, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseError, ErrorCodes, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, ResponseMessage, ParameterStructures, _EM } from './messages'; +import { LinkedMap, LRUCache, Touch } from './linkedMap'; +import { Disposable } from './disposable'; +import { Event, Emitter } from './events'; +import { AbstractCancellationTokenSource, CancellationTokenSource, CancellationToken } from './cancellation'; +import { SharedArraySenderStrategy, SharedArrayReceiverStrategy } from './sharedArrayCancellation'; +import { MessageReader, AbstractMessageReader, ReadableStreamMessageReader, DataCallback, MessageReaderOptions, PartialMessageInfo } from './messageReader'; +import { MessageWriter, AbstractMessageWriter, WriteableStreamMessageWriter, MessageWriterOptions } from './messageWriter'; +import { AbstractMessageBuffer } from './messageBuffer'; +import { ContentTypeEncoderOptions, ContentEncoder, ContentTypeEncoder, ContentTypeDecoderOptions, ContentDecoder, ContentTypeDecoder } from './encoding'; +import { Logger, ConnectionStrategy, ConnectionOptions, MessageConnection, NullLogger, createMessageConnection, ProgressToken, ProgressType, HandlerResult, StarRequestHandler, GenericRequestHandler, RequestHandler0, RequestHandler, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, StarNotificationHandler, GenericNotificationHandler, NotificationHandler0, NotificationHandler, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, Trace, TraceValues, TraceFormat, TraceOptions, SetTraceParams, SetTraceNotification, LogTraceParams, LogTraceNotification, Tracer, ConnectionErrors, ConnectionError, CancellationId, CancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy, MessageStrategy } from './connection'; +import RAL from './ral'; +export { RAL, Message, MessageSignature, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseError, ErrorCodes, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, ResponseMessage, ParameterStructures, _EM, LinkedMap, Touch, LRUCache, Disposable, Event, Emitter, AbstractCancellationTokenSource, CancellationTokenSource, CancellationToken, SharedArraySenderStrategy, SharedArrayReceiverStrategy, MessageReader, AbstractMessageReader, ReadableStreamMessageReader, DataCallback, MessageReaderOptions, PartialMessageInfo, MessageWriter, AbstractMessageWriter, WriteableStreamMessageWriter, MessageWriterOptions, AbstractMessageBuffer, ContentTypeEncoderOptions, ContentEncoder, ContentTypeEncoder, ContentTypeDecoderOptions, ContentDecoder, ContentTypeDecoder, Logger, ConnectionStrategy, ConnectionOptions, MessageConnection, NullLogger, createMessageConnection, ProgressToken, ProgressType, HandlerResult, StarRequestHandler, GenericRequestHandler, RequestHandler0, RequestHandler, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, StarNotificationHandler, GenericNotificationHandler, NotificationHandler0, NotificationHandler, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, Trace, TraceValues, TraceFormat, TraceOptions, SetTraceParams, SetTraceNotification, LogTraceParams, LogTraceNotification, Tracer, ConnectionErrors, ConnectionError, CancellationId, CancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy, MessageStrategy }; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.js" index 1db9d0f5b77bc7cfcd78aea9583ab593846f08f6..546b6e4b2b3432fc3524305ee2b9459647d84cee 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.js" @@ -1,3 +1,81 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7fa670dda5d24ee45092dc03041000d94dd6c5a12766ebb4c9d7499ad9e52915 -size 10611 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +/// +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProgressType = exports.ProgressToken = exports.createMessageConnection = exports.NullLogger = exports.ConnectionOptions = exports.ConnectionStrategy = exports.AbstractMessageBuffer = exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = exports.SharedArrayReceiverStrategy = exports.SharedArraySenderStrategy = exports.CancellationToken = exports.CancellationTokenSource = exports.Emitter = exports.Event = exports.Disposable = exports.LRUCache = exports.Touch = exports.LinkedMap = exports.ParameterStructures = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.ErrorCodes = exports.ResponseError = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType0 = exports.RequestType = exports.Message = exports.RAL = void 0; +exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.Trace = void 0; +const messages_1 = require("./messages"); +Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return messages_1.Message; } }); +Object.defineProperty(exports, "RequestType", { enumerable: true, get: function () { return messages_1.RequestType; } }); +Object.defineProperty(exports, "RequestType0", { enumerable: true, get: function () { return messages_1.RequestType0; } }); +Object.defineProperty(exports, "RequestType1", { enumerable: true, get: function () { return messages_1.RequestType1; } }); +Object.defineProperty(exports, "RequestType2", { enumerable: true, get: function () { return messages_1.RequestType2; } }); +Object.defineProperty(exports, "RequestType3", { enumerable: true, get: function () { return messages_1.RequestType3; } }); +Object.defineProperty(exports, "RequestType4", { enumerable: true, get: function () { return messages_1.RequestType4; } }); +Object.defineProperty(exports, "RequestType5", { enumerable: true, get: function () { return messages_1.RequestType5; } }); +Object.defineProperty(exports, "RequestType6", { enumerable: true, get: function () { return messages_1.RequestType6; } }); +Object.defineProperty(exports, "RequestType7", { enumerable: true, get: function () { return messages_1.RequestType7; } }); +Object.defineProperty(exports, "RequestType8", { enumerable: true, get: function () { return messages_1.RequestType8; } }); +Object.defineProperty(exports, "RequestType9", { enumerable: true, get: function () { return messages_1.RequestType9; } }); +Object.defineProperty(exports, "ResponseError", { enumerable: true, get: function () { return messages_1.ResponseError; } }); +Object.defineProperty(exports, "ErrorCodes", { enumerable: true, get: function () { return messages_1.ErrorCodes; } }); +Object.defineProperty(exports, "NotificationType", { enumerable: true, get: function () { return messages_1.NotificationType; } }); +Object.defineProperty(exports, "NotificationType0", { enumerable: true, get: function () { return messages_1.NotificationType0; } }); +Object.defineProperty(exports, "NotificationType1", { enumerable: true, get: function () { return messages_1.NotificationType1; } }); +Object.defineProperty(exports, "NotificationType2", { enumerable: true, get: function () { return messages_1.NotificationType2; } }); +Object.defineProperty(exports, "NotificationType3", { enumerable: true, get: function () { return messages_1.NotificationType3; } }); +Object.defineProperty(exports, "NotificationType4", { enumerable: true, get: function () { return messages_1.NotificationType4; } }); +Object.defineProperty(exports, "NotificationType5", { enumerable: true, get: function () { return messages_1.NotificationType5; } }); +Object.defineProperty(exports, "NotificationType6", { enumerable: true, get: function () { return messages_1.NotificationType6; } }); +Object.defineProperty(exports, "NotificationType7", { enumerable: true, get: function () { return messages_1.NotificationType7; } }); +Object.defineProperty(exports, "NotificationType8", { enumerable: true, get: function () { return messages_1.NotificationType8; } }); +Object.defineProperty(exports, "NotificationType9", { enumerable: true, get: function () { return messages_1.NotificationType9; } }); +Object.defineProperty(exports, "ParameterStructures", { enumerable: true, get: function () { return messages_1.ParameterStructures; } }); +const linkedMap_1 = require("./linkedMap"); +Object.defineProperty(exports, "LinkedMap", { enumerable: true, get: function () { return linkedMap_1.LinkedMap; } }); +Object.defineProperty(exports, "LRUCache", { enumerable: true, get: function () { return linkedMap_1.LRUCache; } }); +Object.defineProperty(exports, "Touch", { enumerable: true, get: function () { return linkedMap_1.Touch; } }); +const disposable_1 = require("./disposable"); +Object.defineProperty(exports, "Disposable", { enumerable: true, get: function () { return disposable_1.Disposable; } }); +const events_1 = require("./events"); +Object.defineProperty(exports, "Event", { enumerable: true, get: function () { return events_1.Event; } }); +Object.defineProperty(exports, "Emitter", { enumerable: true, get: function () { return events_1.Emitter; } }); +const cancellation_1 = require("./cancellation"); +Object.defineProperty(exports, "CancellationTokenSource", { enumerable: true, get: function () { return cancellation_1.CancellationTokenSource; } }); +Object.defineProperty(exports, "CancellationToken", { enumerable: true, get: function () { return cancellation_1.CancellationToken; } }); +const sharedArrayCancellation_1 = require("./sharedArrayCancellation"); +Object.defineProperty(exports, "SharedArraySenderStrategy", { enumerable: true, get: function () { return sharedArrayCancellation_1.SharedArraySenderStrategy; } }); +Object.defineProperty(exports, "SharedArrayReceiverStrategy", { enumerable: true, get: function () { return sharedArrayCancellation_1.SharedArrayReceiverStrategy; } }); +const messageReader_1 = require("./messageReader"); +Object.defineProperty(exports, "MessageReader", { enumerable: true, get: function () { return messageReader_1.MessageReader; } }); +Object.defineProperty(exports, "AbstractMessageReader", { enumerable: true, get: function () { return messageReader_1.AbstractMessageReader; } }); +Object.defineProperty(exports, "ReadableStreamMessageReader", { enumerable: true, get: function () { return messageReader_1.ReadableStreamMessageReader; } }); +const messageWriter_1 = require("./messageWriter"); +Object.defineProperty(exports, "MessageWriter", { enumerable: true, get: function () { return messageWriter_1.MessageWriter; } }); +Object.defineProperty(exports, "AbstractMessageWriter", { enumerable: true, get: function () { return messageWriter_1.AbstractMessageWriter; } }); +Object.defineProperty(exports, "WriteableStreamMessageWriter", { enumerable: true, get: function () { return messageWriter_1.WriteableStreamMessageWriter; } }); +const messageBuffer_1 = require("./messageBuffer"); +Object.defineProperty(exports, "AbstractMessageBuffer", { enumerable: true, get: function () { return messageBuffer_1.AbstractMessageBuffer; } }); +const connection_1 = require("./connection"); +Object.defineProperty(exports, "ConnectionStrategy", { enumerable: true, get: function () { return connection_1.ConnectionStrategy; } }); +Object.defineProperty(exports, "ConnectionOptions", { enumerable: true, get: function () { return connection_1.ConnectionOptions; } }); +Object.defineProperty(exports, "NullLogger", { enumerable: true, get: function () { return connection_1.NullLogger; } }); +Object.defineProperty(exports, "createMessageConnection", { enumerable: true, get: function () { return connection_1.createMessageConnection; } }); +Object.defineProperty(exports, "ProgressToken", { enumerable: true, get: function () { return connection_1.ProgressToken; } }); +Object.defineProperty(exports, "ProgressType", { enumerable: true, get: function () { return connection_1.ProgressType; } }); +Object.defineProperty(exports, "Trace", { enumerable: true, get: function () { return connection_1.Trace; } }); +Object.defineProperty(exports, "TraceValues", { enumerable: true, get: function () { return connection_1.TraceValues; } }); +Object.defineProperty(exports, "TraceFormat", { enumerable: true, get: function () { return connection_1.TraceFormat; } }); +Object.defineProperty(exports, "SetTraceNotification", { enumerable: true, get: function () { return connection_1.SetTraceNotification; } }); +Object.defineProperty(exports, "LogTraceNotification", { enumerable: true, get: function () { return connection_1.LogTraceNotification; } }); +Object.defineProperty(exports, "ConnectionErrors", { enumerable: true, get: function () { return connection_1.ConnectionErrors; } }); +Object.defineProperty(exports, "ConnectionError", { enumerable: true, get: function () { return connection_1.ConnectionError; } }); +Object.defineProperty(exports, "CancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.CancellationReceiverStrategy; } }); +Object.defineProperty(exports, "CancellationSenderStrategy", { enumerable: true, get: function () { return connection_1.CancellationSenderStrategy; } }); +Object.defineProperty(exports, "CancellationStrategy", { enumerable: true, get: function () { return connection_1.CancellationStrategy; } }); +Object.defineProperty(exports, "MessageStrategy", { enumerable: true, get: function () { return connection_1.MessageStrategy; } }); +const ral_1 = require("./ral"); +exports.RAL = ral_1.default; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts" index d3ad20ff1e6a0619dff0e4588f595f59c3564bb6..4028512ef3535af306f10dc79f6187faf4ced360 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts" @@ -1,3 +1,32 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:392dd7b1117b588cba36c04909efd24b0458980506e8e8c1966114f8989058e2 -size 1030 +import { Event } from './events'; +import { Disposable } from './disposable'; +/** + * Defines a CancellationToken. This interface is not + * intended to be implemented. A CancellationToken must + * be created via a CancellationTokenSource. + */ +export interface CancellationToken { + /** + * Is `true` when the token has been cancelled, `false` otherwise. + */ + readonly isCancellationRequested: boolean; + /** + * An {@link Event event} which fires upon cancellation. + */ + readonly onCancellationRequested: Event; +} +export declare namespace CancellationToken { + const None: CancellationToken; + const Cancelled: CancellationToken; + function is(value: any): value is CancellationToken; +} +export interface AbstractCancellationTokenSource extends Disposable { + token: CancellationToken; + cancel(): void; +} +export declare class CancellationTokenSource implements AbstractCancellationTokenSource { + private _token; + get token(): CancellationToken; + cancel(): void; + dispose(): void; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.js" index db58dc7bbaad2bbee72743e74cdda6d3d1927ec7..43a95808cbee4cd9d452cf5c018a7c62bbf7ac2a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.js" @@ -1,3 +1,96 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bddf9e8f3bf2db7907d3c2551a690328cc6f978b1342432105dcbd072080e935 -size 3288 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CancellationTokenSource = exports.CancellationToken = void 0; +const ral_1 = require("./ral"); +const Is = require("./is"); +const events_1 = require("./events"); +var CancellationToken; +(function (CancellationToken) { + CancellationToken.None = Object.freeze({ + isCancellationRequested: false, + onCancellationRequested: events_1.Event.None + }); + CancellationToken.Cancelled = Object.freeze({ + isCancellationRequested: true, + onCancellationRequested: events_1.Event.None + }); + function is(value) { + const candidate = value; + return candidate && (candidate === CancellationToken.None + || candidate === CancellationToken.Cancelled + || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested)); + } + CancellationToken.is = is; +})(CancellationToken || (exports.CancellationToken = CancellationToken = {})); +const shortcutEvent = Object.freeze(function (callback, context) { + const handle = (0, ral_1.default)().timer.setTimeout(callback.bind(context), 0); + return { dispose() { handle.dispose(); } }; +}); +class MutableToken { + constructor() { + this._isCancelled = false; + } + cancel() { + if (!this._isCancelled) { + this._isCancelled = true; + if (this._emitter) { + this._emitter.fire(undefined); + this.dispose(); + } + } + } + get isCancellationRequested() { + return this._isCancelled; + } + get onCancellationRequested() { + if (this._isCancelled) { + return shortcutEvent; + } + if (!this._emitter) { + this._emitter = new events_1.Emitter(); + } + return this._emitter.event; + } + dispose() { + if (this._emitter) { + this._emitter.dispose(); + this._emitter = undefined; + } + } +} +class CancellationTokenSource { + get token() { + if (!this._token) { + // be lazy and create the token only when + // actually needed + this._token = new MutableToken(); + } + return this._token; + } + cancel() { + if (!this._token) { + // save an object by returning the default + // cancelled token when cancellation happens + // before someone asks for the token + this._token = CancellationToken.Cancelled; + } + else { + this._token.cancel(); + } + } + dispose() { + if (!this._token) { + // ensure to initialize with an empty token if we had none + this._token = CancellationToken.None; + } + else if (this._token instanceof MutableToken) { + // actually dispose + this._token.dispose(); + } + } +} +exports.CancellationTokenSource = CancellationTokenSource; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.d.ts" index 812021a4ae0ed7e10b57885e935b940d7b3d68f6..9cd8fa097c957a1f4b3f1693d55f895c694e1c05 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.d.ts" @@ -1,3 +1,358 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2ff2789ae43f9c056917e7516a02ad07c4cc1cafff3c68ff6b7ff8df623fd259 -size 17880 +import { Message, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseMessage, ResponseError, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, _EM, ParameterStructures } from './messages'; +import type { Disposable } from './disposable'; +import { Event } from './events'; +import { CancellationToken, AbstractCancellationTokenSource } from './cancellation'; +import { MessageReader } from './messageReader'; +import { MessageWriter } from './messageWriter'; +export type ProgressToken = number | string; +export declare namespace ProgressToken { + function is(value: any): value is number | string; +} +interface ProgressParams { + /** + * The progress token provided by the client or server. + */ + token: ProgressToken; + /** + * The progress data. + */ + value: T; +} +export declare class ProgressType { + /** + * Clients must not use these properties. They are here to ensure correct typing. + * in TypeScript + */ + readonly __: [PR, _EM] | undefined; + readonly _pr: PR | undefined; + constructor(); +} +export type HandlerResult = R | ResponseError | Thenable | Thenable> | Thenable>; +export interface StarRequestHandler { + (method: string, params: any[] | object | undefined, token: CancellationToken): HandlerResult; +} +export interface GenericRequestHandler { + (...params: any[]): HandlerResult; +} +export interface RequestHandler0 { + (token: CancellationToken): HandlerResult; +} +export interface RequestHandler { + (params: P, token: CancellationToken): HandlerResult; +} +export interface RequestHandler1 { + (p1: P1, token: CancellationToken): HandlerResult; +} +export interface RequestHandler2 { + (p1: P1, p2: P2, token: CancellationToken): HandlerResult; +} +export interface RequestHandler3 { + (p1: P1, p2: P2, p3: P3, token: CancellationToken): HandlerResult; +} +export interface RequestHandler4 { + (p1: P1, p2: P2, p3: P3, p4: P4, token: CancellationToken): HandlerResult; +} +export interface RequestHandler5 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, token: CancellationToken): HandlerResult; +} +export interface RequestHandler6 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, token: CancellationToken): HandlerResult; +} +export interface RequestHandler7 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, token: CancellationToken): HandlerResult; +} +export interface RequestHandler8 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, token: CancellationToken): HandlerResult; +} +export interface RequestHandler9 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, token: CancellationToken): HandlerResult; +} +export interface StarNotificationHandler { + (method: string, params: any[] | object | undefined): void; +} +export interface GenericNotificationHandler { + (...params: any[]): void; +} +export interface NotificationHandler0 { + (): void; +} +export interface NotificationHandler

{ + (params: P): void; +} +export interface NotificationHandler1 { + (p1: P1): void; +} +export interface NotificationHandler2 { + (p1: P1, p2: P2): void; +} +export interface NotificationHandler3 { + (p1: P1, p2: P2, p3: P3): void; +} +export interface NotificationHandler4 { + (p1: P1, p2: P2, p3: P3, p4: P4): void; +} +export interface NotificationHandler5 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5): void; +} +export interface NotificationHandler6 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6): void; +} +export interface NotificationHandler7 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7): void; +} +export interface NotificationHandler8 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8): void; +} +export interface NotificationHandler9 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9): void; +} +export interface Logger { + error(message: string): void; + warn(message: string): void; + info(message: string): void; + log(message: string): void; +} +export declare const NullLogger: Logger; +export declare enum Trace { + Off = 0, + Messages = 1, + Compact = 2, + Verbose = 3 +} +export declare namespace TraceValues { + /** + * Turn tracing off. + */ + const Off: 'off'; + /** + * Trace messages only. + */ + const Messages: 'messages'; + /** + * Compact message tracing. + */ + const Compact: 'compact'; + /** + * Verbose message tracing. + */ + const Verbose: 'verbose'; +} +export type TraceValues = 'off' | 'messages' | 'compact' | 'verbose'; +export declare namespace Trace { + function fromString(value: string): Trace; + function toString(value: Trace): TraceValues; +} +export declare enum TraceFormat { + Text = "text", + JSON = "json" +} +export declare namespace TraceFormat { + function fromString(value: string): TraceFormat; +} +export interface TraceOptions { + sendNotification?: boolean; + traceFormat?: TraceFormat; +} +export interface SetTraceParams { + value: TraceValues; +} +export declare namespace SetTraceNotification { + const type: NotificationType; +} +export interface LogTraceParams { + message: string; + verbose?: string; +} +export declare namespace LogTraceNotification { + const type: NotificationType; +} +export interface Tracer { + log(dataObject: any): void; + log(message: string, data?: string): void; +} +export declare enum ConnectionErrors { + /** + * The connection is closed. + */ + Closed = 1, + /** + * The connection got disposed. + */ + Disposed = 2, + /** + * The connection is already in listening mode. + */ + AlreadyListening = 3 +} +export declare class ConnectionError extends Error { + readonly code: ConnectionErrors; + constructor(code: ConnectionErrors, message: string); +} +export type ConnectionStrategy = { + cancelUndispatched?: (message: Message, next: (message: Message) => ResponseMessage | undefined) => ResponseMessage | undefined; +}; +export declare namespace ConnectionStrategy { + function is(value: any): value is ConnectionStrategy; +} +export type CancellationId = number | string; +export interface IdCancellationReceiverStrategy { + kind?: 'id'; + /** + * Creates a CancellationTokenSource from a cancellation id. + * + * @param id The cancellation id. + */ + createCancellationTokenSource(id: CancellationId): AbstractCancellationTokenSource; + /** + * An optional method to dispose the strategy. + */ + dispose?(): void; +} +export declare namespace IdCancellationReceiverStrategy { + function is(value: any): value is IdCancellationReceiverStrategy; +} +export interface RequestCancellationReceiverStrategy { + kind: 'request'; + /** + * Create a cancellation token source from a given request message. + * + * @param requestMessage The request message. + */ + createCancellationTokenSource(requestMessage: RequestMessage): AbstractCancellationTokenSource; + /** + * An optional method to dispose the strategy. + */ + dispose?(): void; +} +export declare namespace RequestCancellationReceiverStrategy { + function is(value: any): value is RequestCancellationReceiverStrategy; +} +/** + * This will break with the next major version and will become + * export type CancellationReceiverStrategy = IdCancellationReceiverStrategy | RequestCancellationReceiverStrategy; + */ +export type CancellationReceiverStrategy = IdCancellationReceiverStrategy; +export declare namespace CancellationReceiverStrategy { + const Message: CancellationReceiverStrategy; + function is(value: any): value is CancellationReceiverStrategy; +} +export interface CancellationSenderStrategy { + /** + * Hook to enable cancellation for the given request. + * + * @param request The request to enable cancellation for. + */ + enableCancellation?(request: RequestMessage): void; + /** + * Send cancellation for the given cancellation id + * + * @param conn The connection used. + * @param id The cancellation id. + */ + sendCancellation(conn: MessageConnection, id: CancellationId): Promise; + /** + * Cleanup any cancellation state for the given cancellation id. After this + * method has been call no cancellation will be sent anymore for the given id. + * + * @param id The cancellation id. + */ + cleanup(id: CancellationId): void; + /** + * An optional method to dispose the strategy. + */ + dispose?(): void; +} +export declare namespace CancellationSenderStrategy { + const Message: CancellationSenderStrategy; + function is(value: any): value is CancellationSenderStrategy; +} +export interface CancellationStrategy { + receiver: CancellationReceiverStrategy | RequestCancellationReceiverStrategy; + sender: CancellationSenderStrategy; +} +export declare namespace CancellationStrategy { + const Message: CancellationStrategy; + function is(value: any): value is CancellationStrategy; +} +export interface MessageStrategy { + handleMessage(message: Message, next: (message: Message) => void): void; +} +export declare namespace MessageStrategy { + function is(value: any): value is MessageStrategy; +} +export interface ConnectionOptions { + cancellationStrategy?: CancellationStrategy; + connectionStrategy?: ConnectionStrategy; + messageStrategy?: MessageStrategy; +} +export declare namespace ConnectionOptions { + function is(value: any): value is ConnectionOptions; +} +export interface MessageConnection { + sendRequest(type: RequestType0, token?: CancellationToken): Promise; + sendRequest(type: RequestType, params: P, token?: CancellationToken): Promise; + sendRequest(type: RequestType1, p1: P1, token?: CancellationToken): Promise; + sendRequest(type: RequestType2, p1: P1, p2: P2, token?: CancellationToken): Promise; + sendRequest(type: RequestType3, p1: P1, p2: P2, p3: P3, token?: CancellationToken): Promise; + sendRequest(type: RequestType4, p1: P1, p2: P2, p3: P3, p4: P4, token?: CancellationToken): Promise; + sendRequest(type: RequestType5, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, token?: CancellationToken): Promise; + sendRequest(type: RequestType6, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, token?: CancellationToken): Promise; + sendRequest(type: RequestType7, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, token?: CancellationToken): Promise; + sendRequest(type: RequestType8, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, token?: CancellationToken): Promise; + sendRequest(type: RequestType9, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, token?: CancellationToken): Promise; + sendRequest(method: string, r0?: ParameterStructures | any, ...rest: any[]): Promise; + onRequest(type: RequestType0, handler: RequestHandler0): Disposable; + onRequest(type: RequestType, handler: RequestHandler): Disposable; + onRequest(type: RequestType1, handler: RequestHandler1): Disposable; + onRequest(type: RequestType2, handler: RequestHandler2): Disposable; + onRequest(type: RequestType3, handler: RequestHandler3): Disposable; + onRequest(type: RequestType4, handler: RequestHandler4): Disposable; + onRequest(type: RequestType5, handler: RequestHandler5): Disposable; + onRequest(type: RequestType6, handler: RequestHandler6): Disposable; + onRequest(type: RequestType7, handler: RequestHandler7): Disposable; + onRequest(type: RequestType8, handler: RequestHandler8): Disposable; + onRequest(type: RequestType9, handler: RequestHandler9): Disposable; + onRequest(method: string, handler: GenericRequestHandler): Disposable; + onRequest(handler: StarRequestHandler): Disposable; + hasPendingResponse(): boolean; + sendNotification(type: NotificationType0): Promise; + sendNotification

(type: NotificationType

, params?: P): Promise; + sendNotification(type: NotificationType1, p1: P1): Promise; + sendNotification(type: NotificationType2, p1: P1, p2: P2): Promise; + sendNotification(type: NotificationType3, p1: P1, p2: P2, p3: P3): Promise; + sendNotification(type: NotificationType4, p1: P1, p2: P2, p3: P3, p4: P4): Promise; + sendNotification(type: NotificationType5, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5): Promise; + sendNotification(type: NotificationType6, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6): Promise; + sendNotification(type: NotificationType7, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7): Promise; + sendNotification(type: NotificationType8, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8): Promise; + sendNotification(type: NotificationType9, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9): Promise; + sendNotification(method: string, r0?: ParameterStructures | any, ...rest: any[]): Promise; + onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable; + onNotification

(type: NotificationType

, handler: NotificationHandler

): Disposable; + onNotification(type: NotificationType1, handler: NotificationHandler1): Disposable; + onNotification(type: NotificationType2, handler: NotificationHandler2): Disposable; + onNotification(type: NotificationType3, handler: NotificationHandler3): Disposable; + onNotification(type: NotificationType4, handler: NotificationHandler4): Disposable; + onNotification(type: NotificationType5, handler: NotificationHandler5): Disposable; + onNotification(type: NotificationType6, handler: NotificationHandler6): Disposable; + onNotification(type: NotificationType7, handler: NotificationHandler7): Disposable; + onNotification(type: NotificationType8, handler: NotificationHandler8): Disposable; + onNotification(type: NotificationType9, handler: NotificationHandler9): Disposable; + onNotification(method: string, handler: GenericNotificationHandler): Disposable; + onNotification(handler: StarNotificationHandler): Disposable; + onUnhandledNotification: Event; + onProgress

(type: ProgressType

, token: string | number, handler: NotificationHandler

): Disposable; + sendProgress

(type: ProgressType

, token: string | number, value: P): Promise; + onUnhandledProgress: Event>; + trace(value: Trace, tracer: Tracer, sendNotification?: boolean): Promise; + trace(value: Trace, tracer: Tracer, traceOptions?: TraceOptions): Promise; + onError: Event<[Error, Message | undefined, number | undefined]>; + onClose: Event; + listen(): void; + end(): void; + onDispose: Event; + dispose(): void; + inspect(): void; +} +export declare function createMessageConnection(messageReader: MessageReader, messageWriter: MessageWriter, _logger?: Logger, options?: ConnectionOptions): MessageConnection; +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.js" index 815a3df392e2aad7c9dce99c1710ffdad0ed38db..8f02f2510ccf1270451d3b0881197be6e46126da 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.js" @@ -1,3 +1,1212 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b21227f1c33f30114dd20c38116db829db0799d39f06bba062a3fa68d0e25a61 -size 51048 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createMessageConnection = exports.ConnectionOptions = exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.RequestCancellationReceiverStrategy = exports.IdCancellationReceiverStrategy = exports.ConnectionStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.Trace = exports.NullLogger = exports.ProgressType = exports.ProgressToken = void 0; +const ral_1 = require("./ral"); +const Is = require("./is"); +const messages_1 = require("./messages"); +const linkedMap_1 = require("./linkedMap"); +const events_1 = require("./events"); +const cancellation_1 = require("./cancellation"); +var CancelNotification; +(function (CancelNotification) { + CancelNotification.type = new messages_1.NotificationType('$/cancelRequest'); +})(CancelNotification || (CancelNotification = {})); +var ProgressToken; +(function (ProgressToken) { + function is(value) { + return typeof value === 'string' || typeof value === 'number'; + } + ProgressToken.is = is; +})(ProgressToken || (exports.ProgressToken = ProgressToken = {})); +var ProgressNotification; +(function (ProgressNotification) { + ProgressNotification.type = new messages_1.NotificationType('$/progress'); +})(ProgressNotification || (ProgressNotification = {})); +class ProgressType { + constructor() { + } +} +exports.ProgressType = ProgressType; +var StarRequestHandler; +(function (StarRequestHandler) { + function is(value) { + return Is.func(value); + } + StarRequestHandler.is = is; +})(StarRequestHandler || (StarRequestHandler = {})); +exports.NullLogger = Object.freeze({ + error: () => { }, + warn: () => { }, + info: () => { }, + log: () => { } +}); +var Trace; +(function (Trace) { + Trace[Trace["Off"] = 0] = "Off"; + Trace[Trace["Messages"] = 1] = "Messages"; + Trace[Trace["Compact"] = 2] = "Compact"; + Trace[Trace["Verbose"] = 3] = "Verbose"; +})(Trace || (exports.Trace = Trace = {})); +var TraceValues; +(function (TraceValues) { + /** + * Turn tracing off. + */ + TraceValues.Off = 'off'; + /** + * Trace messages only. + */ + TraceValues.Messages = 'messages'; + /** + * Compact message tracing. + */ + TraceValues.Compact = 'compact'; + /** + * Verbose message tracing. + */ + TraceValues.Verbose = 'verbose'; +})(TraceValues || (exports.TraceValues = TraceValues = {})); +(function (Trace) { + function fromString(value) { + if (!Is.string(value)) { + return Trace.Off; + } + value = value.toLowerCase(); + switch (value) { + case 'off': + return Trace.Off; + case 'messages': + return Trace.Messages; + case 'compact': + return Trace.Compact; + case 'verbose': + return Trace.Verbose; + default: + return Trace.Off; + } + } + Trace.fromString = fromString; + function toString(value) { + switch (value) { + case Trace.Off: + return 'off'; + case Trace.Messages: + return 'messages'; + case Trace.Compact: + return 'compact'; + case Trace.Verbose: + return 'verbose'; + default: + return 'off'; + } + } + Trace.toString = toString; +})(Trace || (exports.Trace = Trace = {})); +var TraceFormat; +(function (TraceFormat) { + TraceFormat["Text"] = "text"; + TraceFormat["JSON"] = "json"; +})(TraceFormat || (exports.TraceFormat = TraceFormat = {})); +(function (TraceFormat) { + function fromString(value) { + if (!Is.string(value)) { + return TraceFormat.Text; + } + value = value.toLowerCase(); + if (value === 'json') { + return TraceFormat.JSON; + } + else { + return TraceFormat.Text; + } + } + TraceFormat.fromString = fromString; +})(TraceFormat || (exports.TraceFormat = TraceFormat = {})); +var SetTraceNotification; +(function (SetTraceNotification) { + SetTraceNotification.type = new messages_1.NotificationType('$/setTrace'); +})(SetTraceNotification || (exports.SetTraceNotification = SetTraceNotification = {})); +var LogTraceNotification; +(function (LogTraceNotification) { + LogTraceNotification.type = new messages_1.NotificationType('$/logTrace'); +})(LogTraceNotification || (exports.LogTraceNotification = LogTraceNotification = {})); +var ConnectionErrors; +(function (ConnectionErrors) { + /** + * The connection is closed. + */ + ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed"; + /** + * The connection got disposed. + */ + ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed"; + /** + * The connection is already in listening mode. + */ + ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening"; +})(ConnectionErrors || (exports.ConnectionErrors = ConnectionErrors = {})); +class ConnectionError extends Error { + constructor(code, message) { + super(message); + this.code = code; + Object.setPrototypeOf(this, ConnectionError.prototype); + } +} +exports.ConnectionError = ConnectionError; +var ConnectionStrategy; +(function (ConnectionStrategy) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.cancelUndispatched); + } + ConnectionStrategy.is = is; +})(ConnectionStrategy || (exports.ConnectionStrategy = ConnectionStrategy = {})); +var IdCancellationReceiverStrategy; +(function (IdCancellationReceiverStrategy) { + function is(value) { + const candidate = value; + return candidate && (candidate.kind === undefined || candidate.kind === 'id') && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === undefined || Is.func(candidate.dispose)); + } + IdCancellationReceiverStrategy.is = is; +})(IdCancellationReceiverStrategy || (exports.IdCancellationReceiverStrategy = IdCancellationReceiverStrategy = {})); +var RequestCancellationReceiverStrategy; +(function (RequestCancellationReceiverStrategy) { + function is(value) { + const candidate = value; + return candidate && candidate.kind === 'request' && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === undefined || Is.func(candidate.dispose)); + } + RequestCancellationReceiverStrategy.is = is; +})(RequestCancellationReceiverStrategy || (exports.RequestCancellationReceiverStrategy = RequestCancellationReceiverStrategy = {})); +var CancellationReceiverStrategy; +(function (CancellationReceiverStrategy) { + CancellationReceiverStrategy.Message = Object.freeze({ + createCancellationTokenSource(_) { + return new cancellation_1.CancellationTokenSource(); + } + }); + function is(value) { + return IdCancellationReceiverStrategy.is(value) || RequestCancellationReceiverStrategy.is(value); + } + CancellationReceiverStrategy.is = is; +})(CancellationReceiverStrategy || (exports.CancellationReceiverStrategy = CancellationReceiverStrategy = {})); +var CancellationSenderStrategy; +(function (CancellationSenderStrategy) { + CancellationSenderStrategy.Message = Object.freeze({ + sendCancellation(conn, id) { + return conn.sendNotification(CancelNotification.type, { id }); + }, + cleanup(_) { } + }); + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup); + } + CancellationSenderStrategy.is = is; +})(CancellationSenderStrategy || (exports.CancellationSenderStrategy = CancellationSenderStrategy = {})); +var CancellationStrategy; +(function (CancellationStrategy) { + CancellationStrategy.Message = Object.freeze({ + receiver: CancellationReceiverStrategy.Message, + sender: CancellationSenderStrategy.Message + }); + function is(value) { + const candidate = value; + return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender); + } + CancellationStrategy.is = is; +})(CancellationStrategy || (exports.CancellationStrategy = CancellationStrategy = {})); +var MessageStrategy; +(function (MessageStrategy) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.handleMessage); + } + MessageStrategy.is = is; +})(MessageStrategy || (exports.MessageStrategy = MessageStrategy = {})); +var ConnectionOptions; +(function (ConnectionOptions) { + function is(value) { + const candidate = value; + return candidate && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy) || MessageStrategy.is(candidate.messageStrategy)); + } + ConnectionOptions.is = is; +})(ConnectionOptions || (exports.ConnectionOptions = ConnectionOptions = {})); +var ConnectionState; +(function (ConnectionState) { + ConnectionState[ConnectionState["New"] = 1] = "New"; + ConnectionState[ConnectionState["Listening"] = 2] = "Listening"; + ConnectionState[ConnectionState["Closed"] = 3] = "Closed"; + ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed"; +})(ConnectionState || (ConnectionState = {})); +function createMessageConnection(messageReader, messageWriter, _logger, options) { + const logger = _logger !== undefined ? _logger : exports.NullLogger; + let sequenceNumber = 0; + let notificationSequenceNumber = 0; + let unknownResponseSequenceNumber = 0; + const version = '2.0'; + let starRequestHandler = undefined; + const requestHandlers = new Map(); + let starNotificationHandler = undefined; + const notificationHandlers = new Map(); + const progressHandlers = new Map(); + let timer; + let messageQueue = new linkedMap_1.LinkedMap(); + let responsePromises = new Map(); + let knownCanceledRequests = new Set(); + let requestTokens = new Map(); + let trace = Trace.Off; + let traceFormat = TraceFormat.Text; + let tracer; + let state = ConnectionState.New; + const errorEmitter = new events_1.Emitter(); + const closeEmitter = new events_1.Emitter(); + const unhandledNotificationEmitter = new events_1.Emitter(); + const unhandledProgressEmitter = new events_1.Emitter(); + const disposeEmitter = new events_1.Emitter(); + const cancellationStrategy = (options && options.cancellationStrategy) ? options.cancellationStrategy : CancellationStrategy.Message; + function createRequestQueueKey(id) { + if (id === null) { + throw new Error(`Can't send requests with id null since the response can't be correlated.`); + } + return 'req-' + id.toString(); + } + function createResponseQueueKey(id) { + if (id === null) { + return 'res-unknown-' + (++unknownResponseSequenceNumber).toString(); + } + else { + return 'res-' + id.toString(); + } + } + function createNotificationQueueKey() { + return 'not-' + (++notificationSequenceNumber).toString(); + } + function addMessageToQueue(queue, message) { + if (messages_1.Message.isRequest(message)) { + queue.set(createRequestQueueKey(message.id), message); + } + else if (messages_1.Message.isResponse(message)) { + queue.set(createResponseQueueKey(message.id), message); + } + else { + queue.set(createNotificationQueueKey(), message); + } + } + function cancelUndispatched(_message) { + return undefined; + } + function isListening() { + return state === ConnectionState.Listening; + } + function isClosed() { + return state === ConnectionState.Closed; + } + function isDisposed() { + return state === ConnectionState.Disposed; + } + function closeHandler() { + if (state === ConnectionState.New || state === ConnectionState.Listening) { + state = ConnectionState.Closed; + closeEmitter.fire(undefined); + } + // If the connection is disposed don't sent close events. + } + function readErrorHandler(error) { + errorEmitter.fire([error, undefined, undefined]); + } + function writeErrorHandler(data) { + errorEmitter.fire(data); + } + messageReader.onClose(closeHandler); + messageReader.onError(readErrorHandler); + messageWriter.onClose(closeHandler); + messageWriter.onError(writeErrorHandler); + function triggerMessageQueue() { + if (timer || messageQueue.size === 0) { + return; + } + timer = (0, ral_1.default)().timer.setImmediate(() => { + timer = undefined; + processMessageQueue(); + }); + } + function handleMessage(message) { + if (messages_1.Message.isRequest(message)) { + handleRequest(message); + } + else if (messages_1.Message.isNotification(message)) { + handleNotification(message); + } + else if (messages_1.Message.isResponse(message)) { + handleResponse(message); + } + else { + handleInvalidMessage(message); + } + } + function processMessageQueue() { + if (messageQueue.size === 0) { + return; + } + const message = messageQueue.shift(); + try { + const messageStrategy = options?.messageStrategy; + if (MessageStrategy.is(messageStrategy)) { + messageStrategy.handleMessage(message, handleMessage); + } + else { + handleMessage(message); + } + } + finally { + triggerMessageQueue(); + } + } + const callback = (message) => { + try { + // We have received a cancellation message. Check if the message is still in the queue + // and cancel it if allowed to do so. + if (messages_1.Message.isNotification(message) && message.method === CancelNotification.type.method) { + const cancelId = message.params.id; + const key = createRequestQueueKey(cancelId); + const toCancel = messageQueue.get(key); + if (messages_1.Message.isRequest(toCancel)) { + const strategy = options?.connectionStrategy; + const response = (strategy && strategy.cancelUndispatched) ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel); + if (response && (response.error !== undefined || response.result !== undefined)) { + messageQueue.delete(key); + requestTokens.delete(cancelId); + response.id = toCancel.id; + traceSendingResponse(response, message.method, Date.now()); + messageWriter.write(response).catch(() => logger.error(`Sending response for canceled message failed.`)); + return; + } + } + const cancellationToken = requestTokens.get(cancelId); + // The request is already running. Cancel the token + if (cancellationToken !== undefined) { + cancellationToken.cancel(); + traceReceivedNotification(message); + return; + } + else { + // Remember the cancel but still queue the message to + // clean up state in process message. + knownCanceledRequests.add(cancelId); + } + } + addMessageToQueue(messageQueue, message); + } + finally { + triggerMessageQueue(); + } + }; + function handleRequest(requestMessage) { + if (isDisposed()) { + // we return here silently since we fired an event when the + // connection got disposed. + return; + } + function reply(resultOrError, method, startTime) { + const message = { + jsonrpc: version, + id: requestMessage.id + }; + if (resultOrError instanceof messages_1.ResponseError) { + message.error = resultOrError.toJson(); + } + else { + message.result = resultOrError === undefined ? null : resultOrError; + } + traceSendingResponse(message, method, startTime); + messageWriter.write(message).catch(() => logger.error(`Sending response failed.`)); + } + function replyError(error, method, startTime) { + const message = { + jsonrpc: version, + id: requestMessage.id, + error: error.toJson() + }; + traceSendingResponse(message, method, startTime); + messageWriter.write(message).catch(() => logger.error(`Sending response failed.`)); + } + function replySuccess(result, method, startTime) { + // The JSON RPC defines that a response must either have a result or an error + // So we can't treat undefined as a valid response result. + if (result === undefined) { + result = null; + } + const message = { + jsonrpc: version, + id: requestMessage.id, + result: result + }; + traceSendingResponse(message, method, startTime); + messageWriter.write(message).catch(() => logger.error(`Sending response failed.`)); + } + traceReceivedRequest(requestMessage); + const element = requestHandlers.get(requestMessage.method); + let type; + let requestHandler; + if (element) { + type = element.type; + requestHandler = element.handler; + } + const startTime = Date.now(); + if (requestHandler || starRequestHandler) { + const tokenKey = requestMessage.id ?? String(Date.now()); // + const cancellationSource = IdCancellationReceiverStrategy.is(cancellationStrategy.receiver) + ? cancellationStrategy.receiver.createCancellationTokenSource(tokenKey) + : cancellationStrategy.receiver.createCancellationTokenSource(requestMessage); + if (requestMessage.id !== null && knownCanceledRequests.has(requestMessage.id)) { + cancellationSource.cancel(); + } + if (requestMessage.id !== null) { + requestTokens.set(tokenKey, cancellationSource); + } + try { + let handlerResult; + if (requestHandler) { + if (requestMessage.params === undefined) { + if (type !== undefined && type.numberOfParams !== 0) { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines ${type.numberOfParams} params but received none.`), requestMessage.method, startTime); + return; + } + handlerResult = requestHandler(cancellationSource.token); + } + else if (Array.isArray(requestMessage.params)) { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byName) { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by name but received parameters by position`), requestMessage.method, startTime); + return; + } + handlerResult = requestHandler(...requestMessage.params, cancellationSource.token); + } + else { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by position but received parameters by name`), requestMessage.method, startTime); + return; + } + handlerResult = requestHandler(requestMessage.params, cancellationSource.token); + } + } + else if (starRequestHandler) { + handlerResult = starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token); + } + const promise = handlerResult; + if (!handlerResult) { + requestTokens.delete(tokenKey); + replySuccess(handlerResult, requestMessage.method, startTime); + } + else if (promise.then) { + promise.then((resultOrError) => { + requestTokens.delete(tokenKey); + reply(resultOrError, requestMessage.method, startTime); + }, error => { + requestTokens.delete(tokenKey); + if (error instanceof messages_1.ResponseError) { + replyError(error, requestMessage.method, startTime); + } + else if (error && Is.string(error.message)) { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime); + } + else { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime); + } + }); + } + else { + requestTokens.delete(tokenKey); + reply(handlerResult, requestMessage.method, startTime); + } + } + catch (error) { + requestTokens.delete(tokenKey); + if (error instanceof messages_1.ResponseError) { + reply(error, requestMessage.method, startTime); + } + else if (error && Is.string(error.message)) { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime); + } + else { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime); + } + } + } + else { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime); + } + } + function handleResponse(responseMessage) { + if (isDisposed()) { + // See handle request. + return; + } + if (responseMessage.id === null) { + if (responseMessage.error) { + logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`); + } + else { + logger.error(`Received response message without id. No further error information provided.`); + } + } + else { + const key = responseMessage.id; + const responsePromise = responsePromises.get(key); + traceReceivedResponse(responseMessage, responsePromise); + if (responsePromise !== undefined) { + responsePromises.delete(key); + try { + if (responseMessage.error) { + const error = responseMessage.error; + responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data)); + } + else if (responseMessage.result !== undefined) { + responsePromise.resolve(responseMessage.result); + } + else { + throw new Error('Should never happen.'); + } + } + catch (error) { + if (error.message) { + logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`); + } + else { + logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`); + } + } + } + } + } + function handleNotification(message) { + if (isDisposed()) { + // See handle request. + return; + } + let type = undefined; + let notificationHandler; + if (message.method === CancelNotification.type.method) { + const cancelId = message.params.id; + knownCanceledRequests.delete(cancelId); + traceReceivedNotification(message); + return; + } + else { + const element = notificationHandlers.get(message.method); + if (element) { + notificationHandler = element.handler; + type = element.type; + } + } + if (notificationHandler || starNotificationHandler) { + try { + traceReceivedNotification(message); + if (notificationHandler) { + if (message.params === undefined) { + if (type !== undefined) { + if (type.numberOfParams !== 0 && type.parameterStructures !== messages_1.ParameterStructures.byName) { + logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received none.`); + } + } + notificationHandler(); + } + else if (Array.isArray(message.params)) { + // There are JSON-RPC libraries that send progress message as positional params although + // specified as named. So convert them if this is the case. + const params = message.params; + if (message.method === ProgressNotification.type.method && params.length === 2 && ProgressToken.is(params[0])) { + notificationHandler({ token: params[0], value: params[1] }); + } + else { + if (type !== undefined) { + if (type.parameterStructures === messages_1.ParameterStructures.byName) { + logger.error(`Notification ${message.method} defines parameters by name but received parameters by position`); + } + if (type.numberOfParams !== message.params.length) { + logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received ${params.length} arguments`); + } + } + notificationHandler(...params); + } + } + else { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) { + logger.error(`Notification ${message.method} defines parameters by position but received parameters by name`); + } + notificationHandler(message.params); + } + } + else if (starNotificationHandler) { + starNotificationHandler(message.method, message.params); + } + } + catch (error) { + if (error.message) { + logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`); + } + else { + logger.error(`Notification handler '${message.method}' failed unexpectedly.`); + } + } + } + else { + unhandledNotificationEmitter.fire(message); + } + } + function handleInvalidMessage(message) { + if (!message) { + logger.error('Received empty message.'); + return; + } + logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`); + // Test whether we find an id to reject the promise + const responseMessage = message; + if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) { + const key = responseMessage.id; + const responseHandler = responsePromises.get(key); + if (responseHandler) { + responseHandler.reject(new Error('The received response has neither a result nor an error property.')); + } + } + } + function stringifyTrace(params) { + if (params === undefined || params === null) { + return undefined; + } + switch (trace) { + case Trace.Verbose: + return JSON.stringify(params, null, 4); + case Trace.Compact: + return JSON.stringify(params); + default: + return undefined; + } + } + function traceSendingRequest(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) { + data = `Params: ${stringifyTrace(message.params)}\n\n`; + } + tracer.log(`Sending request '${message.method} - (${message.id})'.`, data); + } + else { + logLSPMessage('send-request', message); + } + } + function traceSendingNotification(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.params) { + data = `Params: ${stringifyTrace(message.params)}\n\n`; + } + else { + data = 'No parameters provided.\n\n'; + } + } + tracer.log(`Sending notification '${message.method}'.`, data); + } + else { + logLSPMessage('send-notification', message); + } + } + function traceSendingResponse(message, method, startTime) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.error && message.error.data) { + data = `Error data: ${stringifyTrace(message.error.data)}\n\n`; + } + else { + if (message.result) { + data = `Result: ${stringifyTrace(message.result)}\n\n`; + } + else if (message.error === undefined) { + data = 'No result returned.\n\n'; + } + } + } + tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data); + } + else { + logLSPMessage('send-response', message); + } + } + function traceReceivedRequest(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) { + data = `Params: ${stringifyTrace(message.params)}\n\n`; + } + tracer.log(`Received request '${message.method} - (${message.id})'.`, data); + } + else { + logLSPMessage('receive-request', message); + } + } + function traceReceivedNotification(message) { + if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.params) { + data = `Params: ${stringifyTrace(message.params)}\n\n`; + } + else { + data = 'No parameters provided.\n\n'; + } + } + tracer.log(`Received notification '${message.method}'.`, data); + } + else { + logLSPMessage('receive-notification', message); + } + } + function traceReceivedResponse(message, responsePromise) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.error && message.error.data) { + data = `Error data: ${stringifyTrace(message.error.data)}\n\n`; + } + else { + if (message.result) { + data = `Result: ${stringifyTrace(message.result)}\n\n`; + } + else if (message.error === undefined) { + data = 'No result returned.\n\n'; + } + } + } + if (responsePromise) { + const error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : ''; + tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data); + } + else { + tracer.log(`Received response ${message.id} without active response promise.`, data); + } + } + else { + logLSPMessage('receive-response', message); + } + } + function logLSPMessage(type, message) { + if (!tracer || trace === Trace.Off) { + return; + } + const lspMessage = { + isLSPMessage: true, + type, + message, + timestamp: Date.now() + }; + tracer.log(lspMessage); + } + function throwIfClosedOrDisposed() { + if (isClosed()) { + throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.'); + } + if (isDisposed()) { + throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.'); + } + } + function throwIfListening() { + if (isListening()) { + throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening'); + } + } + function throwIfNotListening() { + if (!isListening()) { + throw new Error('Call listen() first.'); + } + } + function undefinedToNull(param) { + if (param === undefined) { + return null; + } + else { + return param; + } + } + function nullToUndefined(param) { + if (param === null) { + return undefined; + } + else { + return param; + } + } + function isNamedParam(param) { + return param !== undefined && param !== null && !Array.isArray(param) && typeof param === 'object'; + } + function computeSingleParam(parameterStructures, param) { + switch (parameterStructures) { + case messages_1.ParameterStructures.auto: + if (isNamedParam(param)) { + return nullToUndefined(param); + } + else { + return [undefinedToNull(param)]; + } + case messages_1.ParameterStructures.byName: + if (!isNamedParam(param)) { + throw new Error(`Received parameters by name but param is not an object literal.`); + } + return nullToUndefined(param); + case messages_1.ParameterStructures.byPosition: + return [undefinedToNull(param)]; + default: + throw new Error(`Unknown parameter structure ${parameterStructures.toString()}`); + } + } + function computeMessageParams(type, params) { + let result; + const numberOfParams = type.numberOfParams; + switch (numberOfParams) { + case 0: + result = undefined; + break; + case 1: + result = computeSingleParam(type.parameterStructures, params[0]); + break; + default: + result = []; + for (let i = 0; i < params.length && i < numberOfParams; i++) { + result.push(undefinedToNull(params[i])); + } + if (params.length < numberOfParams) { + for (let i = params.length; i < numberOfParams; i++) { + result.push(null); + } + } + break; + } + return result; + } + const connection = { + sendNotification: (type, ...args) => { + throwIfClosedOrDisposed(); + let method; + let messageParams; + if (Is.string(type)) { + method = type; + const first = args[0]; + let paramStart = 0; + let parameterStructures = messages_1.ParameterStructures.auto; + if (messages_1.ParameterStructures.is(first)) { + paramStart = 1; + parameterStructures = first; + } + let paramEnd = args.length; + const numberOfParams = paramEnd - paramStart; + switch (numberOfParams) { + case 0: + messageParams = undefined; + break; + case 1: + messageParams = computeSingleParam(parameterStructures, args[paramStart]); + break; + default: + if (parameterStructures === messages_1.ParameterStructures.byName) { + throw new Error(`Received ${numberOfParams} parameters for 'by Name' notification parameter structure.`); + } + messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value)); + break; + } + } + else { + const params = args; + method = type.method; + messageParams = computeMessageParams(type, params); + } + const notificationMessage = { + jsonrpc: version, + method: method, + params: messageParams + }; + traceSendingNotification(notificationMessage); + return messageWriter.write(notificationMessage).catch((error) => { + logger.error(`Sending notification failed.`); + throw error; + }); + }, + onNotification: (type, handler) => { + throwIfClosedOrDisposed(); + let method; + if (Is.func(type)) { + starNotificationHandler = type; + } + else if (handler) { + if (Is.string(type)) { + method = type; + notificationHandlers.set(type, { type: undefined, handler }); + } + else { + method = type.method; + notificationHandlers.set(type.method, { type, handler }); + } + } + return { + dispose: () => { + if (method !== undefined) { + notificationHandlers.delete(method); + } + else { + starNotificationHandler = undefined; + } + } + }; + }, + onProgress: (_type, token, handler) => { + if (progressHandlers.has(token)) { + throw new Error(`Progress handler for token ${token} already registered`); + } + progressHandlers.set(token, handler); + return { + dispose: () => { + progressHandlers.delete(token); + } + }; + }, + sendProgress: (_type, token, value) => { + // This should not await but simple return to ensure that we don't have another + // async scheduling. Otherwise one send could overtake another send. + return connection.sendNotification(ProgressNotification.type, { token, value }); + }, + onUnhandledProgress: unhandledProgressEmitter.event, + sendRequest: (type, ...args) => { + throwIfClosedOrDisposed(); + throwIfNotListening(); + let method; + let messageParams; + let token = undefined; + if (Is.string(type)) { + method = type; + const first = args[0]; + const last = args[args.length - 1]; + let paramStart = 0; + let parameterStructures = messages_1.ParameterStructures.auto; + if (messages_1.ParameterStructures.is(first)) { + paramStart = 1; + parameterStructures = first; + } + let paramEnd = args.length; + if (cancellation_1.CancellationToken.is(last)) { + paramEnd = paramEnd - 1; + token = last; + } + const numberOfParams = paramEnd - paramStart; + switch (numberOfParams) { + case 0: + messageParams = undefined; + break; + case 1: + messageParams = computeSingleParam(parameterStructures, args[paramStart]); + break; + default: + if (parameterStructures === messages_1.ParameterStructures.byName) { + throw new Error(`Received ${numberOfParams} parameters for 'by Name' request parameter structure.`); + } + messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value)); + break; + } + } + else { + const params = args; + method = type.method; + messageParams = computeMessageParams(type, params); + const numberOfParams = type.numberOfParams; + token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined; + } + const id = sequenceNumber++; + let disposable; + if (token) { + disposable = token.onCancellationRequested(() => { + const p = cancellationStrategy.sender.sendCancellation(connection, id); + if (p === undefined) { + logger.log(`Received no promise from cancellation strategy when cancelling id ${id}`); + return Promise.resolve(); + } + else { + return p.catch(() => { + logger.log(`Sending cancellation messages for id ${id} failed`); + }); + } + }); + } + const requestMessage = { + jsonrpc: version, + id: id, + method: method, + params: messageParams + }; + traceSendingRequest(requestMessage); + if (typeof cancellationStrategy.sender.enableCancellation === 'function') { + cancellationStrategy.sender.enableCancellation(requestMessage); + } + return new Promise(async (resolve, reject) => { + const resolveWithCleanup = (r) => { + resolve(r); + cancellationStrategy.sender.cleanup(id); + disposable?.dispose(); + }; + const rejectWithCleanup = (r) => { + reject(r); + cancellationStrategy.sender.cleanup(id); + disposable?.dispose(); + }; + const responsePromise = { method: method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup }; + try { + await messageWriter.write(requestMessage); + responsePromises.set(id, responsePromise); + } + catch (error) { + logger.error(`Sending request failed.`); + // Writing the message failed. So we need to reject the promise. + responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, error.message ? error.message : 'Unknown reason')); + throw error; + } + }); + }, + onRequest: (type, handler) => { + throwIfClosedOrDisposed(); + let method = null; + if (StarRequestHandler.is(type)) { + method = undefined; + starRequestHandler = type; + } + else if (Is.string(type)) { + method = null; + if (handler !== undefined) { + method = type; + requestHandlers.set(type, { handler: handler, type: undefined }); + } + } + else { + if (handler !== undefined) { + method = type.method; + requestHandlers.set(type.method, { type, handler }); + } + } + return { + dispose: () => { + if (method === null) { + return; + } + if (method !== undefined) { + requestHandlers.delete(method); + } + else { + starRequestHandler = undefined; + } + } + }; + }, + hasPendingResponse: () => { + return responsePromises.size > 0; + }, + trace: async (_value, _tracer, sendNotificationOrTraceOptions) => { + let _sendNotification = false; + let _traceFormat = TraceFormat.Text; + if (sendNotificationOrTraceOptions !== undefined) { + if (Is.boolean(sendNotificationOrTraceOptions)) { + _sendNotification = sendNotificationOrTraceOptions; + } + else { + _sendNotification = sendNotificationOrTraceOptions.sendNotification || false; + _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text; + } + } + trace = _value; + traceFormat = _traceFormat; + if (trace === Trace.Off) { + tracer = undefined; + } + else { + tracer = _tracer; + } + if (_sendNotification && !isClosed() && !isDisposed()) { + await connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) }); + } + }, + onError: errorEmitter.event, + onClose: closeEmitter.event, + onUnhandledNotification: unhandledNotificationEmitter.event, + onDispose: disposeEmitter.event, + end: () => { + messageWriter.end(); + }, + dispose: () => { + if (isDisposed()) { + return; + } + state = ConnectionState.Disposed; + disposeEmitter.fire(undefined); + const error = new messages_1.ResponseError(messages_1.ErrorCodes.PendingResponseRejected, 'Pending response rejected since connection got disposed'); + for (const promise of responsePromises.values()) { + promise.reject(error); + } + responsePromises = new Map(); + requestTokens = new Map(); + knownCanceledRequests = new Set(); + messageQueue = new linkedMap_1.LinkedMap(); + // Test for backwards compatibility + if (Is.func(messageWriter.dispose)) { + messageWriter.dispose(); + } + if (Is.func(messageReader.dispose)) { + messageReader.dispose(); + } + }, + listen: () => { + throwIfClosedOrDisposed(); + throwIfListening(); + state = ConnectionState.Listening; + messageReader.listen(callback); + }, + inspect: () => { + // eslint-disable-next-line no-console + (0, ral_1.default)().console.log('inspect'); + } + }; + connection.onNotification(LogTraceNotification.type, (params) => { + if (trace === Trace.Off || !tracer) { + return; + } + const verbose = trace === Trace.Verbose || trace === Trace.Compact; + tracer.log(params.message, verbose ? params.verbose : undefined); + }); + connection.onNotification(ProgressNotification.type, (params) => { + const handler = progressHandlers.get(params.token); + if (handler) { + handler(params.value); + } + else { + unhandledProgressEmitter.fire(params); + } + }); + return connection; +} +exports.createMessageConnection = createMessageConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts" index 41dac66c8a8621db7da17f29483c4c9e42c3acb3..99878bba42532ae95d0d978fcaa8d97420470d8a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts" @@ -1,3 +1,9 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f0745ab78e18a2befaf1d9951481973318722c4e2f33e859239f55fa999ff2b1 -size 188 +export interface Disposable { + /** + * Dispose this object. + */ + dispose(): void; +} +export declare namespace Disposable { + function create(func: () => void): Disposable; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.js" index 649df1edb2f4a65e40fab21b226f06663a1628ab..b2800ad5015c5f940d3abab72aba112207226589 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.js" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ad43f37a324cf41af376ea66004063ac5867a2e3dfce81b47ab617b9105a0a7d -size 677 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Disposable = void 0; +var Disposable; +(function (Disposable) { + function create(func) { + return { + dispose: func + }; + } + Disposable.create = create; +})(Disposable || (exports.Disposable = Disposable = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts" index 7f29e34423fa55e01a06826bbb7e58e7985a0f38..9bc71364f29ea1c00f20c7ba5038ac4a4c9bb627 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts" @@ -1,3 +1,52 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e445daedeac3005da51d0a3e3258be16096e1c0116701e8979272aaf7aba5fb4 -size 1897 +import type RAL from './ral'; +import { Message } from './messages'; +export interface FunctionContentEncoder { + name: string; + encode(input: Uint8Array): Promise; +} +export interface StreamContentEncoder { + name: string; + create(): RAL.WritableStream; +} +export type ContentEncoder = FunctionContentEncoder | (FunctionContentEncoder & StreamContentEncoder); +export interface FunctionContentDecoder { + name: string; + decode(buffer: Uint8Array): Promise; +} +export interface StreamContentDecoder { + name: string; + create(): RAL.WritableStream; +} +export type ContentDecoder = FunctionContentDecoder | (FunctionContentDecoder & StreamContentDecoder); +export interface ContentTypeEncoderOptions { + charset: RAL.MessageBufferEncoding; +} +export interface FunctionContentTypeEncoder { + name: string; + encode(msg: Message, options: ContentTypeEncoderOptions): Promise; +} +export interface StreamContentTypeEncoder { + name: string; + create(options: ContentTypeEncoderOptions): RAL.WritableStream; +} +export type ContentTypeEncoder = FunctionContentTypeEncoder | (FunctionContentTypeEncoder & StreamContentTypeEncoder); +export interface ContentTypeDecoderOptions { + charset: RAL.MessageBufferEncoding; +} +export interface FunctionContentTypeDecoder { + name: string; + decode(buffer: Uint8Array, options: ContentTypeDecoderOptions): Promise; +} +export interface StreamContentTypeDecoder { + name: string; + create(options: ContentTypeDecoderOptions): RAL.WritableStream; +} +export type ContentTypeDecoder = FunctionContentTypeDecoder | (FunctionContentTypeDecoder & StreamContentTypeDecoder); +interface Named { + name: string; +} +export declare namespace Encodings { + function getEncodingHeaderValue(encodings: Named[]): string | undefined; + function parseEncodingHeaderValue(value: string): string[]; +} +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/encoding.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/encoding.js" index 3ed3f1968036b7cfdf9f6e43278a5c536562571f..914ce0a5c235029a7b5f004c2cecc3ce0445631c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/encoding.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/encoding.js" @@ -1,3 +1,70 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:812de3b9b71e07f4c042de286e44a3acc070d4639257e39a9de20548b1f3262b -size 2649 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Encodings = void 0; +var Encodings; +(function (Encodings) { + function getEncodingHeaderValue(encodings) { + if (encodings.length === 1) { + return encodings[0].name; + } + const distribute = encodings.length - 1; + if (distribute > 1000) { + throw new Error(`Quality value can only have three decimal digits but trying to distribute ${encodings.length} elements.`); + } + const digits = Math.ceil(Math.log10(distribute)); + const factor = Math.pow(10, digits); + const diff = Math.floor((1 / distribute) * factor) / factor; + const result = []; + let q = 1; + for (const encoding of encodings) { + result.push(`${encoding.name};q=${q === 1 || q === 0 ? q.toFixed(0) : q.toFixed(digits)}`); + q = q - diff; + } + return result.join(', '); + } + Encodings.getEncodingHeaderValue = getEncodingHeaderValue; + function parseEncodingHeaderValue(value) { + const map = new Map(); + const encodings = value.split(/\s*,\s*/); + for (const value of encodings) { + const [encoding, q] = parseEncoding(value); + if (encoding === '*') { + continue; + } + let values = map.get(q); + if (values === undefined) { + values = []; + map.set(q, values); + } + values.push(encoding); + } + const keys = Array.from(map.keys()); + keys.sort((a, b) => b - a); + const result = []; + for (const key of keys) { + result.push(...map.get(key)); + } + return result; + } + Encodings.parseEncodingHeaderValue = parseEncodingHeaderValue; + function parseEncoding(value) { + let q = 1; + let encoding; + const index = value.indexOf(';q='); + if (index !== -1) { + const parsed = parseFloat(value.substr(index)); + if (!Number.isNaN(parsed)) { + q = parsed; + } + encoding = value.substr(0, index); + } + else { + encoding = value; + } + return [encoding, q]; + } +})(Encodings || (exports.Encodings = Encodings = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.d.ts" index 43c85ceed6e6fb202ac9a30c75699d4d0f956ebc..fe8f407aea94691fc2666913809d6ad5a6e4456f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.d.ts" @@ -1,3 +1,39 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:886e183dd0199e7de45d6308ac3e2185dac6f83283d1b8200ea62cf5c43966a1 -size 1086 +import { Disposable } from './disposable'; +/** + * Represents a typed event. + */ +export interface Event { + /** + * + * @param listener The listener function will be called when the event happens. + * @param thisArgs The 'this' which will be used when calling the event listener. + * @param disposables An array to which a {{IDisposable}} will be added. + * @return + */ + (listener: (e: T) => any, thisArgs?: any, disposables?: Disposable[]): Disposable; +} +export declare namespace Event { + const None: Event; +} +export interface EmitterOptions { + onFirstListenerAdd?: Function; + onLastListenerRemove?: Function; +} +export declare class Emitter { + private _options?; + private static _noop; + private _event; + private _callbacks; + constructor(_options?: EmitterOptions | undefined); + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + get event(): Event; + /** + * To be kept private to fire an event to + * subscribers + */ + fire(event: T): any; + dispose(): void; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.js" index 0e9e2e2f2a5fc842f90226c8981865fa8c77ac2b..e9b3b68081315ddb7ad989ccb83902c75a0970fb 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.js" @@ -1,3 +1,128 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:896ca079b51b0f5daf4668941849d57cc035db5faa12e8fe888e7582e167fd55 -size 4506 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Emitter = exports.Event = void 0; +const ral_1 = require("./ral"); +var Event; +(function (Event) { + const _disposable = { dispose() { } }; + Event.None = function () { return _disposable; }; +})(Event || (exports.Event = Event = {})); +class CallbackList { + add(callback, context = null, bucket) { + if (!this._callbacks) { + this._callbacks = []; + this._contexts = []; + } + this._callbacks.push(callback); + this._contexts.push(context); + if (Array.isArray(bucket)) { + bucket.push({ dispose: () => this.remove(callback, context) }); + } + } + remove(callback, context = null) { + if (!this._callbacks) { + return; + } + let foundCallbackWithDifferentContext = false; + for (let i = 0, len = this._callbacks.length; i < len; i++) { + if (this._callbacks[i] === callback) { + if (this._contexts[i] === context) { + // callback & context match => remove it + this._callbacks.splice(i, 1); + this._contexts.splice(i, 1); + return; + } + else { + foundCallbackWithDifferentContext = true; + } + } + } + if (foundCallbackWithDifferentContext) { + throw new Error('When adding a listener with a context, you should remove it with the same context'); + } + } + invoke(...args) { + if (!this._callbacks) { + return []; + } + const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0); + for (let i = 0, len = callbacks.length; i < len; i++) { + try { + ret.push(callbacks[i].apply(contexts[i], args)); + } + catch (e) { + // eslint-disable-next-line no-console + (0, ral_1.default)().console.error(e); + } + } + return ret; + } + isEmpty() { + return !this._callbacks || this._callbacks.length === 0; + } + dispose() { + this._callbacks = undefined; + this._contexts = undefined; + } +} +class Emitter { + constructor(_options) { + this._options = _options; + } + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + get event() { + if (!this._event) { + this._event = (listener, thisArgs, disposables) => { + if (!this._callbacks) { + this._callbacks = new CallbackList(); + } + if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) { + this._options.onFirstListenerAdd(this); + } + this._callbacks.add(listener, thisArgs); + const result = { + dispose: () => { + if (!this._callbacks) { + // disposable is disposed after emitter is disposed. + return; + } + this._callbacks.remove(listener, thisArgs); + result.dispose = Emitter._noop; + if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) { + this._options.onLastListenerRemove(this); + } + } + }; + if (Array.isArray(disposables)) { + disposables.push(result); + } + return result; + }; + } + return this._event; + } + /** + * To be kept private to fire an event to + * subscribers + */ + fire(event) { + if (this._callbacks) { + this._callbacks.invoke.call(this._callbacks, event); + } + } + dispose() { + if (this._callbacks) { + this._callbacks.dispose(); + this._callbacks = undefined; + } + } +} +exports.Emitter = Emitter; +Emitter._noop = function () { }; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.d.ts" index bc53f5df6c6caf87f0c9425ae9a603687ae044a0..9261a2697bedff7fb49ad6a075afdd68f98b20ff 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.d.ts" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cf445a02b226e862589a7a4d4296dc0eb7e2b3398d24e2a9109fae165a179db1 -size 433 +export declare function boolean(value: any): value is boolean; +export declare function string(value: any): value is string; +export declare function number(value: any): value is number; +export declare function error(value: any): value is Error; +export declare function func(value: any): value is Function; +export declare function array(value: any): value is T[]; +export declare function stringArray(value: any): value is string[]; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.js" index be8091a5694dc82c1790e2798ae8de90ca76997c..b0990e92e144eb21a6113f1de476c50d2230b0de 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.js" @@ -1,3 +1,35 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9b3f16400056b77fc0b940d93ca9db322c297a7e666062ef038fd66604b4c34c -size 1272 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0; +function boolean(value) { + return value === true || value === false; +} +exports.boolean = boolean; +function string(value) { + return typeof value === 'string' || value instanceof String; +} +exports.string = string; +function number(value) { + return typeof value === 'number' || value instanceof Number; +} +exports.number = number; +function error(value) { + return value instanceof Error; +} +exports.error = error; +function func(value) { + return typeof value === 'function'; +} +exports.func = func; +function array(value) { + return Array.isArray(value); +} +exports.array = array; +function stringArray(value) { + return array(value) && value.every(elem => string(elem)); +} +exports.stringArray = stringArray; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts" index 46662a74bee54ecfff384e5c8327a739ca3f59d4..1143ef940d07d75461d3e8ce39c9302910b12e1b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts" @@ -1,3 +1,53 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cab0ba78dc961d90d639ccaf3d56c484e584056da39dc0d9bdaf1957be965f72 -size 1586 +export declare namespace Touch { + const None: 0; + const First: 1; + const AsOld: 1; + const Last: 2; + const AsNew: 2; +} +export type Touch = 0 | 1 | 2; +export declare class LinkedMap implements Map { + readonly [Symbol.toStringTag] = "LinkedMap"; + private _map; + private _head; + private _tail; + private _size; + private _state; + constructor(); + clear(): void; + isEmpty(): boolean; + get size(): number; + get first(): V | undefined; + get last(): V | undefined; + has(key: K): boolean; + get(key: K, touch?: Touch): V | undefined; + set(key: K, value: V, touch?: Touch): this; + delete(key: K): boolean; + remove(key: K): V | undefined; + shift(): V | undefined; + forEach(callbackfn: (value: V, key: K, map: LinkedMap) => void, thisArg?: any): void; + keys(): IterableIterator; + values(): IterableIterator; + entries(): IterableIterator<[K, V]>; + [Symbol.iterator](): IterableIterator<[K, V]>; + protected trimOld(newSize: number): void; + private addItemFirst; + private addItemLast; + private removeItem; + private touch; + toJSON(): [K, V][]; + fromJSON(data: [K, V][]): void; +} +export declare class LRUCache extends LinkedMap { + private _limit; + private _ratio; + constructor(limit: number, ratio?: number); + get limit(): number; + set limit(limit: number); + get ratio(): number; + set ratio(ratio: number); + get(key: K, touch?: Touch): V | undefined; + peek(key: K): V | undefined; + set(key: K, value: V): this; + private checkTrim; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.js" index bcc951e8d01a0ddd7dce5d62f1015e4a592a329e..7edf3738de1cf91e3de36df24ae19b31d11253e8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.js" @@ -1,3 +1,398 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:22c31ebb46ba1554dc2dcfcab45b2c08d88d83ccb479b8f91570566733862a16 -size 11759 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var _a; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LRUCache = exports.LinkedMap = exports.Touch = void 0; +var Touch; +(function (Touch) { + Touch.None = 0; + Touch.First = 1; + Touch.AsOld = Touch.First; + Touch.Last = 2; + Touch.AsNew = Touch.Last; +})(Touch || (exports.Touch = Touch = {})); +class LinkedMap { + constructor() { + this[_a] = 'LinkedMap'; + this._map = new Map(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + this._state = 0; + } + clear() { + this._map.clear(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + this._state++; + } + isEmpty() { + return !this._head && !this._tail; + } + get size() { + return this._size; + } + get first() { + return this._head?.value; + } + get last() { + return this._tail?.value; + } + has(key) { + return this._map.has(key); + } + get(key, touch = Touch.None) { + const item = this._map.get(key); + if (!item) { + return undefined; + } + if (touch !== Touch.None) { + this.touch(item, touch); + } + return item.value; + } + set(key, value, touch = Touch.None) { + let item = this._map.get(key); + if (item) { + item.value = value; + if (touch !== Touch.None) { + this.touch(item, touch); + } + } + else { + item = { key, value, next: undefined, previous: undefined }; + switch (touch) { + case Touch.None: + this.addItemLast(item); + break; + case Touch.First: + this.addItemFirst(item); + break; + case Touch.Last: + this.addItemLast(item); + break; + default: + this.addItemLast(item); + break; + } + this._map.set(key, item); + this._size++; + } + return this; + } + delete(key) { + return !!this.remove(key); + } + remove(key) { + const item = this._map.get(key); + if (!item) { + return undefined; + } + this._map.delete(key); + this.removeItem(item); + this._size--; + return item.value; + } + shift() { + if (!this._head && !this._tail) { + return undefined; + } + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + const item = this._head; + this._map.delete(item.key); + this.removeItem(item); + this._size--; + return item.value; + } + forEach(callbackfn, thisArg) { + const state = this._state; + let current = this._head; + while (current) { + if (thisArg) { + callbackfn.bind(thisArg)(current.value, current.key, this); + } + else { + callbackfn(current.value, current.key, this); + } + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + current = current.next; + } + } + keys() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: current.key, done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + values() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: current.value, done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + entries() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: [current.key, current.value], done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + [(_a = Symbol.toStringTag, Symbol.iterator)]() { + return this.entries(); + } + trimOld(newSize) { + if (newSize >= this.size) { + return; + } + if (newSize === 0) { + this.clear(); + return; + } + let current = this._head; + let currentSize = this.size; + while (current && currentSize > newSize) { + this._map.delete(current.key); + current = current.next; + currentSize--; + } + this._head = current; + this._size = currentSize; + if (current) { + current.previous = undefined; + } + this._state++; + } + addItemFirst(item) { + // First time Insert + if (!this._head && !this._tail) { + this._tail = item; + } + else if (!this._head) { + throw new Error('Invalid list'); + } + else { + item.next = this._head; + this._head.previous = item; + } + this._head = item; + this._state++; + } + addItemLast(item) { + // First time Insert + if (!this._head && !this._tail) { + this._head = item; + } + else if (!this._tail) { + throw new Error('Invalid list'); + } + else { + item.previous = this._tail; + this._tail.next = item; + } + this._tail = item; + this._state++; + } + removeItem(item) { + if (item === this._head && item === this._tail) { + this._head = undefined; + this._tail = undefined; + } + else if (item === this._head) { + // This can only happened if size === 1 which is handle + // by the case above. + if (!item.next) { + throw new Error('Invalid list'); + } + item.next.previous = undefined; + this._head = item.next; + } + else if (item === this._tail) { + // This can only happened if size === 1 which is handle + // by the case above. + if (!item.previous) { + throw new Error('Invalid list'); + } + item.previous.next = undefined; + this._tail = item.previous; + } + else { + const next = item.next; + const previous = item.previous; + if (!next || !previous) { + throw new Error('Invalid list'); + } + next.previous = previous; + previous.next = next; + } + item.next = undefined; + item.previous = undefined; + this._state++; + } + touch(item, touch) { + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + if ((touch !== Touch.First && touch !== Touch.Last)) { + return; + } + if (touch === Touch.First) { + if (item === this._head) { + return; + } + const next = item.next; + const previous = item.previous; + // Unlink the item + if (item === this._tail) { + // previous must be defined since item was not head but is tail + // So there are more than on item in the map + previous.next = undefined; + this._tail = previous; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next.previous = previous; + previous.next = next; + } + // Insert the node at head + item.previous = undefined; + item.next = this._head; + this._head.previous = item; + this._head = item; + this._state++; + } + else if (touch === Touch.Last) { + if (item === this._tail) { + return; + } + const next = item.next; + const previous = item.previous; + // Unlink the item. + if (item === this._head) { + // next must be defined since item was not tail but is head + // So there are more than on item in the map + next.previous = undefined; + this._head = next; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next.previous = previous; + previous.next = next; + } + item.next = undefined; + item.previous = this._tail; + this._tail.next = item; + this._tail = item; + this._state++; + } + } + toJSON() { + const data = []; + this.forEach((value, key) => { + data.push([key, value]); + }); + return data; + } + fromJSON(data) { + this.clear(); + for (const [key, value] of data) { + this.set(key, value); + } + } +} +exports.LinkedMap = LinkedMap; +class LRUCache extends LinkedMap { + constructor(limit, ratio = 1) { + super(); + this._limit = limit; + this._ratio = Math.min(Math.max(0, ratio), 1); + } + get limit() { + return this._limit; + } + set limit(limit) { + this._limit = limit; + this.checkTrim(); + } + get ratio() { + return this._ratio; + } + set ratio(ratio) { + this._ratio = Math.min(Math.max(0, ratio), 1); + this.checkTrim(); + } + get(key, touch = Touch.AsNew) { + return super.get(key, touch); + } + peek(key) { + return super.get(key, Touch.None); + } + set(key, value) { + super.set(key, value, Touch.Last); + this.checkTrim(); + return this; + } + checkTrim() { + if (this.size > this._limit) { + this.trimOld(Math.round(this._limit * this._ratio)); + } + } +} +exports.LRUCache = LRUCache; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts" index 8e0d66cc85ecbce42c92dc8dcaefabea5ae705fc..354df8d2e6edecb9fabb98ca8492f430733e4f49 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts" @@ -1,3 +1,18 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4962729121c2cb97a4481cdb06dfc720a79a3bc2fc9330ff2bcf604cfc541177 -size 907 +import RAL from './ral'; +export declare abstract class AbstractMessageBuffer implements RAL.MessageBuffer { + private _encoding; + private _chunks; + private _totalLength; + constructor(encoding?: RAL.MessageBufferEncoding); + protected abstract emptyBuffer(): Uint8Array; + protected abstract fromString(value: string, encoding: RAL.MessageBufferEncoding): Uint8Array; + protected abstract toString(value: Uint8Array, encoding: RAL.MessageBufferEncoding): string; + protected abstract asNative(buffer: Uint8Array, length?: number): Uint8Array; + protected abstract allocNative(length: number): Uint8Array; + get encoding(): RAL.MessageBufferEncoding; + append(chunk: Uint8Array | string): void; + tryReadHeaders(lowerCaseKeys?: boolean): Map | undefined; + tryReadBody(length: number): Uint8Array | undefined; + get numberOfBytes(): number; + private _read; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js" index ea7d2f97327d92ba3f0ceb16f8732077c2e07e85..f3faca5f60fcc957d5585ca8917fd42ecbb5fd6d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js" @@ -1,3 +1,152 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0d55df776c39afdc26f9bc772321456e09552ecb819203b95d2fa82e10140438 -size 5659 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AbstractMessageBuffer = void 0; +const CR = 13; +const LF = 10; +const CRLF = '\r\n'; +class AbstractMessageBuffer { + constructor(encoding = 'utf-8') { + this._encoding = encoding; + this._chunks = []; + this._totalLength = 0; + } + get encoding() { + return this._encoding; + } + append(chunk) { + const toAppend = typeof chunk === 'string' ? this.fromString(chunk, this._encoding) : chunk; + this._chunks.push(toAppend); + this._totalLength += toAppend.byteLength; + } + tryReadHeaders(lowerCaseKeys = false) { + if (this._chunks.length === 0) { + return undefined; + } + let state = 0; + let chunkIndex = 0; + let offset = 0; + let chunkBytesRead = 0; + row: while (chunkIndex < this._chunks.length) { + const chunk = this._chunks[chunkIndex]; + offset = 0; + column: while (offset < chunk.length) { + const value = chunk[offset]; + switch (value) { + case CR: + switch (state) { + case 0: + state = 1; + break; + case 2: + state = 3; + break; + default: + state = 0; + } + break; + case LF: + switch (state) { + case 1: + state = 2; + break; + case 3: + state = 4; + offset++; + break row; + default: + state = 0; + } + break; + default: + state = 0; + } + offset++; + } + chunkBytesRead += chunk.byteLength; + chunkIndex++; + } + if (state !== 4) { + return undefined; + } + // The buffer contains the two CRLF at the end. So we will + // have two empty lines after the split at the end as well. + const buffer = this._read(chunkBytesRead + offset); + const result = new Map(); + const headers = this.toString(buffer, 'ascii').split(CRLF); + if (headers.length < 2) { + return result; + } + for (let i = 0; i < headers.length - 2; i++) { + const header = headers[i]; + const index = header.indexOf(':'); + if (index === -1) { + throw new Error(`Message header must separate key and value using ':'\n${header}`); + } + const key = header.substr(0, index); + const value = header.substr(index + 1).trim(); + result.set(lowerCaseKeys ? key.toLowerCase() : key, value); + } + return result; + } + tryReadBody(length) { + if (this._totalLength < length) { + return undefined; + } + return this._read(length); + } + get numberOfBytes() { + return this._totalLength; + } + _read(byteCount) { + if (byteCount === 0) { + return this.emptyBuffer(); + } + if (byteCount > this._totalLength) { + throw new Error(`Cannot read so many bytes!`); + } + if (this._chunks[0].byteLength === byteCount) { + // super fast path, precisely first chunk must be returned + const chunk = this._chunks[0]; + this._chunks.shift(); + this._totalLength -= byteCount; + return this.asNative(chunk); + } + if (this._chunks[0].byteLength > byteCount) { + // fast path, the reading is entirely within the first chunk + const chunk = this._chunks[0]; + const result = this.asNative(chunk, byteCount); + this._chunks[0] = chunk.slice(byteCount); + this._totalLength -= byteCount; + return result; + } + const result = this.allocNative(byteCount); + let resultOffset = 0; + let chunkIndex = 0; + while (byteCount > 0) { + const chunk = this._chunks[chunkIndex]; + if (chunk.byteLength > byteCount) { + // this chunk will survive + const chunkPart = chunk.slice(0, byteCount); + result.set(chunkPart, resultOffset); + resultOffset += byteCount; + this._chunks[chunkIndex] = chunk.slice(byteCount); + this._totalLength -= byteCount; + byteCount -= byteCount; + } + else { + // this chunk will be entirely read + result.set(chunk, resultOffset); + resultOffset += chunk.byteLength; + this._chunks.shift(); + this._totalLength -= chunk.byteLength; + byteCount -= chunk.byteLength; + } + } + return result; + } +} +exports.AbstractMessageBuffer = AbstractMessageBuffer; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts" index 25d784f33ae7dbf175c7b0b17c09ff8d405fe6be..d447d07a24ae5803fa2f1a9c1a9137288170c4f1 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts" @@ -1,3 +1,77 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3ca7b2e8012b9a6be09fafd62f8f3937388b9e1600a59c98887d2b11f6d01b43 -size 3002 +import RAL from './ral'; +import { Event } from './events'; +import { Message } from './messages'; +import { ContentDecoder, ContentTypeDecoder } from './encoding'; +import { Disposable } from './api'; +/** + * A callback that receives each incoming JSON-RPC message. + */ +export interface DataCallback { + (data: Message): void; +} +export interface PartialMessageInfo { + readonly messageToken: number; + readonly waitingTime: number; +} +/** Reads JSON-RPC messages from some underlying transport. */ +export interface MessageReader { + /** Raised whenever an error occurs while reading a message. */ + readonly onError: Event; + /** An event raised when the end of the underlying transport has been reached. */ + readonly onClose: Event; + /** + * An event that *may* be raised to inform the owner that only part of a message has been received. + * A MessageReader implementation may choose to raise this event after a timeout elapses while waiting for more of a partially received message to be received. + */ + readonly onPartialMessage: Event; + /** + * Begins listening for incoming messages. To be called at most once. + * @param callback A callback for receiving decoded messages. + */ + listen(callback: DataCallback): Disposable; + /** Releases resources incurred from reading or raising events. Does NOT close the underlying transport, if any. */ + dispose(): void; +} +export declare namespace MessageReader { + function is(value: any): value is MessageReader; +} +export declare abstract class AbstractMessageReader implements MessageReader { + private errorEmitter; + private closeEmitter; + private partialMessageEmitter; + constructor(); + dispose(): void; + get onError(): Event; + protected fireError(error: any): void; + get onClose(): Event; + protected fireClose(): void; + get onPartialMessage(): Event; + protected firePartialMessage(info: PartialMessageInfo): void; + private asError; + abstract listen(callback: DataCallback): Disposable; +} +export interface MessageReaderOptions { + charset?: RAL.MessageBufferEncoding; + contentDecoder?: ContentDecoder; + contentDecoders?: ContentDecoder[]; + contentTypeDecoder?: ContentTypeDecoder; + contentTypeDecoders?: ContentTypeDecoder[]; +} +export declare class ReadableStreamMessageReader extends AbstractMessageReader { + private readable; + private options; + private callback; + private nextMessageLength; + private messageToken; + private buffer; + private partialMessageTimer; + private _partialMessageTimeout; + private readSemaphore; + constructor(readable: RAL.ReadableStream, options?: RAL.MessageBufferEncoding | MessageReaderOptions); + set partialMessageTimeout(timeout: number); + get partialMessageTimeout(): number; + listen(callback: DataCallback): Disposable; + private onData; + private clearPartialMessageTimer; + private setPartialMessageTimer; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.js" index a84ba3ba66fc33cecd951ce3c015bc5e26e4e255..a7518d7d9fd6d6dea6669cf8adc99164a95fee65 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.js" @@ -1,3 +1,197 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8c2a0a8e5c8996f498538c1303ffe591cbc803e7e39e8e6f4401f25e31c3f07a -size 8152 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = void 0; +const ral_1 = require("./ral"); +const Is = require("./is"); +const events_1 = require("./events"); +const semaphore_1 = require("./semaphore"); +var MessageReader; +(function (MessageReader) { + function is(value) { + let candidate = value; + return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) && + Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage); + } + MessageReader.is = is; +})(MessageReader || (exports.MessageReader = MessageReader = {})); +class AbstractMessageReader { + constructor() { + this.errorEmitter = new events_1.Emitter(); + this.closeEmitter = new events_1.Emitter(); + this.partialMessageEmitter = new events_1.Emitter(); + } + dispose() { + this.errorEmitter.dispose(); + this.closeEmitter.dispose(); + } + get onError() { + return this.errorEmitter.event; + } + fireError(error) { + this.errorEmitter.fire(this.asError(error)); + } + get onClose() { + return this.closeEmitter.event; + } + fireClose() { + this.closeEmitter.fire(undefined); + } + get onPartialMessage() { + return this.partialMessageEmitter.event; + } + firePartialMessage(info) { + this.partialMessageEmitter.fire(info); + } + asError(error) { + if (error instanceof Error) { + return error; + } + else { + return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`); + } + } +} +exports.AbstractMessageReader = AbstractMessageReader; +var ResolvedMessageReaderOptions; +(function (ResolvedMessageReaderOptions) { + function fromOptions(options) { + let charset; + let result; + let contentDecoder; + const contentDecoders = new Map(); + let contentTypeDecoder; + const contentTypeDecoders = new Map(); + if (options === undefined || typeof options === 'string') { + charset = options ?? 'utf-8'; + } + else { + charset = options.charset ?? 'utf-8'; + if (options.contentDecoder !== undefined) { + contentDecoder = options.contentDecoder; + contentDecoders.set(contentDecoder.name, contentDecoder); + } + if (options.contentDecoders !== undefined) { + for (const decoder of options.contentDecoders) { + contentDecoders.set(decoder.name, decoder); + } + } + if (options.contentTypeDecoder !== undefined) { + contentTypeDecoder = options.contentTypeDecoder; + contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder); + } + if (options.contentTypeDecoders !== undefined) { + for (const decoder of options.contentTypeDecoders) { + contentTypeDecoders.set(decoder.name, decoder); + } + } + } + if (contentTypeDecoder === undefined) { + contentTypeDecoder = (0, ral_1.default)().applicationJson.decoder; + contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder); + } + return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders }; + } + ResolvedMessageReaderOptions.fromOptions = fromOptions; +})(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {})); +class ReadableStreamMessageReader extends AbstractMessageReader { + constructor(readable, options) { + super(); + this.readable = readable; + this.options = ResolvedMessageReaderOptions.fromOptions(options); + this.buffer = (0, ral_1.default)().messageBuffer.create(this.options.charset); + this._partialMessageTimeout = 10000; + this.nextMessageLength = -1; + this.messageToken = 0; + this.readSemaphore = new semaphore_1.Semaphore(1); + } + set partialMessageTimeout(timeout) { + this._partialMessageTimeout = timeout; + } + get partialMessageTimeout() { + return this._partialMessageTimeout; + } + listen(callback) { + this.nextMessageLength = -1; + this.messageToken = 0; + this.partialMessageTimer = undefined; + this.callback = callback; + const result = this.readable.onData((data) => { + this.onData(data); + }); + this.readable.onError((error) => this.fireError(error)); + this.readable.onClose(() => this.fireClose()); + return result; + } + onData(data) { + try { + this.buffer.append(data); + while (true) { + if (this.nextMessageLength === -1) { + const headers = this.buffer.tryReadHeaders(true); + if (!headers) { + return; + } + const contentLength = headers.get('content-length'); + if (!contentLength) { + this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(headers))}`)); + return; + } + const length = parseInt(contentLength); + if (isNaN(length)) { + this.fireError(new Error(`Content-Length value must be a number. Got ${contentLength}`)); + return; + } + this.nextMessageLength = length; + } + const body = this.buffer.tryReadBody(this.nextMessageLength); + if (body === undefined) { + /** We haven't received the full message yet. */ + this.setPartialMessageTimer(); + return; + } + this.clearPartialMessageTimer(); + this.nextMessageLength = -1; + // Make sure that we convert one received message after the + // other. Otherwise it could happen that a decoding of a second + // smaller message finished before the decoding of a first larger + // message and then we would deliver the second message first. + this.readSemaphore.lock(async () => { + const bytes = this.options.contentDecoder !== undefined + ? await this.options.contentDecoder.decode(body) + : body; + const message = await this.options.contentTypeDecoder.decode(bytes, this.options); + this.callback(message); + }).catch((error) => { + this.fireError(error); + }); + } + } + catch (error) { + this.fireError(error); + } + } + clearPartialMessageTimer() { + if (this.partialMessageTimer) { + this.partialMessageTimer.dispose(); + this.partialMessageTimer = undefined; + } + } + setPartialMessageTimer() { + this.clearPartialMessageTimer(); + if (this._partialMessageTimeout <= 0) { + return; + } + this.partialMessageTimer = (0, ral_1.default)().timer.setTimeout((token, timeout) => { + this.partialMessageTimer = undefined; + if (token === this.messageToken) { + this.firePartialMessage({ messageToken: token, waitingTime: timeout }); + this.setPartialMessageTimer(); + } + }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout); + } +} +exports.ReadableStreamMessageReader = ReadableStreamMessageReader; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts" index c44d89eb01470ac3f6e5f9083d9ab0d07ac6c899..fd86488804a266bcb737049012dbb1460706fb36 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts" @@ -1,3 +1,60 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b138b3f30708386023a7dc9981bb867808e5ff3383429ac7f69b7bfd0dcc5bd5 -size 2193 +import RAL from './ral'; +import { Message } from './messages'; +import { Event } from './events'; +import { ContentEncoder, ContentTypeEncoder } from './encoding'; +/** + * Writes JSON-RPC messages to an underlying transport. + */ +export interface MessageWriter { + /** + * Raised whenever an error occurs while writing a message. + */ + readonly onError: Event<[Error, Message | undefined, number | undefined]>; + /** + * An event raised when the underlying transport has closed and writing is no longer possible. + */ + readonly onClose: Event; + /** + * Sends a JSON-RPC message. + * @param msg The JSON-RPC message to be sent. + * @description Implementations should guarantee messages are transmitted in the same order that they are received by this method. + */ + write(msg: Message): Promise; + /** + * Call when the connection using this message writer ends + * (e.g. MessageConnection.end() is called) + */ + end(): void; + /** Releases resources incurred from writing or raising events. Does NOT close the underlying transport, if any. */ + dispose(): void; +} +export declare namespace MessageWriter { + function is(value: any): value is MessageWriter; +} +export declare abstract class AbstractMessageWriter { + private errorEmitter; + private closeEmitter; + constructor(); + dispose(): void; + get onError(): Event<[Error, Message | undefined, number | undefined]>; + protected fireError(error: any, message?: Message, count?: number): void; + get onClose(): Event; + protected fireClose(): void; + private asError; +} +export interface MessageWriterOptions { + charset?: RAL.MessageBufferEncoding; + contentEncoder?: ContentEncoder; + contentTypeEncoder?: ContentTypeEncoder; +} +export declare class WriteableStreamMessageWriter extends AbstractMessageWriter implements MessageWriter { + private writable; + private options; + private errorCount; + private writeSemaphore; + constructor(writable: RAL.WritableStream, options?: RAL.MessageBufferEncoding | MessageWriterOptions); + write(msg: Message): Promise; + private doWrite; + private handleError; + end(): void; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.js" index 6e6b62d3a09f984c01759e79e7ff5e8d6424a46a..c6c87208a4d0f777da86bac0891d3bddb8fb28e5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.js" @@ -1,3 +1,115 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1e1da3de31ac0f96aa0d20b07a40d425879e3dd637fd42efa01c5e9ae6b9d0c0 -size 4431 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = void 0; +const ral_1 = require("./ral"); +const Is = require("./is"); +const semaphore_1 = require("./semaphore"); +const events_1 = require("./events"); +const ContentLength = 'Content-Length: '; +const CRLF = '\r\n'; +var MessageWriter; +(function (MessageWriter) { + function is(value) { + let candidate = value; + return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) && + Is.func(candidate.onError) && Is.func(candidate.write); + } + MessageWriter.is = is; +})(MessageWriter || (exports.MessageWriter = MessageWriter = {})); +class AbstractMessageWriter { + constructor() { + this.errorEmitter = new events_1.Emitter(); + this.closeEmitter = new events_1.Emitter(); + } + dispose() { + this.errorEmitter.dispose(); + this.closeEmitter.dispose(); + } + get onError() { + return this.errorEmitter.event; + } + fireError(error, message, count) { + this.errorEmitter.fire([this.asError(error), message, count]); + } + get onClose() { + return this.closeEmitter.event; + } + fireClose() { + this.closeEmitter.fire(undefined); + } + asError(error) { + if (error instanceof Error) { + return error; + } + else { + return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`); + } + } +} +exports.AbstractMessageWriter = AbstractMessageWriter; +var ResolvedMessageWriterOptions; +(function (ResolvedMessageWriterOptions) { + function fromOptions(options) { + if (options === undefined || typeof options === 'string') { + return { charset: options ?? 'utf-8', contentTypeEncoder: (0, ral_1.default)().applicationJson.encoder }; + } + else { + return { charset: options.charset ?? 'utf-8', contentEncoder: options.contentEncoder, contentTypeEncoder: options.contentTypeEncoder ?? (0, ral_1.default)().applicationJson.encoder }; + } + } + ResolvedMessageWriterOptions.fromOptions = fromOptions; +})(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {})); +class WriteableStreamMessageWriter extends AbstractMessageWriter { + constructor(writable, options) { + super(); + this.writable = writable; + this.options = ResolvedMessageWriterOptions.fromOptions(options); + this.errorCount = 0; + this.writeSemaphore = new semaphore_1.Semaphore(1); + this.writable.onError((error) => this.fireError(error)); + this.writable.onClose(() => this.fireClose()); + } + async write(msg) { + return this.writeSemaphore.lock(async () => { + const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => { + if (this.options.contentEncoder !== undefined) { + return this.options.contentEncoder.encode(buffer); + } + else { + return buffer; + } + }); + return payload.then((buffer) => { + const headers = []; + headers.push(ContentLength, buffer.byteLength.toString(), CRLF); + headers.push(CRLF); + return this.doWrite(msg, headers, buffer); + }, (error) => { + this.fireError(error); + throw error; + }); + }); + } + async doWrite(msg, headers, data) { + try { + await this.writable.write(headers.join(''), 'ascii'); + return this.writable.write(data); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + this.writable.end(); + } +} +exports.WriteableStreamMessageWriter = WriteableStreamMessageWriter; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.d.ts" index 3a22e80ad4e40c05cc1e0ae450acb9e8e1c5c4ee..4d9ab2bbd71ac450115dbf93a1d8fe7da16165bf 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.d.ts" @@ -1,3 +1,369 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b716daa9737308e83fc9d3826cac21b3a6c12ff420b5e89415d1ca396616f1b6 -size 12602 +/** + * A language server message + */ +export interface Message { + jsonrpc: string; +} +/** + * Request message + */ +export interface RequestMessage extends Message { + /** + * The request id. + */ + id: number | string | null; + /** + * The method to be invoked. + */ + method: string; + /** + * The method's params. + */ + params?: any[] | object; +} +/** + * Predefined error codes. + */ +export declare namespace ErrorCodes { + const ParseError: -32700; + const InvalidRequest: -32600; + const MethodNotFound: -32601; + const InvalidParams: -32602; + const InternalError: -32603; + /** + * This is the start range of JSON RPC reserved error codes. + * It doesn't denote a real error code. No application error codes should + * be defined between the start and end range. For backwards + * compatibility the `ServerNotInitialized` and the `UnknownErrorCode` + * are left in the range. + * + * @since 3.16.0 + */ + const jsonrpcReservedErrorRangeStart: -32099; + /** @deprecated use jsonrpcReservedErrorRangeStart */ + const serverErrorStart: -32099; + /** + * An error occurred when write a message to the transport layer. + */ + const MessageWriteError: -32099; + /** + * An error occurred when reading a message from the transport layer. + */ + const MessageReadError: -32098; + /** + * The connection got disposed or lost and all pending responses got + * rejected. + */ + const PendingResponseRejected: -32097; + /** + * The connection is inactive and a use of it failed. + */ + const ConnectionInactive: -32096; + /** + * Error code indicating that a server received a notification or + * request before the server has received the `initialize` request. + */ + const ServerNotInitialized: -32002; + const UnknownErrorCode: -32001; + /** + * This is the end range of JSON RPC reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + const jsonrpcReservedErrorRangeEnd: -32000; + /** @deprecated use jsonrpcReservedErrorRangeEnd */ + const serverErrorEnd: -32000; +} +type integer = number; +export type ErrorCodes = integer; +export interface ResponseErrorLiteral { + /** + * A number indicating the error type that occurred. + */ + code: number; + /** + * A string providing a short description of the error. + */ + message: string; + /** + * A Primitive or Structured value that contains additional + * information about the error. Can be omitted. + */ + data?: D; +} +/** + * An error object return in a response in case a request + * has failed. + */ +export declare class ResponseError extends Error { + readonly code: number; + readonly data: D | undefined; + constructor(code: number, message: string, data?: D); + toJson(): ResponseErrorLiteral; +} +/** + * A response message. + */ +export interface ResponseMessage extends Message { + /** + * The request id. + */ + id: number | string | null; + /** + * The result of a request. This member is REQUIRED on success. + * This member MUST NOT exist if there was an error invoking the method. + */ + result?: string | number | boolean | object | any[] | null; + /** + * The error object in case a request fails. + */ + error?: ResponseErrorLiteral; +} +/** + * A LSP Log Entry. + */ +export type LSPMessageType = 'send-request' | 'receive-request' | 'send-response' | 'receive-response' | 'send-notification' | 'receive-notification'; +export interface LSPLogMessage { + type: LSPMessageType; + message: RequestMessage | ResponseMessage | NotificationMessage; + timestamp: number; +} +export declare class ParameterStructures { + private readonly kind; + /** + * The parameter structure is automatically inferred on the number of parameters + * and the parameter type in case of a single param. + */ + static readonly auto: ParameterStructures; + /** + * Forces `byPosition` parameter structure. This is useful if you have a single + * parameter which has a literal type. + */ + static readonly byPosition: ParameterStructures; + /** + * Forces `byName` parameter structure. This is only useful when having a single + * parameter. The library will report errors if used with a different number of + * parameters. + */ + static readonly byName: ParameterStructures; + private constructor(); + static is(value: any): value is ParameterStructures; + toString(): string; +} +/** + * An interface to type messages. + */ +export interface MessageSignature { + readonly method: string; + readonly numberOfParams: number; + readonly parameterStructures: ParameterStructures; +} +/** + * An abstract implementation of a MessageType. + */ +export declare abstract class AbstractMessageSignature implements MessageSignature { + readonly method: string; + readonly numberOfParams: number; + constructor(method: string, numberOfParams: number); + get parameterStructures(): ParameterStructures; +} +/** + * End marker interface for request and notification types. + */ +export interface _EM { + _$endMarker$_: number; +} +/** + * Classes to type request response pairs + */ +export declare class RequestType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P, R, E, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class RequestType1 extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, R, E, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class RequestType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, P9, R, E, _EM] | undefined; + constructor(method: string); +} +/** + * Notification Message + */ +export interface NotificationMessage extends Message { + /** + * The method to be invoked. + */ + method: string; + /** + * The notification's params. + */ + params?: any[] | object; +} +export declare class NotificationType

extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class NotificationType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [_EM] | undefined; + constructor(method: string); +} +export declare class NotificationType1 extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class NotificationType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, P9, _EM] | undefined; + constructor(method: string); +} +export declare namespace Message { + /** + * Tests if the given message is a request message + */ + function isRequest(message: Message | undefined): message is RequestMessage; + /** + * Tests if the given message is a notification message + */ + function isNotification(message: Message | undefined): message is NotificationMessage; + /** + * Tests if the given message is a response message + */ + function isResponse(message: Message | undefined): message is ResponseMessage; +} +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.js" index f32a8a79ed27e830479f2ae3ce4aeedeafc4ed0b..459194c62bd33aad140d29382ccee0efd812b6be 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.js" @@ -1,3 +1,306 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7646445ce78ee32dfc25bf75362d09aa91aae9695a80b6f7ce57027ad5dd09a0 -size 10357 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Message = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType = exports.RequestType0 = exports.AbstractMessageSignature = exports.ParameterStructures = exports.ResponseError = exports.ErrorCodes = void 0; +const is = require("./is"); +/** + * Predefined error codes. + */ +var ErrorCodes; +(function (ErrorCodes) { + // Defined by JSON RPC + ErrorCodes.ParseError = -32700; + ErrorCodes.InvalidRequest = -32600; + ErrorCodes.MethodNotFound = -32601; + ErrorCodes.InvalidParams = -32602; + ErrorCodes.InternalError = -32603; + /** + * This is the start range of JSON RPC reserved error codes. + * It doesn't denote a real error code. No application error codes should + * be defined between the start and end range. For backwards + * compatibility the `ServerNotInitialized` and the `UnknownErrorCode` + * are left in the range. + * + * @since 3.16.0 + */ + ErrorCodes.jsonrpcReservedErrorRangeStart = -32099; + /** @deprecated use jsonrpcReservedErrorRangeStart */ + ErrorCodes.serverErrorStart = -32099; + /** + * An error occurred when write a message to the transport layer. + */ + ErrorCodes.MessageWriteError = -32099; + /** + * An error occurred when reading a message from the transport layer. + */ + ErrorCodes.MessageReadError = -32098; + /** + * The connection got disposed or lost and all pending responses got + * rejected. + */ + ErrorCodes.PendingResponseRejected = -32097; + /** + * The connection is inactive and a use of it failed. + */ + ErrorCodes.ConnectionInactive = -32096; + /** + * Error code indicating that a server received a notification or + * request before the server has received the `initialize` request. + */ + ErrorCodes.ServerNotInitialized = -32002; + ErrorCodes.UnknownErrorCode = -32001; + /** + * This is the end range of JSON RPC reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + ErrorCodes.jsonrpcReservedErrorRangeEnd = -32000; + /** @deprecated use jsonrpcReservedErrorRangeEnd */ + ErrorCodes.serverErrorEnd = -32000; +})(ErrorCodes || (exports.ErrorCodes = ErrorCodes = {})); +/** + * An error object return in a response in case a request + * has failed. + */ +class ResponseError extends Error { + constructor(code, message, data) { + super(message); + this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode; + this.data = data; + Object.setPrototypeOf(this, ResponseError.prototype); + } + toJson() { + const result = { + code: this.code, + message: this.message + }; + if (this.data !== undefined) { + result.data = this.data; + } + return result; + } +} +exports.ResponseError = ResponseError; +class ParameterStructures { + constructor(kind) { + this.kind = kind; + } + static is(value) { + return value === ParameterStructures.auto || value === ParameterStructures.byName || value === ParameterStructures.byPosition; + } + toString() { + return this.kind; + } +} +exports.ParameterStructures = ParameterStructures; +/** + * The parameter structure is automatically inferred on the number of parameters + * and the parameter type in case of a single param. + */ +ParameterStructures.auto = new ParameterStructures('auto'); +/** + * Forces `byPosition` parameter structure. This is useful if you have a single + * parameter which has a literal type. + */ +ParameterStructures.byPosition = new ParameterStructures('byPosition'); +/** + * Forces `byName` parameter structure. This is only useful when having a single + * parameter. The library will report errors if used with a different number of + * parameters. + */ +ParameterStructures.byName = new ParameterStructures('byName'); +/** + * An abstract implementation of a MessageType. + */ +class AbstractMessageSignature { + constructor(method, numberOfParams) { + this.method = method; + this.numberOfParams = numberOfParams; + } + get parameterStructures() { + return ParameterStructures.auto; + } +} +exports.AbstractMessageSignature = AbstractMessageSignature; +/** + * Classes to type request response pairs + */ +class RequestType0 extends AbstractMessageSignature { + constructor(method) { + super(method, 0); + } +} +exports.RequestType0 = RequestType0; +class RequestType extends AbstractMessageSignature { + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.RequestType = RequestType; +class RequestType1 extends AbstractMessageSignature { + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.RequestType1 = RequestType1; +class RequestType2 extends AbstractMessageSignature { + constructor(method) { + super(method, 2); + } +} +exports.RequestType2 = RequestType2; +class RequestType3 extends AbstractMessageSignature { + constructor(method) { + super(method, 3); + } +} +exports.RequestType3 = RequestType3; +class RequestType4 extends AbstractMessageSignature { + constructor(method) { + super(method, 4); + } +} +exports.RequestType4 = RequestType4; +class RequestType5 extends AbstractMessageSignature { + constructor(method) { + super(method, 5); + } +} +exports.RequestType5 = RequestType5; +class RequestType6 extends AbstractMessageSignature { + constructor(method) { + super(method, 6); + } +} +exports.RequestType6 = RequestType6; +class RequestType7 extends AbstractMessageSignature { + constructor(method) { + super(method, 7); + } +} +exports.RequestType7 = RequestType7; +class RequestType8 extends AbstractMessageSignature { + constructor(method) { + super(method, 8); + } +} +exports.RequestType8 = RequestType8; +class RequestType9 extends AbstractMessageSignature { + constructor(method) { + super(method, 9); + } +} +exports.RequestType9 = RequestType9; +class NotificationType extends AbstractMessageSignature { + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.NotificationType = NotificationType; +class NotificationType0 extends AbstractMessageSignature { + constructor(method) { + super(method, 0); + } +} +exports.NotificationType0 = NotificationType0; +class NotificationType1 extends AbstractMessageSignature { + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.NotificationType1 = NotificationType1; +class NotificationType2 extends AbstractMessageSignature { + constructor(method) { + super(method, 2); + } +} +exports.NotificationType2 = NotificationType2; +class NotificationType3 extends AbstractMessageSignature { + constructor(method) { + super(method, 3); + } +} +exports.NotificationType3 = NotificationType3; +class NotificationType4 extends AbstractMessageSignature { + constructor(method) { + super(method, 4); + } +} +exports.NotificationType4 = NotificationType4; +class NotificationType5 extends AbstractMessageSignature { + constructor(method) { + super(method, 5); + } +} +exports.NotificationType5 = NotificationType5; +class NotificationType6 extends AbstractMessageSignature { + constructor(method) { + super(method, 6); + } +} +exports.NotificationType6 = NotificationType6; +class NotificationType7 extends AbstractMessageSignature { + constructor(method) { + super(method, 7); + } +} +exports.NotificationType7 = NotificationType7; +class NotificationType8 extends AbstractMessageSignature { + constructor(method) { + super(method, 8); + } +} +exports.NotificationType8 = NotificationType8; +class NotificationType9 extends AbstractMessageSignature { + constructor(method) { + super(method, 9); + } +} +exports.NotificationType9 = NotificationType9; +var Message; +(function (Message) { + /** + * Tests if the given message is a request message + */ + function isRequest(message) { + const candidate = message; + return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id)); + } + Message.isRequest = isRequest; + /** + * Tests if the given message is a notification message + */ + function isNotification(message) { + const candidate = message; + return candidate && is.string(candidate.method) && message.id === void 0; + } + Message.isNotification = isNotification; + /** + * Tests if the given message is a response message + */ + function isResponse(message) { + const candidate = message; + return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null); + } + Message.isResponse = isResponse; +})(Message || (exports.Message = Message = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.d.ts" index 27598c577e0a718001e611b25ee423153f7f3965..e14ec4ae1d36d7b423c0389986a66d1d275781b0 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.d.ts" @@ -1,3 +1,74 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d79ae695899e28c4dba32ba39268a1eafc556f3f183175a355424fae553585a -size 2835 +import type { Disposable } from './disposable'; +import type { ContentTypeEncoder, ContentTypeDecoder } from './encoding'; +interface _MessageBuffer { + readonly encoding: RAL.MessageBufferEncoding; + /** + * Append data to the message buffer. + * + * @param chunk the data to append. + */ + append(chunk: Uint8Array | string): void; + /** + * Tries to read the headers from the buffer + * + * @param lowerCaseKeys Whether the keys should be stored lower case. Doing + * so is recommended since HTTP headers are case insensitive. + * + * @returns the header properties or undefined in not enough data can be read. + */ + tryReadHeaders(lowerCaseKeys?: boolean): Map | undefined; + /** + * Tries to read the body of the given length. + * + * @param length the amount of bytes to read. + * @returns the data or undefined int less data is available. + */ + tryReadBody(length: number): Uint8Array | undefined; +} +type _MessageBufferEncoding = 'ascii' | 'utf-8'; +interface _ReadableStream { + onData(listener: (data: Uint8Array) => void): Disposable; + onClose(listener: () => void): Disposable; + onError(listener: (error: any) => void): Disposable; + onEnd(listener: () => void): Disposable; +} +interface _WritableStream { + onClose(listener: () => void): Disposable; + onError(listener: (error: any) => void): Disposable; + onEnd(listener: () => void): Disposable; + write(data: Uint8Array): Promise; + write(data: string, encoding: _MessageBufferEncoding): Promise; + end(): void; +} +interface _DuplexStream extends _ReadableStream, _WritableStream { +} +interface RAL { + readonly applicationJson: { + readonly encoder: ContentTypeEncoder; + readonly decoder: ContentTypeDecoder; + }; + readonly messageBuffer: { + create(encoding: RAL.MessageBufferEncoding): RAL.MessageBuffer; + }; + readonly console: { + info(message?: any, ...optionalParams: any[]): void; + log(message?: any, ...optionalParams: any[]): void; + warn(message?: any, ...optionalParams: any[]): void; + error(message?: any, ...optionalParams: any[]): void; + }; + readonly timer: { + setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable; + setImmediate(callback: (...args: any[]) => void, ...args: any[]): Disposable; + setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable; + }; +} +declare function RAL(): RAL; +declare namespace RAL { + type MessageBuffer = _MessageBuffer; + type MessageBufferEncoding = _MessageBufferEncoding; + type ReadableStream = _ReadableStream; + type WritableStream = _WritableStream; + type DuplexStream = _DuplexStream; + function install(ral: RAL): void; +} +export default RAL; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.js" index d8f4748e471a911aaa9a7a7f771c4f7da69337dc..ae335df56eca4599be4c63d27f4de3cb4d9c7d27 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.js" @@ -1,3 +1,23 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9b4736fe0168adf1dff8a1f41cf76dc8e9f380684cbb39056403e81a05a51cb3 -size 834 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +let _ral; +function RAL() { + if (_ral === undefined) { + throw new Error(`No runtime abstraction layer installed`); + } + return _ral; +} +(function (RAL) { + function install(ral) { + if (ral === undefined) { + throw new Error(`No runtime abstraction layer provided`); + } + _ral = ral; + } + RAL.install = install; +})(RAL || (RAL = {})); +exports.default = RAL; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts" index 4c391f1034ab8c430240f5b1008c37ce2d048bbd..1261daab59d0723e9adb787406f701cb2f9ac50b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts" @@ -1,3 +1,10 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e861653b284114109a695dd061a427b7bb09ce01dbe1c2d3e753fc342919faaf -size 272 +export declare class Semaphore { + private _capacity; + private _active; + private _waiting; + constructor(capacity?: number); + lock(thunk: () => T | PromiseLike): Promise; + get active(): number; + private runNext; + private doRunNext; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.js" index 112ca39c2ae1bae9b722a0bebc18229206379449..730f4e123dad437817f2676e0be883117a319633 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.js" @@ -1,3 +1,68 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:23f97fc853d012174609337eb92cbebf41b970175ee82fd2bf3ee6cd5a7e0980 -size 2197 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Semaphore = void 0; +const ral_1 = require("./ral"); +class Semaphore { + constructor(capacity = 1) { + if (capacity <= 0) { + throw new Error('Capacity must be greater than 0'); + } + this._capacity = capacity; + this._active = 0; + this._waiting = []; + } + lock(thunk) { + return new Promise((resolve, reject) => { + this._waiting.push({ thunk, resolve, reject }); + this.runNext(); + }); + } + get active() { + return this._active; + } + runNext() { + if (this._waiting.length === 0 || this._active === this._capacity) { + return; + } + (0, ral_1.default)().timer.setImmediate(() => this.doRunNext()); + } + doRunNext() { + if (this._waiting.length === 0 || this._active === this._capacity) { + return; + } + const next = this._waiting.shift(); + this._active++; + if (this._active > this._capacity) { + throw new Error(`To many thunks active`); + } + try { + const result = next.thunk(); + if (result instanceof Promise) { + result.then((value) => { + this._active--; + next.resolve(value); + this.runNext(); + }, (err) => { + this._active--; + next.reject(err); + this.runNext(); + }); + } + else { + this._active--; + next.resolve(result); + this.runNext(); + } + } + catch (err) { + this._active--; + next.reject(err); + this.runNext(); + } + } +} +exports.Semaphore = Semaphore; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts" index 4d5eccfa2fa3489045bdd3ecf1abd39941f005b7..c6e8d08ea418553fd08db047b67ea2c512c4adb2 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts" @@ -1,3 +1,15 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:13ec544ab0a3a7ff96afac1016f55b264c812428e37d595dc33b688296435469 -size 801 +import { RequestMessage } from './messages'; +import { AbstractCancellationTokenSource } from './cancellation'; +import { CancellationId, RequestCancellationReceiverStrategy, CancellationSenderStrategy, MessageConnection } from './connection'; +export declare class SharedArraySenderStrategy implements CancellationSenderStrategy { + private readonly buffers; + constructor(); + enableCancellation(request: RequestMessage): void; + sendCancellation(_conn: MessageConnection, id: CancellationId): Promise; + cleanup(id: CancellationId): void; + dispose(): void; +} +export declare class SharedArrayReceiverStrategy implements RequestCancellationReceiverStrategy { + readonly kind: "request"; + createCancellationTokenSource(request: RequestMessage): AbstractCancellationTokenSource; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js" index 46a78175f24ee7b77361fa3f80212cbe991fcd85..d3971fc9c32c04ce68f2bac7f84518e20a3244af 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js" @@ -1,3 +1,76 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5d72941efcfae5ec26b955f18afc4042833825019e3a84e45fdd4952da51fc29 -size 2640 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SharedArrayReceiverStrategy = exports.SharedArraySenderStrategy = void 0; +const cancellation_1 = require("./cancellation"); +var CancellationState; +(function (CancellationState) { + CancellationState.Continue = 0; + CancellationState.Cancelled = 1; +})(CancellationState || (CancellationState = {})); +class SharedArraySenderStrategy { + constructor() { + this.buffers = new Map(); + } + enableCancellation(request) { + if (request.id === null) { + return; + } + const buffer = new SharedArrayBuffer(4); + const data = new Int32Array(buffer, 0, 1); + data[0] = CancellationState.Continue; + this.buffers.set(request.id, buffer); + request.$cancellationData = buffer; + } + async sendCancellation(_conn, id) { + const buffer = this.buffers.get(id); + if (buffer === undefined) { + return; + } + const data = new Int32Array(buffer, 0, 1); + Atomics.store(data, 0, CancellationState.Cancelled); + } + cleanup(id) { + this.buffers.delete(id); + } + dispose() { + this.buffers.clear(); + } +} +exports.SharedArraySenderStrategy = SharedArraySenderStrategy; +class SharedArrayBufferCancellationToken { + constructor(buffer) { + this.data = new Int32Array(buffer, 0, 1); + } + get isCancellationRequested() { + return Atomics.load(this.data, 0) === CancellationState.Cancelled; + } + get onCancellationRequested() { + throw new Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`); + } +} +class SharedArrayBufferCancellationTokenSource { + constructor(buffer) { + this.token = new SharedArrayBufferCancellationToken(buffer); + } + cancel() { + } + dispose() { + } +} +class SharedArrayReceiverStrategy { + constructor() { + this.kind = 'request'; + } + createCancellationTokenSource(request) { + const buffer = request.$cancellationData; + if (buffer === undefined) { + return new cancellation_1.CancellationTokenSource(); + } + return new SharedArrayBufferCancellationTokenSource(buffer); + } +} +exports.SharedArrayReceiverStrategy = SharedArrayReceiverStrategy; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/main.d.ts" index f8dcc14a8df099b431e3e4bfc121d4797526360b..99eb9ab83c3e604b287ba86399c28dcc077ed62f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/main.d.ts" @@ -1,3 +1,63 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67d37ef881a81aefe3a0f70f78e3835be950f2359487d3eb61b0a3bb9af172bc -size 3537 +/// +/// +/// +/// +/// +import { ChildProcess } from 'child_process'; +import { Socket } from 'net'; +import { MessagePort, Worker } from 'worker_threads'; +import { RAL, AbstractMessageReader, DataCallback, AbstractMessageWriter, Message, ReadableStreamMessageReader, WriteableStreamMessageWriter, MessageWriterOptions, MessageReaderOptions, MessageReader, MessageWriter, ConnectionStrategy, ConnectionOptions, MessageConnection, Logger, Disposable } from '../common/api'; +export * from '../common/api'; +export declare class IPCMessageReader extends AbstractMessageReader { + private process; + constructor(process: NodeJS.Process | ChildProcess); + listen(callback: DataCallback): Disposable; +} +export declare class IPCMessageWriter extends AbstractMessageWriter implements MessageWriter { + private readonly process; + private errorCount; + constructor(process: NodeJS.Process | ChildProcess); + write(msg: Message): Promise; + private handleError; + end(): void; +} +export declare class PortMessageReader extends AbstractMessageReader implements MessageReader { + private onData; + constructor(port: MessagePort | Worker); + listen(callback: DataCallback): Disposable; +} +export declare class PortMessageWriter extends AbstractMessageWriter implements MessageWriter { + private readonly port; + private errorCount; + constructor(port: MessagePort | Worker); + write(msg: Message): Promise; + private handleError; + end(): void; +} +export declare class SocketMessageReader extends ReadableStreamMessageReader { + constructor(socket: Socket, encoding?: RAL.MessageBufferEncoding); +} +export declare class SocketMessageWriter extends WriteableStreamMessageWriter { + private socket; + constructor(socket: Socket, options?: RAL.MessageBufferEncoding | MessageWriterOptions); + dispose(): void; +} +export declare class StreamMessageReader extends ReadableStreamMessageReader { + constructor(readable: NodeJS.ReadableStream, encoding?: RAL.MessageBufferEncoding | MessageReaderOptions); +} +export declare class StreamMessageWriter extends WriteableStreamMessageWriter { + constructor(writable: NodeJS.WritableStream, options?: RAL.MessageBufferEncoding | MessageWriterOptions); +} +export declare function generateRandomPipeName(): string; +export interface PipeTransport { + onConnected(): Promise<[MessageReader, MessageWriter]>; +} +export declare function createClientPipeTransport(pipeName: string, encoding?: RAL.MessageBufferEncoding): Promise; +export declare function createServerPipeTransport(pipeName: string, encoding?: RAL.MessageBufferEncoding): [MessageReader, MessageWriter]; +export interface SocketTransport { + onConnected(): Promise<[MessageReader, MessageWriter]>; +} +export declare function createClientSocketTransport(port: number, encoding?: RAL.MessageBufferEncoding): Promise; +export declare function createServerSocketTransport(port: number, encoding?: RAL.MessageBufferEncoding): [MessageReader, MessageWriter]; +export declare function createMessageConnection(reader: MessageReader, writer: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; +export declare function createMessageConnection(inputStream: NodeJS.ReadableStream, outputStream: NodeJS.WritableStream, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/main.js" index 1a93ef42b35f125f444afc8b116a891d5ccc5dac..57f05a6cb7ee72dcc339f35551b51240d18cf131 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/main.js" @@ -1,3 +1,257 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7c06b1084e5e9b6581cbc0751f8c6b31e87b5c5f0f4b73e96458411191c5c743 -size 9778 +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createMessageConnection = exports.createServerSocketTransport = exports.createClientSocketTransport = exports.createServerPipeTransport = exports.createClientPipeTransport = exports.generateRandomPipeName = exports.StreamMessageWriter = exports.StreamMessageReader = exports.SocketMessageWriter = exports.SocketMessageReader = exports.PortMessageWriter = exports.PortMessageReader = exports.IPCMessageWriter = exports.IPCMessageReader = void 0; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +const ril_1 = require("./ril"); +// Install the node runtime abstract. +ril_1.default.install(); +const path = require("path"); +const os = require("os"); +const crypto_1 = require("crypto"); +const net_1 = require("net"); +const api_1 = require("../common/api"); +__exportStar(require("../common/api"), exports); +class IPCMessageReader extends api_1.AbstractMessageReader { + constructor(process) { + super(); + this.process = process; + let eventEmitter = this.process; + eventEmitter.on('error', (error) => this.fireError(error)); + eventEmitter.on('close', () => this.fireClose()); + } + listen(callback) { + this.process.on('message', callback); + return api_1.Disposable.create(() => this.process.off('message', callback)); + } +} +exports.IPCMessageReader = IPCMessageReader; +class IPCMessageWriter extends api_1.AbstractMessageWriter { + constructor(process) { + super(); + this.process = process; + this.errorCount = 0; + const eventEmitter = this.process; + eventEmitter.on('error', (error) => this.fireError(error)); + eventEmitter.on('close', () => this.fireClose); + } + write(msg) { + try { + if (typeof this.process.send === 'function') { + this.process.send(msg, undefined, undefined, (error) => { + if (error) { + this.errorCount++; + this.handleError(error, msg); + } + else { + this.errorCount = 0; + } + }); + } + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.IPCMessageWriter = IPCMessageWriter; +class PortMessageReader extends api_1.AbstractMessageReader { + constructor(port) { + super(); + this.onData = new api_1.Emitter; + port.on('close', () => this.fireClose); + port.on('error', (error) => this.fireError(error)); + port.on('message', (message) => { + this.onData.fire(message); + }); + } + listen(callback) { + return this.onData.event(callback); + } +} +exports.PortMessageReader = PortMessageReader; +class PortMessageWriter extends api_1.AbstractMessageWriter { + constructor(port) { + super(); + this.port = port; + this.errorCount = 0; + port.on('close', () => this.fireClose()); + port.on('error', (error) => this.fireError(error)); + } + write(msg) { + try { + this.port.postMessage(msg); + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.PortMessageWriter = PortMessageWriter; +class SocketMessageReader extends api_1.ReadableStreamMessageReader { + constructor(socket, encoding = 'utf-8') { + super((0, ril_1.default)().stream.asReadableStream(socket), encoding); + } +} +exports.SocketMessageReader = SocketMessageReader; +class SocketMessageWriter extends api_1.WriteableStreamMessageWriter { + constructor(socket, options) { + super((0, ril_1.default)().stream.asWritableStream(socket), options); + this.socket = socket; + } + dispose() { + super.dispose(); + this.socket.destroy(); + } +} +exports.SocketMessageWriter = SocketMessageWriter; +class StreamMessageReader extends api_1.ReadableStreamMessageReader { + constructor(readable, encoding) { + super((0, ril_1.default)().stream.asReadableStream(readable), encoding); + } +} +exports.StreamMessageReader = StreamMessageReader; +class StreamMessageWriter extends api_1.WriteableStreamMessageWriter { + constructor(writable, options) { + super((0, ril_1.default)().stream.asWritableStream(writable), options); + } +} +exports.StreamMessageWriter = StreamMessageWriter; +const XDG_RUNTIME_DIR = process.env['XDG_RUNTIME_DIR']; +const safeIpcPathLengths = new Map([ + ['linux', 107], + ['darwin', 103] +]); +function generateRandomPipeName() { + const randomSuffix = (0, crypto_1.randomBytes)(21).toString('hex'); + if (process.platform === 'win32') { + return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`; + } + let result; + if (XDG_RUNTIME_DIR) { + result = path.join(XDG_RUNTIME_DIR, `vscode-ipc-${randomSuffix}.sock`); + } + else { + result = path.join(os.tmpdir(), `vscode-${randomSuffix}.sock`); + } + const limit = safeIpcPathLengths.get(process.platform); + if (limit !== undefined && result.length > limit) { + (0, ril_1.default)().console.warn(`WARNING: IPC handle "${result}" is longer than ${limit} characters.`); + } + return result; +} +exports.generateRandomPipeName = generateRandomPipeName; +function createClientPipeTransport(pipeName, encoding = 'utf-8') { + let connectResolve; + const connected = new Promise((resolve, _reject) => { + connectResolve = resolve; + }); + return new Promise((resolve, reject) => { + let server = (0, net_1.createServer)((socket) => { + server.close(); + connectResolve([ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]); + }); + server.on('error', reject); + server.listen(pipeName, () => { + server.removeListener('error', reject); + resolve({ + onConnected: () => { return connected; } + }); + }); + }); +} +exports.createClientPipeTransport = createClientPipeTransport; +function createServerPipeTransport(pipeName, encoding = 'utf-8') { + const socket = (0, net_1.createConnection)(pipeName); + return [ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]; +} +exports.createServerPipeTransport = createServerPipeTransport; +function createClientSocketTransport(port, encoding = 'utf-8') { + let connectResolve; + const connected = new Promise((resolve, _reject) => { + connectResolve = resolve; + }); + return new Promise((resolve, reject) => { + const server = (0, net_1.createServer)((socket) => { + server.close(); + connectResolve([ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]); + }); + server.on('error', reject); + server.listen(port, '127.0.0.1', () => { + server.removeListener('error', reject); + resolve({ + onConnected: () => { return connected; } + }); + }); + }); +} +exports.createClientSocketTransport = createClientSocketTransport; +function createServerSocketTransport(port, encoding = 'utf-8') { + const socket = (0, net_1.createConnection)(port, '127.0.0.1'); + return [ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]; +} +exports.createServerSocketTransport = createServerSocketTransport; +function isReadableStream(value) { + const candidate = value; + return candidate.read !== undefined && candidate.addListener !== undefined; +} +function isWritableStream(value) { + const candidate = value; + return candidate.write !== undefined && candidate.addListener !== undefined; +} +function createMessageConnection(input, output, logger, options) { + if (!logger) { + logger = api_1.NullLogger; + } + const reader = isReadableStream(input) ? new StreamMessageReader(input) : input; + const writer = isWritableStream(output) ? new StreamMessageWriter(output) : output; + if (api_1.ConnectionStrategy.is(options)) { + options = { connectionStrategy: options }; + } + return (0, api_1.createMessageConnection)(reader, writer, logger, options); +} +exports.createMessageConnection = createMessageConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/ril.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/ril.d.ts" index 56718267e6504b75bd3fdf2864cbefd916779fdf..31bc9227d4836c10ae180a936e030b3e5f1bddc4 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/ril.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/ril.d.ts" @@ -1,3 +1,13 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b397fd8e5a65bc04e3de262da0e5ceeae5d53ca7fdfd0f9d8327618b3fe32f3c -size 413 +/// +import { RAL } from '../common/api'; +interface RIL extends RAL { + readonly stream: { + readonly asReadableStream: (stream: NodeJS.ReadableStream) => RAL.ReadableStream; + readonly asWritableStream: (stream: NodeJS.WritableStream) => RAL.WritableStream; + }; +} +declare function RIL(): RIL; +declare namespace RIL { + function install(): void; +} +export default RIL; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/ril.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/ril.js" index 9955ea7fa86e8a830555ceab4f7bdcdf7d36194e..570081810bf8efeb72089ab3f5d40387d18b9135 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/ril.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/ril.js" @@ -1,3 +1,161 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:daff19bb252f60c97c629f7b9f299ae957a9ef2c87152498262484e6b990debc -size 5392 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +const util_1 = require("util"); +const api_1 = require("../common/api"); +class MessageBuffer extends api_1.AbstractMessageBuffer { + constructor(encoding = 'utf-8') { + super(encoding); + } + emptyBuffer() { + return MessageBuffer.emptyBuffer; + } + fromString(value, encoding) { + return Buffer.from(value, encoding); + } + toString(value, encoding) { + if (value instanceof Buffer) { + return value.toString(encoding); + } + else { + return new util_1.TextDecoder(encoding).decode(value); + } + } + asNative(buffer, length) { + if (length === undefined) { + return buffer instanceof Buffer ? buffer : Buffer.from(buffer); + } + else { + return buffer instanceof Buffer ? buffer.slice(0, length) : Buffer.from(buffer, 0, length); + } + } + allocNative(length) { + return Buffer.allocUnsafe(length); + } +} +MessageBuffer.emptyBuffer = Buffer.allocUnsafe(0); +class ReadableStreamWrapper { + constructor(stream) { + this.stream = stream; + } + onClose(listener) { + this.stream.on('close', listener); + return api_1.Disposable.create(() => this.stream.off('close', listener)); + } + onError(listener) { + this.stream.on('error', listener); + return api_1.Disposable.create(() => this.stream.off('error', listener)); + } + onEnd(listener) { + this.stream.on('end', listener); + return api_1.Disposable.create(() => this.stream.off('end', listener)); + } + onData(listener) { + this.stream.on('data', listener); + return api_1.Disposable.create(() => this.stream.off('data', listener)); + } +} +class WritableStreamWrapper { + constructor(stream) { + this.stream = stream; + } + onClose(listener) { + this.stream.on('close', listener); + return api_1.Disposable.create(() => this.stream.off('close', listener)); + } + onError(listener) { + this.stream.on('error', listener); + return api_1.Disposable.create(() => this.stream.off('error', listener)); + } + onEnd(listener) { + this.stream.on('end', listener); + return api_1.Disposable.create(() => this.stream.off('end', listener)); + } + write(data, encoding) { + return new Promise((resolve, reject) => { + const callback = (error) => { + if (error === undefined || error === null) { + resolve(); + } + else { + reject(error); + } + }; + if (typeof data === 'string') { + this.stream.write(data, encoding, callback); + } + else { + this.stream.write(data, callback); + } + }); + } + end() { + this.stream.end(); + } +} +const _ril = Object.freeze({ + messageBuffer: Object.freeze({ + create: (encoding) => new MessageBuffer(encoding) + }), + applicationJson: Object.freeze({ + encoder: Object.freeze({ + name: 'application/json', + encode: (msg, options) => { + try { + return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset)); + } + catch (err) { + return Promise.reject(err); + } + } + }), + decoder: Object.freeze({ + name: 'application/json', + decode: (buffer, options) => { + try { + if (buffer instanceof Buffer) { + return Promise.resolve(JSON.parse(buffer.toString(options.charset))); + } + else { + return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer))); + } + } + catch (err) { + return Promise.reject(err); + } + } + }) + }), + stream: Object.freeze({ + asReadableStream: (stream) => new ReadableStreamWrapper(stream), + asWritableStream: (stream) => new WritableStreamWrapper(stream) + }), + console: console, + timer: Object.freeze({ + setTimeout(callback, ms, ...args) { + const handle = setTimeout(callback, ms, ...args); + return { dispose: () => clearTimeout(handle) }; + }, + setImmediate(callback, ...args) { + const handle = setImmediate(callback, ...args); + return { dispose: () => clearImmediate(handle) }; + }, + setInterval(callback, ms, ...args) { + const handle = setInterval(callback, ms, ...args); + return { dispose: () => clearInterval(handle) }; + } + }) +}); +function RIL() { + return _ril; +} +(function (RIL) { + function install() { + api_1.RAL.install(_ril); + } + RIL.install = install; +})(RIL || (RIL = {})); +exports.default = RIL; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.cmd" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.cmd" index d6820389cf905e2639588cfaf3d1dd49787060d0..791e6e36ca158adb27a1ca664413568656ce2781 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.cmd" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.cmd" @@ -1,3 +1,5 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fad7474018db5e3ef38b97374d82fb3b5c56a16aee423f482b6732800007f533 -size 213 +@echo off +REM This file is necessary to ensure that under Windows we don't +REM run the node.js file in the Windows Script Host when using +REM node in packakge.json scripts. See also PATHEXT setting +node.exe %* \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.d.ts" index d4501421d4bd489c9190700a07b50dd52678f01e..b4c4fcd723edbd7b4ea066a4059cf8393e46aa88 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c98df0145d99011af92c397fa787fc39d42cc04019614ab5581febe71fb32e1 -size 382 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/node/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.js" index 6ca9fea0ab31ba44f19549c8fa3b28a055f235c0..388e3197ebb862634cda424e9d707896b40627da 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20ed9d05087fa65ed99369c32ebaad6d2714c56d38b6b58e660ec428d1280054 -size 408 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/node/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/package.json" index 6c47ddfa222c334c11990845d8d20bb3ff8db999..b6ffb7cc8439b12eb0497ee65635d318df5bb531 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/package.json" @@ -1,3 +1,45 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:102522821065f3a2003b6a2e03777daa05b391aaaba416abecf8f40141310de2 -size 1940 +{ + "name": "vscode-jsonrpc", + "description": "A json rpc implementation over streams", + "version": "8.2.0", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-languageserver-node.git", + "directory": "jsonrpc" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "engines": { + "node": ">=14.0.0" + }, + "main": "./lib/node/main.js", + "browser": { + "./lib/node/main.js": "./lib/browser/main.js" + }, + "typings": "./lib/common/api.d.ts", + "devDependencies": { + "@types/msgpack-lite": "^0.1.7", + "msgpack-lite": "^0.1.26" + }, + "scripts": { + "prepublishOnly": "echo \"⛔ Can only publish from a secure pipeline ⛔\" && node ../build/npm/fail", + "prepack": "npm run all:publish", + "preversion": "npm test", + "compile": "node ../build/bin/tsc -b ./tsconfig.json", + "watch": "node ../build/bin/tsc -b ./tsconfig.watch.json -w", + "clean": "node ../node_modules/.bin/rimraf lib && node ../node_modules/.bin/rimraf dist", + "lint": "node ../node_modules/eslint/bin/eslint.js --ext ts src", + "test": "npm run test:node && npm run test:browser", + "test:node": "node ../node_modules/mocha/bin/_mocha", + "test:browser": "npm run webpack:test:silent && node ../build/bin/runBrowserTests.js http://127.0.0.1:8080/jsonrpc/src/browser/test/", + "webpack": "node ../build/bin/webpack --mode none --config ./webpack.config.js", + "webpack:test": "node ../build/bin/webpack --mode none --config ./src/browser/test/webpack.config.js", + "webpack:test:silent": "node ../build/bin/webpack --no-stats --mode none --config ./src/browser/test/webpack.config.js", + "all": "npm run clean && npm run compile && npm run lint && npm run test", + "compile:publish": "node ../build/bin/tsc -b ./tsconfig.publish.json", + "all:publish": "git clean -xfd . && npm install && npm run compile:publish && npm run lint && npm run test" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/thirdpartynotices.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/thirdpartynotices.txt" index 2d95e953bff42d0943832bbb3cbac2bfdfd91a1e..0592beef14f651f468c39777ce98ebc523ec4a43 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/thirdpartynotices.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/thirdpartynotices.txt" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a89123562fe364dc8e969e85614eb6c1f8452afe131d6e42bd1314bb2d092b04 -size 623 +NOTICES AND INFORMATION +Do Not Translate or Localize + +This software incorporates material from third parties. +Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com, +or you may send a check or money order for US $5.00, including the product name, +the open source component name, platform, and version number, to: + +Source Code Compliance Team +Microsoft Corporation +One Microsoft Way +Redmond, WA 98052 +USA + +Notwithstanding any other terms, you may reverse engineer this software to the extent +required to debug changes to any libraries licensed under the GNU Lesser General Public License. \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/typings/thenable.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/typings/thenable.d.ts" index 71628bfa09bffea0029445a98311b0929f940987..8c4d2eeacd7b7de01db59e651d7eb4990b2ac605 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/typings/thenable.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/typings/thenable.d.ts" @@ -1,3 +1,5 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:65b9243c80068ec9696b1fbdd23c9acf80d51df02f97b2d7a0514312b0a9fe7d -size 398 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +interface Thenable extends PromiseLike { } \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/package.json" index 88ef9329078a117e15d8899846b5a0698c69a656..f0c023bc3af1e4661491e7b6ec0396a9ff5693a5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/package.json" @@ -1,3 +1,45 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aa3ac56b224ec2a0e61a9f8f7e035494719a53108a2771d6aa78b9dac521828b -size 2555 +{ + "name": "vscode-languageserver-protocol", + "description": "VSCode Language Server Protocol implementation", + "version": "3.17.5", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-languageserver-node.git", + "directory": "protocol" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "main": "./lib/node/main.js", + "browser": { + "./lib/node/main.js": "./lib/browser/main.js" + }, + "typings": "./lib/common/api.d.ts", + "dependencies": { + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" + }, + "scripts": { + "prepublishOnly": "echo \"⛔ Can only publish from a secure pipeline ⛔\" && node ../build/npm/fail", + "prepack": "npm run all:publish", + "postpublish": "node ../build/npm/post-publish.js", + "preversion": "npm test", + "compile": "node ../build/bin/tsc -b ./tsconfig.json", + "watch": "node ../build/bin/tsc -b ./tsconfig.watch.json -w", + "clean": "node ../node_modules/.bin/rimraf lib && node ../node_modules/.bin/rimraf dist", + "lint": "node ../node_modules/eslint/bin/eslint.js --ext ts src", + "test": "npm run test:node && npm run test:browser", + "test:node": "node ../node_modules/mocha/bin/_mocha", + "test:browser": "npm run webpack:test:silent && node ../build/bin/runBrowserTests.js http://127.0.0.1:8080/protocol/src/browser/test/", + "webpack:test": "cd ../types && npm run compile:esm && cd ../protocol && node ../build/bin/webpack --mode none --config ./src/browser/test/webpack.config.js", + "webpack:test:silent": "cd ../types && npm run compile:esm && cd ../protocol && node ../build/bin/webpack --no-stats --mode none --config ./src/browser/test/webpack.config.js", + "compile:metaModelTool": "cd ../tools && npm run compile && cd ../protocol", + "generate:metaModel": "node ../tools/lib/generator-main.js -p ./src/common/tsconfig.json > ./metaModel.json", + "generate:metaModelSchema": "ts-json-schema-generator --tsconfig ../tools/tsconfig.json --path ../tools/src/metaModel.ts > ./metaModel.schema.json", + "all": "npm run clean && npm run compile && npm run lint && npm run test && npm run compile:metaModelTool && npm run generate:metaModel && npm run generate:metaModelSchema", + "compile:publish": "node ../build/bin/tsc -b ./tsconfig.publish.json", + "all:publish": "git clean -xfd . && npm install && npm run compile:publish && npm run lint && npm run test && npm run compile:metaModelTool && npm run generate:metaModel && npm run generate:metaModelSchema" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/thirdpartynotices.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/thirdpartynotices.txt" index 54a2efc3a3447e903f30209d65107ca6f758e3f2..b7a903077dd86a250f408b0f0ae6120c6fd2e9a5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/thirdpartynotices.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-protocol/thirdpartynotices.txt" @@ -1,3 +1,31 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9265d27cf75775aa5ae19c5ba01846fb70ecd5121f8c39c81bef7e03f007072c -size 1823 +THIRD-PARTY SOFTWARE NOTICES AND INFORMATION +For Microsoft vscode-languageclient + +This project incorporates material from the project(s) listed below (collectively, “Third Party Code”). +Microsoft is not the original author of the Third Party Code. The original copyright notice and license +under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed +to you under their original license terms set forth below. Microsoft reserves all other rights not expressly +granted, whether by implication, estoppel or otherwise. + +1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped) + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/License.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/License.txt" index 71c73d0cbbb244fd8977b1334dae3ac9800e0c19..a07e3ae825f86b6d1f966659954bffc0768bef66 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/License.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/License.txt" @@ -1,3 +1,11 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec9ee83580841e8eb687aca9867f221503809ba6426c7f876ede17d91b9fcfd0 -size 1095 +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/README.md" index f38cd1b679e6d7a9577918ee13ad67988a3c0480..e833225cdd90a7e52ff70c6ea0c17bc811163d8a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/README.md" @@ -1,3 +1,30 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bec00c2c9fe6405a8828ad61d49b95514dd96ea4d51d401cb451ba40e7546a29 -size 933 +# Text Document implementation for a LSP Node server + +[![NPM Version](https://img.shields.io/npm/v/vscode-languageserver-textdocument.svg)](https://npmjs.org/package/vscode-languageserver-textdocument) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-languageserver-textdocument.svg)](https://npmjs.org/package/vscode-languageserver-textdocument) + +Npm module containing a simple text document implementation for [Node.js](https://nodejs.org/) language server + +Click [here](https://code.visualstudio.com/docs/extensions/example-language-server) for a detailed document on how +to implement language servers for [VSCode](https://code.visualstudio.com/). + +## History + +### 1.04 + +- Introduced ESLint rule for member delimiter style. + +### 1.03 + +- Moved to ES2020 target and lib + +### 1.0.2 + +- JSDoc updates + +### 1.0.0 + +Initial version. + +## License +[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt) diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/esm/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/esm/main.d.ts" index 19ec8fb1e51f20deae16ee52c3fd5ffbfd300b5a..c3a640bb0aa21d534b32bb73eddceec2a7baec4c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/esm/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/esm/main.d.ts" @@ -1,3 +1,191 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:96a56b3bbf8346c584c5d58db4fb8adc58982e4e9f2929488ad5aeb89ddc19f8 -size 6347 +/** + * A tagging type for string properties that are actually URIs. + */ +export type DocumentUri = string; +/** + * Position in a text document expressed as zero-based line and character offset. + * The offsets are based on a UTF-16 string representation. So a string of the form + * `a𐐀b` the character offset of the character `a` is 0, the character offset of `𐐀` + * is 1 and the character offset of b is 3 since `𐐀` is represented using two code + * units in UTF-16. + * + * Positions are line end character agnostic. So you can not specify a position that + * denotes `\r|\n` or `\n|` where `|` represents the character offset. + */ +export interface Position { + /** + * Line position in a document (zero-based). + * + * If a line number is greater than the number of lines in a document, it + * defaults back to the number of lines in the document. + * If a line number is negative, it defaults to 0. + * + * The above two properties are implementation specific. + */ + line: number; + /** + * Character offset on a line in a document (zero-based). + * + * The meaning of this offset is determined by the negotiated + * `PositionEncodingKind`. + * + * If the character value is greater than the line length it defaults back + * to the line length. This property is implementation specific. + */ + character: number; +} +/** + * A range in a text document expressed as (zero-based) start and end positions. + * + * If you want to specify a range that contains a line including the line ending + * character(s) then use an end position denoting the start of the next line. + * For example: + * ```ts + * { + * start: { line: 5, character: 23 } + * end : { line 6, character : 0 } + * } + * ``` + */ +export interface Range { + /** + * The range's start position. + */ + start: Position; + /** + * The range's end position. + */ + end: Position; +} +/** + * A text edit applicable to a text document. + */ +export interface TextEdit { + /** + * The range of the text document to be manipulated. To insert + * text into a document create a range where start === end. + */ + range: Range; + /** + * The string to be inserted. For delete operations use an + * empty string. + */ + newText: string; +} +/** + * An event describing a change to a text document. If range and rangeLength are omitted + * the new text is considered to be the full content of the document. + */ +export type TextDocumentContentChangeEvent = { + /** + * The range of the document that changed. + */ + range: Range; + /** + * The optional length of the range that got replaced. + * + * @deprecated use range instead. + */ + rangeLength?: number; + /** + * The new text for the provided range. + */ + text: string; +} | { + /** + * The new text of the whole document. + */ + text: string; +}; +/** + * A simple text document. Not to be implemented. The document keeps the content + * as string. + */ +export interface TextDocument { + /** + * The associated URI for this document. Most documents have the __file__-scheme, indicating that they + * represent files on disk. However, some documents may have other schemes indicating that they are not + * available on disk. + * + * @readonly + */ + readonly uri: DocumentUri; + /** + * The identifier of the language associated with this document. + * + * @readonly + */ + readonly languageId: string; + /** + * The version number of this document (it will increase after each + * change, including undo/redo). + * + * @readonly + */ + readonly version: number; + /** + * Get the text of this document. A substring can be retrieved by + * providing a range. + * + * @param range (optional) An range within the document to return. + * If no range is passed, the full content is returned. + * Invalid range positions are adjusted as described in {@link Position.line} + * and {@link Position.character}. + * If the start range position is greater than the end range position, + * then the effect of getText is as if the two positions were swapped. + + * @return The text of this document or a substring of the text if a + * range is provided. + */ + getText(range?: Range): string; + /** + * Converts a zero-based offset to a position. + * + * @param offset A zero-based offset. + * @return A valid {@link Position position}. + * @example The text document "ab\ncd" produces: + * * position { line: 0, character: 0 } for `offset` 0. + * * position { line: 0, character: 1 } for `offset` 1. + * * position { line: 0, character: 2 } for `offset` 2. + * * position { line: 1, character: 0 } for `offset` 3. + * * position { line: 1, character: 1 } for `offset` 4. + */ + positionAt(offset: number): Position; + /** + * Converts the position to a zero-based offset. + * Invalid positions are adjusted as described in {@link Position.line} + * and {@link Position.character}. + * + * @param position A position. + * @return A valid zero-based offset. + */ + offsetAt(position: Position): number; + /** + * The number of lines in this document. + * + * @readonly + */ + readonly lineCount: number; +} +export declare namespace TextDocument { + /** + * Creates a new text document. + * + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param version The document's initial version number. + * @param content The document's content. + */ + function create(uri: DocumentUri, languageId: string, version: number, content: string): TextDocument; + /** + * Updates a TextDocument by modifying its content. + * + * @param document the document to update. Only documents created by TextDocument.create are valid inputs. + * @param changes the changes to apply to the document. + * @param version the changes version for the document. + * @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter. + * + */ + function update(document: TextDocument, changes: TextDocumentContentChangeEvent[], version: number): TextDocument; + function applyEdits(document: TextDocument, edits: TextEdit[]): string; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/esm/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/esm/main.js" index 974a57a51e5c0712a1861f6b6bab7e4859649375..e5f7f3a2d4e0482ef9a3a8365d8675ecbd581252 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/esm/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/esm/main.js" @@ -1,3 +1,250 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bed6c0b6595655bde71b94930ea8e4fd4e99a4bd3909a44b71ca78494367bcf5 -size 9737 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +class FullTextDocument { + constructor(uri, languageId, version, content) { + this._uri = uri; + this._languageId = languageId; + this._version = version; + this._content = content; + this._lineOffsets = undefined; + } + get uri() { + return this._uri; + } + get languageId() { + return this._languageId; + } + get version() { + return this._version; + } + getText(range) { + if (range) { + const start = this.offsetAt(range.start); + const end = this.offsetAt(range.end); + return this._content.substring(start, end); + } + return this._content; + } + update(changes, version) { + for (let change of changes) { + if (FullTextDocument.isIncremental(change)) { + // makes sure start is before end + const range = getWellformedRange(change.range); + // update content + const startOffset = this.offsetAt(range.start); + const endOffset = this.offsetAt(range.end); + this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length); + // update the offsets + const startLine = Math.max(range.start.line, 0); + const endLine = Math.max(range.end.line, 0); + let lineOffsets = this._lineOffsets; + const addedLineOffsets = computeLineOffsets(change.text, false, startOffset); + if (endLine - startLine === addedLineOffsets.length) { + for (let i = 0, len = addedLineOffsets.length; i < len; i++) { + lineOffsets[i + startLine + 1] = addedLineOffsets[i]; + } + } + else { + if (addedLineOffsets.length < 10000) { + lineOffsets.splice(startLine + 1, endLine - startLine, ...addedLineOffsets); + } + else { // avoid too many arguments for splice + this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1)); + } + } + const diff = change.text.length - (endOffset - startOffset); + if (diff !== 0) { + for (let i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) { + lineOffsets[i] = lineOffsets[i] + diff; + } + } + } + else if (FullTextDocument.isFull(change)) { + this._content = change.text; + this._lineOffsets = undefined; + } + else { + throw new Error('Unknown change event received'); + } + } + this._version = version; + } + getLineOffsets() { + if (this._lineOffsets === undefined) { + this._lineOffsets = computeLineOffsets(this._content, true); + } + return this._lineOffsets; + } + positionAt(offset) { + offset = Math.max(Math.min(offset, this._content.length), 0); + let lineOffsets = this.getLineOffsets(); + let low = 0, high = lineOffsets.length; + if (high === 0) { + return { line: 0, character: offset }; + } + while (low < high) { + let mid = Math.floor((low + high) / 2); + if (lineOffsets[mid] > offset) { + high = mid; + } + else { + low = mid + 1; + } + } + // low is the least x for which the line offset is larger than the current offset + // or array.length if no line offset is larger than the current offset + let line = low - 1; + return { line, character: offset - lineOffsets[line] }; + } + offsetAt(position) { + let lineOffsets = this.getLineOffsets(); + if (position.line >= lineOffsets.length) { + return this._content.length; + } + else if (position.line < 0) { + return 0; + } + let lineOffset = lineOffsets[position.line]; + let nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length; + return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset); + } + get lineCount() { + return this.getLineOffsets().length; + } + static isIncremental(event) { + let candidate = event; + return candidate !== undefined && candidate !== null && + typeof candidate.text === 'string' && candidate.range !== undefined && + (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number'); + } + static isFull(event) { + let candidate = event; + return candidate !== undefined && candidate !== null && + typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined; + } +} +export var TextDocument; +(function (TextDocument) { + /** + * Creates a new text document. + * + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param version The document's initial version number. + * @param content The document's content. + */ + function create(uri, languageId, version, content) { + return new FullTextDocument(uri, languageId, version, content); + } + TextDocument.create = create; + /** + * Updates a TextDocument by modifying its content. + * + * @param document the document to update. Only documents created by TextDocument.create are valid inputs. + * @param changes the changes to apply to the document. + * @param version the changes version for the document. + * @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter. + * + */ + function update(document, changes, version) { + if (document instanceof FullTextDocument) { + document.update(changes, version); + return document; + } + else { + throw new Error('TextDocument.update: document must be created by TextDocument.create'); + } + } + TextDocument.update = update; + function applyEdits(document, edits) { + let text = document.getText(); + let sortedEdits = mergeSort(edits.map(getWellformedEdit), (a, b) => { + let diff = a.range.start.line - b.range.start.line; + if (diff === 0) { + return a.range.start.character - b.range.start.character; + } + return diff; + }); + let lastModifiedOffset = 0; + const spans = []; + for (const e of sortedEdits) { + let startOffset = document.offsetAt(e.range.start); + if (startOffset < lastModifiedOffset) { + throw new Error('Overlapping edit'); + } + else if (startOffset > lastModifiedOffset) { + spans.push(text.substring(lastModifiedOffset, startOffset)); + } + if (e.newText.length) { + spans.push(e.newText); + } + lastModifiedOffset = document.offsetAt(e.range.end); + } + spans.push(text.substr(lastModifiedOffset)); + return spans.join(''); + } + TextDocument.applyEdits = applyEdits; +})(TextDocument || (TextDocument = {})); +function mergeSort(data, compare) { + if (data.length <= 1) { + // sorted + return data; + } + const p = (data.length / 2) | 0; + const left = data.slice(0, p); + const right = data.slice(p); + mergeSort(left, compare); + mergeSort(right, compare); + let leftIdx = 0; + let rightIdx = 0; + let i = 0; + while (leftIdx < left.length && rightIdx < right.length) { + let ret = compare(left[leftIdx], right[rightIdx]); + if (ret <= 0) { + // smaller_equal -> take left to preserve order + data[i++] = left[leftIdx++]; + } + else { + // greater -> take right + data[i++] = right[rightIdx++]; + } + } + while (leftIdx < left.length) { + data[i++] = left[leftIdx++]; + } + while (rightIdx < right.length) { + data[i++] = right[rightIdx++]; + } + return data; +} +function computeLineOffsets(text, isAtLineStart, textOffset = 0) { + const result = isAtLineStart ? [textOffset] : []; + for (let i = 0; i < text.length; i++) { + let ch = text.charCodeAt(i); + if (ch === 13 /* CharCode.CarriageReturn */ || ch === 10 /* CharCode.LineFeed */) { + if (ch === 13 /* CharCode.CarriageReturn */ && i + 1 < text.length && text.charCodeAt(i + 1) === 10 /* CharCode.LineFeed */) { + i++; + } + result.push(textOffset + i + 1); + } + } + return result; +} +function getWellformedRange(range) { + const start = range.start; + const end = range.end; + if (start.line > end.line || (start.line === end.line && start.character > end.character)) { + return { start: end, end: start }; + } + return range; +} +function getWellformedEdit(textEdit) { + const range = getWellformedRange(textEdit.range); + if (range !== textEdit.range) { + return { newText: textEdit.newText, range }; + } + return textEdit; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/esm/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/esm/package.json" index 01f70c7a5a6ecf4072861dcbf6afc91eccfd1060..3dbc1ca591c0557e35b6004aeba250e6a70b56e3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/esm/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/esm/package.json" @@ -1,3 +1,3 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3ca9d4afd21425087cf31893b8f9f63c81b0b8408db5e343ca76e5f8aa26ab9a -size 23 +{ + "type": "module" +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/umd/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/umd/main.d.ts" index 19ec8fb1e51f20deae16ee52c3fd5ffbfd300b5a..c3a640bb0aa21d534b32bb73eddceec2a7baec4c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/umd/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/umd/main.d.ts" @@ -1,3 +1,191 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:96a56b3bbf8346c584c5d58db4fb8adc58982e4e9f2929488ad5aeb89ddc19f8 -size 6347 +/** + * A tagging type for string properties that are actually URIs. + */ +export type DocumentUri = string; +/** + * Position in a text document expressed as zero-based line and character offset. + * The offsets are based on a UTF-16 string representation. So a string of the form + * `a𐐀b` the character offset of the character `a` is 0, the character offset of `𐐀` + * is 1 and the character offset of b is 3 since `𐐀` is represented using two code + * units in UTF-16. + * + * Positions are line end character agnostic. So you can not specify a position that + * denotes `\r|\n` or `\n|` where `|` represents the character offset. + */ +export interface Position { + /** + * Line position in a document (zero-based). + * + * If a line number is greater than the number of lines in a document, it + * defaults back to the number of lines in the document. + * If a line number is negative, it defaults to 0. + * + * The above two properties are implementation specific. + */ + line: number; + /** + * Character offset on a line in a document (zero-based). + * + * The meaning of this offset is determined by the negotiated + * `PositionEncodingKind`. + * + * If the character value is greater than the line length it defaults back + * to the line length. This property is implementation specific. + */ + character: number; +} +/** + * A range in a text document expressed as (zero-based) start and end positions. + * + * If you want to specify a range that contains a line including the line ending + * character(s) then use an end position denoting the start of the next line. + * For example: + * ```ts + * { + * start: { line: 5, character: 23 } + * end : { line 6, character : 0 } + * } + * ``` + */ +export interface Range { + /** + * The range's start position. + */ + start: Position; + /** + * The range's end position. + */ + end: Position; +} +/** + * A text edit applicable to a text document. + */ +export interface TextEdit { + /** + * The range of the text document to be manipulated. To insert + * text into a document create a range where start === end. + */ + range: Range; + /** + * The string to be inserted. For delete operations use an + * empty string. + */ + newText: string; +} +/** + * An event describing a change to a text document. If range and rangeLength are omitted + * the new text is considered to be the full content of the document. + */ +export type TextDocumentContentChangeEvent = { + /** + * The range of the document that changed. + */ + range: Range; + /** + * The optional length of the range that got replaced. + * + * @deprecated use range instead. + */ + rangeLength?: number; + /** + * The new text for the provided range. + */ + text: string; +} | { + /** + * The new text of the whole document. + */ + text: string; +}; +/** + * A simple text document. Not to be implemented. The document keeps the content + * as string. + */ +export interface TextDocument { + /** + * The associated URI for this document. Most documents have the __file__-scheme, indicating that they + * represent files on disk. However, some documents may have other schemes indicating that they are not + * available on disk. + * + * @readonly + */ + readonly uri: DocumentUri; + /** + * The identifier of the language associated with this document. + * + * @readonly + */ + readonly languageId: string; + /** + * The version number of this document (it will increase after each + * change, including undo/redo). + * + * @readonly + */ + readonly version: number; + /** + * Get the text of this document. A substring can be retrieved by + * providing a range. + * + * @param range (optional) An range within the document to return. + * If no range is passed, the full content is returned. + * Invalid range positions are adjusted as described in {@link Position.line} + * and {@link Position.character}. + * If the start range position is greater than the end range position, + * then the effect of getText is as if the two positions were swapped. + + * @return The text of this document or a substring of the text if a + * range is provided. + */ + getText(range?: Range): string; + /** + * Converts a zero-based offset to a position. + * + * @param offset A zero-based offset. + * @return A valid {@link Position position}. + * @example The text document "ab\ncd" produces: + * * position { line: 0, character: 0 } for `offset` 0. + * * position { line: 0, character: 1 } for `offset` 1. + * * position { line: 0, character: 2 } for `offset` 2. + * * position { line: 1, character: 0 } for `offset` 3. + * * position { line: 1, character: 1 } for `offset` 4. + */ + positionAt(offset: number): Position; + /** + * Converts the position to a zero-based offset. + * Invalid positions are adjusted as described in {@link Position.line} + * and {@link Position.character}. + * + * @param position A position. + * @return A valid zero-based offset. + */ + offsetAt(position: Position): number; + /** + * The number of lines in this document. + * + * @readonly + */ + readonly lineCount: number; +} +export declare namespace TextDocument { + /** + * Creates a new text document. + * + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param version The document's initial version number. + * @param content The document's content. + */ + function create(uri: DocumentUri, languageId: string, version: number, content: string): TextDocument; + /** + * Updates a TextDocument by modifying its content. + * + * @param document the document to update. Only documents created by TextDocument.create are valid inputs. + * @param changes the changes to apply to the document. + * @param version the changes version for the document. + * @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter. + * + */ + function update(document: TextDocument, changes: TextDocumentContentChangeEvent[], version: number): TextDocument; + function applyEdits(document: TextDocument, edits: TextEdit[]): string; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/umd/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/umd/main.js" index 2cc726dccd1efef7cea6e65003a3fc158bac17bc..b3c04acb7b9f35fdb25e671660e9d33f7eba8773 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/umd/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/lib/umd/main.js" @@ -1,3 +1,291 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d176787e4972e1842d05b476b3df0857540a28422a28dd62eb3cf9dea601af77 -size 12803 +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + /* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ + 'use strict'; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.TextDocument = void 0; + var FullTextDocument = /** @class */ (function () { + function FullTextDocument(uri, languageId, version, content) { + this._uri = uri; + this._languageId = languageId; + this._version = version; + this._content = content; + this._lineOffsets = undefined; + } + Object.defineProperty(FullTextDocument.prototype, "uri", { + get: function () { + return this._uri; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(FullTextDocument.prototype, "languageId", { + get: function () { + return this._languageId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(FullTextDocument.prototype, "version", { + get: function () { + return this._version; + }, + enumerable: false, + configurable: true + }); + FullTextDocument.prototype.getText = function (range) { + if (range) { + var start = this.offsetAt(range.start); + var end = this.offsetAt(range.end); + return this._content.substring(start, end); + } + return this._content; + }; + FullTextDocument.prototype.update = function (changes, version) { + for (var _i = 0, changes_1 = changes; _i < changes_1.length; _i++) { + var change = changes_1[_i]; + if (FullTextDocument.isIncremental(change)) { + // makes sure start is before end + var range = getWellformedRange(change.range); + // update content + var startOffset = this.offsetAt(range.start); + var endOffset = this.offsetAt(range.end); + this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length); + // update the offsets + var startLine = Math.max(range.start.line, 0); + var endLine = Math.max(range.end.line, 0); + var lineOffsets = this._lineOffsets; + var addedLineOffsets = computeLineOffsets(change.text, false, startOffset); + if (endLine - startLine === addedLineOffsets.length) { + for (var i = 0, len = addedLineOffsets.length; i < len; i++) { + lineOffsets[i + startLine + 1] = addedLineOffsets[i]; + } + } + else { + if (addedLineOffsets.length < 10000) { + lineOffsets.splice.apply(lineOffsets, __spreadArray([startLine + 1, endLine - startLine], addedLineOffsets, false)); + } + else { // avoid too many arguments for splice + this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1)); + } + } + var diff = change.text.length - (endOffset - startOffset); + if (diff !== 0) { + for (var i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) { + lineOffsets[i] = lineOffsets[i] + diff; + } + } + } + else if (FullTextDocument.isFull(change)) { + this._content = change.text; + this._lineOffsets = undefined; + } + else { + throw new Error('Unknown change event received'); + } + } + this._version = version; + }; + FullTextDocument.prototype.getLineOffsets = function () { + if (this._lineOffsets === undefined) { + this._lineOffsets = computeLineOffsets(this._content, true); + } + return this._lineOffsets; + }; + FullTextDocument.prototype.positionAt = function (offset) { + offset = Math.max(Math.min(offset, this._content.length), 0); + var lineOffsets = this.getLineOffsets(); + var low = 0, high = lineOffsets.length; + if (high === 0) { + return { line: 0, character: offset }; + } + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (lineOffsets[mid] > offset) { + high = mid; + } + else { + low = mid + 1; + } + } + // low is the least x for which the line offset is larger than the current offset + // or array.length if no line offset is larger than the current offset + var line = low - 1; + return { line: line, character: offset - lineOffsets[line] }; + }; + FullTextDocument.prototype.offsetAt = function (position) { + var lineOffsets = this.getLineOffsets(); + if (position.line >= lineOffsets.length) { + return this._content.length; + } + else if (position.line < 0) { + return 0; + } + var lineOffset = lineOffsets[position.line]; + var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length; + return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset); + }; + Object.defineProperty(FullTextDocument.prototype, "lineCount", { + get: function () { + return this.getLineOffsets().length; + }, + enumerable: false, + configurable: true + }); + FullTextDocument.isIncremental = function (event) { + var candidate = event; + return candidate !== undefined && candidate !== null && + typeof candidate.text === 'string' && candidate.range !== undefined && + (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number'); + }; + FullTextDocument.isFull = function (event) { + var candidate = event; + return candidate !== undefined && candidate !== null && + typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined; + }; + return FullTextDocument; + }()); + var TextDocument; + (function (TextDocument) { + /** + * Creates a new text document. + * + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param version The document's initial version number. + * @param content The document's content. + */ + function create(uri, languageId, version, content) { + return new FullTextDocument(uri, languageId, version, content); + } + TextDocument.create = create; + /** + * Updates a TextDocument by modifying its content. + * + * @param document the document to update. Only documents created by TextDocument.create are valid inputs. + * @param changes the changes to apply to the document. + * @param version the changes version for the document. + * @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter. + * + */ + function update(document, changes, version) { + if (document instanceof FullTextDocument) { + document.update(changes, version); + return document; + } + else { + throw new Error('TextDocument.update: document must be created by TextDocument.create'); + } + } + TextDocument.update = update; + function applyEdits(document, edits) { + var text = document.getText(); + var sortedEdits = mergeSort(edits.map(getWellformedEdit), function (a, b) { + var diff = a.range.start.line - b.range.start.line; + if (diff === 0) { + return a.range.start.character - b.range.start.character; + } + return diff; + }); + var lastModifiedOffset = 0; + var spans = []; + for (var _i = 0, sortedEdits_1 = sortedEdits; _i < sortedEdits_1.length; _i++) { + var e = sortedEdits_1[_i]; + var startOffset = document.offsetAt(e.range.start); + if (startOffset < lastModifiedOffset) { + throw new Error('Overlapping edit'); + } + else if (startOffset > lastModifiedOffset) { + spans.push(text.substring(lastModifiedOffset, startOffset)); + } + if (e.newText.length) { + spans.push(e.newText); + } + lastModifiedOffset = document.offsetAt(e.range.end); + } + spans.push(text.substr(lastModifiedOffset)); + return spans.join(''); + } + TextDocument.applyEdits = applyEdits; + })(TextDocument || (exports.TextDocument = TextDocument = {})); + function mergeSort(data, compare) { + if (data.length <= 1) { + // sorted + return data; + } + var p = (data.length / 2) | 0; + var left = data.slice(0, p); + var right = data.slice(p); + mergeSort(left, compare); + mergeSort(right, compare); + var leftIdx = 0; + var rightIdx = 0; + var i = 0; + while (leftIdx < left.length && rightIdx < right.length) { + var ret = compare(left[leftIdx], right[rightIdx]); + if (ret <= 0) { + // smaller_equal -> take left to preserve order + data[i++] = left[leftIdx++]; + } + else { + // greater -> take right + data[i++] = right[rightIdx++]; + } + } + while (leftIdx < left.length) { + data[i++] = left[leftIdx++]; + } + while (rightIdx < right.length) { + data[i++] = right[rightIdx++]; + } + return data; + } + function computeLineOffsets(text, isAtLineStart, textOffset) { + if (textOffset === void 0) { textOffset = 0; } + var result = isAtLineStart ? [textOffset] : []; + for (var i = 0; i < text.length; i++) { + var ch = text.charCodeAt(i); + if (ch === 13 /* CharCode.CarriageReturn */ || ch === 10 /* CharCode.LineFeed */) { + if (ch === 13 /* CharCode.CarriageReturn */ && i + 1 < text.length && text.charCodeAt(i + 1) === 10 /* CharCode.LineFeed */) { + i++; + } + result.push(textOffset + i + 1); + } + } + return result; + } + function getWellformedRange(range) { + var start = range.start; + var end = range.end; + if (start.line > end.line || (start.line === end.line && start.character > end.character)) { + return { start: end, end: start }; + } + return range; + } + function getWellformedEdit(textEdit) { + var range = getWellformedRange(textEdit.range); + if (range !== textEdit.range) { + return { newText: textEdit.newText, range: range }; + } + return textEdit; + } +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/package.json" index 02bdcb227854729e417da68e048ff7ff385ece2c..cf7a4ea1bef55d1bc9fa71efb709587705c4ef0d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/package.json" @@ -1,3 +1,38 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f1bbd5741405601fce4382bdb2350e950ec4bc54b10d15a2933ca020ef78185e -size 1488 +{ + "name": "vscode-languageserver-textdocument", + "description": "A simple text document implementation for Node LSP servers", + "version": "1.0.11", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-languageserver-node.git", + "directory": "textDocument" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "main": "./lib/umd/main.js", + "typings": "./lib/umd/main", + "exports": { + ".": { + "browser": "./lib/esm/main.js", + "import": "./lib/esm/main.js", + "default": "./lib/umd/main.js" + } + }, + "scripts": { + "prepublishOnly": "echo \"⛔ Can only publish from a secure pipeline ⛔\" && node ../build/npm/fail", + "prepack": "npm run all:publish", + "compile": "node ../build/bin/tsc -b ./tsconfig.json", + "clean": "node ../node_modules/.bin/rimraf lib", + "watch": "node ../build/bin/tsc -b ./tsconfig.watch.json -w", + "lint": "node ../node_modules/eslint/bin/eslint.js --ext ts src", + "test": "node ../node_modules/mocha/bin/_mocha", + "all": "npm run clean && npm run compile && npm run lint && npm run test", + "compile:esm": "node ../build/bin/tsc -b ./tsconfig.esm.publish.json && node ../build/bin/fix-esm", + "compile:umd": "node ../build/bin/tsc -b ./tsconfig.umd.publish.json", + "all:publish": "git clean -xfd . && npm install && npm run compile:esm && npm run compile:umd && npm run lint && npm run test", + "preversion": "npm test" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/thirdpartynotices.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/thirdpartynotices.txt" index 2d95e953bff42d0943832bbb3cbac2bfdfd91a1e..0592beef14f651f468c39777ce98ebc523ec4a43 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/thirdpartynotices.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-textdocument/thirdpartynotices.txt" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a89123562fe364dc8e969e85614eb6c1f8452afe131d6e42bd1314bb2d092b04 -size 623 +NOTICES AND INFORMATION +Do Not Translate or Localize + +This software incorporates material from third parties. +Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com, +or you may send a check or money order for US $5.00, including the product name, +the open source component name, platform, and version number, to: + +Source Code Compliance Team +Microsoft Corporation +One Microsoft Way +Redmond, WA 98052 +USA + +Notwithstanding any other terms, you may reverse engineer this software to the extent +required to debug changes to any libraries licensed under the GNU Lesser General Public License. \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/License.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/License.txt" index 71c73d0cbbb244fd8977b1334dae3ac9800e0c19..a07e3ae825f86b6d1f966659954bffc0768bef66 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/License.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/License.txt" @@ -1,3 +1,11 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec9ee83580841e8eb687aca9867f221503809ba6426c7f876ede17d91b9fcfd0 -size 1095 +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/README.md" index 9f70bbcc45463bc7e2445f4267ccf708f8cbcbe6..d47c6d873bb025765df353d1b7f5a40c3efd8ac3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/README.md" @@ -1,3 +1,17 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:53b5e27821b28f8b28f6f13f72d31bfb54793b8ba14bc9d039f1d537d5073043 -size 1023 +# VSCode Language Server Types + +[![NPM Version](https://img.shields.io/npm/v/vscode-languageserver-types.svg)](https://npmjs.org/package/vscode-languageserver-types) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-languageserver-types.svg)](https://npmjs.org/package/vscode-languageserver-types) +[![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-types-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-types-node) + +Npm module containing the types used by the VSCode language client and [Node.js](https://nodejs.org/) language server + +Click [here](https://code.visualstudio.com/docs/extensions/example-language-server) for a detailed document on how +to implement language servers for [VSCode](https://code.visualstudio.com/). + +## History + +For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md) + +## License +[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt) diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/esm/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/esm/main.d.ts" index 93b1fe16fffb20b3500c9da8ec9aed5979f51c7c..f7dac8af49502e8b2ca27a505178d3d1bc460f12 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/esm/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/esm/main.d.ts" @@ -1,3 +1,3139 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2e900e22ef301dafb3a35df7aaab4f139bf1602c8e5dc0bb0ca8b24305af388e -size 100569 +/** + * A tagging type for string properties that are actually document URIs. + */ +export type DocumentUri = string; +export declare namespace DocumentUri { + function is(value: any): value is DocumentUri; +} +/** + * A tagging type for string properties that are actually URIs + * + * @since 3.16.0 + */ +export type URI = string; +export declare namespace URI { + function is(value: any): value is URI; +} +/** + * Defines an integer in the range of -2^31 to 2^31 - 1. + */ +export type integer = number; +export declare namespace integer { + const MIN_VALUE = -2147483648; + const MAX_VALUE = 2147483647; + function is(value: any): value is integer; +} +/** + * Defines an unsigned integer in the range of 0 to 2^31 - 1. + */ +export type uinteger = number; +export declare namespace uinteger { + const MIN_VALUE = 0; + const MAX_VALUE = 2147483647; + function is(value: any): value is uinteger; +} +/** + * Defines a decimal number. Since decimal numbers are very + * rare in the language server specification we denote the + * exact range with every decimal using the mathematics + * interval notations (e.g. [0, 1] denotes all decimals d with + * 0 <= d <= 1. + */ +export type decimal = number; +/** + * The LSP any type. + * + * In the current implementation we map LSPAny to any. This is due to the fact + * that the TypeScript compilers can't infer string access signatures for + * interface correctly (it can though for types). See the following issue for + * details: https://github.com/microsoft/TypeScript/issues/15300. + * + * When the issue is addressed LSPAny can be defined as follows: + * + * ```ts + * export type LSPAny = LSPObject | LSPArray | string | integer | uinteger | decimal | boolean | null | undefined; + * export type LSPObject = { [key: string]: LSPAny }; + * export type LSPArray = LSPAny[]; + * ``` + * + * Please note that strictly speaking a property with the value `undefined` + * can't be converted into JSON preserving the property name. However for + * convenience it is allowed and assumed that all these properties are + * optional as well. + * + * @since 3.17.0 + */ +export type LSPAny = any; +export type LSPObject = object; +export type LSPArray = any[]; +/** + * Position in a text document expressed as zero-based line and character + * offset. Prior to 3.17 the offsets were always based on a UTF-16 string + * representation. So a string of the form `a𐐀b` the character offset of the + * character `a` is 0, the character offset of `𐐀` is 1 and the character + * offset of b is 3 since `𐐀` is represented using two code units in UTF-16. + * Since 3.17 clients and servers can agree on a different string encoding + * representation (e.g. UTF-8). The client announces it's supported encoding + * via the client capability [`general.positionEncodings`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#clientCapabilities). + * The value is an array of position encodings the client supports, with + * decreasing preference (e.g. the encoding at index `0` is the most preferred + * one). To stay backwards compatible the only mandatory encoding is UTF-16 + * represented via the string `utf-16`. The server can pick one of the + * encodings offered by the client and signals that encoding back to the + * client via the initialize result's property + * [`capabilities.positionEncoding`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#serverCapabilities). If the string value + * `utf-16` is missing from the client's capability `general.positionEncodings` + * servers can safely assume that the client supports UTF-16. If the server + * omits the position encoding in its initialize result the encoding defaults + * to the string value `utf-16`. Implementation considerations: since the + * conversion from one encoding into another requires the content of the + * file / line the conversion is best done where the file is read which is + * usually on the server side. + * + * Positions are line end character agnostic. So you can not specify a position + * that denotes `\r|\n` or `\n|` where `|` represents the character offset. + * + * @since 3.17.0 - support for negotiated position encoding. + */ +export interface Position { + /** + * Line position in a document (zero-based). + * + * If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document. + * If a line number is negative, it defaults to 0. + */ + line: uinteger; + /** + * Character offset on a line in a document (zero-based). + * + * The meaning of this offset is determined by the negotiated + * `PositionEncodingKind`. + * + * If the character value is greater than the line length it defaults back to the + * line length. + */ + character: uinteger; +} +/** + * The Position namespace provides helper functions to work with + * {@link Position} literals. + */ +export declare namespace Position { + /** + * Creates a new Position literal from the given line and character. + * @param line The position's line. + * @param character The position's character. + */ + function create(line: uinteger, character: uinteger): Position; + /** + * Checks whether the given literal conforms to the {@link Position} interface. + */ + function is(value: any): value is Position; +} +/** + * A range in a text document expressed as (zero-based) start and end positions. + * + * If you want to specify a range that contains a line including the line ending + * character(s) then use an end position denoting the start of the next line. + * For example: + * ```ts + * { + * start: { line: 5, character: 23 } + * end : { line 6, character : 0 } + * } + * ``` + */ +export interface Range { + /** + * The range's start position. + */ + start: Position; + /** + * The range's end position. + */ + end: Position; +} +/** + * The Range namespace provides helper functions to work with + * {@link Range} literals. + */ +export declare namespace Range { + /** + * Create a new Range literal. + * @param start The range's start position. + * @param end The range's end position. + */ + function create(start: Position, end: Position): Range; + /** + * Create a new Range literal. + * @param startLine The start line number. + * @param startCharacter The start character. + * @param endLine The end line number. + * @param endCharacter The end character. + */ + function create(startLine: uinteger, startCharacter: uinteger, endLine: uinteger, endCharacter: uinteger): Range; + /** + * Checks whether the given literal conforms to the {@link Range} interface. + */ + function is(value: any): value is Range; +} +/** + * Represents a location inside a resource, such as a line + * inside a text file. + */ +export interface Location { + uri: DocumentUri; + range: Range; +} +/** + * The Location namespace provides helper functions to work with + * {@link Location} literals. + */ +export declare namespace Location { + /** + * Creates a Location literal. + * @param uri The location's uri. + * @param range The location's range. + */ + function create(uri: DocumentUri, range: Range): Location; + /** + * Checks whether the given literal conforms to the {@link Location} interface. + */ + function is(value: any): value is Location; +} +/** + * Represents the connection of two locations. Provides additional metadata over normal {@link Location locations}, + * including an origin range. + */ +export interface LocationLink { + /** + * Span of the origin of this link. + * + * Used as the underlined span for mouse interaction. Defaults to the word range at + * the definition position. + */ + originSelectionRange?: Range; + /** + * The target resource identifier of this link. + */ + targetUri: DocumentUri; + /** + * The full target range of this link. If the target for example is a symbol then target range is the + * range enclosing this symbol not including leading/trailing whitespace but everything else + * like comments. This information is typically used to highlight the range in the editor. + */ + targetRange: Range; + /** + * The range that should be selected and revealed when this link is being followed, e.g the name of a function. + * Must be contained by the `targetRange`. See also `DocumentSymbol#range` + */ + targetSelectionRange: Range; +} +/** + * The LocationLink namespace provides helper functions to work with + * {@link LocationLink} literals. + */ +export declare namespace LocationLink { + /** + * Creates a LocationLink literal. + * @param targetUri The definition's uri. + * @param targetRange The full range of the definition. + * @param targetSelectionRange The span of the symbol definition at the target. + * @param originSelectionRange The span of the symbol being defined in the originating source file. + */ + function create(targetUri: DocumentUri, targetRange: Range, targetSelectionRange: Range, originSelectionRange?: Range): LocationLink; + /** + * Checks whether the given literal conforms to the {@link LocationLink} interface. + */ + function is(value: any): value is LocationLink; +} +/** + * Represents a color in RGBA space. + */ +export interface Color { + /** + * The red component of this color in the range [0-1]. + */ + readonly red: decimal; + /** + * The green component of this color in the range [0-1]. + */ + readonly green: decimal; + /** + * The blue component of this color in the range [0-1]. + */ + readonly blue: decimal; + /** + * The alpha component of this color in the range [0-1]. + */ + readonly alpha: decimal; +} +/** + * The Color namespace provides helper functions to work with + * {@link Color} literals. + */ +export declare namespace Color { + /** + * Creates a new Color literal. + */ + function create(red: decimal, green: decimal, blue: decimal, alpha: decimal): Color; + /** + * Checks whether the given literal conforms to the {@link Color} interface. + */ + function is(value: any): value is Color; +} +/** + * Represents a color range from a document. + */ +export interface ColorInformation { + /** + * The range in the document where this color appears. + */ + range: Range; + /** + * The actual color value for this color range. + */ + color: Color; +} +/** + * The ColorInformation namespace provides helper functions to work with + * {@link ColorInformation} literals. + */ +export declare namespace ColorInformation { + /** + * Creates a new ColorInformation literal. + */ + function create(range: Range, color: Color): ColorInformation; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value: any): value is ColorInformation; +} +export interface ColorPresentation { + /** + * The label of this color presentation. It will be shown on the color + * picker header. By default this is also the text that is inserted when selecting + * this color presentation. + */ + label: string; + /** + * An {@link TextEdit edit} which is applied to a document when selecting + * this presentation for the color. When `falsy` the {@link ColorPresentation.label label} + * is used. + */ + textEdit?: TextEdit; + /** + * An optional array of additional {@link TextEdit text edits} that are applied when + * selecting this color presentation. Edits must not overlap with the main {@link ColorPresentation.textEdit edit} nor with themselves. + */ + additionalTextEdits?: TextEdit[]; +} +/** + * The Color namespace provides helper functions to work with + * {@link ColorPresentation} literals. + */ +export declare namespace ColorPresentation { + /** + * Creates a new ColorInformation literal. + */ + function create(label: string, textEdit?: TextEdit, additionalTextEdits?: TextEdit[]): ColorPresentation; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value: any): value is ColorPresentation; +} +/** + * A set of predefined range kinds. + */ +export declare namespace FoldingRangeKind { + /** + * Folding range for a comment + */ + const Comment = "comment"; + /** + * Folding range for an import or include + */ + const Imports = "imports"; + /** + * Folding range for a region (e.g. `#region`) + */ + const Region = "region"; +} +/** + * A predefined folding range kind. + * + * The type is a string since the value set is extensible + */ +export type FoldingRangeKind = string; +/** + * Represents a folding range. To be valid, start and end line must be bigger than zero and smaller + * than the number of lines in the document. Clients are free to ignore invalid ranges. + */ +export interface FoldingRange { + /** + * The zero-based start line of the range to fold. The folded area starts after the line's last character. + * To be valid, the end must be zero or larger and smaller than the number of lines in the document. + */ + startLine: uinteger; + /** + * The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line. + */ + startCharacter?: uinteger; + /** + * The zero-based end line of the range to fold. The folded area ends with the line's last character. + * To be valid, the end must be zero or larger and smaller than the number of lines in the document. + */ + endLine: uinteger; + /** + * The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line. + */ + endCharacter?: uinteger; + /** + * Describes the kind of the folding range such as `comment' or 'region'. The kind + * is used to categorize folding ranges and used by commands like 'Fold all comments'. + * See {@link FoldingRangeKind} for an enumeration of standardized kinds. + */ + kind?: FoldingRangeKind; + /** + * The text that the client should show when the specified range is + * collapsed. If not defined or not supported by the client, a default + * will be chosen by the client. + * + * @since 3.17.0 + */ + collapsedText?: string; +} +/** + * The folding range namespace provides helper functions to work with + * {@link FoldingRange} literals. + */ +export declare namespace FoldingRange { + /** + * Creates a new FoldingRange literal. + */ + function create(startLine: uinteger, endLine: uinteger, startCharacter?: uinteger, endCharacter?: uinteger, kind?: FoldingRangeKind, collapsedText?: string): FoldingRange; + /** + * Checks whether the given literal conforms to the {@link FoldingRange} interface. + */ + function is(value: any): value is FoldingRange; +} +/** + * Represents a related message and source code location for a diagnostic. This should be + * used to point to code locations that cause or related to a diagnostics, e.g when duplicating + * a symbol in a scope. + */ +export interface DiagnosticRelatedInformation { + /** + * The location of this related diagnostic information. + */ + location: Location; + /** + * The message of this related diagnostic information. + */ + message: string; +} +/** + * The DiagnosticRelatedInformation namespace provides helper functions to work with + * {@link DiagnosticRelatedInformation} literals. + */ +export declare namespace DiagnosticRelatedInformation { + /** + * Creates a new DiagnosticRelatedInformation literal. + */ + function create(location: Location, message: string): DiagnosticRelatedInformation; + /** + * Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface. + */ + function is(value: any): value is DiagnosticRelatedInformation; +} +/** + * The diagnostic's severity. + */ +export declare namespace DiagnosticSeverity { + /** + * Reports an error. + */ + const Error: 1; + /** + * Reports a warning. + */ + const Warning: 2; + /** + * Reports an information. + */ + const Information: 3; + /** + * Reports a hint. + */ + const Hint: 4; +} +export type DiagnosticSeverity = 1 | 2 | 3 | 4; +/** + * The diagnostic tags. + * + * @since 3.15.0 + */ +export declare namespace DiagnosticTag { + /** + * Unused or unnecessary code. + * + * Clients are allowed to render diagnostics with this tag faded out instead of having + * an error squiggle. + */ + const Unnecessary: 1; + /** + * Deprecated or obsolete code. + * + * Clients are allowed to rendered diagnostics with this tag strike through. + */ + const Deprecated: 2; +} +export type DiagnosticTag = 1 | 2; +/** + * Structure to capture a description for an error code. + * + * @since 3.16.0 + */ +export interface CodeDescription { + /** + * An URI to open with more information about the diagnostic error. + */ + href: URI; +} +/** + * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes. + * + * @since 3.16.0 + */ +export declare namespace CodeDescription { + function is(value: any): value is CodeDescription; +} +/** + * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects + * are only valid in the scope of a resource. + */ +export interface Diagnostic { + /** + * The range at which the message applies + */ + range: Range; + /** + * The diagnostic's severity. Can be omitted. If omitted it is up to the + * client to interpret diagnostics as error, warning, info or hint. + */ + severity?: DiagnosticSeverity; + /** + * The diagnostic's code, which usually appear in the user interface. + */ + code?: integer | string; + /** + * An optional property to describe the error code. + * Requires the code field (above) to be present/not null. + * + * @since 3.16.0 + */ + codeDescription?: CodeDescription; + /** + * A human-readable string describing the source of this + * diagnostic, e.g. 'typescript' or 'super lint'. It usually + * appears in the user interface. + */ + source?: string; + /** + * The diagnostic's message. It usually appears in the user interface + */ + message: string; + /** + * Additional metadata about the diagnostic. + * + * @since 3.15.0 + */ + tags?: DiagnosticTag[]; + /** + * An array of related diagnostic information, e.g. when symbol-names within + * a scope collide all definitions can be marked via this property. + */ + relatedInformation?: DiagnosticRelatedInformation[]; + /** + * A data entry field that is preserved between a `textDocument/publishDiagnostics` + * notification and `textDocument/codeAction` request. + * + * @since 3.16.0 + */ + data?: LSPAny; +} +/** + * The Diagnostic namespace provides helper functions to work with + * {@link Diagnostic} literals. + */ +export declare namespace Diagnostic { + /** + * Creates a new Diagnostic literal. + */ + function create(range: Range, message: string, severity?: DiagnosticSeverity, code?: integer | string, source?: string, relatedInformation?: DiagnosticRelatedInformation[]): Diagnostic; + /** + * Checks whether the given literal conforms to the {@link Diagnostic} interface. + */ + function is(value: any): value is Diagnostic; +} +/** + * Represents a reference to a command. Provides a title which + * will be used to represent a command in the UI and, optionally, + * an array of arguments which will be passed to the command handler + * function when invoked. + */ +export interface Command { + /** + * Title of the command, like `save`. + */ + title: string; + /** + * The identifier of the actual command handler. + */ + command: string; + /** + * Arguments that the command handler should be + * invoked with. + */ + arguments?: LSPAny[]; +} +/** + * The Command namespace provides helper functions to work with + * {@link Command} literals. + */ +export declare namespace Command { + /** + * Creates a new Command literal. + */ + function create(title: string, command: string, ...args: any[]): Command; + /** + * Checks whether the given literal conforms to the {@link Command} interface. + */ + function is(value: any): value is Command; +} +/** + * A text edit applicable to a text document. + */ +export interface TextEdit { + /** + * The range of the text document to be manipulated. To insert + * text into a document create a range where start === end. + */ + range: Range; + /** + * The string to be inserted. For delete operations use an + * empty string. + */ + newText: string; +} +/** + * The TextEdit namespace provides helper function to create replace, + * insert and delete edits more easily. + */ +export declare namespace TextEdit { + /** + * Creates a replace text edit. + * @param range The range of text to be replaced. + * @param newText The new text. + */ + function replace(range: Range, newText: string): TextEdit; + /** + * Creates an insert text edit. + * @param position The position to insert the text at. + * @param newText The text to be inserted. + */ + function insert(position: Position, newText: string): TextEdit; + /** + * Creates a delete text edit. + * @param range The range of text to be deleted. + */ + function del(range: Range): TextEdit; + function is(value: any): value is TextEdit; +} +/** + * Additional information that describes document changes. + * + * @since 3.16.0 + */ +export interface ChangeAnnotation { + /** + * A human-readable string describing the actual change. The string + * is rendered prominent in the user interface. + */ + label: string; + /** + * A flag which indicates that user confirmation is needed + * before applying the change. + */ + needsConfirmation?: boolean; + /** + * A human-readable string which is rendered less prominent in + * the user interface. + */ + description?: string; +} +export declare namespace ChangeAnnotation { + function create(label: string, needsConfirmation?: boolean, description?: string): ChangeAnnotation; + function is(value: any): value is ChangeAnnotation; +} +export declare namespace ChangeAnnotationIdentifier { + function is(value: any): value is ChangeAnnotationIdentifier; +} +/** + * An identifier to refer to a change annotation stored with a workspace edit. + */ +export type ChangeAnnotationIdentifier = string; +/** + * A special text edit with an additional change annotation. + * + * @since 3.16.0. + */ +export interface AnnotatedTextEdit extends TextEdit { + /** + * The actual identifier of the change annotation + */ + annotationId: ChangeAnnotationIdentifier; +} +export declare namespace AnnotatedTextEdit { + /** + * Creates an annotated replace text edit. + * + * @param range The range of text to be replaced. + * @param newText The new text. + * @param annotation The annotation. + */ + function replace(range: Range, newText: string, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + /** + * Creates an annotated insert text edit. + * + * @param position The position to insert the text at. + * @param newText The text to be inserted. + * @param annotation The annotation. + */ + function insert(position: Position, newText: string, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + /** + * Creates an annotated delete text edit. + * + * @param range The range of text to be deleted. + * @param annotation The annotation. + */ + function del(range: Range, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + function is(value: any): value is AnnotatedTextEdit; +} +/** + * Describes textual changes on a text document. A TextDocumentEdit describes all changes + * on a document version Si and after they are applied move the document to version Si+1. + * So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any + * kind of ordering. However the edits must be non overlapping. + */ +export interface TextDocumentEdit { + /** + * The text document to change. + */ + textDocument: OptionalVersionedTextDocumentIdentifier; + /** + * The edits to be applied. + * + * @since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a + * client capability. + */ + edits: (TextEdit | AnnotatedTextEdit)[]; +} +/** + * The TextDocumentEdit namespace provides helper function to create + * an edit that manipulates a text document. + */ +export declare namespace TextDocumentEdit { + /** + * Creates a new `TextDocumentEdit` + */ + function create(textDocument: OptionalVersionedTextDocumentIdentifier, edits: (TextEdit | AnnotatedTextEdit)[]): TextDocumentEdit; + function is(value: any): value is TextDocumentEdit; +} +/** + * A generic resource operation. + */ +interface ResourceOperation { + /** + * The resource operation kind. + */ + kind: string; + /** + * An optional annotation identifier describing the operation. + * + * @since 3.16.0 + */ + annotationId?: ChangeAnnotationIdentifier; +} +/** + * Options to create a file. + */ +export interface CreateFileOptions { + /** + * Overwrite existing file. Overwrite wins over `ignoreIfExists` + */ + overwrite?: boolean; + /** + * Ignore if exists. + */ + ignoreIfExists?: boolean; +} +/** + * Create file operation. + */ +export interface CreateFile extends ResourceOperation { + /** + * A create + */ + kind: 'create'; + /** + * The resource to create. + */ + uri: DocumentUri; + /** + * Additional options + */ + options?: CreateFileOptions; +} +export declare namespace CreateFile { + function create(uri: DocumentUri, options?: CreateFileOptions, annotation?: ChangeAnnotationIdentifier): CreateFile; + function is(value: any): value is CreateFile; +} +/** + * Rename file options + */ +export interface RenameFileOptions { + /** + * Overwrite target if existing. Overwrite wins over `ignoreIfExists` + */ + overwrite?: boolean; + /** + * Ignores if target exists. + */ + ignoreIfExists?: boolean; +} +/** + * Rename file operation + */ +export interface RenameFile extends ResourceOperation { + /** + * A rename + */ + kind: 'rename'; + /** + * The old (existing) location. + */ + oldUri: DocumentUri; + /** + * The new location. + */ + newUri: DocumentUri; + /** + * Rename options. + */ + options?: RenameFileOptions; +} +export declare namespace RenameFile { + function create(oldUri: DocumentUri, newUri: DocumentUri, options?: RenameFileOptions, annotation?: ChangeAnnotationIdentifier): RenameFile; + function is(value: any): value is RenameFile; +} +/** + * Delete file options + */ +export interface DeleteFileOptions { + /** + * Delete the content recursively if a folder is denoted. + */ + recursive?: boolean; + /** + * Ignore the operation if the file doesn't exist. + */ + ignoreIfNotExists?: boolean; +} +/** + * Delete file operation + */ +export interface DeleteFile extends ResourceOperation { + /** + * A delete + */ + kind: 'delete'; + /** + * The file to delete. + */ + uri: DocumentUri; + /** + * Delete options. + */ + options?: DeleteFileOptions; +} +export declare namespace DeleteFile { + function create(uri: DocumentUri, options?: DeleteFileOptions, annotation?: ChangeAnnotationIdentifier): DeleteFile; + function is(value: any): value is DeleteFile; +} +/** + * A workspace edit represents changes to many resources managed in the workspace. The edit + * should either provide `changes` or `documentChanges`. If documentChanges are present + * they are preferred over `changes` if the client can handle versioned document edits. + * + * Since version 3.13.0 a workspace edit can contain resource operations as well. If resource + * operations are present clients need to execute the operations in the order in which they + * are provided. So a workspace edit for example can consist of the following two changes: + * (1) a create file a.txt and (2) a text document edit which insert text into file a.txt. + * + * An invalid sequence (e.g. (1) delete file a.txt and (2) insert text into file a.txt) will + * cause failure of the operation. How the client recovers from the failure is described by + * the client capability: `workspace.workspaceEdit.failureHandling` + */ +export interface WorkspaceEdit { + /** + * Holds changes to existing resources. + */ + changes?: { + [uri: DocumentUri]: TextEdit[]; + }; + /** + * Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes + * are either an array of `TextDocumentEdit`s to express changes to n different text documents + * where each text document edit addresses a specific version of a text document. Or it can contain + * above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations. + * + * Whether a client supports versioned document edits is expressed via + * `workspace.workspaceEdit.documentChanges` client capability. + * + * If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then + * only plain `TextEdit`s using the `changes` property are supported. + */ + documentChanges?: (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[]; + /** + * A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and + * delete file / folder operations. + * + * Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`. + * + * @since 3.16.0 + */ + changeAnnotations?: { + [id: ChangeAnnotationIdentifier]: ChangeAnnotation; + }; +} +export declare namespace WorkspaceEdit { + function is(value: any): value is WorkspaceEdit; +} +/** + * A change to capture text edits for existing resources. + */ +export interface TextEditChange { + /** + * Gets all text edits for this change. + * + * @return An array of text edits. + * + * @since 3.16.0 - support for annotated text edits. This is usually + * guarded using a client capability. + */ + all(): (TextEdit | AnnotatedTextEdit)[]; + /** + * Clears the edits for this change. + */ + clear(): void; + /** + * Adds a text edit. + * + * @param edit the text edit to add. + * + * @since 3.16.0 - support for annotated text edits. This is usually + * guarded using a client capability. + */ + add(edit: TextEdit | AnnotatedTextEdit): void; + /** + * Insert the given text at the given position. + * + * @param position A position. + * @param newText A string. + * @param annotation An optional annotation. + */ + insert(position: Position, newText: string): void; + insert(position: Position, newText: string, annotation: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; + /** + * Replace the given range with given text for the given resource. + * + * @param range A range. + * @param newText A string. + * @param annotation An optional annotation. + */ + replace(range: Range, newText: string): void; + replace(range: Range, newText: string, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; + /** + * Delete the text at the given range. + * + * @param range A range. + * @param annotation An optional annotation. + */ + delete(range: Range): void; + delete(range: Range, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; +} +/** + * A workspace change helps constructing changes to a workspace. + */ +export declare class WorkspaceChange { + private _workspaceEdit; + private _textEditChanges; + private _changeAnnotations; + constructor(workspaceEdit?: WorkspaceEdit); + /** + * Returns the underlying {@link WorkspaceEdit} literal + * use to be returned from a workspace edit operation like rename. + */ + get edit(): WorkspaceEdit; + /** + * Returns the {@link TextEditChange} to manage text edits + * for resources. + */ + getTextEditChange(textDocument: OptionalVersionedTextDocumentIdentifier): TextEditChange; + getTextEditChange(uri: DocumentUri): TextEditChange; + private initDocumentChanges; + private initChanges; + createFile(uri: DocumentUri, options?: CreateFileOptions): void; + createFile(uri: DocumentUri, annotation: ChangeAnnotation | ChangeAnnotationIdentifier, options?: CreateFileOptions): ChangeAnnotationIdentifier; + renameFile(oldUri: DocumentUri, newUri: DocumentUri, options?: RenameFileOptions): void; + renameFile(oldUri: DocumentUri, newUri: DocumentUri, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier, options?: RenameFileOptions): ChangeAnnotationIdentifier; + deleteFile(uri: DocumentUri, options?: DeleteFileOptions): void; + deleteFile(uri: DocumentUri, annotation: ChangeAnnotation | ChangeAnnotationIdentifier, options?: DeleteFileOptions): ChangeAnnotationIdentifier; +} +/** + * A literal to identify a text document in the client. + */ +export interface TextDocumentIdentifier { + /** + * The text document's uri. + */ + uri: DocumentUri; +} +/** + * The TextDocumentIdentifier namespace provides helper functions to work with + * {@link TextDocumentIdentifier} literals. + */ +export declare namespace TextDocumentIdentifier { + /** + * Creates a new TextDocumentIdentifier literal. + * @param uri The document's uri. + */ + function create(uri: DocumentUri): TextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface. + */ + function is(value: any): value is TextDocumentIdentifier; +} +/** + * A text document identifier to denote a specific version of a text document. + */ +export interface VersionedTextDocumentIdentifier extends TextDocumentIdentifier { + /** + * The version number of this document. + */ + version: integer; +} +/** + * The VersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link VersionedTextDocumentIdentifier} literals. + */ +export declare namespace VersionedTextDocumentIdentifier { + /** + * Creates a new VersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri: DocumentUri, version: integer): VersionedTextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface. + */ + function is(value: any): value is VersionedTextDocumentIdentifier; +} +/** + * A text document identifier to optionally denote a specific version of a text document. + */ +export interface OptionalVersionedTextDocumentIdentifier extends TextDocumentIdentifier { + /** + * The version number of this document. If a versioned text document identifier + * is sent from the server to the client and the file is not open in the editor + * (the server has not received an open notification before) the server can send + * `null` to indicate that the version is unknown and the content on disk is the + * truth (as specified with document content ownership). + */ + version: integer | null; +} +/** + * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link OptionalVersionedTextDocumentIdentifier} literals. + */ +export declare namespace OptionalVersionedTextDocumentIdentifier { + /** + * Creates a new OptionalVersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri: DocumentUri, version: integer | null): OptionalVersionedTextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface. + */ + function is(value: any): value is OptionalVersionedTextDocumentIdentifier; +} +/** + * An item to transfer a text document from the client to the + * server. + */ +export interface TextDocumentItem { + /** + * The text document's uri. + */ + uri: DocumentUri; + /** + * The text document's language identifier. + */ + languageId: string; + /** + * The version number of this document (it will increase after each + * change, including undo/redo). + */ + version: integer; + /** + * The content of the opened text document. + */ + text: string; +} +/** + * The TextDocumentItem namespace provides helper functions to work with + * {@link TextDocumentItem} literals. + */ +export declare namespace TextDocumentItem { + /** + * Creates a new TextDocumentItem literal. + * @param uri The document's uri. + * @param languageId The document's language identifier. + * @param version The document's version number. + * @param text The document's text. + */ + function create(uri: DocumentUri, languageId: string, version: integer, text: string): TextDocumentItem; + /** + * Checks whether the given literal conforms to the {@link TextDocumentItem} interface. + */ + function is(value: any): value is TextDocumentItem; +} +/** + * Describes the content type that a client supports in various + * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. + * + * Please note that `MarkupKinds` must not start with a `$`. This kinds + * are reserved for internal usage. + */ +export declare namespace MarkupKind { + /** + * Plain text is supported as a content format + */ + const PlainText: 'plaintext'; + /** + * Markdown is supported as a content format + */ + const Markdown: 'markdown'; + /** + * Checks whether the given value is a value of the {@link MarkupKind} type. + */ + function is(value: any): value is MarkupKind; +} +export type MarkupKind = 'plaintext' | 'markdown'; +/** + * A `MarkupContent` literal represents a string value which content is interpreted base on its + * kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds. + * + * If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues. + * See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting + * + * Here is an example how such a string can be constructed using JavaScript / TypeScript: + * ```ts + * let markdown: MarkdownContent = { + * kind: MarkupKind.Markdown, + * value: [ + * '# Header', + * 'Some text', + * '```typescript', + * 'someCode();', + * '```' + * ].join('\n') + * }; + * ``` + * + * *Please Note* that clients might sanitize the return markdown. A client could decide to + * remove HTML from the markdown to avoid script execution. + */ +export interface MarkupContent { + /** + * The type of the Markup + */ + kind: MarkupKind; + /** + * The content itself + */ + value: string; +} +export declare namespace MarkupContent { + /** + * Checks whether the given value conforms to the {@link MarkupContent} interface. + */ + function is(value: any): value is MarkupContent; +} +/** + * The kind of a completion entry. + */ +export declare namespace CompletionItemKind { + const Text: 1; + const Method: 2; + const Function: 3; + const Constructor: 4; + const Field: 5; + const Variable: 6; + const Class: 7; + const Interface: 8; + const Module: 9; + const Property: 10; + const Unit: 11; + const Value: 12; + const Enum: 13; + const Keyword: 14; + const Snippet: 15; + const Color: 16; + const File: 17; + const Reference: 18; + const Folder: 19; + const EnumMember: 20; + const Constant: 21; + const Struct: 22; + const Event: 23; + const Operator: 24; + const TypeParameter: 25; +} +export type CompletionItemKind = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25; +/** + * Defines whether the insert text in a completion item should be interpreted as + * plain text or a snippet. + */ +export declare namespace InsertTextFormat { + /** + * The primary text to be inserted is treated as a plain string. + */ + const PlainText: 1; + /** + * The primary text to be inserted is treated as a snippet. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Placeholders with equal identifiers are linked, + * that is typing in one will update others too. + * + * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax + */ + const Snippet: 2; +} +export type InsertTextFormat = 1 | 2; +/** + * Completion item tags are extra annotations that tweak the rendering of a completion + * item. + * + * @since 3.15.0 + */ +export declare namespace CompletionItemTag { + /** + * Render a completion as obsolete, usually using a strike-out. + */ + const Deprecated = 1; +} +export type CompletionItemTag = 1; +/** + * A special text edit to provide an insert and a replace operation. + * + * @since 3.16.0 + */ +export interface InsertReplaceEdit { + /** + * The string to be inserted. + */ + newText: string; + /** + * The range if the insert is requested + */ + insert: Range; + /** + * The range if the replace is requested. + */ + replace: Range; +} +/** + * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits. + * + * @since 3.16.0 + */ +export declare namespace InsertReplaceEdit { + /** + * Creates a new insert / replace edit + */ + function create(newText: string, insert: Range, replace: Range): InsertReplaceEdit; + /** + * Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface. + */ + function is(value: TextEdit | InsertReplaceEdit): value is InsertReplaceEdit; +} +/** + * How whitespace and indentation is handled during completion + * item insertion. + * + * @since 3.16.0 + */ +export declare namespace InsertTextMode { + /** + * The insertion or replace strings is taken as it is. If the + * value is multi line the lines below the cursor will be + * inserted using the indentation defined in the string value. + * The client will not apply any kind of adjustments to the + * string. + */ + const asIs: 1; + /** + * The editor adjusts leading whitespace of new lines so that + * they match the indentation up to the cursor of the line for + * which the item is accepted. + * + * Consider a line like this: <2tabs><3tabs>foo. Accepting a + * multi line completion item is indented using 2 tabs and all + * following lines inserted will be indented using 2 tabs as well. + */ + const adjustIndentation: 2; +} +export type InsertTextMode = 1 | 2; +/** + * Additional details for a completion item label. + * + * @since 3.17.0 + */ +export interface CompletionItemLabelDetails { + /** + * An optional string which is rendered less prominently directly after {@link CompletionItem.label label}, + * without any spacing. Should be used for function signatures and type annotations. + */ + detail?: string; + /** + * An optional string which is rendered less prominently after {@link CompletionItem.detail}. Should be used + * for fully qualified names and file paths. + */ + description?: string; +} +export declare namespace CompletionItemLabelDetails { + function is(value: any): value is CompletionItemLabelDetails; +} +/** + * A completion item represents a text snippet that is + * proposed to complete text that is being typed. + */ +export interface CompletionItem { + /** + * The label of this completion item. + * + * The label property is also by default the text that + * is inserted when selecting this completion. + * + * If label details are provided the label itself should + * be an unqualified name of the completion item. + */ + label: string; + /** + * Additional details for the label + * + * @since 3.17.0 + */ + labelDetails?: CompletionItemLabelDetails; + /** + * The kind of this completion item. Based of the kind + * an icon is chosen by the editor. + */ + kind?: CompletionItemKind; + /** + * Tags for this completion item. + * + * @since 3.15.0 + */ + tags?: CompletionItemTag[]; + /** + * A human-readable string with additional information + * about this item, like type or symbol information. + */ + detail?: string; + /** + * A human-readable string that represents a doc-comment. + */ + documentation?: string | MarkupContent; + /** + * Indicates if this item is deprecated. + * @deprecated Use `tags` instead. + */ + deprecated?: boolean; + /** + * Select this item when showing. + * + * *Note* that only one completion item can be selected and that the + * tool / client decides which item that is. The rule is that the *first* + * item of those that match best is selected. + */ + preselect?: boolean; + /** + * A string that should be used when comparing this item + * with other items. When `falsy` the {@link CompletionItem.label label} + * is used. + */ + sortText?: string; + /** + * A string that should be used when filtering a set of + * completion items. When `falsy` the {@link CompletionItem.label label} + * is used. + */ + filterText?: string; + /** + * A string that should be inserted into a document when selecting + * this completion. When `falsy` the {@link CompletionItem.label label} + * is used. + * + * The `insertText` is subject to interpretation by the client side. + * Some tools might not take the string literally. For example + * VS Code when code complete is requested in this example + * `con` and a completion item with an `insertText` of + * `console` is provided it will only insert `sole`. Therefore it is + * recommended to use `textEdit` instead since it avoids additional client + * side interpretation. + */ + insertText?: string; + /** + * The format of the insert text. The format applies to both the + * `insertText` property and the `newText` property of a provided + * `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`. + * + * Please note that the insertTextFormat doesn't apply to + * `additionalTextEdits`. + */ + insertTextFormat?: InsertTextFormat; + /** + * How whitespace and indentation is handled during completion + * item insertion. If not provided the clients default value depends on + * the `textDocument.completion.insertTextMode` client capability. + * + * @since 3.16.0 + */ + insertTextMode?: InsertTextMode; + /** + * An {@link TextEdit edit} which is applied to a document when selecting + * this completion. When an edit is provided the value of + * {@link CompletionItem.insertText insertText} is ignored. + * + * Most editors support two different operations when accepting a completion + * item. One is to insert a completion text and the other is to replace an + * existing text with a completion text. Since this can usually not be + * predetermined by a server it can report both ranges. Clients need to + * signal support for `InsertReplaceEdits` via the + * `textDocument.completion.insertReplaceSupport` client capability + * property. + * + * *Note 1:* The text edit's range as well as both ranges from an insert + * replace edit must be a [single line] and they must contain the position + * at which completion has been requested. + * *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range + * must be a prefix of the edit's replace range, that means it must be + * contained and starting at the same position. + * + * @since 3.16.0 additional type `InsertReplaceEdit` + */ + textEdit?: TextEdit | InsertReplaceEdit; + /** + * The edit text used if the completion item is part of a CompletionList and + * CompletionList defines an item default for the text edit range. + * + * Clients will only honor this property if they opt into completion list + * item defaults using the capability `completionList.itemDefaults`. + * + * If not provided and a list's default range is provided the label + * property is used as a text. + * + * @since 3.17.0 + */ + textEditText?: string; + /** + * An optional array of additional {@link TextEdit text edits} that are applied when + * selecting this completion. Edits must not overlap (including the same insert position) + * with the main {@link CompletionItem.textEdit edit} nor with themselves. + * + * Additional text edits should be used to change text unrelated to the current cursor position + * (for example adding an import statement at the top of the file if the completion item will + * insert an unqualified type). + */ + additionalTextEdits?: TextEdit[]; + /** + * An optional set of characters that when pressed while this completion is active will accept it first and + * then type that character. *Note* that all commit characters should have `length=1` and that superfluous + * characters will be ignored. + */ + commitCharacters?: string[]; + /** + * An optional {@link Command command} that is executed *after* inserting this completion. *Note* that + * additional modifications to the current document should be described with the + * {@link CompletionItem.additionalTextEdits additionalTextEdits}-property. + */ + command?: Command; + /** + * A data entry field that is preserved on a completion item between a + * {@link CompletionRequest} and a {@link CompletionResolveRequest}. + */ + data?: LSPAny; +} +/** + * The CompletionItem namespace provides functions to deal with + * completion items. + */ +export declare namespace CompletionItem { + /** + * Create a completion item and seed it with a label. + * @param label The completion item's label + */ + function create(label: string): CompletionItem; +} +/** + * Represents a collection of {@link CompletionItem completion items} to be presented + * in the editor. + */ +export interface CompletionList { + /** + * This list it not complete. Further typing results in recomputing this list. + * + * Recomputed lists have all their items replaced (not appended) in the + * incomplete completion sessions. + */ + isIncomplete: boolean; + /** + * In many cases the items of an actual completion result share the same + * value for properties like `commitCharacters` or the range of a text + * edit. A completion list can therefore define item defaults which will + * be used if a completion item itself doesn't specify the value. + * + * If a completion list specifies a default value and a completion item + * also specifies a corresponding value the one from the item is used. + * + * Servers are only allowed to return default values if the client + * signals support for this via the `completionList.itemDefaults` + * capability. + * + * @since 3.17.0 + */ + itemDefaults?: { + /** + * A default commit character set. + * + * @since 3.17.0 + */ + commitCharacters?: string[]; + /** + * A default edit range. + * + * @since 3.17.0 + */ + editRange?: Range | { + insert: Range; + replace: Range; + }; + /** + * A default insert text format. + * + * @since 3.17.0 + */ + insertTextFormat?: InsertTextFormat; + /** + * A default insert text mode. + * + * @since 3.17.0 + */ + insertTextMode?: InsertTextMode; + /** + * A default data value. + * + * @since 3.17.0 + */ + data?: LSPAny; + }; + /** + * The completion items. + */ + items: CompletionItem[]; +} +/** + * The CompletionList namespace provides functions to deal with + * completion lists. + */ +export declare namespace CompletionList { + /** + * Creates a new completion list. + * + * @param items The completion items. + * @param isIncomplete The list is not complete. + */ + function create(items?: CompletionItem[], isIncomplete?: boolean): CompletionList; +} +/** + * MarkedString can be used to render human readable text. It is either a markdown string + * or a code-block that provides a language and a code snippet. The language identifier + * is semantically equal to the optional language identifier in fenced code blocks in GitHub + * issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting + * + * The pair of a language and a value is an equivalent to markdown: + * ```${language} + * ${value} + * ``` + * + * Note that markdown strings will be sanitized - that means html will be escaped. + * @deprecated use MarkupContent instead. + */ +export type MarkedString = string | { + language: string; + value: string; +}; +export declare namespace MarkedString { + /** + * Creates a marked string from plain text. + * + * @param plainText The plain text. + */ + function fromPlainText(plainText: string): string; + /** + * Checks whether the given value conforms to the {@link MarkedString} type. + */ + function is(value: any): value is MarkedString; +} +/** + * The result of a hover request. + */ +export interface Hover { + /** + * The hover's content + */ + contents: MarkupContent | MarkedString | MarkedString[]; + /** + * An optional range inside the text document that is used to + * visualize the hover, e.g. by changing the background color. + */ + range?: Range; +} +export declare namespace Hover { + /** + * Checks whether the given value conforms to the {@link Hover} interface. + */ + function is(value: any): value is Hover; +} +/** + * Represents a parameter of a callable-signature. A parameter can + * have a label and a doc-comment. + */ +export interface ParameterInformation { + /** + * The label of this parameter information. + * + * Either a string or an inclusive start and exclusive end offsets within its containing + * signature label. (see SignatureInformation.label). The offsets are based on a UTF-16 + * string representation as `Position` and `Range` does. + * + * *Note*: a label of type string should be a substring of its containing signature label. + * Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`. + */ + label: string | [uinteger, uinteger]; + /** + * The human-readable doc-comment of this parameter. Will be shown + * in the UI but can be omitted. + */ + documentation?: string | MarkupContent; +} +/** + * The ParameterInformation namespace provides helper functions to work with + * {@link ParameterInformation} literals. + */ +export declare namespace ParameterInformation { + /** + * Creates a new parameter information literal. + * + * @param label A label string. + * @param documentation A doc string. + */ + function create(label: string | [uinteger, uinteger], documentation?: string): ParameterInformation; +} +/** + * Represents the signature of something callable. A signature + * can have a label, like a function-name, a doc-comment, and + * a set of parameters. + */ +export interface SignatureInformation { + /** + * The label of this signature. Will be shown in + * the UI. + */ + label: string; + /** + * The human-readable doc-comment of this signature. Will be shown + * in the UI but can be omitted. + */ + documentation?: string | MarkupContent; + /** + * The parameters of this signature. + */ + parameters?: ParameterInformation[]; + /** + * The index of the active parameter. + * + * If provided, this is used in place of `SignatureHelp.activeParameter`. + * + * @since 3.16.0 + */ + activeParameter?: uinteger; +} +/** + * The SignatureInformation namespace provides helper functions to work with + * {@link SignatureInformation} literals. + */ +export declare namespace SignatureInformation { + function create(label: string, documentation?: string, ...parameters: ParameterInformation[]): SignatureInformation; +} +/** + * Signature help represents the signature of something + * callable. There can be multiple signature but only one + * active and only one active parameter. + */ +export interface SignatureHelp { + /** + * One or more signatures. + */ + signatures: SignatureInformation[]; + /** + * The active signature. If omitted or the value lies outside the + * range of `signatures` the value defaults to zero or is ignored if + * the `SignatureHelp` has no signatures. + * + * Whenever possible implementors should make an active decision about + * the active signature and shouldn't rely on a default value. + * + * In future version of the protocol this property might become + * mandatory to better express this. + */ + activeSignature?: uinteger; + /** + * The active parameter of the active signature. If omitted or the value + * lies outside the range of `signatures[activeSignature].parameters` + * defaults to 0 if the active signature has parameters. If + * the active signature has no parameters it is ignored. + * In future version of the protocol this property might become + * mandatory to better express the active parameter if the + * active signature does have any. + */ + activeParameter?: uinteger; +} +/** + * The definition of a symbol represented as one or many {@link Location locations}. + * For most programming languages there is only one location at which a symbol is + * defined. + * + * Servers should prefer returning `DefinitionLink` over `Definition` if supported + * by the client. + */ +export type Definition = Location | Location[]; +/** + * Information about where a symbol is defined. + * + * Provides additional metadata over normal {@link Location location} definitions, including the range of + * the defining symbol + */ +export type DefinitionLink = LocationLink; +/** + * The declaration of a symbol representation as one or many {@link Location locations}. + */ +export type Declaration = Location | Location[]; +/** + * Information about where a symbol is declared. + * + * Provides additional metadata over normal {@link Location location} declarations, including the range of + * the declaring symbol. + * + * Servers should prefer returning `DeclarationLink` over `Declaration` if supported + * by the client. + */ +export type DeclarationLink = LocationLink; +/** + * Value-object that contains additional information when + * requesting references. + */ +export interface ReferenceContext { + /** + * Include the declaration of the current symbol. + */ + includeDeclaration: boolean; +} +/** + * A document highlight kind. + */ +export declare namespace DocumentHighlightKind { + /** + * A textual occurrence. + */ + const Text: 1; + /** + * Read-access of a symbol, like reading a variable. + */ + const Read: 2; + /** + * Write-access of a symbol, like writing to a variable. + */ + const Write: 3; +} +export type DocumentHighlightKind = 1 | 2 | 3; +/** + * A document highlight is a range inside a text document which deserves + * special attention. Usually a document highlight is visualized by changing + * the background color of its range. + */ +export interface DocumentHighlight { + /** + * The range this highlight applies to. + */ + range: Range; + /** + * The highlight kind, default is {@link DocumentHighlightKind.Text text}. + */ + kind?: DocumentHighlightKind; +} +/** + * DocumentHighlight namespace to provide helper functions to work with + * {@link DocumentHighlight} literals. + */ +export declare namespace DocumentHighlight { + /** + * Create a DocumentHighlight object. + * @param range The range the highlight applies to. + * @param kind The highlight kind + */ + function create(range: Range, kind?: DocumentHighlightKind): DocumentHighlight; +} +/** + * A symbol kind. + */ +export declare namespace SymbolKind { + const File: 1; + const Module: 2; + const Namespace: 3; + const Package: 4; + const Class: 5; + const Method: 6; + const Property: 7; + const Field: 8; + const Constructor: 9; + const Enum: 10; + const Interface: 11; + const Function: 12; + const Variable: 13; + const Constant: 14; + const String: 15; + const Number: 16; + const Boolean: 17; + const Array: 18; + const Object: 19; + const Key: 20; + const Null: 21; + const EnumMember: 22; + const Struct: 23; + const Event: 24; + const Operator: 25; + const TypeParameter: 26; +} +export type SymbolKind = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26; +/** + * Symbol tags are extra annotations that tweak the rendering of a symbol. + * + * @since 3.16 + */ +export declare namespace SymbolTag { + /** + * Render a symbol as obsolete, usually using a strike-out. + */ + const Deprecated: 1; +} +export type SymbolTag = 1; +/** + * A base for all symbol information. + */ +export interface BaseSymbolInformation { + /** + * The name of this symbol. + */ + name: string; + /** + * The kind of this symbol. + */ + kind: SymbolKind; + /** + * Tags for this symbol. + * + * @since 3.16.0 + */ + tags?: SymbolTag[]; + /** + * The name of the symbol containing this symbol. This information is for + * user interface purposes (e.g. to render a qualifier in the user interface + * if necessary). It can't be used to re-infer a hierarchy for the document + * symbols. + */ + containerName?: string; +} +/** + * Represents information about programming constructs like variables, classes, + * interfaces etc. + */ +export interface SymbolInformation extends BaseSymbolInformation { + /** + * Indicates if this symbol is deprecated. + * + * @deprecated Use tags instead + */ + deprecated?: boolean; + /** + * The location of this symbol. The location's range is used by a tool + * to reveal the location in the editor. If the symbol is selected in the + * tool the range's start information is used to position the cursor. So + * the range usually spans more than the actual symbol's name and does + * normally include things like visibility modifiers. + * + * The range doesn't have to denote a node range in the sense of an abstract + * syntax tree. It can therefore not be used to re-construct a hierarchy of + * the symbols. + */ + location: Location; +} +export declare namespace SymbolInformation { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the location of the symbol. + * @param uri The resource of the location of symbol. + * @param containerName The name of the symbol containing the symbol. + */ + function create(name: string, kind: SymbolKind, range: Range, uri: DocumentUri, containerName?: string): SymbolInformation; +} +/** + * A special workspace symbol that supports locations without a range. + * + * See also SymbolInformation. + * + * @since 3.17.0 + */ +export interface WorkspaceSymbol extends BaseSymbolInformation { + /** + * The location of the symbol. Whether a server is allowed to + * return a location without a range depends on the client + * capability `workspace.symbol.resolveSupport`. + * + * See SymbolInformation#location for more details. + */ + location: Location | { + uri: DocumentUri; + }; + /** + * A data entry field that is preserved on a workspace symbol between a + * workspace symbol request and a workspace symbol resolve request. + */ + data?: LSPAny; +} +export declare namespace WorkspaceSymbol { + /** + * Create a new workspace symbol. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param uri The resource of the location of the symbol. + * @param range An options range of the location. + * @returns A WorkspaceSymbol. + */ + function create(name: string, kind: SymbolKind, uri: DocumentUri, range?: Range): WorkspaceSymbol; +} +/** + * Represents programming constructs like variables, classes, interfaces etc. + * that appear in a document. Document symbols can be hierarchical and they + * have two ranges: one that encloses its definition and one that points to + * its most interesting range, e.g. the range of an identifier. + */ +export interface DocumentSymbol { + /** + * The name of this symbol. Will be displayed in the user interface and therefore must not be + * an empty string or a string only consisting of white spaces. + */ + name: string; + /** + * More detail for this symbol, e.g the signature of a function. + */ + detail?: string; + /** + * The kind of this symbol. + */ + kind: SymbolKind; + /** + * Tags for this document symbol. + * + * @since 3.16.0 + */ + tags?: SymbolTag[]; + /** + * Indicates if this symbol is deprecated. + * + * @deprecated Use tags instead + */ + deprecated?: boolean; + /** + * The range enclosing this symbol not including leading/trailing whitespace but everything else + * like comments. This information is typically used to determine if the clients cursor is + * inside the symbol to reveal in the symbol in the UI. + */ + range: Range; + /** + * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. + * Must be contained by the `range`. + */ + selectionRange: Range; + /** + * Children of this symbol, e.g. properties of a class. + */ + children?: DocumentSymbol[]; +} +export declare namespace DocumentSymbol { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param detail The detail of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the symbol. + * @param selectionRange The selectionRange of the symbol. + * @param children Children of the symbol. + */ + function create(name: string, detail: string | undefined, kind: SymbolKind, range: Range, selectionRange: Range, children?: DocumentSymbol[]): DocumentSymbol; + /** + * Checks whether the given literal conforms to the {@link DocumentSymbol} interface. + */ + function is(value: any): value is DocumentSymbol; +} +/** + * The kind of a code action. + * + * Kinds are a hierarchical list of identifiers separated by `.`, e.g. `"refactor.extract.function"`. + * + * The set of kinds is open and client needs to announce the kinds it supports to the server during + * initialization. + */ +export type CodeActionKind = string; +/** + * A set of predefined code action kinds + */ +export declare namespace CodeActionKind { + /** + * Empty kind. + */ + const Empty: ''; + /** + * Base kind for quickfix actions: 'quickfix' + */ + const QuickFix: 'quickfix'; + /** + * Base kind for refactoring actions: 'refactor' + */ + const Refactor: 'refactor'; + /** + * Base kind for refactoring extraction actions: 'refactor.extract' + * + * Example extract actions: + * + * - Extract method + * - Extract function + * - Extract variable + * - Extract interface from class + * - ... + */ + const RefactorExtract: 'refactor.extract'; + /** + * Base kind for refactoring inline actions: 'refactor.inline' + * + * Example inline actions: + * + * - Inline function + * - Inline variable + * - Inline constant + * - ... + */ + const RefactorInline: 'refactor.inline'; + /** + * Base kind for refactoring rewrite actions: 'refactor.rewrite' + * + * Example rewrite actions: + * + * - Convert JavaScript function to class + * - Add or remove parameter + * - Encapsulate field + * - Make method static + * - Move method to base class + * - ... + */ + const RefactorRewrite: 'refactor.rewrite'; + /** + * Base kind for source actions: `source` + * + * Source code actions apply to the entire file. + */ + const Source: 'source'; + /** + * Base kind for an organize imports source action: `source.organizeImports` + */ + const SourceOrganizeImports: 'source.organizeImports'; + /** + * Base kind for auto-fix source actions: `source.fixAll`. + * + * Fix all actions automatically fix errors that have a clear fix that do not require user input. + * They should not suppress errors or perform unsafe fixes such as generating new types or classes. + * + * @since 3.15.0 + */ + const SourceFixAll: 'source.fixAll'; +} +/** + * The reason why code actions were requested. + * + * @since 3.17.0 + */ +export declare namespace CodeActionTriggerKind { + /** + * Code actions were explicitly requested by the user or by an extension. + */ + const Invoked: 1; + /** + * Code actions were requested automatically. + * + * This typically happens when current selection in a file changes, but can + * also be triggered when file content changes. + */ + const Automatic: 2; +} +export type CodeActionTriggerKind = 1 | 2; +/** + * Contains additional diagnostic information about the context in which + * a {@link CodeActionProvider.provideCodeActions code action} is run. + */ +export interface CodeActionContext { + /** + * An array of diagnostics known on the client side overlapping the range provided to the + * `textDocument/codeAction` request. They are provided so that the server knows which + * errors are currently presented to the user for the given range. There is no guarantee + * that these accurately reflect the error state of the resource. The primary parameter + * to compute code actions is the provided range. + */ + diagnostics: Diagnostic[]; + /** + * Requested kind of actions to return. + * + * Actions not of this kind are filtered out by the client before being shown. So servers + * can omit computing them. + */ + only?: CodeActionKind[]; + /** + * The reason why code actions were requested. + * + * @since 3.17.0 + */ + triggerKind?: CodeActionTriggerKind; +} +/** + * The CodeActionContext namespace provides helper functions to work with + * {@link CodeActionContext} literals. + */ +export declare namespace CodeActionContext { + /** + * Creates a new CodeActionContext literal. + */ + function create(diagnostics: Diagnostic[], only?: CodeActionKind[], triggerKind?: CodeActionTriggerKind): CodeActionContext; + /** + * Checks whether the given literal conforms to the {@link CodeActionContext} interface. + */ + function is(value: any): value is CodeActionContext; +} +/** + * A code action represents a change that can be performed in code, e.g. to fix a problem or + * to refactor code. + * + * A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed. + */ +export interface CodeAction { + /** + * A short, human-readable, title for this code action. + */ + title: string; + /** + * The kind of the code action. + * + * Used to filter code actions. + */ + kind?: CodeActionKind; + /** + * The diagnostics that this code action resolves. + */ + diagnostics?: Diagnostic[]; + /** + * Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted + * by keybindings. + * + * A quick fix should be marked preferred if it properly addresses the underlying error. + * A refactoring should be marked preferred if it is the most reasonable choice of actions to take. + * + * @since 3.15.0 + */ + isPreferred?: boolean; + /** + * Marks that the code action cannot currently be applied. + * + * Clients should follow the following guidelines regarding disabled code actions: + * + * - Disabled code actions are not shown in automatic [lightbulbs](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) + * code action menus. + * + * - Disabled actions are shown as faded out in the code action menu when the user requests a more specific type + * of code action, such as refactorings. + * + * - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions) + * that auto applies a code action and only disabled code actions are returned, the client should show the user an + * error message with `reason` in the editor. + * + * @since 3.16.0 + */ + disabled?: { + /** + * Human readable description of why the code action is currently disabled. + * + * This is displayed in the code actions UI. + */ + reason: string; + }; + /** + * The workspace edit this code action performs. + */ + edit?: WorkspaceEdit; + /** + * A command this code action executes. If a code action + * provides an edit and a command, first the edit is + * executed and then the command. + */ + command?: Command; + /** + * A data entry field that is preserved on a code action between + * a `textDocument/codeAction` and a `codeAction/resolve` request. + * + * @since 3.16.0 + */ + data?: LSPAny; +} +export declare namespace CodeAction { + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param kind The kind of the code action. + */ + function create(title: string, kind?: CodeActionKind): CodeAction; + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param command The command to execute. + * @param kind The kind of the code action. + */ + function create(title: string, command: Command, kind?: CodeActionKind): CodeAction; + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param edit The edit to perform. + * @param kind The kind of the code action. + */ + function create(title: string, edit: WorkspaceEdit, kind?: CodeActionKind): CodeAction; + function is(value: any): value is CodeAction; +} +/** + * A code lens represents a {@link Command command} that should be shown along with + * source text, like the number of references, a way to run tests, etc. + * + * A code lens is _unresolved_ when no command is associated to it. For performance + * reasons the creation of a code lens and resolving should be done in two stages. + */ +export interface CodeLens { + /** + * The range in which this code lens is valid. Should only span a single line. + */ + range: Range; + /** + * The command this code lens represents. + */ + command?: Command; + /** + * A data entry field that is preserved on a code lens item between + * a {@link CodeLensRequest} and a {@link CodeLensResolveRequest} + */ + data?: LSPAny; +} +/** + * The CodeLens namespace provides helper functions to work with + * {@link CodeLens} literals. + */ +export declare namespace CodeLens { + /** + * Creates a new CodeLens literal. + */ + function create(range: Range, data?: LSPAny): CodeLens; + /** + * Checks whether the given literal conforms to the {@link CodeLens} interface. + */ + function is(value: any): value is CodeLens; +} +/** + * Value-object describing what options formatting should use. + */ +export interface FormattingOptions { + /** + * Size of a tab in spaces. + */ + tabSize: uinteger; + /** + * Prefer spaces over tabs. + */ + insertSpaces: boolean; + /** + * Trim trailing whitespace on a line. + * + * @since 3.15.0 + */ + trimTrailingWhitespace?: boolean; + /** + * Insert a newline character at the end of the file if one does not exist. + * + * @since 3.15.0 + */ + insertFinalNewline?: boolean; + /** + * Trim all newlines after the final newline at the end of the file. + * + * @since 3.15.0 + */ + trimFinalNewlines?: boolean; + /** + * Signature for further properties. + */ + [key: string]: boolean | integer | string | undefined; +} +/** + * The FormattingOptions namespace provides helper functions to work with + * {@link FormattingOptions} literals. + */ +export declare namespace FormattingOptions { + /** + * Creates a new FormattingOptions literal. + */ + function create(tabSize: uinteger, insertSpaces: boolean): FormattingOptions; + /** + * Checks whether the given literal conforms to the {@link FormattingOptions} interface. + */ + function is(value: any): value is FormattingOptions; +} +/** + * A document link is a range in a text document that links to an internal or external resource, like another + * text document or a web site. + */ +export interface DocumentLink { + /** + * The range this link applies to. + */ + range: Range; + /** + * The uri this link points to. If missing a resolve request is sent later. + */ + target?: URI; + /** + * The tooltip text when you hover over this link. + * + * If a tooltip is provided, is will be displayed in a string that includes instructions on how to + * trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS, + * user settings, and localization. + * + * @since 3.15.0 + */ + tooltip?: string; + /** + * A data entry field that is preserved on a document link between a + * DocumentLinkRequest and a DocumentLinkResolveRequest. + */ + data?: LSPAny; +} +/** + * The DocumentLink namespace provides helper functions to work with + * {@link DocumentLink} literals. + */ +export declare namespace DocumentLink { + /** + * Creates a new DocumentLink literal. + */ + function create(range: Range, target?: string, data?: LSPAny): DocumentLink; + /** + * Checks whether the given literal conforms to the {@link DocumentLink} interface. + */ + function is(value: any): value is DocumentLink; +} +/** + * A selection range represents a part of a selection hierarchy. A selection range + * may have a parent selection range that contains it. + */ +export interface SelectionRange { + /** + * The {@link Range range} of this selection range. + */ + range: Range; + /** + * The parent selection range containing this range. Therefore `parent.range` must contain `this.range`. + */ + parent?: SelectionRange; +} +/** + * The SelectionRange namespace provides helper function to work with + * SelectionRange literals. + */ +export declare namespace SelectionRange { + /** + * Creates a new SelectionRange + * @param range the range. + * @param parent an optional parent. + */ + function create(range: Range, parent?: SelectionRange): SelectionRange; + function is(value: any): value is SelectionRange; +} +/** + * Represents programming constructs like functions or constructors in the context + * of call hierarchy. + * + * @since 3.16.0 + */ +export interface CallHierarchyItem { + /** + * The name of this item. + */ + name: string; + /** + * The kind of this item. + */ + kind: SymbolKind; + /** + * Tags for this item. + */ + tags?: SymbolTag[]; + /** + * More detail for this item, e.g. the signature of a function. + */ + detail?: string; + /** + * The resource identifier of this item. + */ + uri: DocumentUri; + /** + * The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code. + */ + range: Range; + /** + * The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function. + * Must be contained by the {@link CallHierarchyItem.range `range`}. + */ + selectionRange: Range; + /** + * A data entry field that is preserved between a call hierarchy prepare and + * incoming calls or outgoing calls requests. + */ + data?: LSPAny; +} +/** + * Represents an incoming call, e.g. a caller of a method or constructor. + * + * @since 3.16.0 + */ +export interface CallHierarchyIncomingCall { + /** + * The item that makes the call. + */ + from: CallHierarchyItem; + /** + * The ranges at which the calls appear. This is relative to the caller + * denoted by {@link CallHierarchyIncomingCall.from `this.from`}. + */ + fromRanges: Range[]; +} +/** + * Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc. + * + * @since 3.16.0 + */ +export interface CallHierarchyOutgoingCall { + /** + * The item that is called. + */ + to: CallHierarchyItem; + /** + * The range at which this item is called. This is the range relative to the caller, e.g the item + * passed to {@link CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls `provideCallHierarchyOutgoingCalls`} + * and not {@link CallHierarchyOutgoingCall.to `this.to`}. + */ + fromRanges: Range[]; +} +/** + * A set of predefined token types. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ +export declare enum SemanticTokenTypes { + namespace = "namespace", + /** + * Represents a generic type. Acts as a fallback for types which can't be mapped to + * a specific type like class or enum. + */ + type = "type", + class = "class", + enum = "enum", + interface = "interface", + struct = "struct", + typeParameter = "typeParameter", + parameter = "parameter", + variable = "variable", + property = "property", + enumMember = "enumMember", + event = "event", + function = "function", + method = "method", + macro = "macro", + keyword = "keyword", + modifier = "modifier", + comment = "comment", + string = "string", + number = "number", + regexp = "regexp", + operator = "operator", + /** + * @since 3.17.0 + */ + decorator = "decorator" +} +/** + * A set of predefined token modifiers. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ +export declare enum SemanticTokenModifiers { + declaration = "declaration", + definition = "definition", + readonly = "readonly", + static = "static", + deprecated = "deprecated", + abstract = "abstract", + async = "async", + modification = "modification", + documentation = "documentation", + defaultLibrary = "defaultLibrary" +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensLegend { + /** + * The token types a server uses. + */ + tokenTypes: string[]; + /** + * The token modifiers a server uses. + */ + tokenModifiers: string[]; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokens { + /** + * An optional result id. If provided and clients support delta updating + * the client will include the result id in the next semantic token request. + * A server can then instead of computing all semantic tokens again simply + * send a delta. + */ + resultId?: string; + /** + * The actual tokens. + */ + data: uinteger[]; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokens { + function is(value: any): value is SemanticTokens; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensEdit { + /** + * The start offset of the edit. + */ + start: uinteger; + /** + * The count of elements to remove. + */ + deleteCount: uinteger; + /** + * The elements to insert. + */ + data?: uinteger[]; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensDelta { + readonly resultId?: string; + /** + * The semantic token edits to transform a previous result into a new result. + */ + edits: SemanticTokensEdit[]; +} +/** + * @since 3.17.0 + */ +export type TypeHierarchyItem = { + /** + * The name of this item. + */ + name: string; + /** + * The kind of this item. + */ + kind: SymbolKind; + /** + * Tags for this item. + */ + tags?: SymbolTag[]; + /** + * More detail for this item, e.g. the signature of a function. + */ + detail?: string; + /** + * The resource identifier of this item. + */ + uri: DocumentUri; + /** + * The range enclosing this symbol not including leading/trailing whitespace + * but everything else, e.g. comments and code. + */ + range: Range; + /** + * The range that should be selected and revealed when this symbol is being + * picked, e.g. the name of a function. Must be contained by the + * {@link TypeHierarchyItem.range `range`}. + */ + selectionRange: Range; + /** + * A data entry field that is preserved between a type hierarchy prepare and + * supertypes or subtypes requests. It could also be used to identify the + * type hierarchy in the server, helping improve the performance on + * resolving supertypes and subtypes. + */ + data?: LSPAny; +}; +/** + * Provide inline value as text. + * + * @since 3.17.0 + */ +export type InlineValueText = { + /** + * The document range for which the inline value applies. + */ + range: Range; + /** + * The text of the inline value. + */ + text: string; +}; +/** + * The InlineValueText namespace provides functions to deal with InlineValueTexts. + * + * @since 3.17.0 + */ +export declare namespace InlineValueText { + /** + * Creates a new InlineValueText literal. + */ + function create(range: Range, text: string): InlineValueText; + function is(value: InlineValue | undefined | null): value is InlineValueText; +} +/** + * Provide inline value through a variable lookup. + * If only a range is specified, the variable name will be extracted from the underlying document. + * An optional variable name can be used to override the extracted name. + * + * @since 3.17.0 + */ +export type InlineValueVariableLookup = { + /** + * The document range for which the inline value applies. + * The range is used to extract the variable name from the underlying document. + */ + range: Range; + /** + * If specified the name of the variable to look up. + */ + variableName?: string; + /** + * How to perform the lookup. + */ + caseSensitiveLookup: boolean; +}; +/** + * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups. + * + * @since 3.17.0 + */ +export declare namespace InlineValueVariableLookup { + /** + * Creates a new InlineValueText literal. + */ + function create(range: Range, variableName: string | undefined, caseSensitiveLookup: boolean): InlineValueVariableLookup; + function is(value: InlineValue | undefined | null): value is InlineValueVariableLookup; +} +/** + * Provide an inline value through an expression evaluation. + * If only a range is specified, the expression will be extracted from the underlying document. + * An optional expression can be used to override the extracted expression. + * + * @since 3.17.0 + */ +export type InlineValueEvaluatableExpression = { + /** + * The document range for which the inline value applies. + * The range is used to extract the evaluatable expression from the underlying document. + */ + range: Range; + /** + * If specified the expression overrides the extracted expression. + */ + expression?: string; +}; +/** + * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression. + * + * @since 3.17.0 + */ +export declare namespace InlineValueEvaluatableExpression { + /** + * Creates a new InlineValueEvaluatableExpression literal. + */ + function create(range: Range, expression: string | undefined): InlineValueEvaluatableExpression; + function is(value: InlineValue | undefined | null): value is InlineValueEvaluatableExpression; +} +/** + * Inline value information can be provided by different means: + * - directly as a text value (class InlineValueText). + * - as a name to use for a variable lookup (class InlineValueVariableLookup) + * - as an evaluatable expression (class InlineValueEvaluatableExpression) + * The InlineValue types combines all inline value types into one type. + * + * @since 3.17.0 + */ +export type InlineValue = InlineValueText | InlineValueVariableLookup | InlineValueEvaluatableExpression; +/** + * @since 3.17.0 + */ +export type InlineValueContext = { + /** + * The stack frame (as a DAP Id) where the execution has stopped. + */ + frameId: integer; + /** + * The document range where execution has stopped. + * Typically the end position of the range denotes the line where the inline values are shown. + */ + stoppedLocation: Range; +}; +/** + * The InlineValueContext namespace provides helper functions to work with + * {@link InlineValueContext} literals. + * + * @since 3.17.0 + */ +export declare namespace InlineValueContext { + /** + * Creates a new InlineValueContext literal. + */ + function create(frameId: integer, stoppedLocation: Range): InlineValueContext; + /** + * Checks whether the given literal conforms to the {@link InlineValueContext} interface. + */ + function is(value: any): value is InlineValueContext; +} +/** + * Inlay hint kinds. + * + * @since 3.17.0 + */ +export declare namespace InlayHintKind { + /** + * An inlay hint that for a type annotation. + */ + const Type = 1; + /** + * An inlay hint that is for a parameter. + */ + const Parameter = 2; + function is(value: number): value is InlayHintKind; +} +export type InlayHintKind = 1 | 2; +/** + * An inlay hint label part allows for interactive and composite labels + * of inlay hints. + * + * @since 3.17.0 + */ +export type InlayHintLabelPart = { + /** + * The value of this label part. + */ + value: string; + /** + * The tooltip text when you hover over this label part. Depending on + * the client capability `inlayHint.resolveSupport` clients might resolve + * this property late using the resolve request. + */ + tooltip?: string | MarkupContent; + /** + * An optional source code location that represents this + * label part. + * + * The editor will use this location for the hover and for code navigation + * features: This part will become a clickable link that resolves to the + * definition of the symbol at the given location (not necessarily the + * location itself), it shows the hover that shows at the given location, + * and it shows a context menu with further code navigation commands. + * + * Depending on the client capability `inlayHint.resolveSupport` clients + * might resolve this property late using the resolve request. + */ + location?: Location; + /** + * An optional command for this label part. + * + * Depending on the client capability `inlayHint.resolveSupport` clients + * might resolve this property late using the resolve request. + */ + command?: Command; +}; +export declare namespace InlayHintLabelPart { + function create(value: string): InlayHintLabelPart; + function is(value: any): value is InlayHintLabelPart; +} +/** + * Inlay hint information. + * + * @since 3.17.0 + */ +export type InlayHint = { + /** + * The position of this hint. + */ + position: Position; + /** + * The label of this hint. A human readable string or an array of + * InlayHintLabelPart label parts. + * + * *Note* that neither the string nor the label part can be empty. + */ + label: string | InlayHintLabelPart[]; + /** + * The kind of this hint. Can be omitted in which case the client + * should fall back to a reasonable default. + */ + kind?: InlayHintKind; + /** + * Optional text edits that are performed when accepting this inlay hint. + * + * *Note* that edits are expected to change the document so that the inlay + * hint (or its nearest variant) is now part of the document and the inlay + * hint itself is now obsolete. + */ + textEdits?: TextEdit[]; + /** + * The tooltip text when you hover over this item. + */ + tooltip?: string | MarkupContent; + /** + * Render padding before the hint. + * + * Note: Padding should use the editor's background color, not the + * background color of the hint itself. That means padding can be used + * to visually align/separate an inlay hint. + */ + paddingLeft?: boolean; + /** + * Render padding after the hint. + * + * Note: Padding should use the editor's background color, not the + * background color of the hint itself. That means padding can be used + * to visually align/separate an inlay hint. + */ + paddingRight?: boolean; + /** + * A data entry field that is preserved on an inlay hint between + * a `textDocument/inlayHint` and a `inlayHint/resolve` request. + */ + data?: LSPAny; +}; +export declare namespace InlayHint { + function create(position: Position, label: string | InlayHintLabelPart[], kind?: InlayHintKind): InlayHint; + function is(value: any): value is InlayHint; +} +/** + * A string value used as a snippet is a template which allows to insert text + * and to control the editor cursor when insertion happens. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Variables are defined with `$name` and + * `${name:default value}`. + * + * @since 3.18.0 + * @proposed + */ +export interface StringValue { + /** + * The kind of string value. + */ + kind: 'snippet'; + /** + * The snippet string. + */ + value: string; +} +export declare namespace StringValue { + function createSnippet(value: string): StringValue; +} +/** + * An inline completion item represents a text snippet that is proposed inline to complete text that is being typed. + * + * @since 3.18.0 + * @proposed + */ +export interface InlineCompletionItem { + /** + * The text to replace the range with. Must be set. + */ + insertText: string | StringValue; + /** + * A text that is used to decide if this inline completion should be shown. When `falsy` the {@link InlineCompletionItem.insertText} is used. + */ + filterText?: string; + /** + * The range to replace. Must begin and end on the same line. + */ + range?: Range; + /** + * An optional {@link Command} that is executed *after* inserting this completion. + */ + command?: Command; +} +export declare namespace InlineCompletionItem { + function create(insertText: string | StringValue, filterText?: string, range?: Range, command?: Command): InlineCompletionItem; +} +/** + * Represents a collection of {@link InlineCompletionItem inline completion items} to be presented in the editor. + * + * @since 3.18.0 + * @proposed + */ +export interface InlineCompletionList { + /** + * The inline completion items + */ + items: InlineCompletionItem[]; +} +export declare namespace InlineCompletionList { + function create(items: InlineCompletionItem[]): InlineCompletionList; +} +/** + * Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered. + * + * @since 3.18.0 + * @proposed + */ +export declare namespace InlineCompletionTriggerKind { + /** + * Completion was triggered explicitly by a user gesture. + */ + const Invoked: 0; + /** + * Completion was triggered automatically while editing. + */ + const Automatic: 1; +} +export type InlineCompletionTriggerKind = 0 | 1; +/** + * Describes the currently selected completion item. + * + * @since 3.18.0 + * @proposed + */ +export interface SelectedCompletionInfo { + /** + * The range that will be replaced if this completion item is accepted. + */ + range: Range; + /** + * The text the range will be replaced with if this completion is accepted. + */ + text: string; +} +export declare namespace SelectedCompletionInfo { + function create(range: Range, text: string): SelectedCompletionInfo; +} +/** + * Provides information about the context in which an inline completion was requested. + * + * @since 3.18.0 + * @proposed + */ +export interface InlineCompletionContext { + /** + * Describes how the inline completion was triggered. + */ + triggerKind: InlineCompletionTriggerKind; + /** + * Provides information about the currently selected item in the autocomplete widget if it is visible. + */ + selectedCompletionInfo?: SelectedCompletionInfo; +} +export declare namespace InlineCompletionContext { + function create(triggerKind: InlineCompletionTriggerKind, selectedCompletionInfo?: SelectedCompletionInfo): InlineCompletionContext; +} +/** + * A workspace folder inside a client. + */ +export interface WorkspaceFolder { + /** + * The associated URI for this workspace folder. + */ + uri: URI; + /** + * The name of the workspace folder. Used to refer to this + * workspace folder in the user interface. + */ + name: string; +} +export declare namespace WorkspaceFolder { + function is(value: any): value is WorkspaceFolder; +} +export declare const EOL: string[]; +/** + * A simple text document. Not to be implemented. The document keeps the content + * as string. + * + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +export interface TextDocument { + /** + * The associated URI for this document. Most documents have the __file__-scheme, indicating that they + * represent files on disk. However, some documents may have other schemes indicating that they are not + * available on disk. + * + * @readonly + */ + readonly uri: DocumentUri; + /** + * The identifier of the language associated with this document. + * + * @readonly + */ + readonly languageId: string; + /** + * The version number of this document (it will increase after each + * change, including undo/redo). + * + * @readonly + */ + readonly version: integer; + /** + * Get the text of this document. A substring can be retrieved by + * providing a range. + * + * @param range (optional) An range within the document to return. + * If no range is passed, the full content is returned. + * Invalid range positions are adjusted as described in {@link Position.line Position.line} + * and {@link Position.character Position.character}. + * If the start range position is greater than the end range position, + * then the effect of getText is as if the two positions were swapped. + + * @return The text of this document or a substring of the text if a + * range is provided. + */ + getText(range?: Range): string; + /** + * Converts a zero-based offset to a position. + * + * @param offset A zero-based offset. + * @return A valid {@link Position position}. + */ + positionAt(offset: uinteger): Position; + /** + * Converts the position to a zero-based offset. + * Invalid positions are adjusted as described in {@link Position.line Position.line} + * and {@link Position.character Position.character}. + * + * @param position A position. + * @return A valid zero-based offset. + */ + offsetAt(position: Position): uinteger; + /** + * The number of lines in this document. + * + * @readonly + */ + readonly lineCount: uinteger; +} +/** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +export declare namespace TextDocument { + /** + * Creates a new ITextDocument literal from the given uri and content. + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param version The document's version. + * @param content The document's content. + */ + function create(uri: DocumentUri, languageId: string, version: integer, content: string): TextDocument; + /** + * Checks whether the given literal conforms to the {@link ITextDocument} interface. + */ + function is(value: any): value is TextDocument; + function applyEdits(document: TextDocument, edits: TextEdit[]): string; +} +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/esm/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/esm/main.js" index 1238d09f948afc2908c81e1c0395a2c1182058c5..e0781ccb4790ae6e943afd44c24ebe0f99f0d547 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/esm/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/esm/main.js" @@ -1,3 +1,2222 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:07894388a1b28d3ed423e0531ea22934908fe99f2630b6f88a154659b1ab5889 -size 77435 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +export var DocumentUri; +(function (DocumentUri) { + function is(value) { + return typeof value === 'string'; + } + DocumentUri.is = is; +})(DocumentUri || (DocumentUri = {})); +export var URI; +(function (URI) { + function is(value) { + return typeof value === 'string'; + } + URI.is = is; +})(URI || (URI = {})); +export var integer; +(function (integer) { + integer.MIN_VALUE = -2147483648; + integer.MAX_VALUE = 2147483647; + function is(value) { + return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE; + } + integer.is = is; +})(integer || (integer = {})); +export var uinteger; +(function (uinteger) { + uinteger.MIN_VALUE = 0; + uinteger.MAX_VALUE = 2147483647; + function is(value) { + return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE; + } + uinteger.is = is; +})(uinteger || (uinteger = {})); +/** + * The Position namespace provides helper functions to work with + * {@link Position} literals. + */ +export var Position; +(function (Position) { + /** + * Creates a new Position literal from the given line and character. + * @param line The position's line. + * @param character The position's character. + */ + function create(line, character) { + if (line === Number.MAX_VALUE) { + line = uinteger.MAX_VALUE; + } + if (character === Number.MAX_VALUE) { + character = uinteger.MAX_VALUE; + } + return { line, character }; + } + Position.create = create; + /** + * Checks whether the given literal conforms to the {@link Position} interface. + */ + function is(value) { + let candidate = value; + return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character); + } + Position.is = is; +})(Position || (Position = {})); +/** + * The Range namespace provides helper functions to work with + * {@link Range} literals. + */ +export var Range; +(function (Range) { + function create(one, two, three, four) { + if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) { + return { start: Position.create(one, two), end: Position.create(three, four) }; + } + else if (Position.is(one) && Position.is(two)) { + return { start: one, end: two }; + } + else { + throw new Error(`Range#create called with invalid arguments[${one}, ${two}, ${three}, ${four}]`); + } + } + Range.create = create; + /** + * Checks whether the given literal conforms to the {@link Range} interface. + */ + function is(value) { + let candidate = value; + return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end); + } + Range.is = is; +})(Range || (Range = {})); +/** + * The Location namespace provides helper functions to work with + * {@link Location} literals. + */ +export var Location; +(function (Location) { + /** + * Creates a Location literal. + * @param uri The location's uri. + * @param range The location's range. + */ + function create(uri, range) { + return { uri, range }; + } + Location.create = create; + /** + * Checks whether the given literal conforms to the {@link Location} interface. + */ + function is(value) { + let candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri)); + } + Location.is = is; +})(Location || (Location = {})); +/** + * The LocationLink namespace provides helper functions to work with + * {@link LocationLink} literals. + */ +export var LocationLink; +(function (LocationLink) { + /** + * Creates a LocationLink literal. + * @param targetUri The definition's uri. + * @param targetRange The full range of the definition. + * @param targetSelectionRange The span of the symbol definition at the target. + * @param originSelectionRange The span of the symbol being defined in the originating source file. + */ + function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) { + return { targetUri, targetRange, targetSelectionRange, originSelectionRange }; + } + LocationLink.create = create; + /** + * Checks whether the given literal conforms to the {@link LocationLink} interface. + */ + function is(value) { + let candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri) + && Range.is(candidate.targetSelectionRange) + && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange)); + } + LocationLink.is = is; +})(LocationLink || (LocationLink = {})); +/** + * The Color namespace provides helper functions to work with + * {@link Color} literals. + */ +export var Color; +(function (Color) { + /** + * Creates a new Color literal. + */ + function create(red, green, blue, alpha) { + return { + red, + green, + blue, + alpha, + }; + } + Color.create = create; + /** + * Checks whether the given literal conforms to the {@link Color} interface. + */ + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1) + && Is.numberRange(candidate.green, 0, 1) + && Is.numberRange(candidate.blue, 0, 1) + && Is.numberRange(candidate.alpha, 0, 1); + } + Color.is = is; +})(Color || (Color = {})); +/** + * The ColorInformation namespace provides helper functions to work with + * {@link ColorInformation} literals. + */ +export var ColorInformation; +(function (ColorInformation) { + /** + * Creates a new ColorInformation literal. + */ + function create(range, color) { + return { + range, + color, + }; + } + ColorInformation.create = create; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color); + } + ColorInformation.is = is; +})(ColorInformation || (ColorInformation = {})); +/** + * The Color namespace provides helper functions to work with + * {@link ColorPresentation} literals. + */ +export var ColorPresentation; +(function (ColorPresentation) { + /** + * Creates a new ColorInformation literal. + */ + function create(label, textEdit, additionalTextEdits) { + return { + label, + textEdit, + additionalTextEdits, + }; + } + ColorPresentation.create = create; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.label) + && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate)) + && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is)); + } + ColorPresentation.is = is; +})(ColorPresentation || (ColorPresentation = {})); +/** + * A set of predefined range kinds. + */ +export var FoldingRangeKind; +(function (FoldingRangeKind) { + /** + * Folding range for a comment + */ + FoldingRangeKind.Comment = 'comment'; + /** + * Folding range for an import or include + */ + FoldingRangeKind.Imports = 'imports'; + /** + * Folding range for a region (e.g. `#region`) + */ + FoldingRangeKind.Region = 'region'; +})(FoldingRangeKind || (FoldingRangeKind = {})); +/** + * The folding range namespace provides helper functions to work with + * {@link FoldingRange} literals. + */ +export var FoldingRange; +(function (FoldingRange) { + /** + * Creates a new FoldingRange literal. + */ + function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) { + const result = { + startLine, + endLine + }; + if (Is.defined(startCharacter)) { + result.startCharacter = startCharacter; + } + if (Is.defined(endCharacter)) { + result.endCharacter = endCharacter; + } + if (Is.defined(kind)) { + result.kind = kind; + } + if (Is.defined(collapsedText)) { + result.collapsedText = collapsedText; + } + return result; + } + FoldingRange.create = create; + /** + * Checks whether the given literal conforms to the {@link FoldingRange} interface. + */ + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine) + && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter)) + && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter)) + && (Is.undefined(candidate.kind) || Is.string(candidate.kind)); + } + FoldingRange.is = is; +})(FoldingRange || (FoldingRange = {})); +/** + * The DiagnosticRelatedInformation namespace provides helper functions to work with + * {@link DiagnosticRelatedInformation} literals. + */ +export var DiagnosticRelatedInformation; +(function (DiagnosticRelatedInformation) { + /** + * Creates a new DiagnosticRelatedInformation literal. + */ + function create(location, message) { + return { + location, + message + }; + } + DiagnosticRelatedInformation.create = create; + /** + * Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface. + */ + function is(value) { + let candidate = value; + return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message); + } + DiagnosticRelatedInformation.is = is; +})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {})); +/** + * The diagnostic's severity. + */ +export var DiagnosticSeverity; +(function (DiagnosticSeverity) { + /** + * Reports an error. + */ + DiagnosticSeverity.Error = 1; + /** + * Reports a warning. + */ + DiagnosticSeverity.Warning = 2; + /** + * Reports an information. + */ + DiagnosticSeverity.Information = 3; + /** + * Reports a hint. + */ + DiagnosticSeverity.Hint = 4; +})(DiagnosticSeverity || (DiagnosticSeverity = {})); +/** + * The diagnostic tags. + * + * @since 3.15.0 + */ +export var DiagnosticTag; +(function (DiagnosticTag) { + /** + * Unused or unnecessary code. + * + * Clients are allowed to render diagnostics with this tag faded out instead of having + * an error squiggle. + */ + DiagnosticTag.Unnecessary = 1; + /** + * Deprecated or obsolete code. + * + * Clients are allowed to rendered diagnostics with this tag strike through. + */ + DiagnosticTag.Deprecated = 2; +})(DiagnosticTag || (DiagnosticTag = {})); +/** + * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes. + * + * @since 3.16.0 + */ +export var CodeDescription; +(function (CodeDescription) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.href); + } + CodeDescription.is = is; +})(CodeDescription || (CodeDescription = {})); +/** + * The Diagnostic namespace provides helper functions to work with + * {@link Diagnostic} literals. + */ +export var Diagnostic; +(function (Diagnostic) { + /** + * Creates a new Diagnostic literal. + */ + function create(range, message, severity, code, source, relatedInformation) { + let result = { range, message }; + if (Is.defined(severity)) { + result.severity = severity; + } + if (Is.defined(code)) { + result.code = code; + } + if (Is.defined(source)) { + result.source = source; + } + if (Is.defined(relatedInformation)) { + result.relatedInformation = relatedInformation; + } + return result; + } + Diagnostic.create = create; + /** + * Checks whether the given literal conforms to the {@link Diagnostic} interface. + */ + function is(value) { + var _a; + let candidate = value; + return Is.defined(candidate) + && Range.is(candidate.range) + && Is.string(candidate.message) + && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) + && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) + && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href))) + && (Is.string(candidate.source) || Is.undefined(candidate.source)) + && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is)); + } + Diagnostic.is = is; +})(Diagnostic || (Diagnostic = {})); +/** + * The Command namespace provides helper functions to work with + * {@link Command} literals. + */ +export var Command; +(function (Command) { + /** + * Creates a new Command literal. + */ + function create(title, command, ...args) { + let result = { title, command }; + if (Is.defined(args) && args.length > 0) { + result.arguments = args; + } + return result; + } + Command.create = create; + /** + * Checks whether the given literal conforms to the {@link Command} interface. + */ + function is(value) { + let candidate = value; + return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command); + } + Command.is = is; +})(Command || (Command = {})); +/** + * The TextEdit namespace provides helper function to create replace, + * insert and delete edits more easily. + */ +export var TextEdit; +(function (TextEdit) { + /** + * Creates a replace text edit. + * @param range The range of text to be replaced. + * @param newText The new text. + */ + function replace(range, newText) { + return { range, newText }; + } + TextEdit.replace = replace; + /** + * Creates an insert text edit. + * @param position The position to insert the text at. + * @param newText The text to be inserted. + */ + function insert(position, newText) { + return { range: { start: position, end: position }, newText }; + } + TextEdit.insert = insert; + /** + * Creates a delete text edit. + * @param range The range of text to be deleted. + */ + function del(range) { + return { range, newText: '' }; + } + TextEdit.del = del; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) + && Is.string(candidate.newText) + && Range.is(candidate.range); + } + TextEdit.is = is; +})(TextEdit || (TextEdit = {})); +export var ChangeAnnotation; +(function (ChangeAnnotation) { + function create(label, needsConfirmation, description) { + const result = { label }; + if (needsConfirmation !== undefined) { + result.needsConfirmation = needsConfirmation; + } + if (description !== undefined) { + result.description = description; + } + return result; + } + ChangeAnnotation.create = create; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.label) && + (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) && + (Is.string(candidate.description) || candidate.description === undefined); + } + ChangeAnnotation.is = is; +})(ChangeAnnotation || (ChangeAnnotation = {})); +export var ChangeAnnotationIdentifier; +(function (ChangeAnnotationIdentifier) { + function is(value) { + const candidate = value; + return Is.string(candidate); + } + ChangeAnnotationIdentifier.is = is; +})(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {})); +export var AnnotatedTextEdit; +(function (AnnotatedTextEdit) { + /** + * Creates an annotated replace text edit. + * + * @param range The range of text to be replaced. + * @param newText The new text. + * @param annotation The annotation. + */ + function replace(range, newText, annotation) { + return { range, newText, annotationId: annotation }; + } + AnnotatedTextEdit.replace = replace; + /** + * Creates an annotated insert text edit. + * + * @param position The position to insert the text at. + * @param newText The text to be inserted. + * @param annotation The annotation. + */ + function insert(position, newText, annotation) { + return { range: { start: position, end: position }, newText, annotationId: annotation }; + } + AnnotatedTextEdit.insert = insert; + /** + * Creates an annotated delete text edit. + * + * @param range The range of text to be deleted. + * @param annotation The annotation. + */ + function del(range, annotation) { + return { range, newText: '', annotationId: annotation }; + } + AnnotatedTextEdit.del = del; + function is(value) { + const candidate = value; + return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + AnnotatedTextEdit.is = is; +})(AnnotatedTextEdit || (AnnotatedTextEdit = {})); +/** + * The TextDocumentEdit namespace provides helper function to create + * an edit that manipulates a text document. + */ +export var TextDocumentEdit; +(function (TextDocumentEdit) { + /** + * Creates a new `TextDocumentEdit` + */ + function create(textDocument, edits) { + return { textDocument, edits }; + } + TextDocumentEdit.create = create; + function is(value) { + let candidate = value; + return Is.defined(candidate) + && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument) + && Array.isArray(candidate.edits); + } + TextDocumentEdit.is = is; +})(TextDocumentEdit || (TextDocumentEdit = {})); +export var CreateFile; +(function (CreateFile) { + function create(uri, options, annotation) { + let result = { + kind: 'create', + uri + }; + if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + CreateFile.create = create; + function is(value) { + let candidate = value; + return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined || + ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + CreateFile.is = is; +})(CreateFile || (CreateFile = {})); +export var RenameFile; +(function (RenameFile) { + function create(oldUri, newUri, options, annotation) { + let result = { + kind: 'rename', + oldUri, + newUri + }; + if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + RenameFile.create = create; + function is(value) { + let candidate = value; + return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined || + ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + RenameFile.is = is; +})(RenameFile || (RenameFile = {})); +export var DeleteFile; +(function (DeleteFile) { + function create(uri, options, annotation) { + let result = { + kind: 'delete', + uri + }; + if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + DeleteFile.create = create; + function is(value) { + let candidate = value; + return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined || + ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + DeleteFile.is = is; +})(DeleteFile || (DeleteFile = {})); +export var WorkspaceEdit; +(function (WorkspaceEdit) { + function is(value) { + let candidate = value; + return candidate && + (candidate.changes !== undefined || candidate.documentChanges !== undefined) && + (candidate.documentChanges === undefined || candidate.documentChanges.every((change) => { + if (Is.string(change.kind)) { + return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change); + } + else { + return TextDocumentEdit.is(change); + } + })); + } + WorkspaceEdit.is = is; +})(WorkspaceEdit || (WorkspaceEdit = {})); +class TextEditChangeImpl { + constructor(edits, changeAnnotations) { + this.edits = edits; + this.changeAnnotations = changeAnnotations; + } + insert(position, newText, annotation) { + let edit; + let id; + if (annotation === undefined) { + edit = TextEdit.insert(position, newText); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.insert(position, newText, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.insert(position, newText, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + } + replace(range, newText, annotation) { + let edit; + let id; + if (annotation === undefined) { + edit = TextEdit.replace(range, newText); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.replace(range, newText, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.replace(range, newText, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + } + delete(range, annotation) { + let edit; + let id; + if (annotation === undefined) { + edit = TextEdit.del(range); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.del(range, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.del(range, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + } + add(edit) { + this.edits.push(edit); + } + all() { + return this.edits; + } + clear() { + this.edits.splice(0, this.edits.length); + } + assertChangeAnnotations(value) { + if (value === undefined) { + throw new Error(`Text edit change is not configured to manage change annotations.`); + } + } +} +/** + * A helper class + */ +class ChangeAnnotations { + constructor(annotations) { + this._annotations = annotations === undefined ? Object.create(null) : annotations; + this._counter = 0; + this._size = 0; + } + all() { + return this._annotations; + } + get size() { + return this._size; + } + manage(idOrAnnotation, annotation) { + let id; + if (ChangeAnnotationIdentifier.is(idOrAnnotation)) { + id = idOrAnnotation; + } + else { + id = this.nextId(); + annotation = idOrAnnotation; + } + if (this._annotations[id] !== undefined) { + throw new Error(`Id ${id} is already in use.`); + } + if (annotation === undefined) { + throw new Error(`No annotation provided for id ${id}`); + } + this._annotations[id] = annotation; + this._size++; + return id; + } + nextId() { + this._counter++; + return this._counter.toString(); + } +} +/** + * A workspace change helps constructing changes to a workspace. + */ +export class WorkspaceChange { + constructor(workspaceEdit) { + this._textEditChanges = Object.create(null); + if (workspaceEdit !== undefined) { + this._workspaceEdit = workspaceEdit; + if (workspaceEdit.documentChanges) { + this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations); + workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + workspaceEdit.documentChanges.forEach((change) => { + if (TextDocumentEdit.is(change)) { + const textEditChange = new TextEditChangeImpl(change.edits, this._changeAnnotations); + this._textEditChanges[change.textDocument.uri] = textEditChange; + } + }); + } + else if (workspaceEdit.changes) { + Object.keys(workspaceEdit.changes).forEach((key) => { + const textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]); + this._textEditChanges[key] = textEditChange; + }); + } + } + else { + this._workspaceEdit = {}; + } + } + /** + * Returns the underlying {@link WorkspaceEdit} literal + * use to be returned from a workspace edit operation like rename. + */ + get edit() { + this.initDocumentChanges(); + if (this._changeAnnotations !== undefined) { + if (this._changeAnnotations.size === 0) { + this._workspaceEdit.changeAnnotations = undefined; + } + else { + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + } + return this._workspaceEdit; + } + getTextEditChange(key) { + if (OptionalVersionedTextDocumentIdentifier.is(key)) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + const textDocument = { uri: key.uri, version: key.version }; + let result = this._textEditChanges[textDocument.uri]; + if (!result) { + const edits = []; + const textDocumentEdit = { + textDocument, + edits + }; + this._workspaceEdit.documentChanges.push(textDocumentEdit); + result = new TextEditChangeImpl(edits, this._changeAnnotations); + this._textEditChanges[textDocument.uri] = result; + } + return result; + } + else { + this.initChanges(); + if (this._workspaceEdit.changes === undefined) { + throw new Error('Workspace edit is not configured for normal text edit changes.'); + } + let result = this._textEditChanges[key]; + if (!result) { + let edits = []; + this._workspaceEdit.changes[key] = edits; + result = new TextEditChangeImpl(edits); + this._textEditChanges[key] = result; + } + return result; + } + } + initDocumentChanges() { + if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) { + this._changeAnnotations = new ChangeAnnotations(); + this._workspaceEdit.documentChanges = []; + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + } + initChanges() { + if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) { + this._workspaceEdit.changes = Object.create(null); + } + } + createFile(uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + let annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + let operation; + let id; + if (annotation === undefined) { + operation = CreateFile.create(uri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = CreateFile.create(uri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + } + renameFile(oldUri, newUri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + let annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + let operation; + let id; + if (annotation === undefined) { + operation = RenameFile.create(oldUri, newUri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = RenameFile.create(oldUri, newUri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + } + deleteFile(uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + let annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + let operation; + let id; + if (annotation === undefined) { + operation = DeleteFile.create(uri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = DeleteFile.create(uri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + } +} +/** + * The TextDocumentIdentifier namespace provides helper functions to work with + * {@link TextDocumentIdentifier} literals. + */ +export var TextDocumentIdentifier; +(function (TextDocumentIdentifier) { + /** + * Creates a new TextDocumentIdentifier literal. + * @param uri The document's uri. + */ + function create(uri) { + return { uri }; + } + TextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface. + */ + function is(value) { + let candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri); + } + TextDocumentIdentifier.is = is; +})(TextDocumentIdentifier || (TextDocumentIdentifier = {})); +/** + * The VersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link VersionedTextDocumentIdentifier} literals. + */ +export var VersionedTextDocumentIdentifier; +(function (VersionedTextDocumentIdentifier) { + /** + * Creates a new VersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri, version) { + return { uri, version }; + } + VersionedTextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface. + */ + function is(value) { + let candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version); + } + VersionedTextDocumentIdentifier.is = is; +})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {})); +/** + * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link OptionalVersionedTextDocumentIdentifier} literals. + */ +export var OptionalVersionedTextDocumentIdentifier; +(function (OptionalVersionedTextDocumentIdentifier) { + /** + * Creates a new OptionalVersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri, version) { + return { uri, version }; + } + OptionalVersionedTextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface. + */ + function is(value) { + let candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version)); + } + OptionalVersionedTextDocumentIdentifier.is = is; +})(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {})); +/** + * The TextDocumentItem namespace provides helper functions to work with + * {@link TextDocumentItem} literals. + */ +export var TextDocumentItem; +(function (TextDocumentItem) { + /** + * Creates a new TextDocumentItem literal. + * @param uri The document's uri. + * @param languageId The document's language identifier. + * @param version The document's version number. + * @param text The document's text. + */ + function create(uri, languageId, version, text) { + return { uri, languageId, version, text }; + } + TextDocumentItem.create = create; + /** + * Checks whether the given literal conforms to the {@link TextDocumentItem} interface. + */ + function is(value) { + let candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text); + } + TextDocumentItem.is = is; +})(TextDocumentItem || (TextDocumentItem = {})); +/** + * Describes the content type that a client supports in various + * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. + * + * Please note that `MarkupKinds` must not start with a `$`. This kinds + * are reserved for internal usage. + */ +export var MarkupKind; +(function (MarkupKind) { + /** + * Plain text is supported as a content format + */ + MarkupKind.PlainText = 'plaintext'; + /** + * Markdown is supported as a content format + */ + MarkupKind.Markdown = 'markdown'; + /** + * Checks whether the given value is a value of the {@link MarkupKind} type. + */ + function is(value) { + const candidate = value; + return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown; + } + MarkupKind.is = is; +})(MarkupKind || (MarkupKind = {})); +export var MarkupContent; +(function (MarkupContent) { + /** + * Checks whether the given value conforms to the {@link MarkupContent} interface. + */ + function is(value) { + const candidate = value; + return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value); + } + MarkupContent.is = is; +})(MarkupContent || (MarkupContent = {})); +/** + * The kind of a completion entry. + */ +export var CompletionItemKind; +(function (CompletionItemKind) { + CompletionItemKind.Text = 1; + CompletionItemKind.Method = 2; + CompletionItemKind.Function = 3; + CompletionItemKind.Constructor = 4; + CompletionItemKind.Field = 5; + CompletionItemKind.Variable = 6; + CompletionItemKind.Class = 7; + CompletionItemKind.Interface = 8; + CompletionItemKind.Module = 9; + CompletionItemKind.Property = 10; + CompletionItemKind.Unit = 11; + CompletionItemKind.Value = 12; + CompletionItemKind.Enum = 13; + CompletionItemKind.Keyword = 14; + CompletionItemKind.Snippet = 15; + CompletionItemKind.Color = 16; + CompletionItemKind.File = 17; + CompletionItemKind.Reference = 18; + CompletionItemKind.Folder = 19; + CompletionItemKind.EnumMember = 20; + CompletionItemKind.Constant = 21; + CompletionItemKind.Struct = 22; + CompletionItemKind.Event = 23; + CompletionItemKind.Operator = 24; + CompletionItemKind.TypeParameter = 25; +})(CompletionItemKind || (CompletionItemKind = {})); +/** + * Defines whether the insert text in a completion item should be interpreted as + * plain text or a snippet. + */ +export var InsertTextFormat; +(function (InsertTextFormat) { + /** + * The primary text to be inserted is treated as a plain string. + */ + InsertTextFormat.PlainText = 1; + /** + * The primary text to be inserted is treated as a snippet. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Placeholders with equal identifiers are linked, + * that is typing in one will update others too. + * + * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax + */ + InsertTextFormat.Snippet = 2; +})(InsertTextFormat || (InsertTextFormat = {})); +/** + * Completion item tags are extra annotations that tweak the rendering of a completion + * item. + * + * @since 3.15.0 + */ +export var CompletionItemTag; +(function (CompletionItemTag) { + /** + * Render a completion as obsolete, usually using a strike-out. + */ + CompletionItemTag.Deprecated = 1; +})(CompletionItemTag || (CompletionItemTag = {})); +/** + * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits. + * + * @since 3.16.0 + */ +export var InsertReplaceEdit; +(function (InsertReplaceEdit) { + /** + * Creates a new insert / replace edit + */ + function create(newText, insert, replace) { + return { newText, insert, replace }; + } + InsertReplaceEdit.create = create; + /** + * Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface. + */ + function is(value) { + const candidate = value; + return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace); + } + InsertReplaceEdit.is = is; +})(InsertReplaceEdit || (InsertReplaceEdit = {})); +/** + * How whitespace and indentation is handled during completion + * item insertion. + * + * @since 3.16.0 + */ +export var InsertTextMode; +(function (InsertTextMode) { + /** + * The insertion or replace strings is taken as it is. If the + * value is multi line the lines below the cursor will be + * inserted using the indentation defined in the string value. + * The client will not apply any kind of adjustments to the + * string. + */ + InsertTextMode.asIs = 1; + /** + * The editor adjusts leading whitespace of new lines so that + * they match the indentation up to the cursor of the line for + * which the item is accepted. + * + * Consider a line like this: <2tabs><3tabs>foo. Accepting a + * multi line completion item is indented using 2 tabs and all + * following lines inserted will be indented using 2 tabs as well. + */ + InsertTextMode.adjustIndentation = 2; +})(InsertTextMode || (InsertTextMode = {})); +export var CompletionItemLabelDetails; +(function (CompletionItemLabelDetails) { + function is(value) { + const candidate = value; + return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) && + (Is.string(candidate.description) || candidate.description === undefined); + } + CompletionItemLabelDetails.is = is; +})(CompletionItemLabelDetails || (CompletionItemLabelDetails = {})); +/** + * The CompletionItem namespace provides functions to deal with + * completion items. + */ +export var CompletionItem; +(function (CompletionItem) { + /** + * Create a completion item and seed it with a label. + * @param label The completion item's label + */ + function create(label) { + return { label }; + } + CompletionItem.create = create; +})(CompletionItem || (CompletionItem = {})); +/** + * The CompletionList namespace provides functions to deal with + * completion lists. + */ +export var CompletionList; +(function (CompletionList) { + /** + * Creates a new completion list. + * + * @param items The completion items. + * @param isIncomplete The list is not complete. + */ + function create(items, isIncomplete) { + return { items: items ? items : [], isIncomplete: !!isIncomplete }; + } + CompletionList.create = create; +})(CompletionList || (CompletionList = {})); +export var MarkedString; +(function (MarkedString) { + /** + * Creates a marked string from plain text. + * + * @param plainText The plain text. + */ + function fromPlainText(plainText) { + return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash + } + MarkedString.fromPlainText = fromPlainText; + /** + * Checks whether the given value conforms to the {@link MarkedString} type. + */ + function is(value) { + const candidate = value; + return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value)); + } + MarkedString.is = is; +})(MarkedString || (MarkedString = {})); +export var Hover; +(function (Hover) { + /** + * Checks whether the given value conforms to the {@link Hover} interface. + */ + function is(value) { + let candidate = value; + return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) || + MarkedString.is(candidate.contents) || + Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range)); + } + Hover.is = is; +})(Hover || (Hover = {})); +/** + * The ParameterInformation namespace provides helper functions to work with + * {@link ParameterInformation} literals. + */ +export var ParameterInformation; +(function (ParameterInformation) { + /** + * Creates a new parameter information literal. + * + * @param label A label string. + * @param documentation A doc string. + */ + function create(label, documentation) { + return documentation ? { label, documentation } : { label }; + } + ParameterInformation.create = create; +})(ParameterInformation || (ParameterInformation = {})); +/** + * The SignatureInformation namespace provides helper functions to work with + * {@link SignatureInformation} literals. + */ +export var SignatureInformation; +(function (SignatureInformation) { + function create(label, documentation, ...parameters) { + let result = { label }; + if (Is.defined(documentation)) { + result.documentation = documentation; + } + if (Is.defined(parameters)) { + result.parameters = parameters; + } + else { + result.parameters = []; + } + return result; + } + SignatureInformation.create = create; +})(SignatureInformation || (SignatureInformation = {})); +/** + * A document highlight kind. + */ +export var DocumentHighlightKind; +(function (DocumentHighlightKind) { + /** + * A textual occurrence. + */ + DocumentHighlightKind.Text = 1; + /** + * Read-access of a symbol, like reading a variable. + */ + DocumentHighlightKind.Read = 2; + /** + * Write-access of a symbol, like writing to a variable. + */ + DocumentHighlightKind.Write = 3; +})(DocumentHighlightKind || (DocumentHighlightKind = {})); +/** + * DocumentHighlight namespace to provide helper functions to work with + * {@link DocumentHighlight} literals. + */ +export var DocumentHighlight; +(function (DocumentHighlight) { + /** + * Create a DocumentHighlight object. + * @param range The range the highlight applies to. + * @param kind The highlight kind + */ + function create(range, kind) { + let result = { range }; + if (Is.number(kind)) { + result.kind = kind; + } + return result; + } + DocumentHighlight.create = create; +})(DocumentHighlight || (DocumentHighlight = {})); +/** + * A symbol kind. + */ +export var SymbolKind; +(function (SymbolKind) { + SymbolKind.File = 1; + SymbolKind.Module = 2; + SymbolKind.Namespace = 3; + SymbolKind.Package = 4; + SymbolKind.Class = 5; + SymbolKind.Method = 6; + SymbolKind.Property = 7; + SymbolKind.Field = 8; + SymbolKind.Constructor = 9; + SymbolKind.Enum = 10; + SymbolKind.Interface = 11; + SymbolKind.Function = 12; + SymbolKind.Variable = 13; + SymbolKind.Constant = 14; + SymbolKind.String = 15; + SymbolKind.Number = 16; + SymbolKind.Boolean = 17; + SymbolKind.Array = 18; + SymbolKind.Object = 19; + SymbolKind.Key = 20; + SymbolKind.Null = 21; + SymbolKind.EnumMember = 22; + SymbolKind.Struct = 23; + SymbolKind.Event = 24; + SymbolKind.Operator = 25; + SymbolKind.TypeParameter = 26; +})(SymbolKind || (SymbolKind = {})); +/** + * Symbol tags are extra annotations that tweak the rendering of a symbol. + * + * @since 3.16 + */ +export var SymbolTag; +(function (SymbolTag) { + /** + * Render a symbol as obsolete, usually using a strike-out. + */ + SymbolTag.Deprecated = 1; +})(SymbolTag || (SymbolTag = {})); +export var SymbolInformation; +(function (SymbolInformation) { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the location of the symbol. + * @param uri The resource of the location of symbol. + * @param containerName The name of the symbol containing the symbol. + */ + function create(name, kind, range, uri, containerName) { + let result = { + name, + kind, + location: { uri, range } + }; + if (containerName) { + result.containerName = containerName; + } + return result; + } + SymbolInformation.create = create; +})(SymbolInformation || (SymbolInformation = {})); +export var WorkspaceSymbol; +(function (WorkspaceSymbol) { + /** + * Create a new workspace symbol. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param uri The resource of the location of the symbol. + * @param range An options range of the location. + * @returns A WorkspaceSymbol. + */ + function create(name, kind, uri, range) { + return range !== undefined + ? { name, kind, location: { uri, range } } + : { name, kind, location: { uri } }; + } + WorkspaceSymbol.create = create; +})(WorkspaceSymbol || (WorkspaceSymbol = {})); +export var DocumentSymbol; +(function (DocumentSymbol) { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param detail The detail of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the symbol. + * @param selectionRange The selectionRange of the symbol. + * @param children Children of the symbol. + */ + function create(name, detail, kind, range, selectionRange, children) { + let result = { + name, + detail, + kind, + range, + selectionRange + }; + if (children !== undefined) { + result.children = children; + } + return result; + } + DocumentSymbol.create = create; + /** + * Checks whether the given literal conforms to the {@link DocumentSymbol} interface. + */ + function is(value) { + let candidate = value; + return candidate && + Is.string(candidate.name) && Is.number(candidate.kind) && + Range.is(candidate.range) && Range.is(candidate.selectionRange) && + (candidate.detail === undefined || Is.string(candidate.detail)) && + (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) && + (candidate.children === undefined || Array.isArray(candidate.children)) && + (candidate.tags === undefined || Array.isArray(candidate.tags)); + } + DocumentSymbol.is = is; +})(DocumentSymbol || (DocumentSymbol = {})); +/** + * A set of predefined code action kinds + */ +export var CodeActionKind; +(function (CodeActionKind) { + /** + * Empty kind. + */ + CodeActionKind.Empty = ''; + /** + * Base kind for quickfix actions: 'quickfix' + */ + CodeActionKind.QuickFix = 'quickfix'; + /** + * Base kind for refactoring actions: 'refactor' + */ + CodeActionKind.Refactor = 'refactor'; + /** + * Base kind for refactoring extraction actions: 'refactor.extract' + * + * Example extract actions: + * + * - Extract method + * - Extract function + * - Extract variable + * - Extract interface from class + * - ... + */ + CodeActionKind.RefactorExtract = 'refactor.extract'; + /** + * Base kind for refactoring inline actions: 'refactor.inline' + * + * Example inline actions: + * + * - Inline function + * - Inline variable + * - Inline constant + * - ... + */ + CodeActionKind.RefactorInline = 'refactor.inline'; + /** + * Base kind for refactoring rewrite actions: 'refactor.rewrite' + * + * Example rewrite actions: + * + * - Convert JavaScript function to class + * - Add or remove parameter + * - Encapsulate field + * - Make method static + * - Move method to base class + * - ... + */ + CodeActionKind.RefactorRewrite = 'refactor.rewrite'; + /** + * Base kind for source actions: `source` + * + * Source code actions apply to the entire file. + */ + CodeActionKind.Source = 'source'; + /** + * Base kind for an organize imports source action: `source.organizeImports` + */ + CodeActionKind.SourceOrganizeImports = 'source.organizeImports'; + /** + * Base kind for auto-fix source actions: `source.fixAll`. + * + * Fix all actions automatically fix errors that have a clear fix that do not require user input. + * They should not suppress errors or perform unsafe fixes such as generating new types or classes. + * + * @since 3.15.0 + */ + CodeActionKind.SourceFixAll = 'source.fixAll'; +})(CodeActionKind || (CodeActionKind = {})); +/** + * The reason why code actions were requested. + * + * @since 3.17.0 + */ +export var CodeActionTriggerKind; +(function (CodeActionTriggerKind) { + /** + * Code actions were explicitly requested by the user or by an extension. + */ + CodeActionTriggerKind.Invoked = 1; + /** + * Code actions were requested automatically. + * + * This typically happens when current selection in a file changes, but can + * also be triggered when file content changes. + */ + CodeActionTriggerKind.Automatic = 2; +})(CodeActionTriggerKind || (CodeActionTriggerKind = {})); +/** + * The CodeActionContext namespace provides helper functions to work with + * {@link CodeActionContext} literals. + */ +export var CodeActionContext; +(function (CodeActionContext) { + /** + * Creates a new CodeActionContext literal. + */ + function create(diagnostics, only, triggerKind) { + let result = { diagnostics }; + if (only !== undefined && only !== null) { + result.only = only; + } + if (triggerKind !== undefined && triggerKind !== null) { + result.triggerKind = triggerKind; + } + return result; + } + CodeActionContext.create = create; + /** + * Checks whether the given literal conforms to the {@link CodeActionContext} interface. + */ + function is(value) { + let candidate = value; + return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) + && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string)) + && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic); + } + CodeActionContext.is = is; +})(CodeActionContext || (CodeActionContext = {})); +export var CodeAction; +(function (CodeAction) { + function create(title, kindOrCommandOrEdit, kind) { + let result = { title }; + let checkKind = true; + if (typeof kindOrCommandOrEdit === 'string') { + checkKind = false; + result.kind = kindOrCommandOrEdit; + } + else if (Command.is(kindOrCommandOrEdit)) { + result.command = kindOrCommandOrEdit; + } + else { + result.edit = kindOrCommandOrEdit; + } + if (checkKind && kind !== undefined) { + result.kind = kind; + } + return result; + } + CodeAction.create = create; + function is(value) { + let candidate = value; + return candidate && Is.string(candidate.title) && + (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) && + (candidate.kind === undefined || Is.string(candidate.kind)) && + (candidate.edit !== undefined || candidate.command !== undefined) && + (candidate.command === undefined || Command.is(candidate.command)) && + (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) && + (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit)); + } + CodeAction.is = is; +})(CodeAction || (CodeAction = {})); +/** + * The CodeLens namespace provides helper functions to work with + * {@link CodeLens} literals. + */ +export var CodeLens; +(function (CodeLens) { + /** + * Creates a new CodeLens literal. + */ + function create(range, data) { + let result = { range }; + if (Is.defined(data)) { + result.data = data; + } + return result; + } + CodeLens.create = create; + /** + * Checks whether the given literal conforms to the {@link CodeLens} interface. + */ + function is(value) { + let candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command)); + } + CodeLens.is = is; +})(CodeLens || (CodeLens = {})); +/** + * The FormattingOptions namespace provides helper functions to work with + * {@link FormattingOptions} literals. + */ +export var FormattingOptions; +(function (FormattingOptions) { + /** + * Creates a new FormattingOptions literal. + */ + function create(tabSize, insertSpaces) { + return { tabSize, insertSpaces }; + } + FormattingOptions.create = create; + /** + * Checks whether the given literal conforms to the {@link FormattingOptions} interface. + */ + function is(value) { + let candidate = value; + return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces); + } + FormattingOptions.is = is; +})(FormattingOptions || (FormattingOptions = {})); +/** + * The DocumentLink namespace provides helper functions to work with + * {@link DocumentLink} literals. + */ +export var DocumentLink; +(function (DocumentLink) { + /** + * Creates a new DocumentLink literal. + */ + function create(range, target, data) { + return { range, target, data }; + } + DocumentLink.create = create; + /** + * Checks whether the given literal conforms to the {@link DocumentLink} interface. + */ + function is(value) { + let candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target)); + } + DocumentLink.is = is; +})(DocumentLink || (DocumentLink = {})); +/** + * The SelectionRange namespace provides helper function to work with + * SelectionRange literals. + */ +export var SelectionRange; +(function (SelectionRange) { + /** + * Creates a new SelectionRange + * @param range the range. + * @param parent an optional parent. + */ + function create(range, parent) { + return { range, parent }; + } + SelectionRange.create = create; + function is(value) { + let candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent)); + } + SelectionRange.is = is; +})(SelectionRange || (SelectionRange = {})); +/** + * A set of predefined token types. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ +export var SemanticTokenTypes; +(function (SemanticTokenTypes) { + SemanticTokenTypes["namespace"] = "namespace"; + /** + * Represents a generic type. Acts as a fallback for types which can't be mapped to + * a specific type like class or enum. + */ + SemanticTokenTypes["type"] = "type"; + SemanticTokenTypes["class"] = "class"; + SemanticTokenTypes["enum"] = "enum"; + SemanticTokenTypes["interface"] = "interface"; + SemanticTokenTypes["struct"] = "struct"; + SemanticTokenTypes["typeParameter"] = "typeParameter"; + SemanticTokenTypes["parameter"] = "parameter"; + SemanticTokenTypes["variable"] = "variable"; + SemanticTokenTypes["property"] = "property"; + SemanticTokenTypes["enumMember"] = "enumMember"; + SemanticTokenTypes["event"] = "event"; + SemanticTokenTypes["function"] = "function"; + SemanticTokenTypes["method"] = "method"; + SemanticTokenTypes["macro"] = "macro"; + SemanticTokenTypes["keyword"] = "keyword"; + SemanticTokenTypes["modifier"] = "modifier"; + SemanticTokenTypes["comment"] = "comment"; + SemanticTokenTypes["string"] = "string"; + SemanticTokenTypes["number"] = "number"; + SemanticTokenTypes["regexp"] = "regexp"; + SemanticTokenTypes["operator"] = "operator"; + /** + * @since 3.17.0 + */ + SemanticTokenTypes["decorator"] = "decorator"; +})(SemanticTokenTypes || (SemanticTokenTypes = {})); +/** + * A set of predefined token modifiers. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ +export var SemanticTokenModifiers; +(function (SemanticTokenModifiers) { + SemanticTokenModifiers["declaration"] = "declaration"; + SemanticTokenModifiers["definition"] = "definition"; + SemanticTokenModifiers["readonly"] = "readonly"; + SemanticTokenModifiers["static"] = "static"; + SemanticTokenModifiers["deprecated"] = "deprecated"; + SemanticTokenModifiers["abstract"] = "abstract"; + SemanticTokenModifiers["async"] = "async"; + SemanticTokenModifiers["modification"] = "modification"; + SemanticTokenModifiers["documentation"] = "documentation"; + SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary"; +})(SemanticTokenModifiers || (SemanticTokenModifiers = {})); +/** + * @since 3.16.0 + */ +export var SemanticTokens; +(function (SemanticTokens) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') && + Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number'); + } + SemanticTokens.is = is; +})(SemanticTokens || (SemanticTokens = {})); +/** + * The InlineValueText namespace provides functions to deal with InlineValueTexts. + * + * @since 3.17.0 + */ +export var InlineValueText; +(function (InlineValueText) { + /** + * Creates a new InlineValueText literal. + */ + function create(range, text) { + return { range, text }; + } + InlineValueText.create = create; + function is(value) { + const candidate = value; + return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text); + } + InlineValueText.is = is; +})(InlineValueText || (InlineValueText = {})); +/** + * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups. + * + * @since 3.17.0 + */ +export var InlineValueVariableLookup; +(function (InlineValueVariableLookup) { + /** + * Creates a new InlineValueText literal. + */ + function create(range, variableName, caseSensitiveLookup) { + return { range, variableName, caseSensitiveLookup }; + } + InlineValueVariableLookup.create = create; + function is(value) { + const candidate = value; + return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup) + && (Is.string(candidate.variableName) || candidate.variableName === undefined); + } + InlineValueVariableLookup.is = is; +})(InlineValueVariableLookup || (InlineValueVariableLookup = {})); +/** + * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression. + * + * @since 3.17.0 + */ +export var InlineValueEvaluatableExpression; +(function (InlineValueEvaluatableExpression) { + /** + * Creates a new InlineValueEvaluatableExpression literal. + */ + function create(range, expression) { + return { range, expression }; + } + InlineValueEvaluatableExpression.create = create; + function is(value) { + const candidate = value; + return candidate !== undefined && candidate !== null && Range.is(candidate.range) + && (Is.string(candidate.expression) || candidate.expression === undefined); + } + InlineValueEvaluatableExpression.is = is; +})(InlineValueEvaluatableExpression || (InlineValueEvaluatableExpression = {})); +/** + * The InlineValueContext namespace provides helper functions to work with + * {@link InlineValueContext} literals. + * + * @since 3.17.0 + */ +export var InlineValueContext; +(function (InlineValueContext) { + /** + * Creates a new InlineValueContext literal. + */ + function create(frameId, stoppedLocation) { + return { frameId, stoppedLocation }; + } + InlineValueContext.create = create; + /** + * Checks whether the given literal conforms to the {@link InlineValueContext} interface. + */ + function is(value) { + const candidate = value; + return Is.defined(candidate) && Range.is(value.stoppedLocation); + } + InlineValueContext.is = is; +})(InlineValueContext || (InlineValueContext = {})); +/** + * Inlay hint kinds. + * + * @since 3.17.0 + */ +export var InlayHintKind; +(function (InlayHintKind) { + /** + * An inlay hint that for a type annotation. + */ + InlayHintKind.Type = 1; + /** + * An inlay hint that is for a parameter. + */ + InlayHintKind.Parameter = 2; + function is(value) { + return value === 1 || value === 2; + } + InlayHintKind.is = is; +})(InlayHintKind || (InlayHintKind = {})); +export var InlayHintLabelPart; +(function (InlayHintLabelPart) { + function create(value) { + return { value }; + } + InlayHintLabelPart.create = create; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) + && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) + && (candidate.location === undefined || Location.is(candidate.location)) + && (candidate.command === undefined || Command.is(candidate.command)); + } + InlayHintLabelPart.is = is; +})(InlayHintLabelPart || (InlayHintLabelPart = {})); +export var InlayHint; +(function (InlayHint) { + function create(position, label, kind) { + const result = { position, label }; + if (kind !== undefined) { + result.kind = kind; + } + return result; + } + InlayHint.create = create; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Position.is(candidate.position) + && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is)) + && (candidate.kind === undefined || InlayHintKind.is(candidate.kind)) + && (candidate.textEdits === undefined) || Is.typedArray(candidate.textEdits, TextEdit.is) + && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) + && (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft)) + && (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight)); + } + InlayHint.is = is; +})(InlayHint || (InlayHint = {})); +export var StringValue; +(function (StringValue) { + function createSnippet(value) { + return { kind: 'snippet', value }; + } + StringValue.createSnippet = createSnippet; +})(StringValue || (StringValue = {})); +export var InlineCompletionItem; +(function (InlineCompletionItem) { + function create(insertText, filterText, range, command) { + return { insertText, filterText, range, command }; + } + InlineCompletionItem.create = create; +})(InlineCompletionItem || (InlineCompletionItem = {})); +export var InlineCompletionList; +(function (InlineCompletionList) { + function create(items) { + return { items }; + } + InlineCompletionList.create = create; +})(InlineCompletionList || (InlineCompletionList = {})); +/** + * Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered. + * + * @since 3.18.0 + * @proposed + */ +export var InlineCompletionTriggerKind; +(function (InlineCompletionTriggerKind) { + /** + * Completion was triggered explicitly by a user gesture. + */ + InlineCompletionTriggerKind.Invoked = 0; + /** + * Completion was triggered automatically while editing. + */ + InlineCompletionTriggerKind.Automatic = 1; +})(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {})); +export var SelectedCompletionInfo; +(function (SelectedCompletionInfo) { + function create(range, text) { + return { range, text }; + } + SelectedCompletionInfo.create = create; +})(SelectedCompletionInfo || (SelectedCompletionInfo = {})); +export var InlineCompletionContext; +(function (InlineCompletionContext) { + function create(triggerKind, selectedCompletionInfo) { + return { triggerKind, selectedCompletionInfo }; + } + InlineCompletionContext.create = create; +})(InlineCompletionContext || (InlineCompletionContext = {})); +export var WorkspaceFolder; +(function (WorkspaceFolder) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name); + } + WorkspaceFolder.is = is; +})(WorkspaceFolder || (WorkspaceFolder = {})); +export const EOL = ['\n', '\r\n', '\r']; +/** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +export var TextDocument; +(function (TextDocument) { + /** + * Creates a new ITextDocument literal from the given uri and content. + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param version The document's version. + * @param content The document's content. + */ + function create(uri, languageId, version, content) { + return new FullTextDocument(uri, languageId, version, content); + } + TextDocument.create = create; + /** + * Checks whether the given literal conforms to the {@link ITextDocument} interface. + */ + function is(value) { + let candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount) + && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false; + } + TextDocument.is = is; + function applyEdits(document, edits) { + let text = document.getText(); + let sortedEdits = mergeSort(edits, (a, b) => { + let diff = a.range.start.line - b.range.start.line; + if (diff === 0) { + return a.range.start.character - b.range.start.character; + } + return diff; + }); + let lastModifiedOffset = text.length; + for (let i = sortedEdits.length - 1; i >= 0; i--) { + let e = sortedEdits[i]; + let startOffset = document.offsetAt(e.range.start); + let endOffset = document.offsetAt(e.range.end); + if (endOffset <= lastModifiedOffset) { + text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length); + } + else { + throw new Error('Overlapping edit'); + } + lastModifiedOffset = startOffset; + } + return text; + } + TextDocument.applyEdits = applyEdits; + function mergeSort(data, compare) { + if (data.length <= 1) { + // sorted + return data; + } + const p = (data.length / 2) | 0; + const left = data.slice(0, p); + const right = data.slice(p); + mergeSort(left, compare); + mergeSort(right, compare); + let leftIdx = 0; + let rightIdx = 0; + let i = 0; + while (leftIdx < left.length && rightIdx < right.length) { + let ret = compare(left[leftIdx], right[rightIdx]); + if (ret <= 0) { + // smaller_equal -> take left to preserve order + data[i++] = left[leftIdx++]; + } + else { + // greater -> take right + data[i++] = right[rightIdx++]; + } + } + while (leftIdx < left.length) { + data[i++] = left[leftIdx++]; + } + while (rightIdx < right.length) { + data[i++] = right[rightIdx++]; + } + return data; + } +})(TextDocument || (TextDocument = {})); +/** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +class FullTextDocument { + constructor(uri, languageId, version, content) { + this._uri = uri; + this._languageId = languageId; + this._version = version; + this._content = content; + this._lineOffsets = undefined; + } + get uri() { + return this._uri; + } + get languageId() { + return this._languageId; + } + get version() { + return this._version; + } + getText(range) { + if (range) { + let start = this.offsetAt(range.start); + let end = this.offsetAt(range.end); + return this._content.substring(start, end); + } + return this._content; + } + update(event, version) { + this._content = event.text; + this._version = version; + this._lineOffsets = undefined; + } + getLineOffsets() { + if (this._lineOffsets === undefined) { + let lineOffsets = []; + let text = this._content; + let isLineStart = true; + for (let i = 0; i < text.length; i++) { + if (isLineStart) { + lineOffsets.push(i); + isLineStart = false; + } + let ch = text.charAt(i); + isLineStart = (ch === '\r' || ch === '\n'); + if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') { + i++; + } + } + if (isLineStart && text.length > 0) { + lineOffsets.push(text.length); + } + this._lineOffsets = lineOffsets; + } + return this._lineOffsets; + } + positionAt(offset) { + offset = Math.max(Math.min(offset, this._content.length), 0); + let lineOffsets = this.getLineOffsets(); + let low = 0, high = lineOffsets.length; + if (high === 0) { + return Position.create(0, offset); + } + while (low < high) { + let mid = Math.floor((low + high) / 2); + if (lineOffsets[mid] > offset) { + high = mid; + } + else { + low = mid + 1; + } + } + // low is the least x for which the line offset is larger than the current offset + // or array.length if no line offset is larger than the current offset + let line = low - 1; + return Position.create(line, offset - lineOffsets[line]); + } + offsetAt(position) { + let lineOffsets = this.getLineOffsets(); + if (position.line >= lineOffsets.length) { + return this._content.length; + } + else if (position.line < 0) { + return 0; + } + let lineOffset = lineOffsets[position.line]; + let nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length; + return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset); + } + get lineCount() { + return this.getLineOffsets().length; + } +} +var Is; +(function (Is) { + const toString = Object.prototype.toString; + function defined(value) { + return typeof value !== 'undefined'; + } + Is.defined = defined; + function undefined(value) { + return typeof value === 'undefined'; + } + Is.undefined = undefined; + function boolean(value) { + return value === true || value === false; + } + Is.boolean = boolean; + function string(value) { + return toString.call(value) === '[object String]'; + } + Is.string = string; + function number(value) { + return toString.call(value) === '[object Number]'; + } + Is.number = number; + function numberRange(value, min, max) { + return toString.call(value) === '[object Number]' && min <= value && value <= max; + } + Is.numberRange = numberRange; + function integer(value) { + return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647; + } + Is.integer = integer; + function uinteger(value) { + return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647; + } + Is.uinteger = uinteger; + function func(value) { + return toString.call(value) === '[object Function]'; + } + Is.func = func; + function objectLiteral(value) { + // Strictly speaking class instances pass this check as well. Since the LSP + // doesn't use classes we ignore this for now. If we do we need to add something + // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null` + return value !== null && typeof value === 'object'; + } + Is.objectLiteral = objectLiteral; + function typedArray(value, check) { + return Array.isArray(value) && value.every(check); + } + Is.typedArray = typedArray; +})(Is || (Is = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/esm/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/esm/package.json" index 01f70c7a5a6ecf4072861dcbf6afc91eccfd1060..3dbc1ca591c0557e35b6004aeba250e6a70b56e3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/esm/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/esm/package.json" @@ -1,3 +1,3 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3ca9d4afd21425087cf31893b8f9f63c81b0b8408db5e343ca76e5f8aa26ab9a -size 23 +{ + "type": "module" +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/umd/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/umd/main.d.ts" index 93b1fe16fffb20b3500c9da8ec9aed5979f51c7c..f7dac8af49502e8b2ca27a505178d3d1bc460f12 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/umd/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/umd/main.d.ts" @@ -1,3 +1,3139 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2e900e22ef301dafb3a35df7aaab4f139bf1602c8e5dc0bb0ca8b24305af388e -size 100569 +/** + * A tagging type for string properties that are actually document URIs. + */ +export type DocumentUri = string; +export declare namespace DocumentUri { + function is(value: any): value is DocumentUri; +} +/** + * A tagging type for string properties that are actually URIs + * + * @since 3.16.0 + */ +export type URI = string; +export declare namespace URI { + function is(value: any): value is URI; +} +/** + * Defines an integer in the range of -2^31 to 2^31 - 1. + */ +export type integer = number; +export declare namespace integer { + const MIN_VALUE = -2147483648; + const MAX_VALUE = 2147483647; + function is(value: any): value is integer; +} +/** + * Defines an unsigned integer in the range of 0 to 2^31 - 1. + */ +export type uinteger = number; +export declare namespace uinteger { + const MIN_VALUE = 0; + const MAX_VALUE = 2147483647; + function is(value: any): value is uinteger; +} +/** + * Defines a decimal number. Since decimal numbers are very + * rare in the language server specification we denote the + * exact range with every decimal using the mathematics + * interval notations (e.g. [0, 1] denotes all decimals d with + * 0 <= d <= 1. + */ +export type decimal = number; +/** + * The LSP any type. + * + * In the current implementation we map LSPAny to any. This is due to the fact + * that the TypeScript compilers can't infer string access signatures for + * interface correctly (it can though for types). See the following issue for + * details: https://github.com/microsoft/TypeScript/issues/15300. + * + * When the issue is addressed LSPAny can be defined as follows: + * + * ```ts + * export type LSPAny = LSPObject | LSPArray | string | integer | uinteger | decimal | boolean | null | undefined; + * export type LSPObject = { [key: string]: LSPAny }; + * export type LSPArray = LSPAny[]; + * ``` + * + * Please note that strictly speaking a property with the value `undefined` + * can't be converted into JSON preserving the property name. However for + * convenience it is allowed and assumed that all these properties are + * optional as well. + * + * @since 3.17.0 + */ +export type LSPAny = any; +export type LSPObject = object; +export type LSPArray = any[]; +/** + * Position in a text document expressed as zero-based line and character + * offset. Prior to 3.17 the offsets were always based on a UTF-16 string + * representation. So a string of the form `a𐐀b` the character offset of the + * character `a` is 0, the character offset of `𐐀` is 1 and the character + * offset of b is 3 since `𐐀` is represented using two code units in UTF-16. + * Since 3.17 clients and servers can agree on a different string encoding + * representation (e.g. UTF-8). The client announces it's supported encoding + * via the client capability [`general.positionEncodings`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#clientCapabilities). + * The value is an array of position encodings the client supports, with + * decreasing preference (e.g. the encoding at index `0` is the most preferred + * one). To stay backwards compatible the only mandatory encoding is UTF-16 + * represented via the string `utf-16`. The server can pick one of the + * encodings offered by the client and signals that encoding back to the + * client via the initialize result's property + * [`capabilities.positionEncoding`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#serverCapabilities). If the string value + * `utf-16` is missing from the client's capability `general.positionEncodings` + * servers can safely assume that the client supports UTF-16. If the server + * omits the position encoding in its initialize result the encoding defaults + * to the string value `utf-16`. Implementation considerations: since the + * conversion from one encoding into another requires the content of the + * file / line the conversion is best done where the file is read which is + * usually on the server side. + * + * Positions are line end character agnostic. So you can not specify a position + * that denotes `\r|\n` or `\n|` where `|` represents the character offset. + * + * @since 3.17.0 - support for negotiated position encoding. + */ +export interface Position { + /** + * Line position in a document (zero-based). + * + * If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document. + * If a line number is negative, it defaults to 0. + */ + line: uinteger; + /** + * Character offset on a line in a document (zero-based). + * + * The meaning of this offset is determined by the negotiated + * `PositionEncodingKind`. + * + * If the character value is greater than the line length it defaults back to the + * line length. + */ + character: uinteger; +} +/** + * The Position namespace provides helper functions to work with + * {@link Position} literals. + */ +export declare namespace Position { + /** + * Creates a new Position literal from the given line and character. + * @param line The position's line. + * @param character The position's character. + */ + function create(line: uinteger, character: uinteger): Position; + /** + * Checks whether the given literal conforms to the {@link Position} interface. + */ + function is(value: any): value is Position; +} +/** + * A range in a text document expressed as (zero-based) start and end positions. + * + * If you want to specify a range that contains a line including the line ending + * character(s) then use an end position denoting the start of the next line. + * For example: + * ```ts + * { + * start: { line: 5, character: 23 } + * end : { line 6, character : 0 } + * } + * ``` + */ +export interface Range { + /** + * The range's start position. + */ + start: Position; + /** + * The range's end position. + */ + end: Position; +} +/** + * The Range namespace provides helper functions to work with + * {@link Range} literals. + */ +export declare namespace Range { + /** + * Create a new Range literal. + * @param start The range's start position. + * @param end The range's end position. + */ + function create(start: Position, end: Position): Range; + /** + * Create a new Range literal. + * @param startLine The start line number. + * @param startCharacter The start character. + * @param endLine The end line number. + * @param endCharacter The end character. + */ + function create(startLine: uinteger, startCharacter: uinteger, endLine: uinteger, endCharacter: uinteger): Range; + /** + * Checks whether the given literal conforms to the {@link Range} interface. + */ + function is(value: any): value is Range; +} +/** + * Represents a location inside a resource, such as a line + * inside a text file. + */ +export interface Location { + uri: DocumentUri; + range: Range; +} +/** + * The Location namespace provides helper functions to work with + * {@link Location} literals. + */ +export declare namespace Location { + /** + * Creates a Location literal. + * @param uri The location's uri. + * @param range The location's range. + */ + function create(uri: DocumentUri, range: Range): Location; + /** + * Checks whether the given literal conforms to the {@link Location} interface. + */ + function is(value: any): value is Location; +} +/** + * Represents the connection of two locations. Provides additional metadata over normal {@link Location locations}, + * including an origin range. + */ +export interface LocationLink { + /** + * Span of the origin of this link. + * + * Used as the underlined span for mouse interaction. Defaults to the word range at + * the definition position. + */ + originSelectionRange?: Range; + /** + * The target resource identifier of this link. + */ + targetUri: DocumentUri; + /** + * The full target range of this link. If the target for example is a symbol then target range is the + * range enclosing this symbol not including leading/trailing whitespace but everything else + * like comments. This information is typically used to highlight the range in the editor. + */ + targetRange: Range; + /** + * The range that should be selected and revealed when this link is being followed, e.g the name of a function. + * Must be contained by the `targetRange`. See also `DocumentSymbol#range` + */ + targetSelectionRange: Range; +} +/** + * The LocationLink namespace provides helper functions to work with + * {@link LocationLink} literals. + */ +export declare namespace LocationLink { + /** + * Creates a LocationLink literal. + * @param targetUri The definition's uri. + * @param targetRange The full range of the definition. + * @param targetSelectionRange The span of the symbol definition at the target. + * @param originSelectionRange The span of the symbol being defined in the originating source file. + */ + function create(targetUri: DocumentUri, targetRange: Range, targetSelectionRange: Range, originSelectionRange?: Range): LocationLink; + /** + * Checks whether the given literal conforms to the {@link LocationLink} interface. + */ + function is(value: any): value is LocationLink; +} +/** + * Represents a color in RGBA space. + */ +export interface Color { + /** + * The red component of this color in the range [0-1]. + */ + readonly red: decimal; + /** + * The green component of this color in the range [0-1]. + */ + readonly green: decimal; + /** + * The blue component of this color in the range [0-1]. + */ + readonly blue: decimal; + /** + * The alpha component of this color in the range [0-1]. + */ + readonly alpha: decimal; +} +/** + * The Color namespace provides helper functions to work with + * {@link Color} literals. + */ +export declare namespace Color { + /** + * Creates a new Color literal. + */ + function create(red: decimal, green: decimal, blue: decimal, alpha: decimal): Color; + /** + * Checks whether the given literal conforms to the {@link Color} interface. + */ + function is(value: any): value is Color; +} +/** + * Represents a color range from a document. + */ +export interface ColorInformation { + /** + * The range in the document where this color appears. + */ + range: Range; + /** + * The actual color value for this color range. + */ + color: Color; +} +/** + * The ColorInformation namespace provides helper functions to work with + * {@link ColorInformation} literals. + */ +export declare namespace ColorInformation { + /** + * Creates a new ColorInformation literal. + */ + function create(range: Range, color: Color): ColorInformation; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value: any): value is ColorInformation; +} +export interface ColorPresentation { + /** + * The label of this color presentation. It will be shown on the color + * picker header. By default this is also the text that is inserted when selecting + * this color presentation. + */ + label: string; + /** + * An {@link TextEdit edit} which is applied to a document when selecting + * this presentation for the color. When `falsy` the {@link ColorPresentation.label label} + * is used. + */ + textEdit?: TextEdit; + /** + * An optional array of additional {@link TextEdit text edits} that are applied when + * selecting this color presentation. Edits must not overlap with the main {@link ColorPresentation.textEdit edit} nor with themselves. + */ + additionalTextEdits?: TextEdit[]; +} +/** + * The Color namespace provides helper functions to work with + * {@link ColorPresentation} literals. + */ +export declare namespace ColorPresentation { + /** + * Creates a new ColorInformation literal. + */ + function create(label: string, textEdit?: TextEdit, additionalTextEdits?: TextEdit[]): ColorPresentation; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value: any): value is ColorPresentation; +} +/** + * A set of predefined range kinds. + */ +export declare namespace FoldingRangeKind { + /** + * Folding range for a comment + */ + const Comment = "comment"; + /** + * Folding range for an import or include + */ + const Imports = "imports"; + /** + * Folding range for a region (e.g. `#region`) + */ + const Region = "region"; +} +/** + * A predefined folding range kind. + * + * The type is a string since the value set is extensible + */ +export type FoldingRangeKind = string; +/** + * Represents a folding range. To be valid, start and end line must be bigger than zero and smaller + * than the number of lines in the document. Clients are free to ignore invalid ranges. + */ +export interface FoldingRange { + /** + * The zero-based start line of the range to fold. The folded area starts after the line's last character. + * To be valid, the end must be zero or larger and smaller than the number of lines in the document. + */ + startLine: uinteger; + /** + * The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line. + */ + startCharacter?: uinteger; + /** + * The zero-based end line of the range to fold. The folded area ends with the line's last character. + * To be valid, the end must be zero or larger and smaller than the number of lines in the document. + */ + endLine: uinteger; + /** + * The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line. + */ + endCharacter?: uinteger; + /** + * Describes the kind of the folding range such as `comment' or 'region'. The kind + * is used to categorize folding ranges and used by commands like 'Fold all comments'. + * See {@link FoldingRangeKind} for an enumeration of standardized kinds. + */ + kind?: FoldingRangeKind; + /** + * The text that the client should show when the specified range is + * collapsed. If not defined or not supported by the client, a default + * will be chosen by the client. + * + * @since 3.17.0 + */ + collapsedText?: string; +} +/** + * The folding range namespace provides helper functions to work with + * {@link FoldingRange} literals. + */ +export declare namespace FoldingRange { + /** + * Creates a new FoldingRange literal. + */ + function create(startLine: uinteger, endLine: uinteger, startCharacter?: uinteger, endCharacter?: uinteger, kind?: FoldingRangeKind, collapsedText?: string): FoldingRange; + /** + * Checks whether the given literal conforms to the {@link FoldingRange} interface. + */ + function is(value: any): value is FoldingRange; +} +/** + * Represents a related message and source code location for a diagnostic. This should be + * used to point to code locations that cause or related to a diagnostics, e.g when duplicating + * a symbol in a scope. + */ +export interface DiagnosticRelatedInformation { + /** + * The location of this related diagnostic information. + */ + location: Location; + /** + * The message of this related diagnostic information. + */ + message: string; +} +/** + * The DiagnosticRelatedInformation namespace provides helper functions to work with + * {@link DiagnosticRelatedInformation} literals. + */ +export declare namespace DiagnosticRelatedInformation { + /** + * Creates a new DiagnosticRelatedInformation literal. + */ + function create(location: Location, message: string): DiagnosticRelatedInformation; + /** + * Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface. + */ + function is(value: any): value is DiagnosticRelatedInformation; +} +/** + * The diagnostic's severity. + */ +export declare namespace DiagnosticSeverity { + /** + * Reports an error. + */ + const Error: 1; + /** + * Reports a warning. + */ + const Warning: 2; + /** + * Reports an information. + */ + const Information: 3; + /** + * Reports a hint. + */ + const Hint: 4; +} +export type DiagnosticSeverity = 1 | 2 | 3 | 4; +/** + * The diagnostic tags. + * + * @since 3.15.0 + */ +export declare namespace DiagnosticTag { + /** + * Unused or unnecessary code. + * + * Clients are allowed to render diagnostics with this tag faded out instead of having + * an error squiggle. + */ + const Unnecessary: 1; + /** + * Deprecated or obsolete code. + * + * Clients are allowed to rendered diagnostics with this tag strike through. + */ + const Deprecated: 2; +} +export type DiagnosticTag = 1 | 2; +/** + * Structure to capture a description for an error code. + * + * @since 3.16.0 + */ +export interface CodeDescription { + /** + * An URI to open with more information about the diagnostic error. + */ + href: URI; +} +/** + * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes. + * + * @since 3.16.0 + */ +export declare namespace CodeDescription { + function is(value: any): value is CodeDescription; +} +/** + * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects + * are only valid in the scope of a resource. + */ +export interface Diagnostic { + /** + * The range at which the message applies + */ + range: Range; + /** + * The diagnostic's severity. Can be omitted. If omitted it is up to the + * client to interpret diagnostics as error, warning, info or hint. + */ + severity?: DiagnosticSeverity; + /** + * The diagnostic's code, which usually appear in the user interface. + */ + code?: integer | string; + /** + * An optional property to describe the error code. + * Requires the code field (above) to be present/not null. + * + * @since 3.16.0 + */ + codeDescription?: CodeDescription; + /** + * A human-readable string describing the source of this + * diagnostic, e.g. 'typescript' or 'super lint'. It usually + * appears in the user interface. + */ + source?: string; + /** + * The diagnostic's message. It usually appears in the user interface + */ + message: string; + /** + * Additional metadata about the diagnostic. + * + * @since 3.15.0 + */ + tags?: DiagnosticTag[]; + /** + * An array of related diagnostic information, e.g. when symbol-names within + * a scope collide all definitions can be marked via this property. + */ + relatedInformation?: DiagnosticRelatedInformation[]; + /** + * A data entry field that is preserved between a `textDocument/publishDiagnostics` + * notification and `textDocument/codeAction` request. + * + * @since 3.16.0 + */ + data?: LSPAny; +} +/** + * The Diagnostic namespace provides helper functions to work with + * {@link Diagnostic} literals. + */ +export declare namespace Diagnostic { + /** + * Creates a new Diagnostic literal. + */ + function create(range: Range, message: string, severity?: DiagnosticSeverity, code?: integer | string, source?: string, relatedInformation?: DiagnosticRelatedInformation[]): Diagnostic; + /** + * Checks whether the given literal conforms to the {@link Diagnostic} interface. + */ + function is(value: any): value is Diagnostic; +} +/** + * Represents a reference to a command. Provides a title which + * will be used to represent a command in the UI and, optionally, + * an array of arguments which will be passed to the command handler + * function when invoked. + */ +export interface Command { + /** + * Title of the command, like `save`. + */ + title: string; + /** + * The identifier of the actual command handler. + */ + command: string; + /** + * Arguments that the command handler should be + * invoked with. + */ + arguments?: LSPAny[]; +} +/** + * The Command namespace provides helper functions to work with + * {@link Command} literals. + */ +export declare namespace Command { + /** + * Creates a new Command literal. + */ + function create(title: string, command: string, ...args: any[]): Command; + /** + * Checks whether the given literal conforms to the {@link Command} interface. + */ + function is(value: any): value is Command; +} +/** + * A text edit applicable to a text document. + */ +export interface TextEdit { + /** + * The range of the text document to be manipulated. To insert + * text into a document create a range where start === end. + */ + range: Range; + /** + * The string to be inserted. For delete operations use an + * empty string. + */ + newText: string; +} +/** + * The TextEdit namespace provides helper function to create replace, + * insert and delete edits more easily. + */ +export declare namespace TextEdit { + /** + * Creates a replace text edit. + * @param range The range of text to be replaced. + * @param newText The new text. + */ + function replace(range: Range, newText: string): TextEdit; + /** + * Creates an insert text edit. + * @param position The position to insert the text at. + * @param newText The text to be inserted. + */ + function insert(position: Position, newText: string): TextEdit; + /** + * Creates a delete text edit. + * @param range The range of text to be deleted. + */ + function del(range: Range): TextEdit; + function is(value: any): value is TextEdit; +} +/** + * Additional information that describes document changes. + * + * @since 3.16.0 + */ +export interface ChangeAnnotation { + /** + * A human-readable string describing the actual change. The string + * is rendered prominent in the user interface. + */ + label: string; + /** + * A flag which indicates that user confirmation is needed + * before applying the change. + */ + needsConfirmation?: boolean; + /** + * A human-readable string which is rendered less prominent in + * the user interface. + */ + description?: string; +} +export declare namespace ChangeAnnotation { + function create(label: string, needsConfirmation?: boolean, description?: string): ChangeAnnotation; + function is(value: any): value is ChangeAnnotation; +} +export declare namespace ChangeAnnotationIdentifier { + function is(value: any): value is ChangeAnnotationIdentifier; +} +/** + * An identifier to refer to a change annotation stored with a workspace edit. + */ +export type ChangeAnnotationIdentifier = string; +/** + * A special text edit with an additional change annotation. + * + * @since 3.16.0. + */ +export interface AnnotatedTextEdit extends TextEdit { + /** + * The actual identifier of the change annotation + */ + annotationId: ChangeAnnotationIdentifier; +} +export declare namespace AnnotatedTextEdit { + /** + * Creates an annotated replace text edit. + * + * @param range The range of text to be replaced. + * @param newText The new text. + * @param annotation The annotation. + */ + function replace(range: Range, newText: string, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + /** + * Creates an annotated insert text edit. + * + * @param position The position to insert the text at. + * @param newText The text to be inserted. + * @param annotation The annotation. + */ + function insert(position: Position, newText: string, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + /** + * Creates an annotated delete text edit. + * + * @param range The range of text to be deleted. + * @param annotation The annotation. + */ + function del(range: Range, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + function is(value: any): value is AnnotatedTextEdit; +} +/** + * Describes textual changes on a text document. A TextDocumentEdit describes all changes + * on a document version Si and after they are applied move the document to version Si+1. + * So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any + * kind of ordering. However the edits must be non overlapping. + */ +export interface TextDocumentEdit { + /** + * The text document to change. + */ + textDocument: OptionalVersionedTextDocumentIdentifier; + /** + * The edits to be applied. + * + * @since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a + * client capability. + */ + edits: (TextEdit | AnnotatedTextEdit)[]; +} +/** + * The TextDocumentEdit namespace provides helper function to create + * an edit that manipulates a text document. + */ +export declare namespace TextDocumentEdit { + /** + * Creates a new `TextDocumentEdit` + */ + function create(textDocument: OptionalVersionedTextDocumentIdentifier, edits: (TextEdit | AnnotatedTextEdit)[]): TextDocumentEdit; + function is(value: any): value is TextDocumentEdit; +} +/** + * A generic resource operation. + */ +interface ResourceOperation { + /** + * The resource operation kind. + */ + kind: string; + /** + * An optional annotation identifier describing the operation. + * + * @since 3.16.0 + */ + annotationId?: ChangeAnnotationIdentifier; +} +/** + * Options to create a file. + */ +export interface CreateFileOptions { + /** + * Overwrite existing file. Overwrite wins over `ignoreIfExists` + */ + overwrite?: boolean; + /** + * Ignore if exists. + */ + ignoreIfExists?: boolean; +} +/** + * Create file operation. + */ +export interface CreateFile extends ResourceOperation { + /** + * A create + */ + kind: 'create'; + /** + * The resource to create. + */ + uri: DocumentUri; + /** + * Additional options + */ + options?: CreateFileOptions; +} +export declare namespace CreateFile { + function create(uri: DocumentUri, options?: CreateFileOptions, annotation?: ChangeAnnotationIdentifier): CreateFile; + function is(value: any): value is CreateFile; +} +/** + * Rename file options + */ +export interface RenameFileOptions { + /** + * Overwrite target if existing. Overwrite wins over `ignoreIfExists` + */ + overwrite?: boolean; + /** + * Ignores if target exists. + */ + ignoreIfExists?: boolean; +} +/** + * Rename file operation + */ +export interface RenameFile extends ResourceOperation { + /** + * A rename + */ + kind: 'rename'; + /** + * The old (existing) location. + */ + oldUri: DocumentUri; + /** + * The new location. + */ + newUri: DocumentUri; + /** + * Rename options. + */ + options?: RenameFileOptions; +} +export declare namespace RenameFile { + function create(oldUri: DocumentUri, newUri: DocumentUri, options?: RenameFileOptions, annotation?: ChangeAnnotationIdentifier): RenameFile; + function is(value: any): value is RenameFile; +} +/** + * Delete file options + */ +export interface DeleteFileOptions { + /** + * Delete the content recursively if a folder is denoted. + */ + recursive?: boolean; + /** + * Ignore the operation if the file doesn't exist. + */ + ignoreIfNotExists?: boolean; +} +/** + * Delete file operation + */ +export interface DeleteFile extends ResourceOperation { + /** + * A delete + */ + kind: 'delete'; + /** + * The file to delete. + */ + uri: DocumentUri; + /** + * Delete options. + */ + options?: DeleteFileOptions; +} +export declare namespace DeleteFile { + function create(uri: DocumentUri, options?: DeleteFileOptions, annotation?: ChangeAnnotationIdentifier): DeleteFile; + function is(value: any): value is DeleteFile; +} +/** + * A workspace edit represents changes to many resources managed in the workspace. The edit + * should either provide `changes` or `documentChanges`. If documentChanges are present + * they are preferred over `changes` if the client can handle versioned document edits. + * + * Since version 3.13.0 a workspace edit can contain resource operations as well. If resource + * operations are present clients need to execute the operations in the order in which they + * are provided. So a workspace edit for example can consist of the following two changes: + * (1) a create file a.txt and (2) a text document edit which insert text into file a.txt. + * + * An invalid sequence (e.g. (1) delete file a.txt and (2) insert text into file a.txt) will + * cause failure of the operation. How the client recovers from the failure is described by + * the client capability: `workspace.workspaceEdit.failureHandling` + */ +export interface WorkspaceEdit { + /** + * Holds changes to existing resources. + */ + changes?: { + [uri: DocumentUri]: TextEdit[]; + }; + /** + * Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes + * are either an array of `TextDocumentEdit`s to express changes to n different text documents + * where each text document edit addresses a specific version of a text document. Or it can contain + * above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations. + * + * Whether a client supports versioned document edits is expressed via + * `workspace.workspaceEdit.documentChanges` client capability. + * + * If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then + * only plain `TextEdit`s using the `changes` property are supported. + */ + documentChanges?: (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[]; + /** + * A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and + * delete file / folder operations. + * + * Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`. + * + * @since 3.16.0 + */ + changeAnnotations?: { + [id: ChangeAnnotationIdentifier]: ChangeAnnotation; + }; +} +export declare namespace WorkspaceEdit { + function is(value: any): value is WorkspaceEdit; +} +/** + * A change to capture text edits for existing resources. + */ +export interface TextEditChange { + /** + * Gets all text edits for this change. + * + * @return An array of text edits. + * + * @since 3.16.0 - support for annotated text edits. This is usually + * guarded using a client capability. + */ + all(): (TextEdit | AnnotatedTextEdit)[]; + /** + * Clears the edits for this change. + */ + clear(): void; + /** + * Adds a text edit. + * + * @param edit the text edit to add. + * + * @since 3.16.0 - support for annotated text edits. This is usually + * guarded using a client capability. + */ + add(edit: TextEdit | AnnotatedTextEdit): void; + /** + * Insert the given text at the given position. + * + * @param position A position. + * @param newText A string. + * @param annotation An optional annotation. + */ + insert(position: Position, newText: string): void; + insert(position: Position, newText: string, annotation: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; + /** + * Replace the given range with given text for the given resource. + * + * @param range A range. + * @param newText A string. + * @param annotation An optional annotation. + */ + replace(range: Range, newText: string): void; + replace(range: Range, newText: string, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; + /** + * Delete the text at the given range. + * + * @param range A range. + * @param annotation An optional annotation. + */ + delete(range: Range): void; + delete(range: Range, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; +} +/** + * A workspace change helps constructing changes to a workspace. + */ +export declare class WorkspaceChange { + private _workspaceEdit; + private _textEditChanges; + private _changeAnnotations; + constructor(workspaceEdit?: WorkspaceEdit); + /** + * Returns the underlying {@link WorkspaceEdit} literal + * use to be returned from a workspace edit operation like rename. + */ + get edit(): WorkspaceEdit; + /** + * Returns the {@link TextEditChange} to manage text edits + * for resources. + */ + getTextEditChange(textDocument: OptionalVersionedTextDocumentIdentifier): TextEditChange; + getTextEditChange(uri: DocumentUri): TextEditChange; + private initDocumentChanges; + private initChanges; + createFile(uri: DocumentUri, options?: CreateFileOptions): void; + createFile(uri: DocumentUri, annotation: ChangeAnnotation | ChangeAnnotationIdentifier, options?: CreateFileOptions): ChangeAnnotationIdentifier; + renameFile(oldUri: DocumentUri, newUri: DocumentUri, options?: RenameFileOptions): void; + renameFile(oldUri: DocumentUri, newUri: DocumentUri, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier, options?: RenameFileOptions): ChangeAnnotationIdentifier; + deleteFile(uri: DocumentUri, options?: DeleteFileOptions): void; + deleteFile(uri: DocumentUri, annotation: ChangeAnnotation | ChangeAnnotationIdentifier, options?: DeleteFileOptions): ChangeAnnotationIdentifier; +} +/** + * A literal to identify a text document in the client. + */ +export interface TextDocumentIdentifier { + /** + * The text document's uri. + */ + uri: DocumentUri; +} +/** + * The TextDocumentIdentifier namespace provides helper functions to work with + * {@link TextDocumentIdentifier} literals. + */ +export declare namespace TextDocumentIdentifier { + /** + * Creates a new TextDocumentIdentifier literal. + * @param uri The document's uri. + */ + function create(uri: DocumentUri): TextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface. + */ + function is(value: any): value is TextDocumentIdentifier; +} +/** + * A text document identifier to denote a specific version of a text document. + */ +export interface VersionedTextDocumentIdentifier extends TextDocumentIdentifier { + /** + * The version number of this document. + */ + version: integer; +} +/** + * The VersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link VersionedTextDocumentIdentifier} literals. + */ +export declare namespace VersionedTextDocumentIdentifier { + /** + * Creates a new VersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri: DocumentUri, version: integer): VersionedTextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface. + */ + function is(value: any): value is VersionedTextDocumentIdentifier; +} +/** + * A text document identifier to optionally denote a specific version of a text document. + */ +export interface OptionalVersionedTextDocumentIdentifier extends TextDocumentIdentifier { + /** + * The version number of this document. If a versioned text document identifier + * is sent from the server to the client and the file is not open in the editor + * (the server has not received an open notification before) the server can send + * `null` to indicate that the version is unknown and the content on disk is the + * truth (as specified with document content ownership). + */ + version: integer | null; +} +/** + * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link OptionalVersionedTextDocumentIdentifier} literals. + */ +export declare namespace OptionalVersionedTextDocumentIdentifier { + /** + * Creates a new OptionalVersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri: DocumentUri, version: integer | null): OptionalVersionedTextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface. + */ + function is(value: any): value is OptionalVersionedTextDocumentIdentifier; +} +/** + * An item to transfer a text document from the client to the + * server. + */ +export interface TextDocumentItem { + /** + * The text document's uri. + */ + uri: DocumentUri; + /** + * The text document's language identifier. + */ + languageId: string; + /** + * The version number of this document (it will increase after each + * change, including undo/redo). + */ + version: integer; + /** + * The content of the opened text document. + */ + text: string; +} +/** + * The TextDocumentItem namespace provides helper functions to work with + * {@link TextDocumentItem} literals. + */ +export declare namespace TextDocumentItem { + /** + * Creates a new TextDocumentItem literal. + * @param uri The document's uri. + * @param languageId The document's language identifier. + * @param version The document's version number. + * @param text The document's text. + */ + function create(uri: DocumentUri, languageId: string, version: integer, text: string): TextDocumentItem; + /** + * Checks whether the given literal conforms to the {@link TextDocumentItem} interface. + */ + function is(value: any): value is TextDocumentItem; +} +/** + * Describes the content type that a client supports in various + * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. + * + * Please note that `MarkupKinds` must not start with a `$`. This kinds + * are reserved for internal usage. + */ +export declare namespace MarkupKind { + /** + * Plain text is supported as a content format + */ + const PlainText: 'plaintext'; + /** + * Markdown is supported as a content format + */ + const Markdown: 'markdown'; + /** + * Checks whether the given value is a value of the {@link MarkupKind} type. + */ + function is(value: any): value is MarkupKind; +} +export type MarkupKind = 'plaintext' | 'markdown'; +/** + * A `MarkupContent` literal represents a string value which content is interpreted base on its + * kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds. + * + * If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues. + * See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting + * + * Here is an example how such a string can be constructed using JavaScript / TypeScript: + * ```ts + * let markdown: MarkdownContent = { + * kind: MarkupKind.Markdown, + * value: [ + * '# Header', + * 'Some text', + * '```typescript', + * 'someCode();', + * '```' + * ].join('\n') + * }; + * ``` + * + * *Please Note* that clients might sanitize the return markdown. A client could decide to + * remove HTML from the markdown to avoid script execution. + */ +export interface MarkupContent { + /** + * The type of the Markup + */ + kind: MarkupKind; + /** + * The content itself + */ + value: string; +} +export declare namespace MarkupContent { + /** + * Checks whether the given value conforms to the {@link MarkupContent} interface. + */ + function is(value: any): value is MarkupContent; +} +/** + * The kind of a completion entry. + */ +export declare namespace CompletionItemKind { + const Text: 1; + const Method: 2; + const Function: 3; + const Constructor: 4; + const Field: 5; + const Variable: 6; + const Class: 7; + const Interface: 8; + const Module: 9; + const Property: 10; + const Unit: 11; + const Value: 12; + const Enum: 13; + const Keyword: 14; + const Snippet: 15; + const Color: 16; + const File: 17; + const Reference: 18; + const Folder: 19; + const EnumMember: 20; + const Constant: 21; + const Struct: 22; + const Event: 23; + const Operator: 24; + const TypeParameter: 25; +} +export type CompletionItemKind = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25; +/** + * Defines whether the insert text in a completion item should be interpreted as + * plain text or a snippet. + */ +export declare namespace InsertTextFormat { + /** + * The primary text to be inserted is treated as a plain string. + */ + const PlainText: 1; + /** + * The primary text to be inserted is treated as a snippet. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Placeholders with equal identifiers are linked, + * that is typing in one will update others too. + * + * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax + */ + const Snippet: 2; +} +export type InsertTextFormat = 1 | 2; +/** + * Completion item tags are extra annotations that tweak the rendering of a completion + * item. + * + * @since 3.15.0 + */ +export declare namespace CompletionItemTag { + /** + * Render a completion as obsolete, usually using a strike-out. + */ + const Deprecated = 1; +} +export type CompletionItemTag = 1; +/** + * A special text edit to provide an insert and a replace operation. + * + * @since 3.16.0 + */ +export interface InsertReplaceEdit { + /** + * The string to be inserted. + */ + newText: string; + /** + * The range if the insert is requested + */ + insert: Range; + /** + * The range if the replace is requested. + */ + replace: Range; +} +/** + * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits. + * + * @since 3.16.0 + */ +export declare namespace InsertReplaceEdit { + /** + * Creates a new insert / replace edit + */ + function create(newText: string, insert: Range, replace: Range): InsertReplaceEdit; + /** + * Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface. + */ + function is(value: TextEdit | InsertReplaceEdit): value is InsertReplaceEdit; +} +/** + * How whitespace and indentation is handled during completion + * item insertion. + * + * @since 3.16.0 + */ +export declare namespace InsertTextMode { + /** + * The insertion or replace strings is taken as it is. If the + * value is multi line the lines below the cursor will be + * inserted using the indentation defined in the string value. + * The client will not apply any kind of adjustments to the + * string. + */ + const asIs: 1; + /** + * The editor adjusts leading whitespace of new lines so that + * they match the indentation up to the cursor of the line for + * which the item is accepted. + * + * Consider a line like this: <2tabs><3tabs>foo. Accepting a + * multi line completion item is indented using 2 tabs and all + * following lines inserted will be indented using 2 tabs as well. + */ + const adjustIndentation: 2; +} +export type InsertTextMode = 1 | 2; +/** + * Additional details for a completion item label. + * + * @since 3.17.0 + */ +export interface CompletionItemLabelDetails { + /** + * An optional string which is rendered less prominently directly after {@link CompletionItem.label label}, + * without any spacing. Should be used for function signatures and type annotations. + */ + detail?: string; + /** + * An optional string which is rendered less prominently after {@link CompletionItem.detail}. Should be used + * for fully qualified names and file paths. + */ + description?: string; +} +export declare namespace CompletionItemLabelDetails { + function is(value: any): value is CompletionItemLabelDetails; +} +/** + * A completion item represents a text snippet that is + * proposed to complete text that is being typed. + */ +export interface CompletionItem { + /** + * The label of this completion item. + * + * The label property is also by default the text that + * is inserted when selecting this completion. + * + * If label details are provided the label itself should + * be an unqualified name of the completion item. + */ + label: string; + /** + * Additional details for the label + * + * @since 3.17.0 + */ + labelDetails?: CompletionItemLabelDetails; + /** + * The kind of this completion item. Based of the kind + * an icon is chosen by the editor. + */ + kind?: CompletionItemKind; + /** + * Tags for this completion item. + * + * @since 3.15.0 + */ + tags?: CompletionItemTag[]; + /** + * A human-readable string with additional information + * about this item, like type or symbol information. + */ + detail?: string; + /** + * A human-readable string that represents a doc-comment. + */ + documentation?: string | MarkupContent; + /** + * Indicates if this item is deprecated. + * @deprecated Use `tags` instead. + */ + deprecated?: boolean; + /** + * Select this item when showing. + * + * *Note* that only one completion item can be selected and that the + * tool / client decides which item that is. The rule is that the *first* + * item of those that match best is selected. + */ + preselect?: boolean; + /** + * A string that should be used when comparing this item + * with other items. When `falsy` the {@link CompletionItem.label label} + * is used. + */ + sortText?: string; + /** + * A string that should be used when filtering a set of + * completion items. When `falsy` the {@link CompletionItem.label label} + * is used. + */ + filterText?: string; + /** + * A string that should be inserted into a document when selecting + * this completion. When `falsy` the {@link CompletionItem.label label} + * is used. + * + * The `insertText` is subject to interpretation by the client side. + * Some tools might not take the string literally. For example + * VS Code when code complete is requested in this example + * `con` and a completion item with an `insertText` of + * `console` is provided it will only insert `sole`. Therefore it is + * recommended to use `textEdit` instead since it avoids additional client + * side interpretation. + */ + insertText?: string; + /** + * The format of the insert text. The format applies to both the + * `insertText` property and the `newText` property of a provided + * `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`. + * + * Please note that the insertTextFormat doesn't apply to + * `additionalTextEdits`. + */ + insertTextFormat?: InsertTextFormat; + /** + * How whitespace and indentation is handled during completion + * item insertion. If not provided the clients default value depends on + * the `textDocument.completion.insertTextMode` client capability. + * + * @since 3.16.0 + */ + insertTextMode?: InsertTextMode; + /** + * An {@link TextEdit edit} which is applied to a document when selecting + * this completion. When an edit is provided the value of + * {@link CompletionItem.insertText insertText} is ignored. + * + * Most editors support two different operations when accepting a completion + * item. One is to insert a completion text and the other is to replace an + * existing text with a completion text. Since this can usually not be + * predetermined by a server it can report both ranges. Clients need to + * signal support for `InsertReplaceEdits` via the + * `textDocument.completion.insertReplaceSupport` client capability + * property. + * + * *Note 1:* The text edit's range as well as both ranges from an insert + * replace edit must be a [single line] and they must contain the position + * at which completion has been requested. + * *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range + * must be a prefix of the edit's replace range, that means it must be + * contained and starting at the same position. + * + * @since 3.16.0 additional type `InsertReplaceEdit` + */ + textEdit?: TextEdit | InsertReplaceEdit; + /** + * The edit text used if the completion item is part of a CompletionList and + * CompletionList defines an item default for the text edit range. + * + * Clients will only honor this property if they opt into completion list + * item defaults using the capability `completionList.itemDefaults`. + * + * If not provided and a list's default range is provided the label + * property is used as a text. + * + * @since 3.17.0 + */ + textEditText?: string; + /** + * An optional array of additional {@link TextEdit text edits} that are applied when + * selecting this completion. Edits must not overlap (including the same insert position) + * with the main {@link CompletionItem.textEdit edit} nor with themselves. + * + * Additional text edits should be used to change text unrelated to the current cursor position + * (for example adding an import statement at the top of the file if the completion item will + * insert an unqualified type). + */ + additionalTextEdits?: TextEdit[]; + /** + * An optional set of characters that when pressed while this completion is active will accept it first and + * then type that character. *Note* that all commit characters should have `length=1` and that superfluous + * characters will be ignored. + */ + commitCharacters?: string[]; + /** + * An optional {@link Command command} that is executed *after* inserting this completion. *Note* that + * additional modifications to the current document should be described with the + * {@link CompletionItem.additionalTextEdits additionalTextEdits}-property. + */ + command?: Command; + /** + * A data entry field that is preserved on a completion item between a + * {@link CompletionRequest} and a {@link CompletionResolveRequest}. + */ + data?: LSPAny; +} +/** + * The CompletionItem namespace provides functions to deal with + * completion items. + */ +export declare namespace CompletionItem { + /** + * Create a completion item and seed it with a label. + * @param label The completion item's label + */ + function create(label: string): CompletionItem; +} +/** + * Represents a collection of {@link CompletionItem completion items} to be presented + * in the editor. + */ +export interface CompletionList { + /** + * This list it not complete. Further typing results in recomputing this list. + * + * Recomputed lists have all their items replaced (not appended) in the + * incomplete completion sessions. + */ + isIncomplete: boolean; + /** + * In many cases the items of an actual completion result share the same + * value for properties like `commitCharacters` or the range of a text + * edit. A completion list can therefore define item defaults which will + * be used if a completion item itself doesn't specify the value. + * + * If a completion list specifies a default value and a completion item + * also specifies a corresponding value the one from the item is used. + * + * Servers are only allowed to return default values if the client + * signals support for this via the `completionList.itemDefaults` + * capability. + * + * @since 3.17.0 + */ + itemDefaults?: { + /** + * A default commit character set. + * + * @since 3.17.0 + */ + commitCharacters?: string[]; + /** + * A default edit range. + * + * @since 3.17.0 + */ + editRange?: Range | { + insert: Range; + replace: Range; + }; + /** + * A default insert text format. + * + * @since 3.17.0 + */ + insertTextFormat?: InsertTextFormat; + /** + * A default insert text mode. + * + * @since 3.17.0 + */ + insertTextMode?: InsertTextMode; + /** + * A default data value. + * + * @since 3.17.0 + */ + data?: LSPAny; + }; + /** + * The completion items. + */ + items: CompletionItem[]; +} +/** + * The CompletionList namespace provides functions to deal with + * completion lists. + */ +export declare namespace CompletionList { + /** + * Creates a new completion list. + * + * @param items The completion items. + * @param isIncomplete The list is not complete. + */ + function create(items?: CompletionItem[], isIncomplete?: boolean): CompletionList; +} +/** + * MarkedString can be used to render human readable text. It is either a markdown string + * or a code-block that provides a language and a code snippet. The language identifier + * is semantically equal to the optional language identifier in fenced code blocks in GitHub + * issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting + * + * The pair of a language and a value is an equivalent to markdown: + * ```${language} + * ${value} + * ``` + * + * Note that markdown strings will be sanitized - that means html will be escaped. + * @deprecated use MarkupContent instead. + */ +export type MarkedString = string | { + language: string; + value: string; +}; +export declare namespace MarkedString { + /** + * Creates a marked string from plain text. + * + * @param plainText The plain text. + */ + function fromPlainText(plainText: string): string; + /** + * Checks whether the given value conforms to the {@link MarkedString} type. + */ + function is(value: any): value is MarkedString; +} +/** + * The result of a hover request. + */ +export interface Hover { + /** + * The hover's content + */ + contents: MarkupContent | MarkedString | MarkedString[]; + /** + * An optional range inside the text document that is used to + * visualize the hover, e.g. by changing the background color. + */ + range?: Range; +} +export declare namespace Hover { + /** + * Checks whether the given value conforms to the {@link Hover} interface. + */ + function is(value: any): value is Hover; +} +/** + * Represents a parameter of a callable-signature. A parameter can + * have a label and a doc-comment. + */ +export interface ParameterInformation { + /** + * The label of this parameter information. + * + * Either a string or an inclusive start and exclusive end offsets within its containing + * signature label. (see SignatureInformation.label). The offsets are based on a UTF-16 + * string representation as `Position` and `Range` does. + * + * *Note*: a label of type string should be a substring of its containing signature label. + * Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`. + */ + label: string | [uinteger, uinteger]; + /** + * The human-readable doc-comment of this parameter. Will be shown + * in the UI but can be omitted. + */ + documentation?: string | MarkupContent; +} +/** + * The ParameterInformation namespace provides helper functions to work with + * {@link ParameterInformation} literals. + */ +export declare namespace ParameterInformation { + /** + * Creates a new parameter information literal. + * + * @param label A label string. + * @param documentation A doc string. + */ + function create(label: string | [uinteger, uinteger], documentation?: string): ParameterInformation; +} +/** + * Represents the signature of something callable. A signature + * can have a label, like a function-name, a doc-comment, and + * a set of parameters. + */ +export interface SignatureInformation { + /** + * The label of this signature. Will be shown in + * the UI. + */ + label: string; + /** + * The human-readable doc-comment of this signature. Will be shown + * in the UI but can be omitted. + */ + documentation?: string | MarkupContent; + /** + * The parameters of this signature. + */ + parameters?: ParameterInformation[]; + /** + * The index of the active parameter. + * + * If provided, this is used in place of `SignatureHelp.activeParameter`. + * + * @since 3.16.0 + */ + activeParameter?: uinteger; +} +/** + * The SignatureInformation namespace provides helper functions to work with + * {@link SignatureInformation} literals. + */ +export declare namespace SignatureInformation { + function create(label: string, documentation?: string, ...parameters: ParameterInformation[]): SignatureInformation; +} +/** + * Signature help represents the signature of something + * callable. There can be multiple signature but only one + * active and only one active parameter. + */ +export interface SignatureHelp { + /** + * One or more signatures. + */ + signatures: SignatureInformation[]; + /** + * The active signature. If omitted or the value lies outside the + * range of `signatures` the value defaults to zero or is ignored if + * the `SignatureHelp` has no signatures. + * + * Whenever possible implementors should make an active decision about + * the active signature and shouldn't rely on a default value. + * + * In future version of the protocol this property might become + * mandatory to better express this. + */ + activeSignature?: uinteger; + /** + * The active parameter of the active signature. If omitted or the value + * lies outside the range of `signatures[activeSignature].parameters` + * defaults to 0 if the active signature has parameters. If + * the active signature has no parameters it is ignored. + * In future version of the protocol this property might become + * mandatory to better express the active parameter if the + * active signature does have any. + */ + activeParameter?: uinteger; +} +/** + * The definition of a symbol represented as one or many {@link Location locations}. + * For most programming languages there is only one location at which a symbol is + * defined. + * + * Servers should prefer returning `DefinitionLink` over `Definition` if supported + * by the client. + */ +export type Definition = Location | Location[]; +/** + * Information about where a symbol is defined. + * + * Provides additional metadata over normal {@link Location location} definitions, including the range of + * the defining symbol + */ +export type DefinitionLink = LocationLink; +/** + * The declaration of a symbol representation as one or many {@link Location locations}. + */ +export type Declaration = Location | Location[]; +/** + * Information about where a symbol is declared. + * + * Provides additional metadata over normal {@link Location location} declarations, including the range of + * the declaring symbol. + * + * Servers should prefer returning `DeclarationLink` over `Declaration` if supported + * by the client. + */ +export type DeclarationLink = LocationLink; +/** + * Value-object that contains additional information when + * requesting references. + */ +export interface ReferenceContext { + /** + * Include the declaration of the current symbol. + */ + includeDeclaration: boolean; +} +/** + * A document highlight kind. + */ +export declare namespace DocumentHighlightKind { + /** + * A textual occurrence. + */ + const Text: 1; + /** + * Read-access of a symbol, like reading a variable. + */ + const Read: 2; + /** + * Write-access of a symbol, like writing to a variable. + */ + const Write: 3; +} +export type DocumentHighlightKind = 1 | 2 | 3; +/** + * A document highlight is a range inside a text document which deserves + * special attention. Usually a document highlight is visualized by changing + * the background color of its range. + */ +export interface DocumentHighlight { + /** + * The range this highlight applies to. + */ + range: Range; + /** + * The highlight kind, default is {@link DocumentHighlightKind.Text text}. + */ + kind?: DocumentHighlightKind; +} +/** + * DocumentHighlight namespace to provide helper functions to work with + * {@link DocumentHighlight} literals. + */ +export declare namespace DocumentHighlight { + /** + * Create a DocumentHighlight object. + * @param range The range the highlight applies to. + * @param kind The highlight kind + */ + function create(range: Range, kind?: DocumentHighlightKind): DocumentHighlight; +} +/** + * A symbol kind. + */ +export declare namespace SymbolKind { + const File: 1; + const Module: 2; + const Namespace: 3; + const Package: 4; + const Class: 5; + const Method: 6; + const Property: 7; + const Field: 8; + const Constructor: 9; + const Enum: 10; + const Interface: 11; + const Function: 12; + const Variable: 13; + const Constant: 14; + const String: 15; + const Number: 16; + const Boolean: 17; + const Array: 18; + const Object: 19; + const Key: 20; + const Null: 21; + const EnumMember: 22; + const Struct: 23; + const Event: 24; + const Operator: 25; + const TypeParameter: 26; +} +export type SymbolKind = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26; +/** + * Symbol tags are extra annotations that tweak the rendering of a symbol. + * + * @since 3.16 + */ +export declare namespace SymbolTag { + /** + * Render a symbol as obsolete, usually using a strike-out. + */ + const Deprecated: 1; +} +export type SymbolTag = 1; +/** + * A base for all symbol information. + */ +export interface BaseSymbolInformation { + /** + * The name of this symbol. + */ + name: string; + /** + * The kind of this symbol. + */ + kind: SymbolKind; + /** + * Tags for this symbol. + * + * @since 3.16.0 + */ + tags?: SymbolTag[]; + /** + * The name of the symbol containing this symbol. This information is for + * user interface purposes (e.g. to render a qualifier in the user interface + * if necessary). It can't be used to re-infer a hierarchy for the document + * symbols. + */ + containerName?: string; +} +/** + * Represents information about programming constructs like variables, classes, + * interfaces etc. + */ +export interface SymbolInformation extends BaseSymbolInformation { + /** + * Indicates if this symbol is deprecated. + * + * @deprecated Use tags instead + */ + deprecated?: boolean; + /** + * The location of this symbol. The location's range is used by a tool + * to reveal the location in the editor. If the symbol is selected in the + * tool the range's start information is used to position the cursor. So + * the range usually spans more than the actual symbol's name and does + * normally include things like visibility modifiers. + * + * The range doesn't have to denote a node range in the sense of an abstract + * syntax tree. It can therefore not be used to re-construct a hierarchy of + * the symbols. + */ + location: Location; +} +export declare namespace SymbolInformation { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the location of the symbol. + * @param uri The resource of the location of symbol. + * @param containerName The name of the symbol containing the symbol. + */ + function create(name: string, kind: SymbolKind, range: Range, uri: DocumentUri, containerName?: string): SymbolInformation; +} +/** + * A special workspace symbol that supports locations without a range. + * + * See also SymbolInformation. + * + * @since 3.17.0 + */ +export interface WorkspaceSymbol extends BaseSymbolInformation { + /** + * The location of the symbol. Whether a server is allowed to + * return a location without a range depends on the client + * capability `workspace.symbol.resolveSupport`. + * + * See SymbolInformation#location for more details. + */ + location: Location | { + uri: DocumentUri; + }; + /** + * A data entry field that is preserved on a workspace symbol between a + * workspace symbol request and a workspace symbol resolve request. + */ + data?: LSPAny; +} +export declare namespace WorkspaceSymbol { + /** + * Create a new workspace symbol. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param uri The resource of the location of the symbol. + * @param range An options range of the location. + * @returns A WorkspaceSymbol. + */ + function create(name: string, kind: SymbolKind, uri: DocumentUri, range?: Range): WorkspaceSymbol; +} +/** + * Represents programming constructs like variables, classes, interfaces etc. + * that appear in a document. Document symbols can be hierarchical and they + * have two ranges: one that encloses its definition and one that points to + * its most interesting range, e.g. the range of an identifier. + */ +export interface DocumentSymbol { + /** + * The name of this symbol. Will be displayed in the user interface and therefore must not be + * an empty string or a string only consisting of white spaces. + */ + name: string; + /** + * More detail for this symbol, e.g the signature of a function. + */ + detail?: string; + /** + * The kind of this symbol. + */ + kind: SymbolKind; + /** + * Tags for this document symbol. + * + * @since 3.16.0 + */ + tags?: SymbolTag[]; + /** + * Indicates if this symbol is deprecated. + * + * @deprecated Use tags instead + */ + deprecated?: boolean; + /** + * The range enclosing this symbol not including leading/trailing whitespace but everything else + * like comments. This information is typically used to determine if the clients cursor is + * inside the symbol to reveal in the symbol in the UI. + */ + range: Range; + /** + * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. + * Must be contained by the `range`. + */ + selectionRange: Range; + /** + * Children of this symbol, e.g. properties of a class. + */ + children?: DocumentSymbol[]; +} +export declare namespace DocumentSymbol { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param detail The detail of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the symbol. + * @param selectionRange The selectionRange of the symbol. + * @param children Children of the symbol. + */ + function create(name: string, detail: string | undefined, kind: SymbolKind, range: Range, selectionRange: Range, children?: DocumentSymbol[]): DocumentSymbol; + /** + * Checks whether the given literal conforms to the {@link DocumentSymbol} interface. + */ + function is(value: any): value is DocumentSymbol; +} +/** + * The kind of a code action. + * + * Kinds are a hierarchical list of identifiers separated by `.`, e.g. `"refactor.extract.function"`. + * + * The set of kinds is open and client needs to announce the kinds it supports to the server during + * initialization. + */ +export type CodeActionKind = string; +/** + * A set of predefined code action kinds + */ +export declare namespace CodeActionKind { + /** + * Empty kind. + */ + const Empty: ''; + /** + * Base kind for quickfix actions: 'quickfix' + */ + const QuickFix: 'quickfix'; + /** + * Base kind for refactoring actions: 'refactor' + */ + const Refactor: 'refactor'; + /** + * Base kind for refactoring extraction actions: 'refactor.extract' + * + * Example extract actions: + * + * - Extract method + * - Extract function + * - Extract variable + * - Extract interface from class + * - ... + */ + const RefactorExtract: 'refactor.extract'; + /** + * Base kind for refactoring inline actions: 'refactor.inline' + * + * Example inline actions: + * + * - Inline function + * - Inline variable + * - Inline constant + * - ... + */ + const RefactorInline: 'refactor.inline'; + /** + * Base kind for refactoring rewrite actions: 'refactor.rewrite' + * + * Example rewrite actions: + * + * - Convert JavaScript function to class + * - Add or remove parameter + * - Encapsulate field + * - Make method static + * - Move method to base class + * - ... + */ + const RefactorRewrite: 'refactor.rewrite'; + /** + * Base kind for source actions: `source` + * + * Source code actions apply to the entire file. + */ + const Source: 'source'; + /** + * Base kind for an organize imports source action: `source.organizeImports` + */ + const SourceOrganizeImports: 'source.organizeImports'; + /** + * Base kind for auto-fix source actions: `source.fixAll`. + * + * Fix all actions automatically fix errors that have a clear fix that do not require user input. + * They should not suppress errors or perform unsafe fixes such as generating new types or classes. + * + * @since 3.15.0 + */ + const SourceFixAll: 'source.fixAll'; +} +/** + * The reason why code actions were requested. + * + * @since 3.17.0 + */ +export declare namespace CodeActionTriggerKind { + /** + * Code actions were explicitly requested by the user or by an extension. + */ + const Invoked: 1; + /** + * Code actions were requested automatically. + * + * This typically happens when current selection in a file changes, but can + * also be triggered when file content changes. + */ + const Automatic: 2; +} +export type CodeActionTriggerKind = 1 | 2; +/** + * Contains additional diagnostic information about the context in which + * a {@link CodeActionProvider.provideCodeActions code action} is run. + */ +export interface CodeActionContext { + /** + * An array of diagnostics known on the client side overlapping the range provided to the + * `textDocument/codeAction` request. They are provided so that the server knows which + * errors are currently presented to the user for the given range. There is no guarantee + * that these accurately reflect the error state of the resource. The primary parameter + * to compute code actions is the provided range. + */ + diagnostics: Diagnostic[]; + /** + * Requested kind of actions to return. + * + * Actions not of this kind are filtered out by the client before being shown. So servers + * can omit computing them. + */ + only?: CodeActionKind[]; + /** + * The reason why code actions were requested. + * + * @since 3.17.0 + */ + triggerKind?: CodeActionTriggerKind; +} +/** + * The CodeActionContext namespace provides helper functions to work with + * {@link CodeActionContext} literals. + */ +export declare namespace CodeActionContext { + /** + * Creates a new CodeActionContext literal. + */ + function create(diagnostics: Diagnostic[], only?: CodeActionKind[], triggerKind?: CodeActionTriggerKind): CodeActionContext; + /** + * Checks whether the given literal conforms to the {@link CodeActionContext} interface. + */ + function is(value: any): value is CodeActionContext; +} +/** + * A code action represents a change that can be performed in code, e.g. to fix a problem or + * to refactor code. + * + * A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed. + */ +export interface CodeAction { + /** + * A short, human-readable, title for this code action. + */ + title: string; + /** + * The kind of the code action. + * + * Used to filter code actions. + */ + kind?: CodeActionKind; + /** + * The diagnostics that this code action resolves. + */ + diagnostics?: Diagnostic[]; + /** + * Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted + * by keybindings. + * + * A quick fix should be marked preferred if it properly addresses the underlying error. + * A refactoring should be marked preferred if it is the most reasonable choice of actions to take. + * + * @since 3.15.0 + */ + isPreferred?: boolean; + /** + * Marks that the code action cannot currently be applied. + * + * Clients should follow the following guidelines regarding disabled code actions: + * + * - Disabled code actions are not shown in automatic [lightbulbs](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) + * code action menus. + * + * - Disabled actions are shown as faded out in the code action menu when the user requests a more specific type + * of code action, such as refactorings. + * + * - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions) + * that auto applies a code action and only disabled code actions are returned, the client should show the user an + * error message with `reason` in the editor. + * + * @since 3.16.0 + */ + disabled?: { + /** + * Human readable description of why the code action is currently disabled. + * + * This is displayed in the code actions UI. + */ + reason: string; + }; + /** + * The workspace edit this code action performs. + */ + edit?: WorkspaceEdit; + /** + * A command this code action executes. If a code action + * provides an edit and a command, first the edit is + * executed and then the command. + */ + command?: Command; + /** + * A data entry field that is preserved on a code action between + * a `textDocument/codeAction` and a `codeAction/resolve` request. + * + * @since 3.16.0 + */ + data?: LSPAny; +} +export declare namespace CodeAction { + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param kind The kind of the code action. + */ + function create(title: string, kind?: CodeActionKind): CodeAction; + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param command The command to execute. + * @param kind The kind of the code action. + */ + function create(title: string, command: Command, kind?: CodeActionKind): CodeAction; + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param edit The edit to perform. + * @param kind The kind of the code action. + */ + function create(title: string, edit: WorkspaceEdit, kind?: CodeActionKind): CodeAction; + function is(value: any): value is CodeAction; +} +/** + * A code lens represents a {@link Command command} that should be shown along with + * source text, like the number of references, a way to run tests, etc. + * + * A code lens is _unresolved_ when no command is associated to it. For performance + * reasons the creation of a code lens and resolving should be done in two stages. + */ +export interface CodeLens { + /** + * The range in which this code lens is valid. Should only span a single line. + */ + range: Range; + /** + * The command this code lens represents. + */ + command?: Command; + /** + * A data entry field that is preserved on a code lens item between + * a {@link CodeLensRequest} and a {@link CodeLensResolveRequest} + */ + data?: LSPAny; +} +/** + * The CodeLens namespace provides helper functions to work with + * {@link CodeLens} literals. + */ +export declare namespace CodeLens { + /** + * Creates a new CodeLens literal. + */ + function create(range: Range, data?: LSPAny): CodeLens; + /** + * Checks whether the given literal conforms to the {@link CodeLens} interface. + */ + function is(value: any): value is CodeLens; +} +/** + * Value-object describing what options formatting should use. + */ +export interface FormattingOptions { + /** + * Size of a tab in spaces. + */ + tabSize: uinteger; + /** + * Prefer spaces over tabs. + */ + insertSpaces: boolean; + /** + * Trim trailing whitespace on a line. + * + * @since 3.15.0 + */ + trimTrailingWhitespace?: boolean; + /** + * Insert a newline character at the end of the file if one does not exist. + * + * @since 3.15.0 + */ + insertFinalNewline?: boolean; + /** + * Trim all newlines after the final newline at the end of the file. + * + * @since 3.15.0 + */ + trimFinalNewlines?: boolean; + /** + * Signature for further properties. + */ + [key: string]: boolean | integer | string | undefined; +} +/** + * The FormattingOptions namespace provides helper functions to work with + * {@link FormattingOptions} literals. + */ +export declare namespace FormattingOptions { + /** + * Creates a new FormattingOptions literal. + */ + function create(tabSize: uinteger, insertSpaces: boolean): FormattingOptions; + /** + * Checks whether the given literal conforms to the {@link FormattingOptions} interface. + */ + function is(value: any): value is FormattingOptions; +} +/** + * A document link is a range in a text document that links to an internal or external resource, like another + * text document or a web site. + */ +export interface DocumentLink { + /** + * The range this link applies to. + */ + range: Range; + /** + * The uri this link points to. If missing a resolve request is sent later. + */ + target?: URI; + /** + * The tooltip text when you hover over this link. + * + * If a tooltip is provided, is will be displayed in a string that includes instructions on how to + * trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS, + * user settings, and localization. + * + * @since 3.15.0 + */ + tooltip?: string; + /** + * A data entry field that is preserved on a document link between a + * DocumentLinkRequest and a DocumentLinkResolveRequest. + */ + data?: LSPAny; +} +/** + * The DocumentLink namespace provides helper functions to work with + * {@link DocumentLink} literals. + */ +export declare namespace DocumentLink { + /** + * Creates a new DocumentLink literal. + */ + function create(range: Range, target?: string, data?: LSPAny): DocumentLink; + /** + * Checks whether the given literal conforms to the {@link DocumentLink} interface. + */ + function is(value: any): value is DocumentLink; +} +/** + * A selection range represents a part of a selection hierarchy. A selection range + * may have a parent selection range that contains it. + */ +export interface SelectionRange { + /** + * The {@link Range range} of this selection range. + */ + range: Range; + /** + * The parent selection range containing this range. Therefore `parent.range` must contain `this.range`. + */ + parent?: SelectionRange; +} +/** + * The SelectionRange namespace provides helper function to work with + * SelectionRange literals. + */ +export declare namespace SelectionRange { + /** + * Creates a new SelectionRange + * @param range the range. + * @param parent an optional parent. + */ + function create(range: Range, parent?: SelectionRange): SelectionRange; + function is(value: any): value is SelectionRange; +} +/** + * Represents programming constructs like functions or constructors in the context + * of call hierarchy. + * + * @since 3.16.0 + */ +export interface CallHierarchyItem { + /** + * The name of this item. + */ + name: string; + /** + * The kind of this item. + */ + kind: SymbolKind; + /** + * Tags for this item. + */ + tags?: SymbolTag[]; + /** + * More detail for this item, e.g. the signature of a function. + */ + detail?: string; + /** + * The resource identifier of this item. + */ + uri: DocumentUri; + /** + * The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code. + */ + range: Range; + /** + * The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function. + * Must be contained by the {@link CallHierarchyItem.range `range`}. + */ + selectionRange: Range; + /** + * A data entry field that is preserved between a call hierarchy prepare and + * incoming calls or outgoing calls requests. + */ + data?: LSPAny; +} +/** + * Represents an incoming call, e.g. a caller of a method or constructor. + * + * @since 3.16.0 + */ +export interface CallHierarchyIncomingCall { + /** + * The item that makes the call. + */ + from: CallHierarchyItem; + /** + * The ranges at which the calls appear. This is relative to the caller + * denoted by {@link CallHierarchyIncomingCall.from `this.from`}. + */ + fromRanges: Range[]; +} +/** + * Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc. + * + * @since 3.16.0 + */ +export interface CallHierarchyOutgoingCall { + /** + * The item that is called. + */ + to: CallHierarchyItem; + /** + * The range at which this item is called. This is the range relative to the caller, e.g the item + * passed to {@link CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls `provideCallHierarchyOutgoingCalls`} + * and not {@link CallHierarchyOutgoingCall.to `this.to`}. + */ + fromRanges: Range[]; +} +/** + * A set of predefined token types. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ +export declare enum SemanticTokenTypes { + namespace = "namespace", + /** + * Represents a generic type. Acts as a fallback for types which can't be mapped to + * a specific type like class or enum. + */ + type = "type", + class = "class", + enum = "enum", + interface = "interface", + struct = "struct", + typeParameter = "typeParameter", + parameter = "parameter", + variable = "variable", + property = "property", + enumMember = "enumMember", + event = "event", + function = "function", + method = "method", + macro = "macro", + keyword = "keyword", + modifier = "modifier", + comment = "comment", + string = "string", + number = "number", + regexp = "regexp", + operator = "operator", + /** + * @since 3.17.0 + */ + decorator = "decorator" +} +/** + * A set of predefined token modifiers. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ +export declare enum SemanticTokenModifiers { + declaration = "declaration", + definition = "definition", + readonly = "readonly", + static = "static", + deprecated = "deprecated", + abstract = "abstract", + async = "async", + modification = "modification", + documentation = "documentation", + defaultLibrary = "defaultLibrary" +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensLegend { + /** + * The token types a server uses. + */ + tokenTypes: string[]; + /** + * The token modifiers a server uses. + */ + tokenModifiers: string[]; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokens { + /** + * An optional result id. If provided and clients support delta updating + * the client will include the result id in the next semantic token request. + * A server can then instead of computing all semantic tokens again simply + * send a delta. + */ + resultId?: string; + /** + * The actual tokens. + */ + data: uinteger[]; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokens { + function is(value: any): value is SemanticTokens; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensEdit { + /** + * The start offset of the edit. + */ + start: uinteger; + /** + * The count of elements to remove. + */ + deleteCount: uinteger; + /** + * The elements to insert. + */ + data?: uinteger[]; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensDelta { + readonly resultId?: string; + /** + * The semantic token edits to transform a previous result into a new result. + */ + edits: SemanticTokensEdit[]; +} +/** + * @since 3.17.0 + */ +export type TypeHierarchyItem = { + /** + * The name of this item. + */ + name: string; + /** + * The kind of this item. + */ + kind: SymbolKind; + /** + * Tags for this item. + */ + tags?: SymbolTag[]; + /** + * More detail for this item, e.g. the signature of a function. + */ + detail?: string; + /** + * The resource identifier of this item. + */ + uri: DocumentUri; + /** + * The range enclosing this symbol not including leading/trailing whitespace + * but everything else, e.g. comments and code. + */ + range: Range; + /** + * The range that should be selected and revealed when this symbol is being + * picked, e.g. the name of a function. Must be contained by the + * {@link TypeHierarchyItem.range `range`}. + */ + selectionRange: Range; + /** + * A data entry field that is preserved between a type hierarchy prepare and + * supertypes or subtypes requests. It could also be used to identify the + * type hierarchy in the server, helping improve the performance on + * resolving supertypes and subtypes. + */ + data?: LSPAny; +}; +/** + * Provide inline value as text. + * + * @since 3.17.0 + */ +export type InlineValueText = { + /** + * The document range for which the inline value applies. + */ + range: Range; + /** + * The text of the inline value. + */ + text: string; +}; +/** + * The InlineValueText namespace provides functions to deal with InlineValueTexts. + * + * @since 3.17.0 + */ +export declare namespace InlineValueText { + /** + * Creates a new InlineValueText literal. + */ + function create(range: Range, text: string): InlineValueText; + function is(value: InlineValue | undefined | null): value is InlineValueText; +} +/** + * Provide inline value through a variable lookup. + * If only a range is specified, the variable name will be extracted from the underlying document. + * An optional variable name can be used to override the extracted name. + * + * @since 3.17.0 + */ +export type InlineValueVariableLookup = { + /** + * The document range for which the inline value applies. + * The range is used to extract the variable name from the underlying document. + */ + range: Range; + /** + * If specified the name of the variable to look up. + */ + variableName?: string; + /** + * How to perform the lookup. + */ + caseSensitiveLookup: boolean; +}; +/** + * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups. + * + * @since 3.17.0 + */ +export declare namespace InlineValueVariableLookup { + /** + * Creates a new InlineValueText literal. + */ + function create(range: Range, variableName: string | undefined, caseSensitiveLookup: boolean): InlineValueVariableLookup; + function is(value: InlineValue | undefined | null): value is InlineValueVariableLookup; +} +/** + * Provide an inline value through an expression evaluation. + * If only a range is specified, the expression will be extracted from the underlying document. + * An optional expression can be used to override the extracted expression. + * + * @since 3.17.0 + */ +export type InlineValueEvaluatableExpression = { + /** + * The document range for which the inline value applies. + * The range is used to extract the evaluatable expression from the underlying document. + */ + range: Range; + /** + * If specified the expression overrides the extracted expression. + */ + expression?: string; +}; +/** + * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression. + * + * @since 3.17.0 + */ +export declare namespace InlineValueEvaluatableExpression { + /** + * Creates a new InlineValueEvaluatableExpression literal. + */ + function create(range: Range, expression: string | undefined): InlineValueEvaluatableExpression; + function is(value: InlineValue | undefined | null): value is InlineValueEvaluatableExpression; +} +/** + * Inline value information can be provided by different means: + * - directly as a text value (class InlineValueText). + * - as a name to use for a variable lookup (class InlineValueVariableLookup) + * - as an evaluatable expression (class InlineValueEvaluatableExpression) + * The InlineValue types combines all inline value types into one type. + * + * @since 3.17.0 + */ +export type InlineValue = InlineValueText | InlineValueVariableLookup | InlineValueEvaluatableExpression; +/** + * @since 3.17.0 + */ +export type InlineValueContext = { + /** + * The stack frame (as a DAP Id) where the execution has stopped. + */ + frameId: integer; + /** + * The document range where execution has stopped. + * Typically the end position of the range denotes the line where the inline values are shown. + */ + stoppedLocation: Range; +}; +/** + * The InlineValueContext namespace provides helper functions to work with + * {@link InlineValueContext} literals. + * + * @since 3.17.0 + */ +export declare namespace InlineValueContext { + /** + * Creates a new InlineValueContext literal. + */ + function create(frameId: integer, stoppedLocation: Range): InlineValueContext; + /** + * Checks whether the given literal conforms to the {@link InlineValueContext} interface. + */ + function is(value: any): value is InlineValueContext; +} +/** + * Inlay hint kinds. + * + * @since 3.17.0 + */ +export declare namespace InlayHintKind { + /** + * An inlay hint that for a type annotation. + */ + const Type = 1; + /** + * An inlay hint that is for a parameter. + */ + const Parameter = 2; + function is(value: number): value is InlayHintKind; +} +export type InlayHintKind = 1 | 2; +/** + * An inlay hint label part allows for interactive and composite labels + * of inlay hints. + * + * @since 3.17.0 + */ +export type InlayHintLabelPart = { + /** + * The value of this label part. + */ + value: string; + /** + * The tooltip text when you hover over this label part. Depending on + * the client capability `inlayHint.resolveSupport` clients might resolve + * this property late using the resolve request. + */ + tooltip?: string | MarkupContent; + /** + * An optional source code location that represents this + * label part. + * + * The editor will use this location for the hover and for code navigation + * features: This part will become a clickable link that resolves to the + * definition of the symbol at the given location (not necessarily the + * location itself), it shows the hover that shows at the given location, + * and it shows a context menu with further code navigation commands. + * + * Depending on the client capability `inlayHint.resolveSupport` clients + * might resolve this property late using the resolve request. + */ + location?: Location; + /** + * An optional command for this label part. + * + * Depending on the client capability `inlayHint.resolveSupport` clients + * might resolve this property late using the resolve request. + */ + command?: Command; +}; +export declare namespace InlayHintLabelPart { + function create(value: string): InlayHintLabelPart; + function is(value: any): value is InlayHintLabelPart; +} +/** + * Inlay hint information. + * + * @since 3.17.0 + */ +export type InlayHint = { + /** + * The position of this hint. + */ + position: Position; + /** + * The label of this hint. A human readable string or an array of + * InlayHintLabelPart label parts. + * + * *Note* that neither the string nor the label part can be empty. + */ + label: string | InlayHintLabelPart[]; + /** + * The kind of this hint. Can be omitted in which case the client + * should fall back to a reasonable default. + */ + kind?: InlayHintKind; + /** + * Optional text edits that are performed when accepting this inlay hint. + * + * *Note* that edits are expected to change the document so that the inlay + * hint (or its nearest variant) is now part of the document and the inlay + * hint itself is now obsolete. + */ + textEdits?: TextEdit[]; + /** + * The tooltip text when you hover over this item. + */ + tooltip?: string | MarkupContent; + /** + * Render padding before the hint. + * + * Note: Padding should use the editor's background color, not the + * background color of the hint itself. That means padding can be used + * to visually align/separate an inlay hint. + */ + paddingLeft?: boolean; + /** + * Render padding after the hint. + * + * Note: Padding should use the editor's background color, not the + * background color of the hint itself. That means padding can be used + * to visually align/separate an inlay hint. + */ + paddingRight?: boolean; + /** + * A data entry field that is preserved on an inlay hint between + * a `textDocument/inlayHint` and a `inlayHint/resolve` request. + */ + data?: LSPAny; +}; +export declare namespace InlayHint { + function create(position: Position, label: string | InlayHintLabelPart[], kind?: InlayHintKind): InlayHint; + function is(value: any): value is InlayHint; +} +/** + * A string value used as a snippet is a template which allows to insert text + * and to control the editor cursor when insertion happens. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Variables are defined with `$name` and + * `${name:default value}`. + * + * @since 3.18.0 + * @proposed + */ +export interface StringValue { + /** + * The kind of string value. + */ + kind: 'snippet'; + /** + * The snippet string. + */ + value: string; +} +export declare namespace StringValue { + function createSnippet(value: string): StringValue; +} +/** + * An inline completion item represents a text snippet that is proposed inline to complete text that is being typed. + * + * @since 3.18.0 + * @proposed + */ +export interface InlineCompletionItem { + /** + * The text to replace the range with. Must be set. + */ + insertText: string | StringValue; + /** + * A text that is used to decide if this inline completion should be shown. When `falsy` the {@link InlineCompletionItem.insertText} is used. + */ + filterText?: string; + /** + * The range to replace. Must begin and end on the same line. + */ + range?: Range; + /** + * An optional {@link Command} that is executed *after* inserting this completion. + */ + command?: Command; +} +export declare namespace InlineCompletionItem { + function create(insertText: string | StringValue, filterText?: string, range?: Range, command?: Command): InlineCompletionItem; +} +/** + * Represents a collection of {@link InlineCompletionItem inline completion items} to be presented in the editor. + * + * @since 3.18.0 + * @proposed + */ +export interface InlineCompletionList { + /** + * The inline completion items + */ + items: InlineCompletionItem[]; +} +export declare namespace InlineCompletionList { + function create(items: InlineCompletionItem[]): InlineCompletionList; +} +/** + * Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered. + * + * @since 3.18.0 + * @proposed + */ +export declare namespace InlineCompletionTriggerKind { + /** + * Completion was triggered explicitly by a user gesture. + */ + const Invoked: 0; + /** + * Completion was triggered automatically while editing. + */ + const Automatic: 1; +} +export type InlineCompletionTriggerKind = 0 | 1; +/** + * Describes the currently selected completion item. + * + * @since 3.18.0 + * @proposed + */ +export interface SelectedCompletionInfo { + /** + * The range that will be replaced if this completion item is accepted. + */ + range: Range; + /** + * The text the range will be replaced with if this completion is accepted. + */ + text: string; +} +export declare namespace SelectedCompletionInfo { + function create(range: Range, text: string): SelectedCompletionInfo; +} +/** + * Provides information about the context in which an inline completion was requested. + * + * @since 3.18.0 + * @proposed + */ +export interface InlineCompletionContext { + /** + * Describes how the inline completion was triggered. + */ + triggerKind: InlineCompletionTriggerKind; + /** + * Provides information about the currently selected item in the autocomplete widget if it is visible. + */ + selectedCompletionInfo?: SelectedCompletionInfo; +} +export declare namespace InlineCompletionContext { + function create(triggerKind: InlineCompletionTriggerKind, selectedCompletionInfo?: SelectedCompletionInfo): InlineCompletionContext; +} +/** + * A workspace folder inside a client. + */ +export interface WorkspaceFolder { + /** + * The associated URI for this workspace folder. + */ + uri: URI; + /** + * The name of the workspace folder. Used to refer to this + * workspace folder in the user interface. + */ + name: string; +} +export declare namespace WorkspaceFolder { + function is(value: any): value is WorkspaceFolder; +} +export declare const EOL: string[]; +/** + * A simple text document. Not to be implemented. The document keeps the content + * as string. + * + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +export interface TextDocument { + /** + * The associated URI for this document. Most documents have the __file__-scheme, indicating that they + * represent files on disk. However, some documents may have other schemes indicating that they are not + * available on disk. + * + * @readonly + */ + readonly uri: DocumentUri; + /** + * The identifier of the language associated with this document. + * + * @readonly + */ + readonly languageId: string; + /** + * The version number of this document (it will increase after each + * change, including undo/redo). + * + * @readonly + */ + readonly version: integer; + /** + * Get the text of this document. A substring can be retrieved by + * providing a range. + * + * @param range (optional) An range within the document to return. + * If no range is passed, the full content is returned. + * Invalid range positions are adjusted as described in {@link Position.line Position.line} + * and {@link Position.character Position.character}. + * If the start range position is greater than the end range position, + * then the effect of getText is as if the two positions were swapped. + + * @return The text of this document or a substring of the text if a + * range is provided. + */ + getText(range?: Range): string; + /** + * Converts a zero-based offset to a position. + * + * @param offset A zero-based offset. + * @return A valid {@link Position position}. + */ + positionAt(offset: uinteger): Position; + /** + * Converts the position to a zero-based offset. + * Invalid positions are adjusted as described in {@link Position.line Position.line} + * and {@link Position.character Position.character}. + * + * @param position A position. + * @return A valid zero-based offset. + */ + offsetAt(position: Position): uinteger; + /** + * The number of lines in this document. + * + * @readonly + */ + readonly lineCount: uinteger; +} +/** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +export declare namespace TextDocument { + /** + * Creates a new ITextDocument literal from the given uri and content. + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param version The document's version. + * @param content The document's content. + */ + function create(uri: DocumentUri, languageId: string, version: integer, content: string): TextDocument; + /** + * Checks whether the given literal conforms to the {@link ITextDocument} interface. + */ + function is(value: any): value is TextDocument; + function applyEdits(document: TextDocument, edits: TextEdit[]): string; +} +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/umd/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/umd/main.js" index abe46ba4be391f8de05eaf3fa4646fd89d84dbc8..c90e028d81a1033927a302b1bfe3bb6db39802ff 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/umd/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/lib/umd/main.js" @@ -1,3 +1,2272 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:56a481d96a6612180f6af67912daf1cc44dd0ed3ab2d447f62b93d3f965120cd -size 93906 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + /* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ + 'use strict'; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.TextDocument = exports.EOL = exports.WorkspaceFolder = exports.InlineCompletionContext = exports.SelectedCompletionInfo = exports.InlineCompletionTriggerKind = exports.InlineCompletionList = exports.InlineCompletionItem = exports.StringValue = exports.InlayHint = exports.InlayHintLabelPart = exports.InlayHintKind = exports.InlineValueContext = exports.InlineValueEvaluatableExpression = exports.InlineValueVariableLookup = exports.InlineValueText = exports.SemanticTokens = exports.SemanticTokenModifiers = exports.SemanticTokenTypes = exports.SelectionRange = exports.DocumentLink = exports.FormattingOptions = exports.CodeLens = exports.CodeAction = exports.CodeActionContext = exports.CodeActionTriggerKind = exports.CodeActionKind = exports.DocumentSymbol = exports.WorkspaceSymbol = exports.SymbolInformation = exports.SymbolTag = exports.SymbolKind = exports.DocumentHighlight = exports.DocumentHighlightKind = exports.SignatureInformation = exports.ParameterInformation = exports.Hover = exports.MarkedString = exports.CompletionList = exports.CompletionItem = exports.CompletionItemLabelDetails = exports.InsertTextMode = exports.InsertReplaceEdit = exports.CompletionItemTag = exports.InsertTextFormat = exports.CompletionItemKind = exports.MarkupContent = exports.MarkupKind = exports.TextDocumentItem = exports.OptionalVersionedTextDocumentIdentifier = exports.VersionedTextDocumentIdentifier = exports.TextDocumentIdentifier = exports.WorkspaceChange = exports.WorkspaceEdit = exports.DeleteFile = exports.RenameFile = exports.CreateFile = exports.TextDocumentEdit = exports.AnnotatedTextEdit = exports.ChangeAnnotationIdentifier = exports.ChangeAnnotation = exports.TextEdit = exports.Command = exports.Diagnostic = exports.CodeDescription = exports.DiagnosticTag = exports.DiagnosticSeverity = exports.DiagnosticRelatedInformation = exports.FoldingRange = exports.FoldingRangeKind = exports.ColorPresentation = exports.ColorInformation = exports.Color = exports.LocationLink = exports.Location = exports.Range = exports.Position = exports.uinteger = exports.integer = exports.URI = exports.DocumentUri = void 0; + var DocumentUri; + (function (DocumentUri) { + function is(value) { + return typeof value === 'string'; + } + DocumentUri.is = is; + })(DocumentUri || (exports.DocumentUri = DocumentUri = {})); + var URI; + (function (URI) { + function is(value) { + return typeof value === 'string'; + } + URI.is = is; + })(URI || (exports.URI = URI = {})); + var integer; + (function (integer) { + integer.MIN_VALUE = -2147483648; + integer.MAX_VALUE = 2147483647; + function is(value) { + return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE; + } + integer.is = is; + })(integer || (exports.integer = integer = {})); + var uinteger; + (function (uinteger) { + uinteger.MIN_VALUE = 0; + uinteger.MAX_VALUE = 2147483647; + function is(value) { + return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE; + } + uinteger.is = is; + })(uinteger || (exports.uinteger = uinteger = {})); + /** + * The Position namespace provides helper functions to work with + * {@link Position} literals. + */ + var Position; + (function (Position) { + /** + * Creates a new Position literal from the given line and character. + * @param line The position's line. + * @param character The position's character. + */ + function create(line, character) { + if (line === Number.MAX_VALUE) { + line = uinteger.MAX_VALUE; + } + if (character === Number.MAX_VALUE) { + character = uinteger.MAX_VALUE; + } + return { line: line, character: character }; + } + Position.create = create; + /** + * Checks whether the given literal conforms to the {@link Position} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character); + } + Position.is = is; + })(Position || (exports.Position = Position = {})); + /** + * The Range namespace provides helper functions to work with + * {@link Range} literals. + */ + var Range; + (function (Range) { + function create(one, two, three, four) { + if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) { + return { start: Position.create(one, two), end: Position.create(three, four) }; + } + else if (Position.is(one) && Position.is(two)) { + return { start: one, end: two }; + } + else { + throw new Error("Range#create called with invalid arguments[".concat(one, ", ").concat(two, ", ").concat(three, ", ").concat(four, "]")); + } + } + Range.create = create; + /** + * Checks whether the given literal conforms to the {@link Range} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end); + } + Range.is = is; + })(Range || (exports.Range = Range = {})); + /** + * The Location namespace provides helper functions to work with + * {@link Location} literals. + */ + var Location; + (function (Location) { + /** + * Creates a Location literal. + * @param uri The location's uri. + * @param range The location's range. + */ + function create(uri, range) { + return { uri: uri, range: range }; + } + Location.create = create; + /** + * Checks whether the given literal conforms to the {@link Location} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri)); + } + Location.is = is; + })(Location || (exports.Location = Location = {})); + /** + * The LocationLink namespace provides helper functions to work with + * {@link LocationLink} literals. + */ + var LocationLink; + (function (LocationLink) { + /** + * Creates a LocationLink literal. + * @param targetUri The definition's uri. + * @param targetRange The full range of the definition. + * @param targetSelectionRange The span of the symbol definition at the target. + * @param originSelectionRange The span of the symbol being defined in the originating source file. + */ + function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) { + return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange }; + } + LocationLink.create = create; + /** + * Checks whether the given literal conforms to the {@link LocationLink} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri) + && Range.is(candidate.targetSelectionRange) + && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange)); + } + LocationLink.is = is; + })(LocationLink || (exports.LocationLink = LocationLink = {})); + /** + * The Color namespace provides helper functions to work with + * {@link Color} literals. + */ + var Color; + (function (Color) { + /** + * Creates a new Color literal. + */ + function create(red, green, blue, alpha) { + return { + red: red, + green: green, + blue: blue, + alpha: alpha, + }; + } + Color.create = create; + /** + * Checks whether the given literal conforms to the {@link Color} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1) + && Is.numberRange(candidate.green, 0, 1) + && Is.numberRange(candidate.blue, 0, 1) + && Is.numberRange(candidate.alpha, 0, 1); + } + Color.is = is; + })(Color || (exports.Color = Color = {})); + /** + * The ColorInformation namespace provides helper functions to work with + * {@link ColorInformation} literals. + */ + var ColorInformation; + (function (ColorInformation) { + /** + * Creates a new ColorInformation literal. + */ + function create(range, color) { + return { + range: range, + color: color, + }; + } + ColorInformation.create = create; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color); + } + ColorInformation.is = is; + })(ColorInformation || (exports.ColorInformation = ColorInformation = {})); + /** + * The Color namespace provides helper functions to work with + * {@link ColorPresentation} literals. + */ + var ColorPresentation; + (function (ColorPresentation) { + /** + * Creates a new ColorInformation literal. + */ + function create(label, textEdit, additionalTextEdits) { + return { + label: label, + textEdit: textEdit, + additionalTextEdits: additionalTextEdits, + }; + } + ColorPresentation.create = create; + /** + * Checks whether the given literal conforms to the {@link ColorInformation} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.label) + && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate)) + && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is)); + } + ColorPresentation.is = is; + })(ColorPresentation || (exports.ColorPresentation = ColorPresentation = {})); + /** + * A set of predefined range kinds. + */ + var FoldingRangeKind; + (function (FoldingRangeKind) { + /** + * Folding range for a comment + */ + FoldingRangeKind.Comment = 'comment'; + /** + * Folding range for an import or include + */ + FoldingRangeKind.Imports = 'imports'; + /** + * Folding range for a region (e.g. `#region`) + */ + FoldingRangeKind.Region = 'region'; + })(FoldingRangeKind || (exports.FoldingRangeKind = FoldingRangeKind = {})); + /** + * The folding range namespace provides helper functions to work with + * {@link FoldingRange} literals. + */ + var FoldingRange; + (function (FoldingRange) { + /** + * Creates a new FoldingRange literal. + */ + function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) { + var result = { + startLine: startLine, + endLine: endLine + }; + if (Is.defined(startCharacter)) { + result.startCharacter = startCharacter; + } + if (Is.defined(endCharacter)) { + result.endCharacter = endCharacter; + } + if (Is.defined(kind)) { + result.kind = kind; + } + if (Is.defined(collapsedText)) { + result.collapsedText = collapsedText; + } + return result; + } + FoldingRange.create = create; + /** + * Checks whether the given literal conforms to the {@link FoldingRange} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine) + && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter)) + && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter)) + && (Is.undefined(candidate.kind) || Is.string(candidate.kind)); + } + FoldingRange.is = is; + })(FoldingRange || (exports.FoldingRange = FoldingRange = {})); + /** + * The DiagnosticRelatedInformation namespace provides helper functions to work with + * {@link DiagnosticRelatedInformation} literals. + */ + var DiagnosticRelatedInformation; + (function (DiagnosticRelatedInformation) { + /** + * Creates a new DiagnosticRelatedInformation literal. + */ + function create(location, message) { + return { + location: location, + message: message + }; + } + DiagnosticRelatedInformation.create = create; + /** + * Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message); + } + DiagnosticRelatedInformation.is = is; + })(DiagnosticRelatedInformation || (exports.DiagnosticRelatedInformation = DiagnosticRelatedInformation = {})); + /** + * The diagnostic's severity. + */ + var DiagnosticSeverity; + (function (DiagnosticSeverity) { + /** + * Reports an error. + */ + DiagnosticSeverity.Error = 1; + /** + * Reports a warning. + */ + DiagnosticSeverity.Warning = 2; + /** + * Reports an information. + */ + DiagnosticSeverity.Information = 3; + /** + * Reports a hint. + */ + DiagnosticSeverity.Hint = 4; + })(DiagnosticSeverity || (exports.DiagnosticSeverity = DiagnosticSeverity = {})); + /** + * The diagnostic tags. + * + * @since 3.15.0 + */ + var DiagnosticTag; + (function (DiagnosticTag) { + /** + * Unused or unnecessary code. + * + * Clients are allowed to render diagnostics with this tag faded out instead of having + * an error squiggle. + */ + DiagnosticTag.Unnecessary = 1; + /** + * Deprecated or obsolete code. + * + * Clients are allowed to rendered diagnostics with this tag strike through. + */ + DiagnosticTag.Deprecated = 2; + })(DiagnosticTag || (exports.DiagnosticTag = DiagnosticTag = {})); + /** + * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes. + * + * @since 3.16.0 + */ + var CodeDescription; + (function (CodeDescription) { + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.href); + } + CodeDescription.is = is; + })(CodeDescription || (exports.CodeDescription = CodeDescription = {})); + /** + * The Diagnostic namespace provides helper functions to work with + * {@link Diagnostic} literals. + */ + var Diagnostic; + (function (Diagnostic) { + /** + * Creates a new Diagnostic literal. + */ + function create(range, message, severity, code, source, relatedInformation) { + var result = { range: range, message: message }; + if (Is.defined(severity)) { + result.severity = severity; + } + if (Is.defined(code)) { + result.code = code; + } + if (Is.defined(source)) { + result.source = source; + } + if (Is.defined(relatedInformation)) { + result.relatedInformation = relatedInformation; + } + return result; + } + Diagnostic.create = create; + /** + * Checks whether the given literal conforms to the {@link Diagnostic} interface. + */ + function is(value) { + var _a; + var candidate = value; + return Is.defined(candidate) + && Range.is(candidate.range) + && Is.string(candidate.message) + && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) + && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) + && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href))) + && (Is.string(candidate.source) || Is.undefined(candidate.source)) + && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is)); + } + Diagnostic.is = is; + })(Diagnostic || (exports.Diagnostic = Diagnostic = {})); + /** + * The Command namespace provides helper functions to work with + * {@link Command} literals. + */ + var Command; + (function (Command) { + /** + * Creates a new Command literal. + */ + function create(title, command) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var result = { title: title, command: command }; + if (Is.defined(args) && args.length > 0) { + result.arguments = args; + } + return result; + } + Command.create = create; + /** + * Checks whether the given literal conforms to the {@link Command} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command); + } + Command.is = is; + })(Command || (exports.Command = Command = {})); + /** + * The TextEdit namespace provides helper function to create replace, + * insert and delete edits more easily. + */ + var TextEdit; + (function (TextEdit) { + /** + * Creates a replace text edit. + * @param range The range of text to be replaced. + * @param newText The new text. + */ + function replace(range, newText) { + return { range: range, newText: newText }; + } + TextEdit.replace = replace; + /** + * Creates an insert text edit. + * @param position The position to insert the text at. + * @param newText The text to be inserted. + */ + function insert(position, newText) { + return { range: { start: position, end: position }, newText: newText }; + } + TextEdit.insert = insert; + /** + * Creates a delete text edit. + * @param range The range of text to be deleted. + */ + function del(range) { + return { range: range, newText: '' }; + } + TextEdit.del = del; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) + && Is.string(candidate.newText) + && Range.is(candidate.range); + } + TextEdit.is = is; + })(TextEdit || (exports.TextEdit = TextEdit = {})); + var ChangeAnnotation; + (function (ChangeAnnotation) { + function create(label, needsConfirmation, description) { + var result = { label: label }; + if (needsConfirmation !== undefined) { + result.needsConfirmation = needsConfirmation; + } + if (description !== undefined) { + result.description = description; + } + return result; + } + ChangeAnnotation.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.label) && + (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) && + (Is.string(candidate.description) || candidate.description === undefined); + } + ChangeAnnotation.is = is; + })(ChangeAnnotation || (exports.ChangeAnnotation = ChangeAnnotation = {})); + var ChangeAnnotationIdentifier; + (function (ChangeAnnotationIdentifier) { + function is(value) { + var candidate = value; + return Is.string(candidate); + } + ChangeAnnotationIdentifier.is = is; + })(ChangeAnnotationIdentifier || (exports.ChangeAnnotationIdentifier = ChangeAnnotationIdentifier = {})); + var AnnotatedTextEdit; + (function (AnnotatedTextEdit) { + /** + * Creates an annotated replace text edit. + * + * @param range The range of text to be replaced. + * @param newText The new text. + * @param annotation The annotation. + */ + function replace(range, newText, annotation) { + return { range: range, newText: newText, annotationId: annotation }; + } + AnnotatedTextEdit.replace = replace; + /** + * Creates an annotated insert text edit. + * + * @param position The position to insert the text at. + * @param newText The text to be inserted. + * @param annotation The annotation. + */ + function insert(position, newText, annotation) { + return { range: { start: position, end: position }, newText: newText, annotationId: annotation }; + } + AnnotatedTextEdit.insert = insert; + /** + * Creates an annotated delete text edit. + * + * @param range The range of text to be deleted. + * @param annotation The annotation. + */ + function del(range, annotation) { + return { range: range, newText: '', annotationId: annotation }; + } + AnnotatedTextEdit.del = del; + function is(value) { + var candidate = value; + return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + AnnotatedTextEdit.is = is; + })(AnnotatedTextEdit || (exports.AnnotatedTextEdit = AnnotatedTextEdit = {})); + /** + * The TextDocumentEdit namespace provides helper function to create + * an edit that manipulates a text document. + */ + var TextDocumentEdit; + (function (TextDocumentEdit) { + /** + * Creates a new `TextDocumentEdit` + */ + function create(textDocument, edits) { + return { textDocument: textDocument, edits: edits }; + } + TextDocumentEdit.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) + && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument) + && Array.isArray(candidate.edits); + } + TextDocumentEdit.is = is; + })(TextDocumentEdit || (exports.TextDocumentEdit = TextDocumentEdit = {})); + var CreateFile; + (function (CreateFile) { + function create(uri, options, annotation) { + var result = { + kind: 'create', + uri: uri + }; + if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + CreateFile.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined || + ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + CreateFile.is = is; + })(CreateFile || (exports.CreateFile = CreateFile = {})); + var RenameFile; + (function (RenameFile) { + function create(oldUri, newUri, options, annotation) { + var result = { + kind: 'rename', + oldUri: oldUri, + newUri: newUri + }; + if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + RenameFile.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined || + ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + RenameFile.is = is; + })(RenameFile || (exports.RenameFile = RenameFile = {})); + var DeleteFile; + (function (DeleteFile) { + function create(uri, options, annotation) { + var result = { + kind: 'delete', + uri: uri + }; + if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + DeleteFile.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined || + ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + DeleteFile.is = is; + })(DeleteFile || (exports.DeleteFile = DeleteFile = {})); + var WorkspaceEdit; + (function (WorkspaceEdit) { + function is(value) { + var candidate = value; + return candidate && + (candidate.changes !== undefined || candidate.documentChanges !== undefined) && + (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) { + if (Is.string(change.kind)) { + return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change); + } + else { + return TextDocumentEdit.is(change); + } + })); + } + WorkspaceEdit.is = is; + })(WorkspaceEdit || (exports.WorkspaceEdit = WorkspaceEdit = {})); + var TextEditChangeImpl = /** @class */ (function () { + function TextEditChangeImpl(edits, changeAnnotations) { + this.edits = edits; + this.changeAnnotations = changeAnnotations; + } + TextEditChangeImpl.prototype.insert = function (position, newText, annotation) { + var edit; + var id; + if (annotation === undefined) { + edit = TextEdit.insert(position, newText); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.insert(position, newText, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.insert(position, newText, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + }; + TextEditChangeImpl.prototype.replace = function (range, newText, annotation) { + var edit; + var id; + if (annotation === undefined) { + edit = TextEdit.replace(range, newText); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.replace(range, newText, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.replace(range, newText, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + }; + TextEditChangeImpl.prototype.delete = function (range, annotation) { + var edit; + var id; + if (annotation === undefined) { + edit = TextEdit.del(range); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.del(range, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.del(range, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + }; + TextEditChangeImpl.prototype.add = function (edit) { + this.edits.push(edit); + }; + TextEditChangeImpl.prototype.all = function () { + return this.edits; + }; + TextEditChangeImpl.prototype.clear = function () { + this.edits.splice(0, this.edits.length); + }; + TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) { + if (value === undefined) { + throw new Error("Text edit change is not configured to manage change annotations."); + } + }; + return TextEditChangeImpl; + }()); + /** + * A helper class + */ + var ChangeAnnotations = /** @class */ (function () { + function ChangeAnnotations(annotations) { + this._annotations = annotations === undefined ? Object.create(null) : annotations; + this._counter = 0; + this._size = 0; + } + ChangeAnnotations.prototype.all = function () { + return this._annotations; + }; + Object.defineProperty(ChangeAnnotations.prototype, "size", { + get: function () { + return this._size; + }, + enumerable: false, + configurable: true + }); + ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) { + var id; + if (ChangeAnnotationIdentifier.is(idOrAnnotation)) { + id = idOrAnnotation; + } + else { + id = this.nextId(); + annotation = idOrAnnotation; + } + if (this._annotations[id] !== undefined) { + throw new Error("Id ".concat(id, " is already in use.")); + } + if (annotation === undefined) { + throw new Error("No annotation provided for id ".concat(id)); + } + this._annotations[id] = annotation; + this._size++; + return id; + }; + ChangeAnnotations.prototype.nextId = function () { + this._counter++; + return this._counter.toString(); + }; + return ChangeAnnotations; + }()); + /** + * A workspace change helps constructing changes to a workspace. + */ + var WorkspaceChange = /** @class */ (function () { + function WorkspaceChange(workspaceEdit) { + var _this = this; + this._textEditChanges = Object.create(null); + if (workspaceEdit !== undefined) { + this._workspaceEdit = workspaceEdit; + if (workspaceEdit.documentChanges) { + this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations); + workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + workspaceEdit.documentChanges.forEach(function (change) { + if (TextDocumentEdit.is(change)) { + var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations); + _this._textEditChanges[change.textDocument.uri] = textEditChange; + } + }); + } + else if (workspaceEdit.changes) { + Object.keys(workspaceEdit.changes).forEach(function (key) { + var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]); + _this._textEditChanges[key] = textEditChange; + }); + } + } + else { + this._workspaceEdit = {}; + } + } + Object.defineProperty(WorkspaceChange.prototype, "edit", { + /** + * Returns the underlying {@link WorkspaceEdit} literal + * use to be returned from a workspace edit operation like rename. + */ + get: function () { + this.initDocumentChanges(); + if (this._changeAnnotations !== undefined) { + if (this._changeAnnotations.size === 0) { + this._workspaceEdit.changeAnnotations = undefined; + } + else { + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + } + return this._workspaceEdit; + }, + enumerable: false, + configurable: true + }); + WorkspaceChange.prototype.getTextEditChange = function (key) { + if (OptionalVersionedTextDocumentIdentifier.is(key)) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var textDocument = { uri: key.uri, version: key.version }; + var result = this._textEditChanges[textDocument.uri]; + if (!result) { + var edits = []; + var textDocumentEdit = { + textDocument: textDocument, + edits: edits + }; + this._workspaceEdit.documentChanges.push(textDocumentEdit); + result = new TextEditChangeImpl(edits, this._changeAnnotations); + this._textEditChanges[textDocument.uri] = result; + } + return result; + } + else { + this.initChanges(); + if (this._workspaceEdit.changes === undefined) { + throw new Error('Workspace edit is not configured for normal text edit changes.'); + } + var result = this._textEditChanges[key]; + if (!result) { + var edits = []; + this._workspaceEdit.changes[key] = edits; + result = new TextEditChangeImpl(edits); + this._textEditChanges[key] = result; + } + return result; + } + }; + WorkspaceChange.prototype.initDocumentChanges = function () { + if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) { + this._changeAnnotations = new ChangeAnnotations(); + this._workspaceEdit.documentChanges = []; + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + }; + WorkspaceChange.prototype.initChanges = function () { + if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) { + this._workspaceEdit.changes = Object.create(null); + } + }; + WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + var operation; + var id; + if (annotation === undefined) { + operation = CreateFile.create(uri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = CreateFile.create(uri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + }; + WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + var operation; + var id; + if (annotation === undefined) { + operation = RenameFile.create(oldUri, newUri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = RenameFile.create(oldUri, newUri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + }; + WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + var operation; + var id; + if (annotation === undefined) { + operation = DeleteFile.create(uri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = DeleteFile.create(uri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + }; + return WorkspaceChange; + }()); + exports.WorkspaceChange = WorkspaceChange; + /** + * The TextDocumentIdentifier namespace provides helper functions to work with + * {@link TextDocumentIdentifier} literals. + */ + var TextDocumentIdentifier; + (function (TextDocumentIdentifier) { + /** + * Creates a new TextDocumentIdentifier literal. + * @param uri The document's uri. + */ + function create(uri) { + return { uri: uri }; + } + TextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri); + } + TextDocumentIdentifier.is = is; + })(TextDocumentIdentifier || (exports.TextDocumentIdentifier = TextDocumentIdentifier = {})); + /** + * The VersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link VersionedTextDocumentIdentifier} literals. + */ + var VersionedTextDocumentIdentifier; + (function (VersionedTextDocumentIdentifier) { + /** + * Creates a new VersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri, version) { + return { uri: uri, version: version }; + } + VersionedTextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version); + } + VersionedTextDocumentIdentifier.is = is; + })(VersionedTextDocumentIdentifier || (exports.VersionedTextDocumentIdentifier = VersionedTextDocumentIdentifier = {})); + /** + * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with + * {@link OptionalVersionedTextDocumentIdentifier} literals. + */ + var OptionalVersionedTextDocumentIdentifier; + (function (OptionalVersionedTextDocumentIdentifier) { + /** + * Creates a new OptionalVersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param version The document's version. + */ + function create(uri, version) { + return { uri: uri, version: version }; + } + OptionalVersionedTextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version)); + } + OptionalVersionedTextDocumentIdentifier.is = is; + })(OptionalVersionedTextDocumentIdentifier || (exports.OptionalVersionedTextDocumentIdentifier = OptionalVersionedTextDocumentIdentifier = {})); + /** + * The TextDocumentItem namespace provides helper functions to work with + * {@link TextDocumentItem} literals. + */ + var TextDocumentItem; + (function (TextDocumentItem) { + /** + * Creates a new TextDocumentItem literal. + * @param uri The document's uri. + * @param languageId The document's language identifier. + * @param version The document's version number. + * @param text The document's text. + */ + function create(uri, languageId, version, text) { + return { uri: uri, languageId: languageId, version: version, text: text }; + } + TextDocumentItem.create = create; + /** + * Checks whether the given literal conforms to the {@link TextDocumentItem} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text); + } + TextDocumentItem.is = is; + })(TextDocumentItem || (exports.TextDocumentItem = TextDocumentItem = {})); + /** + * Describes the content type that a client supports in various + * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. + * + * Please note that `MarkupKinds` must not start with a `$`. This kinds + * are reserved for internal usage. + */ + var MarkupKind; + (function (MarkupKind) { + /** + * Plain text is supported as a content format + */ + MarkupKind.PlainText = 'plaintext'; + /** + * Markdown is supported as a content format + */ + MarkupKind.Markdown = 'markdown'; + /** + * Checks whether the given value is a value of the {@link MarkupKind} type. + */ + function is(value) { + var candidate = value; + return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown; + } + MarkupKind.is = is; + })(MarkupKind || (exports.MarkupKind = MarkupKind = {})); + var MarkupContent; + (function (MarkupContent) { + /** + * Checks whether the given value conforms to the {@link MarkupContent} interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value); + } + MarkupContent.is = is; + })(MarkupContent || (exports.MarkupContent = MarkupContent = {})); + /** + * The kind of a completion entry. + */ + var CompletionItemKind; + (function (CompletionItemKind) { + CompletionItemKind.Text = 1; + CompletionItemKind.Method = 2; + CompletionItemKind.Function = 3; + CompletionItemKind.Constructor = 4; + CompletionItemKind.Field = 5; + CompletionItemKind.Variable = 6; + CompletionItemKind.Class = 7; + CompletionItemKind.Interface = 8; + CompletionItemKind.Module = 9; + CompletionItemKind.Property = 10; + CompletionItemKind.Unit = 11; + CompletionItemKind.Value = 12; + CompletionItemKind.Enum = 13; + CompletionItemKind.Keyword = 14; + CompletionItemKind.Snippet = 15; + CompletionItemKind.Color = 16; + CompletionItemKind.File = 17; + CompletionItemKind.Reference = 18; + CompletionItemKind.Folder = 19; + CompletionItemKind.EnumMember = 20; + CompletionItemKind.Constant = 21; + CompletionItemKind.Struct = 22; + CompletionItemKind.Event = 23; + CompletionItemKind.Operator = 24; + CompletionItemKind.TypeParameter = 25; + })(CompletionItemKind || (exports.CompletionItemKind = CompletionItemKind = {})); + /** + * Defines whether the insert text in a completion item should be interpreted as + * plain text or a snippet. + */ + var InsertTextFormat; + (function (InsertTextFormat) { + /** + * The primary text to be inserted is treated as a plain string. + */ + InsertTextFormat.PlainText = 1; + /** + * The primary text to be inserted is treated as a snippet. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Placeholders with equal identifiers are linked, + * that is typing in one will update others too. + * + * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax + */ + InsertTextFormat.Snippet = 2; + })(InsertTextFormat || (exports.InsertTextFormat = InsertTextFormat = {})); + /** + * Completion item tags are extra annotations that tweak the rendering of a completion + * item. + * + * @since 3.15.0 + */ + var CompletionItemTag; + (function (CompletionItemTag) { + /** + * Render a completion as obsolete, usually using a strike-out. + */ + CompletionItemTag.Deprecated = 1; + })(CompletionItemTag || (exports.CompletionItemTag = CompletionItemTag = {})); + /** + * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits. + * + * @since 3.16.0 + */ + var InsertReplaceEdit; + (function (InsertReplaceEdit) { + /** + * Creates a new insert / replace edit + */ + function create(newText, insert, replace) { + return { newText: newText, insert: insert, replace: replace }; + } + InsertReplaceEdit.create = create; + /** + * Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface. + */ + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace); + } + InsertReplaceEdit.is = is; + })(InsertReplaceEdit || (exports.InsertReplaceEdit = InsertReplaceEdit = {})); + /** + * How whitespace and indentation is handled during completion + * item insertion. + * + * @since 3.16.0 + */ + var InsertTextMode; + (function (InsertTextMode) { + /** + * The insertion or replace strings is taken as it is. If the + * value is multi line the lines below the cursor will be + * inserted using the indentation defined in the string value. + * The client will not apply any kind of adjustments to the + * string. + */ + InsertTextMode.asIs = 1; + /** + * The editor adjusts leading whitespace of new lines so that + * they match the indentation up to the cursor of the line for + * which the item is accepted. + * + * Consider a line like this: <2tabs><3tabs>foo. Accepting a + * multi line completion item is indented using 2 tabs and all + * following lines inserted will be indented using 2 tabs as well. + */ + InsertTextMode.adjustIndentation = 2; + })(InsertTextMode || (exports.InsertTextMode = InsertTextMode = {})); + var CompletionItemLabelDetails; + (function (CompletionItemLabelDetails) { + function is(value) { + var candidate = value; + return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) && + (Is.string(candidate.description) || candidate.description === undefined); + } + CompletionItemLabelDetails.is = is; + })(CompletionItemLabelDetails || (exports.CompletionItemLabelDetails = CompletionItemLabelDetails = {})); + /** + * The CompletionItem namespace provides functions to deal with + * completion items. + */ + var CompletionItem; + (function (CompletionItem) { + /** + * Create a completion item and seed it with a label. + * @param label The completion item's label + */ + function create(label) { + return { label: label }; + } + CompletionItem.create = create; + })(CompletionItem || (exports.CompletionItem = CompletionItem = {})); + /** + * The CompletionList namespace provides functions to deal with + * completion lists. + */ + var CompletionList; + (function (CompletionList) { + /** + * Creates a new completion list. + * + * @param items The completion items. + * @param isIncomplete The list is not complete. + */ + function create(items, isIncomplete) { + return { items: items ? items : [], isIncomplete: !!isIncomplete }; + } + CompletionList.create = create; + })(CompletionList || (exports.CompletionList = CompletionList = {})); + var MarkedString; + (function (MarkedString) { + /** + * Creates a marked string from plain text. + * + * @param plainText The plain text. + */ + function fromPlainText(plainText) { + return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash + } + MarkedString.fromPlainText = fromPlainText; + /** + * Checks whether the given value conforms to the {@link MarkedString} type. + */ + function is(value) { + var candidate = value; + return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value)); + } + MarkedString.is = is; + })(MarkedString || (exports.MarkedString = MarkedString = {})); + var Hover; + (function (Hover) { + /** + * Checks whether the given value conforms to the {@link Hover} interface. + */ + function is(value) { + var candidate = value; + return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) || + MarkedString.is(candidate.contents) || + Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range)); + } + Hover.is = is; + })(Hover || (exports.Hover = Hover = {})); + /** + * The ParameterInformation namespace provides helper functions to work with + * {@link ParameterInformation} literals. + */ + var ParameterInformation; + (function (ParameterInformation) { + /** + * Creates a new parameter information literal. + * + * @param label A label string. + * @param documentation A doc string. + */ + function create(label, documentation) { + return documentation ? { label: label, documentation: documentation } : { label: label }; + } + ParameterInformation.create = create; + })(ParameterInformation || (exports.ParameterInformation = ParameterInformation = {})); + /** + * The SignatureInformation namespace provides helper functions to work with + * {@link SignatureInformation} literals. + */ + var SignatureInformation; + (function (SignatureInformation) { + function create(label, documentation) { + var parameters = []; + for (var _i = 2; _i < arguments.length; _i++) { + parameters[_i - 2] = arguments[_i]; + } + var result = { label: label }; + if (Is.defined(documentation)) { + result.documentation = documentation; + } + if (Is.defined(parameters)) { + result.parameters = parameters; + } + else { + result.parameters = []; + } + return result; + } + SignatureInformation.create = create; + })(SignatureInformation || (exports.SignatureInformation = SignatureInformation = {})); + /** + * A document highlight kind. + */ + var DocumentHighlightKind; + (function (DocumentHighlightKind) { + /** + * A textual occurrence. + */ + DocumentHighlightKind.Text = 1; + /** + * Read-access of a symbol, like reading a variable. + */ + DocumentHighlightKind.Read = 2; + /** + * Write-access of a symbol, like writing to a variable. + */ + DocumentHighlightKind.Write = 3; + })(DocumentHighlightKind || (exports.DocumentHighlightKind = DocumentHighlightKind = {})); + /** + * DocumentHighlight namespace to provide helper functions to work with + * {@link DocumentHighlight} literals. + */ + var DocumentHighlight; + (function (DocumentHighlight) { + /** + * Create a DocumentHighlight object. + * @param range The range the highlight applies to. + * @param kind The highlight kind + */ + function create(range, kind) { + var result = { range: range }; + if (Is.number(kind)) { + result.kind = kind; + } + return result; + } + DocumentHighlight.create = create; + })(DocumentHighlight || (exports.DocumentHighlight = DocumentHighlight = {})); + /** + * A symbol kind. + */ + var SymbolKind; + (function (SymbolKind) { + SymbolKind.File = 1; + SymbolKind.Module = 2; + SymbolKind.Namespace = 3; + SymbolKind.Package = 4; + SymbolKind.Class = 5; + SymbolKind.Method = 6; + SymbolKind.Property = 7; + SymbolKind.Field = 8; + SymbolKind.Constructor = 9; + SymbolKind.Enum = 10; + SymbolKind.Interface = 11; + SymbolKind.Function = 12; + SymbolKind.Variable = 13; + SymbolKind.Constant = 14; + SymbolKind.String = 15; + SymbolKind.Number = 16; + SymbolKind.Boolean = 17; + SymbolKind.Array = 18; + SymbolKind.Object = 19; + SymbolKind.Key = 20; + SymbolKind.Null = 21; + SymbolKind.EnumMember = 22; + SymbolKind.Struct = 23; + SymbolKind.Event = 24; + SymbolKind.Operator = 25; + SymbolKind.TypeParameter = 26; + })(SymbolKind || (exports.SymbolKind = SymbolKind = {})); + /** + * Symbol tags are extra annotations that tweak the rendering of a symbol. + * + * @since 3.16 + */ + var SymbolTag; + (function (SymbolTag) { + /** + * Render a symbol as obsolete, usually using a strike-out. + */ + SymbolTag.Deprecated = 1; + })(SymbolTag || (exports.SymbolTag = SymbolTag = {})); + var SymbolInformation; + (function (SymbolInformation) { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the location of the symbol. + * @param uri The resource of the location of symbol. + * @param containerName The name of the symbol containing the symbol. + */ + function create(name, kind, range, uri, containerName) { + var result = { + name: name, + kind: kind, + location: { uri: uri, range: range } + }; + if (containerName) { + result.containerName = containerName; + } + return result; + } + SymbolInformation.create = create; + })(SymbolInformation || (exports.SymbolInformation = SymbolInformation = {})); + var WorkspaceSymbol; + (function (WorkspaceSymbol) { + /** + * Create a new workspace symbol. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param uri The resource of the location of the symbol. + * @param range An options range of the location. + * @returns A WorkspaceSymbol. + */ + function create(name, kind, uri, range) { + return range !== undefined + ? { name: name, kind: kind, location: { uri: uri, range: range } } + : { name: name, kind: kind, location: { uri: uri } }; + } + WorkspaceSymbol.create = create; + })(WorkspaceSymbol || (exports.WorkspaceSymbol = WorkspaceSymbol = {})); + var DocumentSymbol; + (function (DocumentSymbol) { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param detail The detail of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the symbol. + * @param selectionRange The selectionRange of the symbol. + * @param children Children of the symbol. + */ + function create(name, detail, kind, range, selectionRange, children) { + var result = { + name: name, + detail: detail, + kind: kind, + range: range, + selectionRange: selectionRange + }; + if (children !== undefined) { + result.children = children; + } + return result; + } + DocumentSymbol.create = create; + /** + * Checks whether the given literal conforms to the {@link DocumentSymbol} interface. + */ + function is(value) { + var candidate = value; + return candidate && + Is.string(candidate.name) && Is.number(candidate.kind) && + Range.is(candidate.range) && Range.is(candidate.selectionRange) && + (candidate.detail === undefined || Is.string(candidate.detail)) && + (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) && + (candidate.children === undefined || Array.isArray(candidate.children)) && + (candidate.tags === undefined || Array.isArray(candidate.tags)); + } + DocumentSymbol.is = is; + })(DocumentSymbol || (exports.DocumentSymbol = DocumentSymbol = {})); + /** + * A set of predefined code action kinds + */ + var CodeActionKind; + (function (CodeActionKind) { + /** + * Empty kind. + */ + CodeActionKind.Empty = ''; + /** + * Base kind for quickfix actions: 'quickfix' + */ + CodeActionKind.QuickFix = 'quickfix'; + /** + * Base kind for refactoring actions: 'refactor' + */ + CodeActionKind.Refactor = 'refactor'; + /** + * Base kind for refactoring extraction actions: 'refactor.extract' + * + * Example extract actions: + * + * - Extract method + * - Extract function + * - Extract variable + * - Extract interface from class + * - ... + */ + CodeActionKind.RefactorExtract = 'refactor.extract'; + /** + * Base kind for refactoring inline actions: 'refactor.inline' + * + * Example inline actions: + * + * - Inline function + * - Inline variable + * - Inline constant + * - ... + */ + CodeActionKind.RefactorInline = 'refactor.inline'; + /** + * Base kind for refactoring rewrite actions: 'refactor.rewrite' + * + * Example rewrite actions: + * + * - Convert JavaScript function to class + * - Add or remove parameter + * - Encapsulate field + * - Make method static + * - Move method to base class + * - ... + */ + CodeActionKind.RefactorRewrite = 'refactor.rewrite'; + /** + * Base kind for source actions: `source` + * + * Source code actions apply to the entire file. + */ + CodeActionKind.Source = 'source'; + /** + * Base kind for an organize imports source action: `source.organizeImports` + */ + CodeActionKind.SourceOrganizeImports = 'source.organizeImports'; + /** + * Base kind for auto-fix source actions: `source.fixAll`. + * + * Fix all actions automatically fix errors that have a clear fix that do not require user input. + * They should not suppress errors or perform unsafe fixes such as generating new types or classes. + * + * @since 3.15.0 + */ + CodeActionKind.SourceFixAll = 'source.fixAll'; + })(CodeActionKind || (exports.CodeActionKind = CodeActionKind = {})); + /** + * The reason why code actions were requested. + * + * @since 3.17.0 + */ + var CodeActionTriggerKind; + (function (CodeActionTriggerKind) { + /** + * Code actions were explicitly requested by the user or by an extension. + */ + CodeActionTriggerKind.Invoked = 1; + /** + * Code actions were requested automatically. + * + * This typically happens when current selection in a file changes, but can + * also be triggered when file content changes. + */ + CodeActionTriggerKind.Automatic = 2; + })(CodeActionTriggerKind || (exports.CodeActionTriggerKind = CodeActionTriggerKind = {})); + /** + * The CodeActionContext namespace provides helper functions to work with + * {@link CodeActionContext} literals. + */ + var CodeActionContext; + (function (CodeActionContext) { + /** + * Creates a new CodeActionContext literal. + */ + function create(diagnostics, only, triggerKind) { + var result = { diagnostics: diagnostics }; + if (only !== undefined && only !== null) { + result.only = only; + } + if (triggerKind !== undefined && triggerKind !== null) { + result.triggerKind = triggerKind; + } + return result; + } + CodeActionContext.create = create; + /** + * Checks whether the given literal conforms to the {@link CodeActionContext} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) + && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string)) + && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic); + } + CodeActionContext.is = is; + })(CodeActionContext || (exports.CodeActionContext = CodeActionContext = {})); + var CodeAction; + (function (CodeAction) { + function create(title, kindOrCommandOrEdit, kind) { + var result = { title: title }; + var checkKind = true; + if (typeof kindOrCommandOrEdit === 'string') { + checkKind = false; + result.kind = kindOrCommandOrEdit; + } + else if (Command.is(kindOrCommandOrEdit)) { + result.command = kindOrCommandOrEdit; + } + else { + result.edit = kindOrCommandOrEdit; + } + if (checkKind && kind !== undefined) { + result.kind = kind; + } + return result; + } + CodeAction.create = create; + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.title) && + (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) && + (candidate.kind === undefined || Is.string(candidate.kind)) && + (candidate.edit !== undefined || candidate.command !== undefined) && + (candidate.command === undefined || Command.is(candidate.command)) && + (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) && + (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit)); + } + CodeAction.is = is; + })(CodeAction || (exports.CodeAction = CodeAction = {})); + /** + * The CodeLens namespace provides helper functions to work with + * {@link CodeLens} literals. + */ + var CodeLens; + (function (CodeLens) { + /** + * Creates a new CodeLens literal. + */ + function create(range, data) { + var result = { range: range }; + if (Is.defined(data)) { + result.data = data; + } + return result; + } + CodeLens.create = create; + /** + * Checks whether the given literal conforms to the {@link CodeLens} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command)); + } + CodeLens.is = is; + })(CodeLens || (exports.CodeLens = CodeLens = {})); + /** + * The FormattingOptions namespace provides helper functions to work with + * {@link FormattingOptions} literals. + */ + var FormattingOptions; + (function (FormattingOptions) { + /** + * Creates a new FormattingOptions literal. + */ + function create(tabSize, insertSpaces) { + return { tabSize: tabSize, insertSpaces: insertSpaces }; + } + FormattingOptions.create = create; + /** + * Checks whether the given literal conforms to the {@link FormattingOptions} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces); + } + FormattingOptions.is = is; + })(FormattingOptions || (exports.FormattingOptions = FormattingOptions = {})); + /** + * The DocumentLink namespace provides helper functions to work with + * {@link DocumentLink} literals. + */ + var DocumentLink; + (function (DocumentLink) { + /** + * Creates a new DocumentLink literal. + */ + function create(range, target, data) { + return { range: range, target: target, data: data }; + } + DocumentLink.create = create; + /** + * Checks whether the given literal conforms to the {@link DocumentLink} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target)); + } + DocumentLink.is = is; + })(DocumentLink || (exports.DocumentLink = DocumentLink = {})); + /** + * The SelectionRange namespace provides helper function to work with + * SelectionRange literals. + */ + var SelectionRange; + (function (SelectionRange) { + /** + * Creates a new SelectionRange + * @param range the range. + * @param parent an optional parent. + */ + function create(range, parent) { + return { range: range, parent: parent }; + } + SelectionRange.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent)); + } + SelectionRange.is = is; + })(SelectionRange || (exports.SelectionRange = SelectionRange = {})); + /** + * A set of predefined token types. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ + var SemanticTokenTypes; + (function (SemanticTokenTypes) { + SemanticTokenTypes["namespace"] = "namespace"; + /** + * Represents a generic type. Acts as a fallback for types which can't be mapped to + * a specific type like class or enum. + */ + SemanticTokenTypes["type"] = "type"; + SemanticTokenTypes["class"] = "class"; + SemanticTokenTypes["enum"] = "enum"; + SemanticTokenTypes["interface"] = "interface"; + SemanticTokenTypes["struct"] = "struct"; + SemanticTokenTypes["typeParameter"] = "typeParameter"; + SemanticTokenTypes["parameter"] = "parameter"; + SemanticTokenTypes["variable"] = "variable"; + SemanticTokenTypes["property"] = "property"; + SemanticTokenTypes["enumMember"] = "enumMember"; + SemanticTokenTypes["event"] = "event"; + SemanticTokenTypes["function"] = "function"; + SemanticTokenTypes["method"] = "method"; + SemanticTokenTypes["macro"] = "macro"; + SemanticTokenTypes["keyword"] = "keyword"; + SemanticTokenTypes["modifier"] = "modifier"; + SemanticTokenTypes["comment"] = "comment"; + SemanticTokenTypes["string"] = "string"; + SemanticTokenTypes["number"] = "number"; + SemanticTokenTypes["regexp"] = "regexp"; + SemanticTokenTypes["operator"] = "operator"; + /** + * @since 3.17.0 + */ + SemanticTokenTypes["decorator"] = "decorator"; + })(SemanticTokenTypes || (exports.SemanticTokenTypes = SemanticTokenTypes = {})); + /** + * A set of predefined token modifiers. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ + var SemanticTokenModifiers; + (function (SemanticTokenModifiers) { + SemanticTokenModifiers["declaration"] = "declaration"; + SemanticTokenModifiers["definition"] = "definition"; + SemanticTokenModifiers["readonly"] = "readonly"; + SemanticTokenModifiers["static"] = "static"; + SemanticTokenModifiers["deprecated"] = "deprecated"; + SemanticTokenModifiers["abstract"] = "abstract"; + SemanticTokenModifiers["async"] = "async"; + SemanticTokenModifiers["modification"] = "modification"; + SemanticTokenModifiers["documentation"] = "documentation"; + SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary"; + })(SemanticTokenModifiers || (exports.SemanticTokenModifiers = SemanticTokenModifiers = {})); + /** + * @since 3.16.0 + */ + var SemanticTokens; + (function (SemanticTokens) { + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') && + Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number'); + } + SemanticTokens.is = is; + })(SemanticTokens || (exports.SemanticTokens = SemanticTokens = {})); + /** + * The InlineValueText namespace provides functions to deal with InlineValueTexts. + * + * @since 3.17.0 + */ + var InlineValueText; + (function (InlineValueText) { + /** + * Creates a new InlineValueText literal. + */ + function create(range, text) { + return { range: range, text: text }; + } + InlineValueText.create = create; + function is(value) { + var candidate = value; + return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text); + } + InlineValueText.is = is; + })(InlineValueText || (exports.InlineValueText = InlineValueText = {})); + /** + * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups. + * + * @since 3.17.0 + */ + var InlineValueVariableLookup; + (function (InlineValueVariableLookup) { + /** + * Creates a new InlineValueText literal. + */ + function create(range, variableName, caseSensitiveLookup) { + return { range: range, variableName: variableName, caseSensitiveLookup: caseSensitiveLookup }; + } + InlineValueVariableLookup.create = create; + function is(value) { + var candidate = value; + return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup) + && (Is.string(candidate.variableName) || candidate.variableName === undefined); + } + InlineValueVariableLookup.is = is; + })(InlineValueVariableLookup || (exports.InlineValueVariableLookup = InlineValueVariableLookup = {})); + /** + * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression. + * + * @since 3.17.0 + */ + var InlineValueEvaluatableExpression; + (function (InlineValueEvaluatableExpression) { + /** + * Creates a new InlineValueEvaluatableExpression literal. + */ + function create(range, expression) { + return { range: range, expression: expression }; + } + InlineValueEvaluatableExpression.create = create; + function is(value) { + var candidate = value; + return candidate !== undefined && candidate !== null && Range.is(candidate.range) + && (Is.string(candidate.expression) || candidate.expression === undefined); + } + InlineValueEvaluatableExpression.is = is; + })(InlineValueEvaluatableExpression || (exports.InlineValueEvaluatableExpression = InlineValueEvaluatableExpression = {})); + /** + * The InlineValueContext namespace provides helper functions to work with + * {@link InlineValueContext} literals. + * + * @since 3.17.0 + */ + var InlineValueContext; + (function (InlineValueContext) { + /** + * Creates a new InlineValueContext literal. + */ + function create(frameId, stoppedLocation) { + return { frameId: frameId, stoppedLocation: stoppedLocation }; + } + InlineValueContext.create = create; + /** + * Checks whether the given literal conforms to the {@link InlineValueContext} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(value.stoppedLocation); + } + InlineValueContext.is = is; + })(InlineValueContext || (exports.InlineValueContext = InlineValueContext = {})); + /** + * Inlay hint kinds. + * + * @since 3.17.0 + */ + var InlayHintKind; + (function (InlayHintKind) { + /** + * An inlay hint that for a type annotation. + */ + InlayHintKind.Type = 1; + /** + * An inlay hint that is for a parameter. + */ + InlayHintKind.Parameter = 2; + function is(value) { + return value === 1 || value === 2; + } + InlayHintKind.is = is; + })(InlayHintKind || (exports.InlayHintKind = InlayHintKind = {})); + var InlayHintLabelPart; + (function (InlayHintLabelPart) { + function create(value) { + return { value: value }; + } + InlayHintLabelPart.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) + && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) + && (candidate.location === undefined || Location.is(candidate.location)) + && (candidate.command === undefined || Command.is(candidate.command)); + } + InlayHintLabelPart.is = is; + })(InlayHintLabelPart || (exports.InlayHintLabelPart = InlayHintLabelPart = {})); + var InlayHint; + (function (InlayHint) { + function create(position, label, kind) { + var result = { position: position, label: label }; + if (kind !== undefined) { + result.kind = kind; + } + return result; + } + InlayHint.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Position.is(candidate.position) + && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is)) + && (candidate.kind === undefined || InlayHintKind.is(candidate.kind)) + && (candidate.textEdits === undefined) || Is.typedArray(candidate.textEdits, TextEdit.is) + && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) + && (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft)) + && (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight)); + } + InlayHint.is = is; + })(InlayHint || (exports.InlayHint = InlayHint = {})); + var StringValue; + (function (StringValue) { + function createSnippet(value) { + return { kind: 'snippet', value: value }; + } + StringValue.createSnippet = createSnippet; + })(StringValue || (exports.StringValue = StringValue = {})); + var InlineCompletionItem; + (function (InlineCompletionItem) { + function create(insertText, filterText, range, command) { + return { insertText: insertText, filterText: filterText, range: range, command: command }; + } + InlineCompletionItem.create = create; + })(InlineCompletionItem || (exports.InlineCompletionItem = InlineCompletionItem = {})); + var InlineCompletionList; + (function (InlineCompletionList) { + function create(items) { + return { items: items }; + } + InlineCompletionList.create = create; + })(InlineCompletionList || (exports.InlineCompletionList = InlineCompletionList = {})); + /** + * Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered. + * + * @since 3.18.0 + * @proposed + */ + var InlineCompletionTriggerKind; + (function (InlineCompletionTriggerKind) { + /** + * Completion was triggered explicitly by a user gesture. + */ + InlineCompletionTriggerKind.Invoked = 0; + /** + * Completion was triggered automatically while editing. + */ + InlineCompletionTriggerKind.Automatic = 1; + })(InlineCompletionTriggerKind || (exports.InlineCompletionTriggerKind = InlineCompletionTriggerKind = {})); + var SelectedCompletionInfo; + (function (SelectedCompletionInfo) { + function create(range, text) { + return { range: range, text: text }; + } + SelectedCompletionInfo.create = create; + })(SelectedCompletionInfo || (exports.SelectedCompletionInfo = SelectedCompletionInfo = {})); + var InlineCompletionContext; + (function (InlineCompletionContext) { + function create(triggerKind, selectedCompletionInfo) { + return { triggerKind: triggerKind, selectedCompletionInfo: selectedCompletionInfo }; + } + InlineCompletionContext.create = create; + })(InlineCompletionContext || (exports.InlineCompletionContext = InlineCompletionContext = {})); + var WorkspaceFolder; + (function (WorkspaceFolder) { + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name); + } + WorkspaceFolder.is = is; + })(WorkspaceFolder || (exports.WorkspaceFolder = WorkspaceFolder = {})); + exports.EOL = ['\n', '\r\n', '\r']; + /** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ + var TextDocument; + (function (TextDocument) { + /** + * Creates a new ITextDocument literal from the given uri and content. + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param version The document's version. + * @param content The document's content. + */ + function create(uri, languageId, version, content) { + return new FullTextDocument(uri, languageId, version, content); + } + TextDocument.create = create; + /** + * Checks whether the given literal conforms to the {@link ITextDocument} interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount) + && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false; + } + TextDocument.is = is; + function applyEdits(document, edits) { + var text = document.getText(); + var sortedEdits = mergeSort(edits, function (a, b) { + var diff = a.range.start.line - b.range.start.line; + if (diff === 0) { + return a.range.start.character - b.range.start.character; + } + return diff; + }); + var lastModifiedOffset = text.length; + for (var i = sortedEdits.length - 1; i >= 0; i--) { + var e = sortedEdits[i]; + var startOffset = document.offsetAt(e.range.start); + var endOffset = document.offsetAt(e.range.end); + if (endOffset <= lastModifiedOffset) { + text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length); + } + else { + throw new Error('Overlapping edit'); + } + lastModifiedOffset = startOffset; + } + return text; + } + TextDocument.applyEdits = applyEdits; + function mergeSort(data, compare) { + if (data.length <= 1) { + // sorted + return data; + } + var p = (data.length / 2) | 0; + var left = data.slice(0, p); + var right = data.slice(p); + mergeSort(left, compare); + mergeSort(right, compare); + var leftIdx = 0; + var rightIdx = 0; + var i = 0; + while (leftIdx < left.length && rightIdx < right.length) { + var ret = compare(left[leftIdx], right[rightIdx]); + if (ret <= 0) { + // smaller_equal -> take left to preserve order + data[i++] = left[leftIdx++]; + } + else { + // greater -> take right + data[i++] = right[rightIdx++]; + } + } + while (leftIdx < left.length) { + data[i++] = left[leftIdx++]; + } + while (rightIdx < right.length) { + data[i++] = right[rightIdx++]; + } + return data; + } + })(TextDocument || (exports.TextDocument = TextDocument = {})); + /** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ + var FullTextDocument = /** @class */ (function () { + function FullTextDocument(uri, languageId, version, content) { + this._uri = uri; + this._languageId = languageId; + this._version = version; + this._content = content; + this._lineOffsets = undefined; + } + Object.defineProperty(FullTextDocument.prototype, "uri", { + get: function () { + return this._uri; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(FullTextDocument.prototype, "languageId", { + get: function () { + return this._languageId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(FullTextDocument.prototype, "version", { + get: function () { + return this._version; + }, + enumerable: false, + configurable: true + }); + FullTextDocument.prototype.getText = function (range) { + if (range) { + var start = this.offsetAt(range.start); + var end = this.offsetAt(range.end); + return this._content.substring(start, end); + } + return this._content; + }; + FullTextDocument.prototype.update = function (event, version) { + this._content = event.text; + this._version = version; + this._lineOffsets = undefined; + }; + FullTextDocument.prototype.getLineOffsets = function () { + if (this._lineOffsets === undefined) { + var lineOffsets = []; + var text = this._content; + var isLineStart = true; + for (var i = 0; i < text.length; i++) { + if (isLineStart) { + lineOffsets.push(i); + isLineStart = false; + } + var ch = text.charAt(i); + isLineStart = (ch === '\r' || ch === '\n'); + if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') { + i++; + } + } + if (isLineStart && text.length > 0) { + lineOffsets.push(text.length); + } + this._lineOffsets = lineOffsets; + } + return this._lineOffsets; + }; + FullTextDocument.prototype.positionAt = function (offset) { + offset = Math.max(Math.min(offset, this._content.length), 0); + var lineOffsets = this.getLineOffsets(); + var low = 0, high = lineOffsets.length; + if (high === 0) { + return Position.create(0, offset); + } + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (lineOffsets[mid] > offset) { + high = mid; + } + else { + low = mid + 1; + } + } + // low is the least x for which the line offset is larger than the current offset + // or array.length if no line offset is larger than the current offset + var line = low - 1; + return Position.create(line, offset - lineOffsets[line]); + }; + FullTextDocument.prototype.offsetAt = function (position) { + var lineOffsets = this.getLineOffsets(); + if (position.line >= lineOffsets.length) { + return this._content.length; + } + else if (position.line < 0) { + return 0; + } + var lineOffset = lineOffsets[position.line]; + var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length; + return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset); + }; + Object.defineProperty(FullTextDocument.prototype, "lineCount", { + get: function () { + return this.getLineOffsets().length; + }, + enumerable: false, + configurable: true + }); + return FullTextDocument; + }()); + var Is; + (function (Is) { + var toString = Object.prototype.toString; + function defined(value) { + return typeof value !== 'undefined'; + } + Is.defined = defined; + function undefined(value) { + return typeof value === 'undefined'; + } + Is.undefined = undefined; + function boolean(value) { + return value === true || value === false; + } + Is.boolean = boolean; + function string(value) { + return toString.call(value) === '[object String]'; + } + Is.string = string; + function number(value) { + return toString.call(value) === '[object Number]'; + } + Is.number = number; + function numberRange(value, min, max) { + return toString.call(value) === '[object Number]' && min <= value && value <= max; + } + Is.numberRange = numberRange; + function integer(value) { + return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647; + } + Is.integer = integer; + function uinteger(value) { + return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647; + } + Is.uinteger = uinteger; + function func(value) { + return toString.call(value) === '[object Function]'; + } + Is.func = func; + function objectLiteral(value) { + // Strictly speaking class instances pass this check as well. Since the LSP + // doesn't use classes we ignore this for now. If we do we need to add something + // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null` + return value !== null && typeof value === 'object'; + } + Is.objectLiteral = objectLiteral; + function typedArray(value, check) { + return Array.isArray(value) && value.every(check); + } + Is.typedArray = typedArray; + })(Is || (Is = {})); +}); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/package.json" index b60a1e7ee3668c7b6dd9da3bae33ee501896b0e1..b82d00d2ac2cb736ff791e8ef57981d4868452fa 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/package.json" @@ -1,3 +1,38 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e7a803ab5a3935a834b99bf7abd7b1ca650e44b0fdbf2ac13f0188392d694992 -size 1458 +{ + "name": "vscode-languageserver-types", + "description": "Types used by the Language server for node", + "version": "3.17.5", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-languageserver-node.git", + "directory": "types" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "main": "./lib/umd/main.js", + "typings": "./lib/umd/main", + "exports": { + ".": { + "browser": "./lib/esm/main.js", + "import": "./lib/esm/main.js", + "default": "./lib/umd/main.js" + } + }, + "scripts": { + "prepublishOnly": "echo \"⛔ Can only publish from a secure pipeline ⛔\" && node ../build/npm/fail", + "prepack": "npm run all:publish", + "compile": "node ../build/bin/tsc -b ./tsconfig.json", + "clean": "node ../node_modules/.bin/rimraf lib", + "watch": "node ../build/bin/tsc -b ./tsconfig.watch.json -w", + "lint": "node ../node_modules/eslint/bin/eslint.js --ext ts src", + "test": "node ../node_modules/mocha/bin/_mocha", + "all": "npm run clean && npm run compile && npm run lint && npm run test", + "compile:esm": "node ../build/bin/tsc -b ./tsconfig.esm.publish.json && node ../build/bin/fix-esm", + "compile:umd": "node ../build/bin/tsc -b ./tsconfig.umd.publish.json", + "all:publish": "git clean -xfd . && npm install && npm run compile:esm && npm run compile:umd && npm run lint && npm run test", + "preversion": "npm test" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/thirdpartynotices.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/thirdpartynotices.txt" index 2d95e953bff42d0943832bbb3cbac2bfdfd91a1e..0592beef14f651f468c39777ce98ebc523ec4a43 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/thirdpartynotices.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver-types/thirdpartynotices.txt" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a89123562fe364dc8e969e85614eb6c1f8452afe131d6e42bd1314bb2d092b04 -size 623 +NOTICES AND INFORMATION +Do Not Translate or Localize + +This software incorporates material from third parties. +Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com, +or you may send a check or money order for US $5.00, including the product name, +the open source component name, platform, and version number, to: + +Source Code Compliance Team +Microsoft Corporation +One Microsoft Way +Redmond, WA 98052 +USA + +Notwithstanding any other terms, you may reverse engineer this software to the extent +required to debug changes to any libraries licensed under the GNU Lesser General Public License. \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/License.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/License.txt" index 71c73d0cbbb244fd8977b1334dae3ac9800e0c19..a07e3ae825f86b6d1f966659954bffc0768bef66 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/License.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/License.txt" @@ -1,3 +1,11 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec9ee83580841e8eb687aca9867f221503809ba6426c7f876ede17d91b9fcfd0 -size 1095 +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/README.md" index 56d42e005436cb6b1ba2351233688f3a5b13be03..4198157bc19941b01e2b74c534b432c49682bd62 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/README.md" @@ -1,3 +1,17 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6709a9d93dd8bb14a5c14115cd49a965a5c165adc5e30ef5952dfde81cf8ef79 -size 984 +# VSCode Language Server + +[![NPM Version](https://img.shields.io/npm/v/vscode-languageserver.svg)](https://npmjs.org/package/vscode-languageserver) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-languageserver.svg)](https://npmjs.org/package/vscode-languageserver) +[![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-node) + +Npm module to implement a VSCode language server using [Node.js](https://nodejs.org/) as a runtime. + +Click [here](https://code.visualstudio.com/docs/extensions/example-language-server) for a detailed document on how to use this npm module +to implement language servers for [VSCode](https://code.visualstudio.com/). + +## History + +For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md) + +## License +[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt) \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/bin/installServerIntoExtension" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/bin/installServerIntoExtension" index 7a2ecfae39cf3da965d62d4b2fb46c498cfc17c4..0e84cbc2b603feedbd9eacb09fc4f01ca622f4b3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/bin/installServerIntoExtension" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/bin/installServerIntoExtension" @@ -1,3 +1,73 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7b5fd67187666a1b28d88aed87983ade6062c70562dffcbf998b99e2fc1c16d8 -size 2754 +/* eslint-disable no-console */ +#!/usr/bin/env node + +var path = require('path'); +var fs = require('fs'); +var cp = require('child_process'); + +var extensionDirectory = process.argv[2]; +if (!extensionDirectory) { + console.error('No extension directory provided.'); + process.exit(1); +} +extensionDirectory = path.resolve(extensionDirectory); +if (!fs.existsSync(extensionDirectory)) { + console.error('Extension directory ' + extensionDirectory + ' doesn\'t exist on disk.'); + process.exit(1); +} + +var packageFile = process.argv[3]; +if (!packageFile) { + console.error('No package.json file provided.'); + process.exit(1); +} +packageFile = path.resolve(packageFile); +if (!fs.existsSync(packageFile)) { + console.error('Package file ' + packageFile + ' doesn\'t exist on disk.'); + process.exit(1); +} +var tsconfigFile = process.argv[4]; +if (!tsconfigFile) { + console.error('No tsconfig.json file provided'); + process.exit(1); +} +tsconfigFile = path.resolve(tsconfigFile); +if (!fs.existsSync(tsconfigFile)) { + console.error('tsconfig file ' + tsconfigFile + ' doesn\'t exist on disk.'); + process.exit(1); +} + +var extensionServerDirectory = path.join(extensionDirectory, 'server'); + +var json = require(tsconfigFile); +var compilerOptions = json.compilerOptions; +if (compilerOptions) { + var outDir = compilerOptions.outDir; + if (!outDir || path.join(path.dirname(tsconfigFile), outDir) !== extensionServerDirectory) { + console.error('outDir in ' + process.argv[4] + ' must point to ' + extensionServerDirectory + ' but it points to ' + path.join(path.dirname(tsconfigFile), outDir)); + console.error('Please change outDir in ' + process.argv[4] + ' to ' + path.relative(path.dirname(tsconfigFile), extensionServerDirectory).replace(/\\/g, '/')); + process.exit(1); + } +} + +if (!fs.existsSync(extensionServerDirectory)) { + fs.mkdirSync(extensionServerDirectory); +} + +var dest = path.join(extensionServerDirectory, 'package.json'); +console.log('Copying package.json to extension\'s server location...'); +fs.writeFileSync(dest, fs.readFileSync(packageFile)); + +var shrinkwrapFile = process.argv[5]; +if (fs.existsSync(shrinkwrapFile)) { + const shrinkWrapDest = path.join(extensionServerDirectory, 'npm-shrinkwrap.json'); + shrinkwrapFile = path.resolve(shrinkwrapFile); + console.log('Copying npm-shrinkwrap.json to extension\'s server location...'); + fs.writeFileSync(shrinkWrapDest, fs.readFileSync(shrinkwrapFile)); + +} + +console.log('The script is deprecated. See https://github.com/microsoft/vscode-extension-samples/tree/master/lsp-sample for an example on how to setup an extension / server project.'); +console.log(''); +console.log('Updating server npm modules into extension\'s server location...'); +cp.execSync('npm update --production --prefix ' + extensionServerDirectory); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/browser.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/browser.d.ts" index 0898e728f1aa9ab8ecda68d04096c898e91dbe6a..e628f1b5caf549c4b58cead28e5ca6a1d682acf8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/browser.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/browser.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99170b7257d895bb2594d7db9c255a4b0029a1363fe5e89849fda830b5c997ce -size 385 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/browser/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/browser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/browser.js" index da29a4f6ec2636f4c79c022c589b7adc67c91530..f5caebf0011feb56821400f3e85f752c80778192 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/browser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/browser.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9406802db032558d3cd8bde9f68d20c067f3a7eca251ad7d0e4473da8d457ada -size 411 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/browser/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/browser/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/browser/main.d.ts" index 0c283e4bcb3492be0c81825f87837cd3f0a92428..0ee3a2bc2effcd9f347028ad914b7a6b8d1adddd 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/browser/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/browser/main.d.ts" @@ -1,3 +1,20 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:14246cd016d146072475fb648c4e7ca7101bea205972d5ca4412f6e978eff871 -size 1371 +import { MessageReader, MessageWriter, ConnectionStrategy, ConnectionOptions, Connection, Features, _Connection, _ } from '../common/api'; +export * from 'vscode-languageserver-protocol/browser'; +export * from '../common/api'; +/** + * Creates a new connection. + * + * @param factories: The factories for proposed features. + * @param reader The message reader to read messages from. + * @param writer The message writer to write message to. + * @param options An optional connection strategy or connection options to control additional settings + */ +export declare function createConnection(factories: Features, reader: MessageReader, writer: MessageWriter, options?: ConnectionStrategy | ConnectionOptions): _Connection; +/** + * Creates a new connection. + * + * @param reader The message reader to read messages from. + * @param writer The message writer to write message to. + * @param options An optional connection strategy or connection options to control additional settings + */ +export declare function createConnection(reader: MessageReader, writer: MessageWriter, options?: ConnectionStrategy | ConnectionOptions): Connection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/browser/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/browser/main.js" index 78b99d1bdf0ed59c04e126eddbaa4763d1d1442d..e69eca4ab203aebd24bf4103dcdd9a315d050775 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/browser/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/browser/main.js" @@ -1,3 +1,59 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99b55457739f022a8974985c104c41488388ca3284f4d4b1712d2a7e7991b404 -size 2159 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createConnection = void 0; +const api_1 = require("../common/api"); +__exportStar(require("vscode-languageserver-protocol/browser"), exports); +__exportStar(require("../common/api"), exports); +let _shutdownReceived = false; +const watchDog = { + initialize: (_params) => { + }, + get shutdownReceived() { + return _shutdownReceived; + }, + set shutdownReceived(value) { + _shutdownReceived = value; + }, + exit: (_code) => { + } +}; +function createConnection(arg1, arg2, arg3, arg4) { + let factories; + let reader; + let writer; + let options; + if (arg1 !== void 0 && arg1.__brand === 'features') { + factories = arg1; + arg1 = arg2; + arg2 = arg3; + arg3 = arg4; + } + if (api_1.ConnectionStrategy.is(arg1) || api_1.ConnectionOptions.is(arg1)) { + options = arg1; + } + else { + reader = arg1; + writer = arg2; + options = arg3; + } + const connectionFactory = (logger) => { + return api_1.createProtocolConnection(reader, writer, logger, options); + }; + return api_1.createConnection(connectionFactory, watchDog, factories); +} +exports.createConnection = createConnection; +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/api.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/api.d.ts" index 31c21e31aa4d6f076857878042f0c15df7f22698..42f8a62e609c1cd75cdb30ecdbf3f5586091a016 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/api.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/api.d.ts" @@ -1,3 +1,11 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3b4ba8322f73cc571cd57e55199b909e04b5da79d00d58a3a20fd71463f8c081 -size 577 +import { _, Features, _Connection } from './server'; +import { SemanticTokensBuilder } from './semanticTokens'; +import type { WorkDoneProgressReporter, WorkDoneProgressServerReporter, ResultProgressReporter } from './progress'; +export * from 'vscode-languageserver-protocol/'; +export { WorkDoneProgressReporter, WorkDoneProgressServerReporter, ResultProgressReporter }; +export { SemanticTokensBuilder }; +export * from './server'; +export declare namespace ProposedFeatures { + const all: Features<_, _, _, _, _, _, _>; + type Connection = _Connection<_, _, _, _, _, _, _>; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/api.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/api.js" index 5d39f7eb7ad623920e0ebcd7a6cfd8000fb6c87e..3cd626239571c1940d4fa72acf8947cfa3ff99b3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/api.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/api.js" @@ -1,3 +1,28 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7dd35423adcf7379aa0b5370d2e81ea5336ad1f8a693e0fea2b13bc0708d1d7c -size 1551 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProposedFeatures = exports.SemanticTokensBuilder = void 0; +const semanticTokens_1 = require("./semanticTokens"); +Object.defineProperty(exports, "SemanticTokensBuilder", { enumerable: true, get: function () { return semanticTokens_1.SemanticTokensBuilder; } }); +__exportStar(require("vscode-languageserver-protocol/"), exports); +__exportStar(require("./server"), exports); +var ProposedFeatures; +(function (ProposedFeatures) { + ProposedFeatures.all = { + __brand: 'features' + }; +})(ProposedFeatures = exports.ProposedFeatures || (exports.ProposedFeatures = {})); +//# sourceMappingURL=api.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/callHierarchy.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/callHierarchy.d.ts" index bc52c0e3bd71f5d6764911e23601c66c0dfd4a32..759c245d95b30c51e38ad61fe3928b76b81bb7b5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/callHierarchy.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/callHierarchy.d.ts" @@ -1,3 +1,15 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9acd551d1b5fb8a4ea4bfd65e8fcc8beca89a4b98fc1a9321924308256383565 -size 961 +import { CallHierarchyItem, CallHierarchyPrepareParams, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCall, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCall } from 'vscode-languageserver-protocol'; +import type { Feature, _Languages, ServerRequestHandler } from './server'; +/** + * Shape of the call hierarchy feature + * + * @since 3.16.0 + */ +export interface CallHierarchy { + callHierarchy: { + onPrepare(handler: ServerRequestHandler): void; + onIncomingCalls(handler: ServerRequestHandler): void; + onOutgoingCalls(handler: ServerRequestHandler): void; + }; +} +export declare const CallHierarchyFeature: Feature<_Languages, CallHierarchy>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/callHierarchy.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/callHierarchy.js" index fc4ec0269611059d8362d423256d31288e532890..783f1409696cdeff3b783214475e280eafb44f3b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/callHierarchy.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/callHierarchy.js" @@ -1,3 +1,35 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f9b493457fcef303c94099bf11a0f8f31c0c3d7b69cc34e9a4456411103c7b10 -size 1950 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CallHierarchyFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const CallHierarchyFeature = (Base) => { + return class extends Base { + get callHierarchy() { + return { + onPrepare: (handler) => { + this.connection.onRequest(vscode_languageserver_protocol_1.CallHierarchyPrepareRequest.type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), undefined); + }); + }, + onIncomingCalls: (handler) => { + const type = vscode_languageserver_protocol_1.CallHierarchyIncomingCallsRequest.type; + this.connection.onRequest(type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params)); + }); + }, + onOutgoingCalls: (handler) => { + const type = vscode_languageserver_protocol_1.CallHierarchyOutgoingCallsRequest.type; + this.connection.onRequest(type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params)); + }); + } + }; + } + }; +}; +exports.CallHierarchyFeature = CallHierarchyFeature; +//# sourceMappingURL=callHierarchy.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/configuration.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/configuration.d.ts" index 26c036b3ac38f9574d7e886875ba256ea11374da..5a7f74288a51a7983192f99bf973cb136bcd944a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/configuration.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/configuration.d.ts" @@ -1,3 +1,9 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7662d6994d28c9ebbe61b88cc35c3d705804351eedbf363df30ea9fe8c4961dc -size 465 +import { ConfigurationItem } from 'vscode-languageserver-protocol'; +import type { Feature, _RemoteWorkspace } from './server'; +export interface Configuration { + getConfiguration(): Promise; + getConfiguration(section: string): Promise; + getConfiguration(item: ConfigurationItem): Promise; + getConfiguration(items: ConfigurationItem[]): Promise; +} +export declare const ConfigurationFeature: Feature<_RemoteWorkspace, Configuration>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/configuration.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/configuration.js" index 809e2d96078eb371b819f5c7f913582cf9bedeb4..988c7a70037cd01376ee605e3a172ef1f987b8cf 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/configuration.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/configuration.js" @@ -1,3 +1,34 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e84a92e5560b7596d29132a24df42e11366efb040d57a10ff8506d648ec272f7 -size 1450 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ConfigurationFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const Is = require("./utils/is"); +const ConfigurationFeature = (Base) => { + return class extends Base { + getConfiguration(arg) { + if (!arg) { + return this._getConfiguration({}); + } + else if (Is.string(arg)) { + return this._getConfiguration({ section: arg }); + } + else { + return this._getConfiguration(arg); + } + } + _getConfiguration(arg) { + let params = { + items: Array.isArray(arg) ? arg : [arg] + }; + return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => { + return Array.isArray(arg) ? result : result[0]; + }); + } + }; +}; +exports.ConfigurationFeature = ConfigurationFeature; +//# sourceMappingURL=configuration.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/fileOperations.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/fileOperations.d.ts" index 1d08592f2d8662b5caa4819ebed64f0991c38d6b..148f656385d75849199233571ad07d078ab1ee85 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/fileOperations.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/fileOperations.d.ts" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a0116a0ba37624acef486fba35bd5530c8c25415798c8908a35e5f72913d2365 -size 969 +import { RequestHandler, NotificationHandler, WorkspaceEdit, CreateFilesParams, RenameFilesParams, DeleteFilesParams } from 'vscode-languageserver-protocol'; +import type { Feature, _RemoteWorkspace } from './server'; +/** + * Shape of the file operations feature + * + * @since 3.16.0 + */ +export interface FileOperationsFeatureShape { + onDidCreateFiles(handler: NotificationHandler): void; + onDidRenameFiles(handler: NotificationHandler): void; + onDidDeleteFiles(handler: NotificationHandler): void; + onWillCreateFiles(handler: RequestHandler): void; + onWillRenameFiles(handler: RequestHandler): void; + onWillDeleteFiles(handler: RequestHandler): void; +} +export declare const FileOperationsFeature: Feature<_RemoteWorkspace, FileOperationsFeatureShape>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/fileOperations.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/fileOperations.js" index 2018a08e117a61226d2443c71946632f18065b1a..b9ce58bf1eed170e280c68d8b0ba3c7d495b9f4c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/fileOperations.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/fileOperations.js" @@ -1,3 +1,44 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:84e69c931c5d2d3719bd5b53e4b3600f6ef0f199629bd27ceaa75a4b370386f1 -size 2106 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FileOperationsFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const FileOperationsFeature = (Base) => { + return class extends Base { + onDidCreateFiles(handler) { + this.connection.onNotification(vscode_languageserver_protocol_1.DidCreateFilesNotification.type, (params) => { + handler(params); + }); + } + onDidRenameFiles(handler) { + this.connection.onNotification(vscode_languageserver_protocol_1.DidRenameFilesNotification.type, (params) => { + handler(params); + }); + } + onDidDeleteFiles(handler) { + this.connection.onNotification(vscode_languageserver_protocol_1.DidDeleteFilesNotification.type, (params) => { + handler(params); + }); + } + onWillCreateFiles(handler) { + return this.connection.onRequest(vscode_languageserver_protocol_1.WillCreateFilesRequest.type, (params, cancel) => { + return handler(params, cancel); + }); + } + onWillRenameFiles(handler) { + return this.connection.onRequest(vscode_languageserver_protocol_1.WillRenameFilesRequest.type, (params, cancel) => { + return handler(params, cancel); + }); + } + onWillDeleteFiles(handler) { + return this.connection.onRequest(vscode_languageserver_protocol_1.WillDeleteFilesRequest.type, (params, cancel) => { + return handler(params, cancel); + }); + } + }; +}; +exports.FileOperationsFeature = FileOperationsFeature; +//# sourceMappingURL=fileOperations.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/linkedEditingRange.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/linkedEditingRange.d.ts" index 551406627e0693100bfc905c621404d0d71183e9..75b4ec1ee6e501173ee2a83d8b8c773eb407a3c5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/linkedEditingRange.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/linkedEditingRange.d.ts" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3bd2fc1b877ba4f9c91fca3231333471f3ff0edf85e146eaafdff2bc42c9a44c -size 670 +import { LinkedEditingRangeParams, LinkedEditingRanges } from 'vscode-languageserver-protocol'; +import type { Feature, _Languages, ServerRequestHandler } from './server'; +/** + * Shape of the linked editing feature + * + * @since 3.16.0 + */ +export interface LinkedEditingRangeFeatureShape { + /** + * Installs a handler for the linked editing range request. + * + * @param handler The corresponding handler. + */ + onLinkedEditingRange(handler: ServerRequestHandler): void; +} +export declare const LinkedEditingRangeFeature: Feature<_Languages, LinkedEditingRangeFeatureShape>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/linkedEditingRange.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/linkedEditingRange.js" index 41fa11398d1bdcb245b5359ef66541537a522631..bc36f12f3d18ceb0cdc9787bf53f72d6869de69a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/linkedEditingRange.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/linkedEditingRange.js" @@ -1,3 +1,19 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d459c484b35a3d0cbfc11a217d96b76350e354b3c5acda0db2a8b509468c509f -size 1039 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LinkedEditingRangeFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const LinkedEditingRangeFeature = (Base) => { + return class extends Base { + onLinkedEditingRange(handler) { + this.connection.onRequest(vscode_languageserver_protocol_1.LinkedEditingRangeRequest.type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), undefined); + }); + } + }; +}; +exports.LinkedEditingRangeFeature = LinkedEditingRangeFeature; +//# sourceMappingURL=linkedEditingRange.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/moniker.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/moniker.d.ts" index 22f104a5d3c0a7e468b2d0b662bdbe4a8c984b4f..9dbf1bfee224a05fd6fb7412a943fd8893a12ff2 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/moniker.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/moniker.d.ts" @@ -1,3 +1,13 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:387a6dc0d57a9f602d0d7f2f4ba88b65540c1c19d84088157610ca0176793a03 -size 449 +import { MonikerParams, Moniker } from 'vscode-languageserver-protocol'; +import type { Feature, _Languages, ServerRequestHandler } from './server'; +/** + * Shape of the moniker feature + * + * @since 3.16.0 + */ +export interface MonikerFeatureShape { + moniker: { + on(handler: ServerRequestHandler): void; + }; +} +export declare const MonikerFeature: Feature<_Languages, MonikerFeatureShape>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/moniker.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/moniker.js" index e545901a128063477f5bdaa84a8bf4c62e450af3..7fee87140197987864ce9f4f378dbb5e9e490f36 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/moniker.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/moniker.js" @@ -1,3 +1,24 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f4bb695ddd89d59f4f277a4ef21485433f6c3cccabedeb39cd382cee2cc70a9c -size 1147 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MonikerFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const MonikerFeature = (Base) => { + return class extends Base { + get moniker() { + return { + on: (handler) => { + const type = vscode_languageserver_protocol_1.MonikerRequest.type; + this.connection.onRequest(type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params)); + }); + }, + }; + } + }; +}; +exports.MonikerFeature = MonikerFeature; +//# sourceMappingURL=moniker.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/progress.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/progress.d.ts" index b094e5d3f5794c985efd42a18714b2a968778c20..b74a64e8d15914f2df530f7eae86d207e1f318f8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/progress.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/progress.d.ts" @@ -1,3 +1,25 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f1f23acd4a8193453749f69d4432f5f122d6d572b793a8b630dd12fe80b0c3d3 -size 1358 +import { CancellationToken, ProgressToken, ProgressType, WorkDoneProgressParams, PartialResultParams } from 'vscode-languageserver-protocol'; +import type { Feature, _RemoteWindow } from './server'; +export interface ProgressContext { + sendProgress

(type: ProgressType

, token: ProgressToken, value: P): void; +} +export interface WorkDoneProgressReporter { + begin(title: string, percentage?: number, message?: string, cancellable?: boolean): void; + report(percentage: number): void; + report(message: string): void; + report(percentage: number, message: string): void; + done(): void; +} +export interface WorkDoneProgressServerReporter extends WorkDoneProgressReporter { + readonly token: CancellationToken; +} +export interface WindowProgress { + attachWorkDoneProgress(token: ProgressToken | undefined): WorkDoneProgressReporter; + createWorkDoneProgress(): Promise; +} +export declare function attachWorkDone(connection: ProgressContext, params: WorkDoneProgressParams | undefined): WorkDoneProgressReporter; +export declare const ProgressFeature: Feature<_RemoteWindow, WindowProgress>; +export interface ResultProgressReporter { + report(data: R): void; +} +export declare function attachPartialResult(connection: ProgressContext, params: PartialResultParams): ResultProgressReporter | undefined; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/progress.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/progress.js" index 8e698ec35be21ec4c81ab91c4d9ea5bc7cc0ec67..2b3a988d73e4b49cb55af5e2ed6891f1970dc4f8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/progress.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/progress.js" @@ -1,3 +1,160 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:188259a5574e763d1cbf73f1646f74148aaab987f3cf47d5cfae06d8f777cb64 -size 5759 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.attachPartialResult = exports.ProgressFeature = exports.attachWorkDone = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const uuid_1 = require("./utils/uuid"); +class WorkDoneProgressReporterImpl { + constructor(_connection, _token) { + this._connection = _connection; + this._token = _token; + WorkDoneProgressReporterImpl.Instances.set(this._token, this); + } + begin(title, percentage, message, cancellable) { + let param = { + kind: 'begin', + title, + percentage, + message, + cancellable + }; + this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param); + } + report(arg0, arg1) { + let param = { + kind: 'report' + }; + if (typeof arg0 === 'number') { + param.percentage = arg0; + if (arg1 !== undefined) { + param.message = arg1; + } + } + else { + param.message = arg0; + } + this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param); + } + done() { + WorkDoneProgressReporterImpl.Instances.delete(this._token); + this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, { kind: 'end' }); + } +} +WorkDoneProgressReporterImpl.Instances = new Map(); +class WorkDoneProgressServerReporterImpl extends WorkDoneProgressReporterImpl { + constructor(connection, token) { + super(connection, token); + this._source = new vscode_languageserver_protocol_1.CancellationTokenSource(); + } + get token() { + return this._source.token; + } + done() { + this._source.dispose(); + super.done(); + } + cancel() { + this._source.cancel(); + } +} +class NullProgressReporter { + constructor() { + } + begin() { + } + report() { + } + done() { + } +} +class NullProgressServerReporter extends NullProgressReporter { + constructor() { + super(); + this._source = new vscode_languageserver_protocol_1.CancellationTokenSource(); + } + get token() { + return this._source.token; + } + done() { + this._source.dispose(); + } + cancel() { + this._source.cancel(); + } +} +function attachWorkDone(connection, params) { + if (params === undefined || params.workDoneToken === undefined) { + return new NullProgressReporter(); + } + const token = params.workDoneToken; + delete params.workDoneToken; + return new WorkDoneProgressReporterImpl(connection, token); +} +exports.attachWorkDone = attachWorkDone; +const ProgressFeature = (Base) => { + return class extends Base { + constructor() { + super(); + this._progressSupported = false; + } + initialize(capabilities) { + var _a; + if (((_a = capabilities === null || capabilities === void 0 ? void 0 : capabilities.window) === null || _a === void 0 ? void 0 : _a.workDoneProgress) === true) { + this._progressSupported = true; + this.connection.onNotification(vscode_languageserver_protocol_1.WorkDoneProgressCancelNotification.type, (params) => { + let progress = WorkDoneProgressReporterImpl.Instances.get(params.token); + if (progress instanceof WorkDoneProgressServerReporterImpl || progress instanceof NullProgressServerReporter) { + progress.cancel(); + } + }); + } + } + attachWorkDoneProgress(token) { + if (token === undefined) { + return new NullProgressReporter(); + } + else { + return new WorkDoneProgressReporterImpl(this.connection, token); + } + } + createWorkDoneProgress() { + if (this._progressSupported) { + const token = uuid_1.generateUuid(); + return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkDoneProgressCreateRequest.type, { token }).then(() => { + const result = new WorkDoneProgressServerReporterImpl(this.connection, token); + return result; + }); + } + else { + return Promise.resolve(new NullProgressServerReporter()); + } + } + }; +}; +exports.ProgressFeature = ProgressFeature; +var ResultProgress; +(function (ResultProgress) { + ResultProgress.type = new vscode_languageserver_protocol_1.ProgressType(); +})(ResultProgress || (ResultProgress = {})); +class ResultProgressReporterImpl { + constructor(_connection, _token) { + this._connection = _connection; + this._token = _token; + } + report(data) { + this._connection.sendProgress(ResultProgress.type, this._token, data); + } +} +function attachPartialResult(connection, params) { + if (params === undefined || params.partialResultToken === undefined) { + return undefined; + } + const token = params.partialResultToken; + delete params.partialResultToken; + return new ResultProgressReporterImpl(connection, token); +} +exports.attachPartialResult = attachPartialResult; +//# sourceMappingURL=progress.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/semanticTokens.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/semanticTokens.d.ts" index 7277c75a8982e6b5aa423f659582f8c88c2773ac..756319ab5cfaa70d81914733b077c4e160f05cd1 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/semanticTokens.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/semanticTokens.d.ts" @@ -1,3 +1,31 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a7024322dc86e43685c5564b438decad7557de62baae80b062fee78752c3b2f4 -size 1480 +import { SemanticTokens, SemanticTokensPartialResult, SemanticTokensDelta, SemanticTokensDeltaPartialResult, SemanticTokensParams, SemanticTokensDeltaParams, SemanticTokensRangeParams } from 'vscode-languageserver-protocol'; +import type { Feature, _Languages, ServerRequestHandler } from './server'; +/** + * Shape of the semantic token feature + * + * @since 3.16.0 + */ +export interface SemanticTokensFeatureShape { + semanticTokens: { + on(handler: ServerRequestHandler): void; + onDelta(handler: ServerRequestHandler): void; + onRange(handler: ServerRequestHandler): void; + }; +} +export declare const SemanticTokensFeature: Feature<_Languages, SemanticTokensFeatureShape>; +export declare class SemanticTokensBuilder { + private _id; + private _prevLine; + private _prevChar; + private _data; + private _dataLen; + private _prevData; + constructor(); + private initialize; + push(line: number, char: number, length: number, tokenType: number, tokenModifiers: number): void; + get id(): string; + previousResult(id: string): void; + build(): SemanticTokens; + canBuildEdits(): boolean; + buildEdits(): SemanticTokens | SemanticTokensDelta; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/semanticTokens.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/semanticTokens.js" index 30ec6c2676924a8d23254921f52f9075bca5dd74..66170c90f0fe457c4a5a325c6712aca22cee688d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/semanticTokens.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/semanticTokens.js" @@ -1,3 +1,127 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:163acf4386642913aa5bb7a72d899ecac2f0da093ff1f11465de340f3e3cfadd -size 5139 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SemanticTokensBuilder = exports.SemanticTokensFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const SemanticTokensFeature = (Base) => { + return class extends Base { + get semanticTokens() { + return { + on: (handler) => { + const type = vscode_languageserver_protocol_1.SemanticTokensRequest.type; + this.connection.onRequest(type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params)); + }); + }, + onDelta: (handler) => { + const type = vscode_languageserver_protocol_1.SemanticTokensDeltaRequest.type; + this.connection.onRequest(type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params)); + }); + }, + onRange: (handler) => { + const type = vscode_languageserver_protocol_1.SemanticTokensRangeRequest.type; + this.connection.onRequest(type, (params, cancel) => { + return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params)); + }); + } + }; + } + }; +}; +exports.SemanticTokensFeature = SemanticTokensFeature; +class SemanticTokensBuilder { + constructor() { + this._prevData = undefined; + this.initialize(); + } + initialize() { + this._id = Date.now(); + this._prevLine = 0; + this._prevChar = 0; + this._data = []; + this._dataLen = 0; + } + push(line, char, length, tokenType, tokenModifiers) { + let pushLine = line; + let pushChar = char; + if (this._dataLen > 0) { + pushLine -= this._prevLine; + if (pushLine === 0) { + pushChar -= this._prevChar; + } + } + this._data[this._dataLen++] = pushLine; + this._data[this._dataLen++] = pushChar; + this._data[this._dataLen++] = length; + this._data[this._dataLen++] = tokenType; + this._data[this._dataLen++] = tokenModifiers; + this._prevLine = line; + this._prevChar = char; + } + get id() { + return this._id.toString(); + } + previousResult(id) { + if (this.id === id) { + this._prevData = this._data; + } + this.initialize(); + } + build() { + this._prevData = undefined; + return { + resultId: this.id, + data: this._data + }; + } + canBuildEdits() { + return this._prevData !== undefined; + } + buildEdits() { + if (this._prevData !== undefined) { + const prevDataLength = this._prevData.length; + const dataLength = this._data.length; + let startIndex = 0; + while (startIndex < dataLength && startIndex < prevDataLength && this._prevData[startIndex] === this._data[startIndex]) { + startIndex++; + } + if (startIndex < dataLength && startIndex < prevDataLength) { + // Find end index + let endIndex = 0; + while (endIndex < dataLength && endIndex < prevDataLength && this._prevData[prevDataLength - 1 - endIndex] === this._data[dataLength - 1 - endIndex]) { + endIndex++; + } + const newData = this._data.slice(startIndex, dataLength - endIndex); + const result = { + resultId: this.id, + edits: [ + { start: startIndex, deleteCount: prevDataLength - endIndex - startIndex, data: newData } + ] + }; + return result; + } + else if (startIndex < dataLength) { + return { resultId: this.id, edits: [ + { start: startIndex, deleteCount: 0, data: this._data.slice(startIndex) } + ] }; + } + else if (startIndex < prevDataLength) { + return { resultId: this.id, edits: [ + { start: startIndex, deleteCount: prevDataLength - startIndex } + ] }; + } + else { + return { resultId: this.id, edits: [] }; + } + } + else { + return this.build(); + } + } +} +exports.SemanticTokensBuilder = SemanticTokensBuilder; +//# sourceMappingURL=semanticTokens.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/server.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/server.d.ts" index 3d10a8677aa380ad775d1518319dbdaa31bbdd77..7b37e041e5095bb6f08fc07d79e50f4f26a6d427 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/server.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/server.d.ts" @@ -1,3 +1,867 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7078f6149d25fa110b2bd24dece6754520e5984a2dd014875bef7ebe91016617 -size 37858 +import { CancellationToken, ProtocolRequestType0, RequestHandler0, ProtocolRequestType, RequestHandler, GenericRequestHandler, StarRequestHandler, HandlerResult, ProtocolNotificationType0, NotificationHandler0, ProtocolNotificationType, NotificationHandler, GenericNotificationHandler, StarNotificationHandler, ProgressType, Disposable, InitializeParams, InitializeResult, InitializeError, InitializedParams, DidChangeConfigurationParams, DidChangeWatchedFilesParams, DidOpenTextDocumentParams, DidChangeTextDocumentParams, DidCloseTextDocumentParams, WillSaveTextDocumentParams, TextEdit, DidSaveTextDocumentParams, PublishDiagnosticsParams, HoverParams, Hover, CompletionParams, CompletionItem, CompletionList, SignatureHelpParams, SignatureHelp, DeclarationParams, Declaration, DeclarationLink, Location, DefinitionParams, Definition, DefinitionLink, TypeDefinitionParams, ImplementationParams, ReferenceParams, DocumentHighlightParams, DocumentHighlight, DocumentSymbolParams, SymbolInformation, DocumentSymbol, WorkspaceSymbolParams, CodeActionParams, Command, CodeAction, CodeLensParams, CodeLens, DocumentFormattingParams, DocumentRangeFormattingParams, DocumentOnTypeFormattingParams, RenameParams, WorkspaceEdit, PrepareRenameParams, Range, DocumentLinkParams, DocumentLink, DocumentColorParams, ColorInformation, ColorPresentationParams, ColorPresentation, FoldingRangeParams, FoldingRange, SelectionRangeParams, SelectionRange, ExecuteCommandParams, MessageActionItem, ClientCapabilities, ServerCapabilities, Logger, ProtocolConnection, TextDocumentContentChangeEvent, TextDocumentSaveReason, Event, MessageSignature, ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse, WorkDoneProgressParams, PartialResultParams, RegistrationType, RequestType0, RequestType, NotificationType0, NotificationType } from 'vscode-languageserver-protocol'; +import { WorkDoneProgressReporter, ResultProgressReporter, WindowProgress } from './progress'; +import { Configuration } from './configuration'; +import { WorkspaceFolders } from './workspaceFolders'; +import { CallHierarchy } from './callHierarchy'; +import { SemanticTokensFeatureShape } from './semanticTokens'; +import { ShowDocumentFeatureShape } from './showDocument'; +import { FileOperationsFeatureShape } from './fileOperations'; +import { LinkedEditingRangeFeatureShape } from './linkedEditingRange'; +import { MonikerFeatureShape } from './moniker'; +export interface TextDocumentsConfiguration { + create(uri: string, languageId: string, version: number, content: string): T; + update(document: T, changes: TextDocumentContentChangeEvent[], version: number): T; +} +/** + * Event to signal changes to a text document. + */ +export interface TextDocumentChangeEvent { + /** + * The document that has changed. + */ + document: T; +} +/** + * Event to signal that a document will be saved. + */ +export interface TextDocumentWillSaveEvent { + /** + * The document that will be saved + */ + document: T; + /** + * The reason why save was triggered. + */ + reason: TextDocumentSaveReason; +} +/** + * A manager for simple text documents + */ +export declare class TextDocuments { + private _configuration; + private _documents; + private _onDidChangeContent; + private _onDidOpen; + private _onDidClose; + private _onDidSave; + private _onWillSave; + private _willSaveWaitUntil; + /** + * Create a new text document manager. + */ + constructor(configuration: TextDocumentsConfiguration); + /** + * An event that fires when a text document managed by this manager + * has been opened or the content changes. + */ + get onDidChangeContent(): Event>; + /** + * An event that fires when a text document managed by this manager + * has been opened. + */ + get onDidOpen(): Event>; + /** + * An event that fires when a text document managed by this manager + * will be saved. + */ + get onWillSave(): Event>; + /** + * Sets a handler that will be called if a participant wants to provide + * edits during a text document save. + */ + onWillSaveWaitUntil(handler: RequestHandler, TextEdit[], void>): void; + /** + * An event that fires when a text document managed by this manager + * has been saved. + */ + get onDidSave(): Event>; + /** + * An event that fires when a text document managed by this manager + * has been closed. + */ + get onDidClose(): Event>; + /** + * Returns the document for the given URI. Returns undefined if + * the document is not managed by this instance. + * + * @param uri The text document's URI to retrieve. + * @return the text document or `undefined`. + */ + get(uri: string): T | undefined; + /** + * Returns all text documents managed by this instance. + * + * @return all text documents. + */ + all(): T[]; + /** + * Returns the URIs of all text documents managed by this instance. + * + * @return the URI's of all text documents. + */ + keys(): string[]; + /** + * Listens for `low level` notification on the given connection to + * update the text documents managed by this instance. + * + * Please note that the connection only provides handlers not an event model. Therefore + * listening on a connection will overwrite the following handlers on a connection: + * `onDidOpenTextDocument`, `onDidChangeTextDocument`, `onDidCloseTextDocument`, + * `onWillSaveTextDocument`, `onWillSaveTextDocumentWaitUntil` and `onDidSaveTextDocument`. + * + * Use the corresponding events on the TextDocuments instance instead. + * + * @param connection The connection to listen on. + */ + listen(connection: Connection): void; +} +/** + * Helps tracking error message. Equal occurrences of the same + * message are only stored once. This class is for example + * useful if text documents are validated in a loop and equal + * error message should be folded into one. + */ +export declare class ErrorMessageTracker { + private _messages; + constructor(); + /** + * Add a message to the tracker. + * + * @param message The message to add. + */ + add(message: string): void; + /** + * Send all tracked messages to the connection's window. + * + * @param connection The connection established between client and server. + */ + sendErrors(connection: { + window: RemoteWindow; + }): void; +} +/** + * + */ +interface Remote { + /** + * Attach the remote to the given connection. + * + * @param connection The connection this remote is operating on. + */ + attach(connection: Connection): void; + /** + * The connection this remote is attached to. + */ + connection: Connection; + /** + * Called to initialize the remote with the given + * client capabilities + * + * @param capabilities The client capabilities + */ + initialize(capabilities: ClientCapabilities): void; + /** + * Called to fill in the server capabilities this feature implements. + * + * @param capabilities The server capabilities to fill. + */ + fillServerCapabilities(capabilities: ServerCapabilities): void; +} +/** + * The RemoteConsole interface contains all functions to interact with + * the tools / clients console or log system. Internally it used `window/logMessage` + * notifications. + */ +export interface RemoteConsole { + /** + * The connection this remote is attached to. + */ + connection: Connection; + /** + * Show an error message. + * + * @param message The message to show. + */ + error(message: string): void; + /** + * Show a warning message. + * + * @param message The message to show. + */ + warn(message: string): void; + /** + * Show an information message. + * + * @param message The message to show. + */ + info(message: string): void; + /** + * Log a message. + * + * @param message The message to log. + */ + log(message: string): void; +} +/** + * The RemoteWindow interface contains all functions to interact with + * the visual window of VS Code. + */ +export interface _RemoteWindow { + /** + * The connection this remote is attached to. + */ + connection: Connection; + /** + * Shows an error message in the client's user interface. Depending on the client this might + * be a modal dialog with a confirmation button or a notification in a notification center + * + * @param message The message to show. + * @param actions Possible additional actions presented in the user interface. The selected action + * will be the value of the resolved promise + */ + showErrorMessage(message: string): void; + showErrorMessage(message: string, ...actions: T[]): Promise; + /** + * Shows a warning message in the client's user interface. Depending on the client this might + * be a modal dialog with a confirmation button or a notification in a notification center + * + * @param message The message to show. + * @param actions Possible additional actions presented in the user interface. The selected action + * will be the value of the resolved promise + */ + showWarningMessage(message: string): void; + showWarningMessage(message: string, ...actions: T[]): Promise; + /** + * Shows an information message in the client's user interface. Depending on the client this might + * be a modal dialog with a confirmation button or a notification in a notification center + * + * @param message The message to show. + * @param actions Possible additional actions presented in the user interface. The selected action + * will be the value of the resolved promise + */ + showInformationMessage(message: string): void; + showInformationMessage(message: string, ...actions: T[]): Promise; +} +export declare type RemoteWindow = _RemoteWindow & WindowProgress & ShowDocumentFeatureShape; +/** + * A bulk registration manages n single registration to be able to register + * for n notifications or requests using one register request. + */ +export interface BulkRegistration { + /** + * Adds a single registration. + * @param type the notification type to register for. + * @param registerParams special registration parameters. + */ + add(type: ProtocolNotificationType0, registerParams: RO): void; + add(type: ProtocolNotificationType, registerParams: RO): void; + /** + * Adds a single registration. + * @param type the request type to register for. + * @param registerParams special registration parameters. + */ + add(type: ProtocolRequestType0, registerParams: RO): void; + add(type: ProtocolRequestType, registerParams: RO): void; + /** + * Adds a single registration. + * @param type the notification type to register for. + * @param registerParams special registration parameters. + */ + add(type: RegistrationType, registerParams: RO): void; +} +export declare namespace BulkRegistration { + /** + * Creates a new bulk registration. + * @return an empty bulk registration. + */ + function create(): BulkRegistration; +} +/** + * A `BulkUnregistration` manages n unregistrations. + */ +export interface BulkUnregistration extends Disposable { + /** + * Disposes a single registration. It will be removed from the + * `BulkUnregistration`. + */ + disposeSingle(arg: string | MessageSignature): boolean; +} +export declare namespace BulkUnregistration { + function create(): BulkUnregistration; +} +/** + * Interface to register and unregister `listeners` on the client / tools side. + */ +export interface RemoteClient { + /** + * The connection this remote is attached to. + */ + connection: Connection; + /** + * Registers a listener for the given request. + * + * @param type the request type to register for. + * @param registerParams special registration parameters. + * @return a `Disposable` to unregister the listener again. + */ + register(type: ProtocolNotificationType, registerParams?: RO): Promise; + register(type: ProtocolNotificationType0, registerParams?: RO): Promise; + /** + * Registers a listener for the given request. + * + * @param unregisteration the unregistration to add a corresponding unregister action to. + * @param type the request type to register for. + * @param registerParams special registration parameters. + * @return the updated unregistration. + */ + register(unregisteration: BulkUnregistration, type: ProtocolNotificationType, registerParams?: RO): Promise; + register(unregisteration: BulkUnregistration, type: ProtocolNotificationType0, registerParams?: RO): Promise; + /** + * Registers a listener for the given request. + * + * @param type the request type to register for. + * @param registerParams special registration parameters. + * @return a `Disposable` to unregister the listener again. + */ + register(type: ProtocolRequestType, registerParams?: RO): Promise; + register(type: ProtocolRequestType0, registerParams?: RO): Promise; + /** + * Registers a listener for the given request. + * + * @param unregisteration the unregistration to add a corresponding unregister action to. + * @param type the request type to register for. + * @param registerParams special registration parameters. + * @return the updated unregistration. + */ + register(unregisteration: BulkUnregistration, type: ProtocolRequestType, registerParams?: RO): Promise; + register(unregisteration: BulkUnregistration, type: ProtocolRequestType0, registerParams?: RO): Promise; + /** + * Registers a listener for the given registration type. + * + * @param type the registration type. + * @param registerParams special registration parameters. + * @return a `Disposable` to unregister the listener again. + */ + register(type: RegistrationType, registerParams?: RO): Promise; + /** + * Registers a listener for the given registration type. + * + * @param unregisteration the unregistration to add a corresponding unregister action to. + * @param type the registration type. + * @param registerParams special registration parameters. + * @return the updated unregistration. + */ + register(unregisteration: BulkUnregistration, type: RegistrationType, registerParams?: RO): Promise; + /** + * Registers a set of listeners. + * @param registrations the bulk registration + * @return a `Disposable` to unregister the listeners again. + */ + register(registrations: BulkRegistration): Promise; +} +/** + * Represents the workspace managed by the client. + */ +export interface _RemoteWorkspace { + /** + * The connection this remote is attached to. + */ + connection: Connection; + /** + * Applies a `WorkspaceEdit` to the workspace + * @param param the workspace edit params. + * @return a thenable that resolves to the `ApplyWorkspaceEditResponse`. + */ + applyEdit(paramOrEdit: ApplyWorkspaceEditParams | WorkspaceEdit): Promise; +} +export declare type RemoteWorkspace = _RemoteWorkspace & Configuration & WorkspaceFolders & FileOperationsFeatureShape; +/** + * Interface to log telemetry events. The events are actually send to the client + * and the client needs to feed the event into a proper telemetry system. + */ +export interface Telemetry { + /** + * The connection this remote is attached to. + */ + connection: Connection; + /** + * Log the given data to telemetry. + * + * @param data The data to log. Must be a JSON serializable object. + */ + logEvent(data: any): void; +} +/** + * Interface to log traces to the client. The events are sent to the client and the + * client needs to log the trace events. + */ +export interface RemoteTracer { + /** + * The connection this remote is attached to. + */ + connection: Connection; + /** + * Log the given data to the trace Log + */ + log(message: string, verbose?: string): void; +} +export interface _Languages { + connection: Connection; + attachWorkDoneProgress(params: WorkDoneProgressParams): WorkDoneProgressReporter; + attachPartialResultProgress(type: ProgressType, params: PartialResultParams): ResultProgressReporter | undefined; +} +export declare class _LanguagesImpl implements Remote, _Languages { + private _connection; + constructor(); + attach(connection: Connection): void; + get connection(): Connection; + initialize(_capabilities: ClientCapabilities): void; + fillServerCapabilities(_capabilities: ServerCapabilities): void; + attachWorkDoneProgress(params: WorkDoneProgressParams): WorkDoneProgressReporter; + attachPartialResultProgress(_type: ProgressType, params: PartialResultParams): ResultProgressReporter | undefined; +} +export declare type Languages = _Languages & CallHierarchy & SemanticTokensFeatureShape & LinkedEditingRangeFeatureShape & MonikerFeatureShape; +/** + * An empty interface for new proposed API. + */ +export interface _ { +} +export interface ServerRequestHandler { + (params: P, token: CancellationToken, workDoneProgress: WorkDoneProgressReporter, resultProgress?: ResultProgressReporter): HandlerResult; +} +/** + * Interface to describe the shape of the server connection. + */ +export interface _Connection { + /** + * Start listening on the input stream for messages to process. + */ + listen(): void; + /** + * Installs a request handler described by the given [RequestType](#RequestType). + * + * @param type The [RequestType](#RequestType) describing the request. + * @param handler The handler to install + */ + onRequest(type: ProtocolRequestType0, handler: RequestHandler0): void; + onRequest(type: ProtocolRequestType, handler: RequestHandler): void; + onRequest(type: RequestType0, handler: RequestHandler0): void; + onRequest(type: RequestType, handler: RequestHandler): void; + /** + * Installs a request handler for the given method. + * + * @param method The method to register a request handler for. + * @param handler The handler to install. + */ + onRequest(method: string, handler: GenericRequestHandler): void; + /** + * Installs a request handler that is invoked if no specific request handler can be found. + * + * @param handler a handler that handles all requests. + */ + onRequest(handler: StarRequestHandler): void; + /** + * Send a request to the client. + * + * @param type The [RequestType](#RequestType) describing the request. + * @param params The request's parameters. + */ + sendRequest(type: ProtocolRequestType0, token?: CancellationToken): Promise; + sendRequest(type: ProtocolRequestType, params: P, token?: CancellationToken): Promise; + sendRequest(type: RequestType0, token?: CancellationToken): Promise; + sendRequest(type: RequestType, params: P, token?: CancellationToken): Promise; + /** + * Send a request to the client. + * + * @param method The method to invoke on the client. + * @param params The request's parameters. + */ + sendRequest(method: string, token?: CancellationToken): Promise; + sendRequest(method: string, params: any, token?: CancellationToken): Promise; + /** + * Installs a notification handler described by the given [NotificationType](#NotificationType). + * + * @param type The [NotificationType](#NotificationType) describing the notification. + * @param handler The handler to install. + */ + onNotification(type: ProtocolNotificationType0, handler: NotificationHandler0): void; + onNotification(type: ProtocolNotificationType, handler: NotificationHandler

): void; + onNotification(type: NotificationType0, handler: NotificationHandler0): void; + onNotification

(type: NotificationType

, handler: NotificationHandler

): void; + /** + * Installs a notification handler for the given method. + * + * @param method The method to register a request handler for. + * @param handler The handler to install. + */ + onNotification(method: string, handler: GenericNotificationHandler): void; + /** + * Installs a notification handler that is invoked if no specific notification handler can be found. + * + * @param handler a handler that handles all notifications. + */ + onNotification(handler: StarNotificationHandler): void; + /** + * Send a notification to the client. + * + * @param type The [NotificationType](#NotificationType) describing the notification. + * @param params The notification's parameters. + */ + sendNotification(type: ProtocolNotificationType0): void; + sendNotification(type: ProtocolNotificationType, params: P): void; + sendNotification(type: NotificationType0): void; + sendNotification

(type: NotificationType

, params: P): void; + /** + * Send a notification to the client. + * + * @param method The method to invoke on the client. + * @param params The notification's parameters. + */ + sendNotification(method: string, params?: any): void; + /** + * Installs a progress handler for a given token. + * @param type the progress type + * @param token the token + * @param handler the handler + */ + onProgress

(type: ProgressType

, token: string | number, handler: NotificationHandler

): Disposable; + /** + * Sends progress. + * @param type the progress type + * @param token the token to use + * @param value the progress value + */ + sendProgress

(type: ProgressType

, token: string | number, value: P): void; + /** + * Installs a handler for the initialize request. + * + * @param handler The initialize handler. + */ + onInitialize(handler: ServerRequestHandler): void; + /** + * Installs a handler for the initialized notification. + * + * @param handler The initialized handler. + */ + onInitialized(handler: NotificationHandler): void; + /** + * Installs a handler for the shutdown request. + * + * @param handler The initialize handler. + */ + onShutdown(handler: RequestHandler0): void; + /** + * Installs a handler for the exit notification. + * + * @param handler The exit handler. + */ + onExit(handler: NotificationHandler0): void; + /** + * A property to provide access to console specific features. + */ + console: RemoteConsole & PConsole; + /** + * A property to provide access to tracer specific features. + */ + tracer: RemoteTracer & PTracer; + /** + * A property to provide access to telemetry specific features. + */ + telemetry: Telemetry & PTelemetry; + /** + * A property to provide access to client specific features like registering + * for requests or notifications. + */ + client: RemoteClient & PClient; + /** + * A property to provide access to windows specific features. + */ + window: RemoteWindow & PWindow; + /** + * A property to provide access to workspace specific features. + */ + workspace: RemoteWorkspace & PWorkspace; + /** + * A property to provide access to language specific features. + */ + languages: Languages & PLanguages; + /** + * Installs a handler for the `DidChangeConfiguration` notification. + * + * @param handler The corresponding handler. + */ + onDidChangeConfiguration(handler: NotificationHandler): void; + /** + * Installs a handler for the `DidChangeWatchedFiles` notification. + * + * @param handler The corresponding handler. + */ + onDidChangeWatchedFiles(handler: NotificationHandler): void; + /** + * Installs a handler for the `DidOpenTextDocument` notification. + * + * @param handler The corresponding handler. + */ + onDidOpenTextDocument(handler: NotificationHandler): void; + /** + * Installs a handler for the `DidChangeTextDocument` notification. + * + * @param handler The corresponding handler. + */ + onDidChangeTextDocument(handler: NotificationHandler): void; + /** + * Installs a handler for the `DidCloseTextDocument` notification. + * + * @param handler The corresponding handler. + */ + onDidCloseTextDocument(handler: NotificationHandler): void; + /** + * Installs a handler for the `WillSaveTextDocument` notification. + * + * Note that this notification is opt-in. The client will not send it unless + * your server has the `textDocumentSync.willSave` capability or you've + * dynamically registered for the `textDocument/willSave` method. + * + * @param handler The corresponding handler. + */ + onWillSaveTextDocument(handler: NotificationHandler): void; + /** + * Installs a handler for the `WillSaveTextDocumentWaitUntil` request. + * + * Note that this request is opt-in. The client will not send it unless + * your server has the `textDocumentSync.willSaveWaitUntil` capability, + * or you've dynamically registered for the `textDocument/willSaveWaitUntil` + * method. + * + * @param handler The corresponding handler. + */ + onWillSaveTextDocumentWaitUntil(handler: RequestHandler): void; + /** + * Installs a handler for the `DidSaveTextDocument` notification. + * + * @param handler The corresponding handler. + */ + onDidSaveTextDocument(handler: NotificationHandler): void; + /** + * Sends diagnostics computed for a given document to VSCode to render them in the + * user interface. + * + * @param params The diagnostic parameters. + */ + sendDiagnostics(params: PublishDiagnosticsParams): void; + /** + * Installs a handler for the `Hover` request. + * + * @param handler The corresponding handler. + */ + onHover(handler: ServerRequestHandler): void; + /** + * Installs a handler for the `Completion` request. + * + * @param handler The corresponding handler. + */ + onCompletion(handler: ServerRequestHandler): void; + /** + * Installs a handler for the `CompletionResolve` request. + * + * @param handler The corresponding handler. + */ + onCompletionResolve(handler: RequestHandler): void; + /** + * Installs a handler for the `SignatureHelp` request. + * + * @param handler The corresponding handler. + */ + onSignatureHelp(handler: ServerRequestHandler): void; + /** + * Installs a handler for the `Declaration` request. + * + * @param handler The corresponding handler. + */ + onDeclaration(handler: ServerRequestHandler): void; + /** + * Installs a handler for the `Definition` request. + * + * @param handler The corresponding handler. + */ + onDefinition(handler: ServerRequestHandler): void; + /** + * Installs a handler for the `Type Definition` request. + * + * @param handler The corresponding handler. + */ + onTypeDefinition(handler: ServerRequestHandler): void; + /** + * Installs a handler for the `Implementation` request. + * + * @param handler The corresponding handler. + */ + onImplementation(handler: ServerRequestHandler): void; + /** + * Installs a handler for the `References` request. + * + * @param handler The corresponding handler. + */ + onReferences(handler: ServerRequestHandler): void; + /** + * Installs a handler for the `DocumentHighlight` request. + * + * @param handler The corresponding handler. + */ + onDocumentHighlight(handler: ServerRequestHandler): void; + /** + * Installs a handler for the `DocumentSymbol` request. + * + * @param handler The corresponding handler. + */ + onDocumentSymbol(handler: ServerRequestHandler): void; + /** + * Installs a handler for the `WorkspaceSymbol` request. + * + * @param handler The corresponding handler. + */ + onWorkspaceSymbol(handler: ServerRequestHandler): void; + /** + * Installs a handler for the `CodeAction` request. + * + * @param handler The corresponding handler. + */ + onCodeAction(handler: ServerRequestHandler): void; + /** + * Installs a handler for the `CodeAction` resolve request. + * + * @param handler The corresponding handler. + */ + onCodeActionResolve(handler: RequestHandler): void; + /** + * Compute a list of [lenses](#CodeLens). This call should return as fast as possible and if + * computing the commands is expensive implementers should only return code lens objects with the + * range set and handle the resolve request. + * + * @param handler The corresponding handler. + */ + onCodeLens(handler: ServerRequestHandler): void; + /** + * This function will be called for each visible code lens, usually when scrolling and after + * the onCodeLens has been called. + * + * @param handler The corresponding handler. + */ + onCodeLensResolve(handler: RequestHandler): void; + /** + * Installs a handler for the document formatting request. + * + * @param handler The corresponding handler. + */ + onDocumentFormatting(handler: ServerRequestHandler): void; + /** + * Installs a handler for the document range formatting request. + * + * @param handler The corresponding handler. + */ + onDocumentRangeFormatting(handler: ServerRequestHandler): void; + /** + * Installs a handler for the document on type formatting request. + * + * @param handler The corresponding handler. + */ + onDocumentOnTypeFormatting(handler: RequestHandler): void; + /** + * Installs a handler for the rename request. + * + * @param handler The corresponding handler. + */ + onRenameRequest(handler: ServerRequestHandler): void; + /** + * Installs a handler for the prepare rename request. + * + * @param handler The corresponding handler. + */ + onPrepareRename(handler: RequestHandler): void; + /** + * Installs a handler for the document links request. + * + * @param handler The corresponding handler. + */ + onDocumentLinks(handler: ServerRequestHandler): void; + /** + * Installs a handler for the document links resolve request. + * + * @param handler The corresponding handler. + */ + onDocumentLinkResolve(handler: RequestHandler): void; + /** + * Installs a handler for the document color request. + * + * @param handler The corresponding handler. + */ + onDocumentColor(handler: ServerRequestHandler): void; + /** + * Installs a handler for the document color request. + * + * @param handler The corresponding handler. + */ + onColorPresentation(handler: ServerRequestHandler): void; + /** + * Installs a handler for the folding ranges request. + * + * @param handler The corresponding handler. + */ + onFoldingRanges(handler: ServerRequestHandler): void; + /** + * Installs a handler for the selection ranges request. + * + * @param handler The corresponding handler. + */ + onSelectionRanges(handler: ServerRequestHandler): void; + /** + * Installs a handler for the execute command request. + * + * @param handler The corresponding handler. + */ + onExecuteCommand(handler: ServerRequestHandler): void; + /** + * Disposes the connection + */ + dispose(): void; +} +export interface Connection extends _Connection { +} +export interface Feature { + (Base: new () => B): new () => B & P; +} +export declare type ConsoleFeature

= Feature; +export declare function combineConsoleFeatures(one: ConsoleFeature, two: ConsoleFeature): ConsoleFeature; +export declare type TelemetryFeature

= Feature; +export declare function combineTelemetryFeatures(one: TelemetryFeature, two: TelemetryFeature): TelemetryFeature; +export declare type TracerFeature

= Feature; +export declare function combineTracerFeatures(one: TracerFeature, two: TracerFeature): TracerFeature; +export declare type ClientFeature

= Feature; +export declare function combineClientFeatures(one: ClientFeature, two: ClientFeature): ClientFeature; +export declare type WindowFeature

= Feature<_RemoteWindow, P>; +export declare function combineWindowFeatures(one: WindowFeature, two: WindowFeature): WindowFeature; +export declare type WorkspaceFeature

= Feature<_RemoteWorkspace, P>; +export declare function combineWorkspaceFeatures(one: WorkspaceFeature, two: WorkspaceFeature): WorkspaceFeature; +export declare type LanguagesFeature

= Feature<_Languages, P>; +export declare function combineLanguagesFeatures(one: LanguagesFeature, two: LanguagesFeature): LanguagesFeature; +export interface Features { + __brand: 'features'; + console?: ConsoleFeature; + tracer?: TracerFeature; + telemetry?: TelemetryFeature; + client?: ClientFeature; + window?: WindowFeature; + workspace?: WorkspaceFeature; + languages?: LanguagesFeature; +} +export declare function combineFeatures(one: Features, two: Features): Features; +export interface WatchDog { + shutdownReceived: boolean; + initialize(params: InitializeParams): void; + exit(code: number): void; +} +export declare function createConnection(connectionFactory: (logger: Logger) => ProtocolConnection, watchDog: WatchDog, factories?: Features): _Connection; +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/server.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/server.js" index 30d4598be3a7acc64253e7ff4e8b4471376305b6..b672f6a09db1fb50cdeefc8e9caf8d71d7234e0c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/server.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/server.js" @@ -1,3 +1,834 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:80d69344f85e40fb6f8e8ad51a96bfa875c493d735b733d205608e537b9b899a -size 37598 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createConnection = exports.combineFeatures = exports.combineLanguagesFeatures = exports.combineWorkspaceFeatures = exports.combineWindowFeatures = exports.combineClientFeatures = exports.combineTracerFeatures = exports.combineTelemetryFeatures = exports.combineConsoleFeatures = exports._LanguagesImpl = exports.BulkUnregistration = exports.BulkRegistration = exports.ErrorMessageTracker = exports.TextDocuments = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const Is = require("./utils/is"); +const UUID = require("./utils/uuid"); +const progress_1 = require("./progress"); +const configuration_1 = require("./configuration"); +const workspaceFolders_1 = require("./workspaceFolders"); +const callHierarchy_1 = require("./callHierarchy"); +const semanticTokens_1 = require("./semanticTokens"); +const showDocument_1 = require("./showDocument"); +const fileOperations_1 = require("./fileOperations"); +const linkedEditingRange_1 = require("./linkedEditingRange"); +const moniker_1 = require("./moniker"); +function null2Undefined(value) { + if (value === null) { + return undefined; + } + return value; +} +/** + * A manager for simple text documents + */ +class TextDocuments { + /** + * Create a new text document manager. + */ + constructor(configuration) { + this._documents = Object.create(null); + this._configuration = configuration; + this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter(); + this._onDidOpen = new vscode_languageserver_protocol_1.Emitter(); + this._onDidClose = new vscode_languageserver_protocol_1.Emitter(); + this._onDidSave = new vscode_languageserver_protocol_1.Emitter(); + this._onWillSave = new vscode_languageserver_protocol_1.Emitter(); + } + /** + * An event that fires when a text document managed by this manager + * has been opened or the content changes. + */ + get onDidChangeContent() { + return this._onDidChangeContent.event; + } + /** + * An event that fires when a text document managed by this manager + * has been opened. + */ + get onDidOpen() { + return this._onDidOpen.event; + } + /** + * An event that fires when a text document managed by this manager + * will be saved. + */ + get onWillSave() { + return this._onWillSave.event; + } + /** + * Sets a handler that will be called if a participant wants to provide + * edits during a text document save. + */ + onWillSaveWaitUntil(handler) { + this._willSaveWaitUntil = handler; + } + /** + * An event that fires when a text document managed by this manager + * has been saved. + */ + get onDidSave() { + return this._onDidSave.event; + } + /** + * An event that fires when a text document managed by this manager + * has been closed. + */ + get onDidClose() { + return this._onDidClose.event; + } + /** + * Returns the document for the given URI. Returns undefined if + * the document is not managed by this instance. + * + * @param uri The text document's URI to retrieve. + * @return the text document or `undefined`. + */ + get(uri) { + return this._documents[uri]; + } + /** + * Returns all text documents managed by this instance. + * + * @return all text documents. + */ + all() { + return Object.keys(this._documents).map(key => this._documents[key]); + } + /** + * Returns the URIs of all text documents managed by this instance. + * + * @return the URI's of all text documents. + */ + keys() { + return Object.keys(this._documents); + } + /** + * Listens for `low level` notification on the given connection to + * update the text documents managed by this instance. + * + * Please note that the connection only provides handlers not an event model. Therefore + * listening on a connection will overwrite the following handlers on a connection: + * `onDidOpenTextDocument`, `onDidChangeTextDocument`, `onDidCloseTextDocument`, + * `onWillSaveTextDocument`, `onWillSaveTextDocumentWaitUntil` and `onDidSaveTextDocument`. + * + * Use the corresponding events on the TextDocuments instance instead. + * + * @param connection The connection to listen on. + */ + listen(connection) { + connection.__textDocumentSync = vscode_languageserver_protocol_1.TextDocumentSyncKind.Full; + connection.onDidOpenTextDocument((event) => { + let td = event.textDocument; + let document = this._configuration.create(td.uri, td.languageId, td.version, td.text); + this._documents[td.uri] = document; + let toFire = Object.freeze({ document }); + this._onDidOpen.fire(toFire); + this._onDidChangeContent.fire(toFire); + }); + connection.onDidChangeTextDocument((event) => { + let td = event.textDocument; + let changes = event.contentChanges; + if (changes.length === 0) { + return; + } + let document = this._documents[td.uri]; + const { version } = td; + if (version === null || version === undefined) { + throw new Error(`Received document change event for ${td.uri} without valid version identifier`); + } + document = this._configuration.update(document, changes, version); + this._documents[td.uri] = document; + this._onDidChangeContent.fire(Object.freeze({ document })); + }); + connection.onDidCloseTextDocument((event) => { + let document = this._documents[event.textDocument.uri]; + if (document) { + delete this._documents[event.textDocument.uri]; + this._onDidClose.fire(Object.freeze({ document })); + } + }); + connection.onWillSaveTextDocument((event) => { + let document = this._documents[event.textDocument.uri]; + if (document) { + this._onWillSave.fire(Object.freeze({ document, reason: event.reason })); + } + }); + connection.onWillSaveTextDocumentWaitUntil((event, token) => { + let document = this._documents[event.textDocument.uri]; + if (document && this._willSaveWaitUntil) { + return this._willSaveWaitUntil(Object.freeze({ document, reason: event.reason }), token); + } + else { + return []; + } + }); + connection.onDidSaveTextDocument((event) => { + let document = this._documents[event.textDocument.uri]; + if (document) { + this._onDidSave.fire(Object.freeze({ document })); + } + }); + } +} +exports.TextDocuments = TextDocuments; +/** + * Helps tracking error message. Equal occurrences of the same + * message are only stored once. This class is for example + * useful if text documents are validated in a loop and equal + * error message should be folded into one. + */ +class ErrorMessageTracker { + constructor() { + this._messages = Object.create(null); + } + /** + * Add a message to the tracker. + * + * @param message The message to add. + */ + add(message) { + let count = this._messages[message]; + if (!count) { + count = 0; + } + count++; + this._messages[message] = count; + } + /** + * Send all tracked messages to the connection's window. + * + * @param connection The connection established between client and server. + */ + sendErrors(connection) { + Object.keys(this._messages).forEach(message => { + connection.window.showErrorMessage(message); + }); + } +} +exports.ErrorMessageTracker = ErrorMessageTracker; +class RemoteConsoleImpl { + constructor() { + } + rawAttach(connection) { + this._rawConnection = connection; + } + attach(connection) { + this._connection = connection; + } + get connection() { + if (!this._connection) { + throw new Error('Remote is not attached to a connection yet.'); + } + return this._connection; + } + fillServerCapabilities(_capabilities) { + } + initialize(_capabilities) { + } + error(message) { + this.send(vscode_languageserver_protocol_1.MessageType.Error, message); + } + warn(message) { + this.send(vscode_languageserver_protocol_1.MessageType.Warning, message); + } + info(message) { + this.send(vscode_languageserver_protocol_1.MessageType.Info, message); + } + log(message) { + this.send(vscode_languageserver_protocol_1.MessageType.Log, message); + } + send(type, message) { + if (this._rawConnection) { + this._rawConnection.sendNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, { type, message }); + } + } +} +class _RemoteWindowImpl { + constructor() { + } + attach(connection) { + this._connection = connection; + } + get connection() { + if (!this._connection) { + throw new Error('Remote is not attached to a connection yet.'); + } + return this._connection; + } + initialize(_capabilities) { + } + fillServerCapabilities(_capabilities) { + } + showErrorMessage(message, ...actions) { + let params = { type: vscode_languageserver_protocol_1.MessageType.Error, message, actions }; + return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined); + } + showWarningMessage(message, ...actions) { + let params = { type: vscode_languageserver_protocol_1.MessageType.Warning, message, actions }; + return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined); + } + showInformationMessage(message, ...actions) { + let params = { type: vscode_languageserver_protocol_1.MessageType.Info, message, actions }; + return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined); + } +} +const RemoteWindowImpl = showDocument_1.ShowDocumentFeature(progress_1.ProgressFeature(_RemoteWindowImpl)); +var BulkRegistration; +(function (BulkRegistration) { + /** + * Creates a new bulk registration. + * @return an empty bulk registration. + */ + function create() { + return new BulkRegistrationImpl(); + } + BulkRegistration.create = create; +})(BulkRegistration = exports.BulkRegistration || (exports.BulkRegistration = {})); +class BulkRegistrationImpl { + constructor() { + this._registrations = []; + this._registered = new Set(); + } + add(type, registerOptions) { + const method = Is.string(type) ? type : type.method; + if (this._registered.has(method)) { + throw new Error(`${method} is already added to this registration`); + } + const id = UUID.generateUuid(); + this._registrations.push({ + id: id, + method: method, + registerOptions: registerOptions || {} + }); + this._registered.add(method); + } + asRegistrationParams() { + return { + registrations: this._registrations + }; + } +} +var BulkUnregistration; +(function (BulkUnregistration) { + function create() { + return new BulkUnregistrationImpl(undefined, []); + } + BulkUnregistration.create = create; +})(BulkUnregistration = exports.BulkUnregistration || (exports.BulkUnregistration = {})); +class BulkUnregistrationImpl { + constructor(_connection, unregistrations) { + this._connection = _connection; + this._unregistrations = new Map(); + unregistrations.forEach(unregistration => { + this._unregistrations.set(unregistration.method, unregistration); + }); + } + get isAttached() { + return !!this._connection; + } + attach(connection) { + this._connection = connection; + } + add(unregistration) { + this._unregistrations.set(unregistration.method, unregistration); + } + dispose() { + let unregistrations = []; + for (let unregistration of this._unregistrations.values()) { + unregistrations.push(unregistration); + } + let params = { + unregisterations: unregistrations + }; + this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => { + this._connection.console.info(`Bulk unregistration failed.`); + }); + } + disposeSingle(arg) { + const method = Is.string(arg) ? arg : arg.method; + const unregistration = this._unregistrations.get(method); + if (!unregistration) { + return false; + } + let params = { + unregisterations: [unregistration] + }; + this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(() => { + this._unregistrations.delete(method); + }, (_error) => { + this._connection.console.info(`Un-registering request handler for ${unregistration.id} failed.`); + }); + return true; + } +} +class RemoteClientImpl { + attach(connection) { + this._connection = connection; + } + get connection() { + if (!this._connection) { + throw new Error('Remote is not attached to a connection yet.'); + } + return this._connection; + } + initialize(_capabilities) { + } + fillServerCapabilities(_capabilities) { + } + register(typeOrRegistrations, registerOptionsOrType, registerOptions) { + if (typeOrRegistrations instanceof BulkRegistrationImpl) { + return this.registerMany(typeOrRegistrations); + } + else if (typeOrRegistrations instanceof BulkUnregistrationImpl) { + return this.registerSingle1(typeOrRegistrations, registerOptionsOrType, registerOptions); + } + else { + return this.registerSingle2(typeOrRegistrations, registerOptionsOrType); + } + } + registerSingle1(unregistration, type, registerOptions) { + const method = Is.string(type) ? type : type.method; + const id = UUID.generateUuid(); + let params = { + registrations: [{ id, method, registerOptions: registerOptions || {} }] + }; + if (!unregistration.isAttached) { + unregistration.attach(this.connection); + } + return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => { + unregistration.add({ id: id, method: method }); + return unregistration; + }, (_error) => { + this.connection.console.info(`Registering request handler for ${method} failed.`); + return Promise.reject(_error); + }); + } + registerSingle2(type, registerOptions) { + const method = Is.string(type) ? type : type.method; + const id = UUID.generateUuid(); + let params = { + registrations: [{ id, method, registerOptions: registerOptions || {} }] + }; + return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => { + return vscode_languageserver_protocol_1.Disposable.create(() => { + this.unregisterSingle(id, method); + }); + }, (_error) => { + this.connection.console.info(`Registering request handler for ${method} failed.`); + return Promise.reject(_error); + }); + } + unregisterSingle(id, method) { + let params = { + unregisterations: [{ id, method }] + }; + return this.connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => { + this.connection.console.info(`Un-registering request handler for ${id} failed.`); + }); + } + registerMany(registrations) { + let params = registrations.asRegistrationParams(); + return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then(() => { + return new BulkUnregistrationImpl(this._connection, params.registrations.map(registration => { return { id: registration.id, method: registration.method }; })); + }, (_error) => { + this.connection.console.info(`Bulk registration failed.`); + return Promise.reject(_error); + }); + } +} +class _RemoteWorkspaceImpl { + constructor() { + } + attach(connection) { + this._connection = connection; + } + get connection() { + if (!this._connection) { + throw new Error('Remote is not attached to a connection yet.'); + } + return this._connection; + } + initialize(_capabilities) { + } + fillServerCapabilities(_capabilities) { + } + applyEdit(paramOrEdit) { + function isApplyWorkspaceEditParams(value) { + return value && !!value.edit; + } + let params = isApplyWorkspaceEditParams(paramOrEdit) ? paramOrEdit : { edit: paramOrEdit }; + return this.connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params); + } +} +const RemoteWorkspaceImpl = fileOperations_1.FileOperationsFeature(workspaceFolders_1.WorkspaceFoldersFeature(configuration_1.ConfigurationFeature(_RemoteWorkspaceImpl))); +class TracerImpl { + constructor() { + this._trace = vscode_languageserver_protocol_1.Trace.Off; + } + attach(connection) { + this._connection = connection; + } + get connection() { + if (!this._connection) { + throw new Error('Remote is not attached to a connection yet.'); + } + return this._connection; + } + initialize(_capabilities) { + } + fillServerCapabilities(_capabilities) { + } + set trace(value) { + this._trace = value; + } + log(message, verbose) { + if (this._trace === vscode_languageserver_protocol_1.Trace.Off) { + return; + } + this.connection.sendNotification(vscode_languageserver_protocol_1.LogTraceNotification.type, { + message: message, + verbose: this._trace === vscode_languageserver_protocol_1.Trace.Verbose ? verbose : undefined + }); + } +} +class TelemetryImpl { + constructor() { + } + attach(connection) { + this._connection = connection; + } + get connection() { + if (!this._connection) { + throw new Error('Remote is not attached to a connection yet.'); + } + return this._connection; + } + initialize(_capabilities) { + } + fillServerCapabilities(_capabilities) { + } + logEvent(data) { + this.connection.sendNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, data); + } +} +class _LanguagesImpl { + constructor() { + } + attach(connection) { + this._connection = connection; + } + get connection() { + if (!this._connection) { + throw new Error('Remote is not attached to a connection yet.'); + } + return this._connection; + } + initialize(_capabilities) { + } + fillServerCapabilities(_capabilities) { + } + attachWorkDoneProgress(params) { + return progress_1.attachWorkDone(this.connection, params); + } + attachPartialResultProgress(_type, params) { + return progress_1.attachPartialResult(this.connection, params); + } +} +exports._LanguagesImpl = _LanguagesImpl; +const LanguagesImpl = moniker_1.MonikerFeature(linkedEditingRange_1.LinkedEditingRangeFeature(semanticTokens_1.SemanticTokensFeature(callHierarchy_1.CallHierarchyFeature(_LanguagesImpl)))); +function combineConsoleFeatures(one, two) { + return function (Base) { + return two(one(Base)); + }; +} +exports.combineConsoleFeatures = combineConsoleFeatures; +function combineTelemetryFeatures(one, two) { + return function (Base) { + return two(one(Base)); + }; +} +exports.combineTelemetryFeatures = combineTelemetryFeatures; +function combineTracerFeatures(one, two) { + return function (Base) { + return two(one(Base)); + }; +} +exports.combineTracerFeatures = combineTracerFeatures; +function combineClientFeatures(one, two) { + return function (Base) { + return two(one(Base)); + }; +} +exports.combineClientFeatures = combineClientFeatures; +function combineWindowFeatures(one, two) { + return function (Base) { + return two(one(Base)); + }; +} +exports.combineWindowFeatures = combineWindowFeatures; +function combineWorkspaceFeatures(one, two) { + return function (Base) { + return two(one(Base)); + }; +} +exports.combineWorkspaceFeatures = combineWorkspaceFeatures; +function combineLanguagesFeatures(one, two) { + return function (Base) { + return two(one(Base)); + }; +} +exports.combineLanguagesFeatures = combineLanguagesFeatures; +function combineFeatures(one, two) { + function combine(one, two, func) { + if (one && two) { + return func(one, two); + } + else if (one) { + return one; + } + else { + return two; + } + } + let result = { + __brand: 'features', + console: combine(one.console, two.console, combineConsoleFeatures), + tracer: combine(one.tracer, two.tracer, combineTracerFeatures), + telemetry: combine(one.telemetry, two.telemetry, combineTelemetryFeatures), + client: combine(one.client, two.client, combineClientFeatures), + window: combine(one.window, two.window, combineWindowFeatures), + workspace: combine(one.workspace, two.workspace, combineWorkspaceFeatures) + }; + return result; +} +exports.combineFeatures = combineFeatures; +function createConnection(connectionFactory, watchDog, factories) { + const logger = (factories && factories.console ? new (factories.console(RemoteConsoleImpl))() : new RemoteConsoleImpl()); + const connection = connectionFactory(logger); + logger.rawAttach(connection); + const tracer = (factories && factories.tracer ? new (factories.tracer(TracerImpl))() : new TracerImpl()); + const telemetry = (factories && factories.telemetry ? new (factories.telemetry(TelemetryImpl))() : new TelemetryImpl()); + const client = (factories && factories.client ? new (factories.client(RemoteClientImpl))() : new RemoteClientImpl()); + const remoteWindow = (factories && factories.window ? new (factories.window(RemoteWindowImpl))() : new RemoteWindowImpl()); + const workspace = (factories && factories.workspace ? new (factories.workspace(RemoteWorkspaceImpl))() : new RemoteWorkspaceImpl()); + const languages = (factories && factories.languages ? new (factories.languages(LanguagesImpl))() : new LanguagesImpl()); + const allRemotes = [logger, tracer, telemetry, client, remoteWindow, workspace, languages]; + function asPromise(value) { + if (value instanceof Promise) { + return value; + } + else if (Is.thenable(value)) { + return new Promise((resolve, reject) => { + value.then((resolved) => resolve(resolved), (error) => reject(error)); + }); + } + else { + return Promise.resolve(value); + } + } + let shutdownHandler = undefined; + let initializeHandler = undefined; + let exitHandler = undefined; + let protocolConnection = { + listen: () => connection.listen(), + sendRequest: (type, ...params) => connection.sendRequest(Is.string(type) ? type : type.method, ...params), + onRequest: (type, handler) => connection.onRequest(type, handler), + sendNotification: (type, param) => { + const method = Is.string(type) ? type : type.method; + if (arguments.length === 1) { + connection.sendNotification(method); + } + else { + connection.sendNotification(method, param); + } + }, + onNotification: (type, handler) => connection.onNotification(type, handler), + onProgress: connection.onProgress, + sendProgress: connection.sendProgress, + onInitialize: (handler) => initializeHandler = handler, + onInitialized: (handler) => connection.onNotification(vscode_languageserver_protocol_1.InitializedNotification.type, handler), + onShutdown: (handler) => shutdownHandler = handler, + onExit: (handler) => exitHandler = handler, + get console() { return logger; }, + get telemetry() { return telemetry; }, + get tracer() { return tracer; }, + get client() { return client; }, + get window() { return remoteWindow; }, + get workspace() { return workspace; }, + get languages() { return languages; }, + onDidChangeConfiguration: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, handler), + onDidChangeWatchedFiles: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, handler), + __textDocumentSync: undefined, + onDidOpenTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, handler), + onDidChangeTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, handler), + onDidCloseTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, handler), + onWillSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, handler), + onWillSaveTextDocumentWaitUntil: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, handler), + onDidSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, handler), + sendDiagnostics: (params) => connection.sendNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, params), + onHover: (handler) => connection.onRequest(vscode_languageserver_protocol_1.HoverRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined); + }), + onCompletion: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params)); + }), + onCompletionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, handler), + onSignatureHelp: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined); + }), + onDeclaration: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params)); + }), + onDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params)); + }), + onTypeDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params)); + }), + onImplementation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params)); + }), + onReferences: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params)); + }), + onDocumentHighlight: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params)); + }), + onDocumentSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params)); + }), + onWorkspaceSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params)); + }), + onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params)); + }), + onCodeActionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionResolveRequest.type, (params, cancel) => { + return handler(params, cancel); + }), + onCodeLens: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params)); + }), + onCodeLensResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, (params, cancel) => { + return handler(params, cancel); + }), + onDocumentFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined); + }), + onDocumentRangeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined); + }), + onDocumentOnTypeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, (params, cancel) => { + return handler(params, cancel); + }), + onRenameRequest: (handler) => connection.onRequest(vscode_languageserver_protocol_1.RenameRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined); + }), + onPrepareRename: (handler) => connection.onRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, (params, cancel) => { + return handler(params, cancel); + }), + onDocumentLinks: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params)); + }), + onDocumentLinkResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, (params, cancel) => { + return handler(params, cancel); + }), + onDocumentColor: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params)); + }), + onColorPresentation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params)); + }), + onFoldingRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params)); + }), + onSelectionRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SelectionRangeRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params)); + }), + onExecuteCommand: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, (params, cancel) => { + return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined); + }), + dispose: () => connection.dispose() + }; + for (let remote of allRemotes) { + remote.attach(protocolConnection); + } + connection.onRequest(vscode_languageserver_protocol_1.InitializeRequest.type, (params) => { + watchDog.initialize(params); + if (Is.string(params.trace)) { + tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.trace); + } + for (let remote of allRemotes) { + remote.initialize(params.capabilities); + } + if (initializeHandler) { + let result = initializeHandler(params, new vscode_languageserver_protocol_1.CancellationTokenSource().token, progress_1.attachWorkDone(connection, params), undefined); + return asPromise(result).then((value) => { + if (value instanceof vscode_languageserver_protocol_1.ResponseError) { + return value; + } + let result = value; + if (!result) { + result = { capabilities: {} }; + } + let capabilities = result.capabilities; + if (!capabilities) { + capabilities = {}; + result.capabilities = capabilities; + } + if (capabilities.textDocumentSync === undefined || capabilities.textDocumentSync === null) { + capabilities.textDocumentSync = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None; + } + else if (!Is.number(capabilities.textDocumentSync) && !Is.number(capabilities.textDocumentSync.change)) { + capabilities.textDocumentSync.change = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None; + } + for (let remote of allRemotes) { + remote.fillServerCapabilities(capabilities); + } + return result; + }); + } + else { + let result = { capabilities: { textDocumentSync: vscode_languageserver_protocol_1.TextDocumentSyncKind.None } }; + for (let remote of allRemotes) { + remote.fillServerCapabilities(result.capabilities); + } + return result; + } + }); + connection.onRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, () => { + watchDog.shutdownReceived = true; + if (shutdownHandler) { + return shutdownHandler(new vscode_languageserver_protocol_1.CancellationTokenSource().token); + } + else { + return undefined; + } + }); + connection.onNotification(vscode_languageserver_protocol_1.ExitNotification.type, () => { + try { + if (exitHandler) { + exitHandler(); + } + } + finally { + if (watchDog.shutdownReceived) { + watchDog.exit(0); + } + else { + watchDog.exit(1); + } + } + }); + connection.onNotification(vscode_languageserver_protocol_1.SetTraceNotification.type, (params) => { + tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.value); + }); + return protocolConnection; +} +exports.createConnection = createConnection; +//# sourceMappingURL=server.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/showDocument.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/showDocument.d.ts" index 6fb6dfa1dc61bdc10cd0092cbd7a63a913c08247..dd4174b845512bf4ed53a99c4af911130a8f902b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/showDocument.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/showDocument.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:351bbf43d585484825ee6c4b4805aac137ffc8e8a3b9812af99945a202db7c02 -size 358 +import { ShowDocumentParams, ShowDocumentResult } from 'vscode-languageserver-protocol'; +import type { Feature, _RemoteWindow } from './server'; +export interface ShowDocumentFeatureShape { + showDocument(params: ShowDocumentParams): Promise; +} +export declare const ShowDocumentFeature: Feature<_RemoteWindow, ShowDocumentFeatureShape>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/showDocument.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/showDocument.js" index 43696a425cc51c3c6cf524571befb4a1ec7cdf76..1eb8601743ecee26b5973e8ac944d7d34949b794 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/showDocument.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/showDocument.js" @@ -1,3 +1,17 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:70cc8190502e99abaabd3eda54303b8b32ad00b15c05da04fb933d06a2bb9b81 -size 878 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ShowDocumentFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const ShowDocumentFeature = (Base) => { + return class extends Base { + showDocument(params) { + return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowDocumentRequest.type, params); + } + }; +}; +exports.ShowDocumentFeature = ShowDocumentFeature; +//# sourceMappingURL=showDocument.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/utils/is.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/utils/is.d.ts" index df97e0de094f9bd62072a18545c8cd2d20e340aa..8c3812f9e3d06419b433160dd614b3d848304347 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/utils/is.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/utils/is.d.ts" @@ -1,3 +1,9 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:98b8e50ce364a3d2f1049c2cc5e585f121442e1888062173b6b6f6d6b4c0bb2e -size 601 +export declare function boolean(value: any): value is boolean; +export declare function string(value: any): value is string; +export declare function number(value: any): value is number; +export declare function error(value: any): value is Error; +export declare function func(value: any): value is Function; +export declare function array(value: any): value is T[]; +export declare function stringArray(value: any): value is string[]; +export declare function typedArray(value: any, check: (value: any) => boolean): value is T[]; +export declare function thenable(value: any): value is Thenable; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/utils/is.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/utils/is.js" index caf5bb0671ed5a0cde03e70a798e1a22049c9e9f..2ff00fc6d7497a9bf06f2d5a81fcf93816a5b5bf 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/utils/is.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/utils/is.js" @@ -1,3 +1,44 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:633c00f847d21aef50bb3feec151290d2704c5506bf25040e840eaf2913b0849 -size 1564 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.thenable = exports.typedArray = exports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0; +function boolean(value) { + return value === true || value === false; +} +exports.boolean = boolean; +function string(value) { + return typeof value === 'string' || value instanceof String; +} +exports.string = string; +function number(value) { + return typeof value === 'number' || value instanceof Number; +} +exports.number = number; +function error(value) { + return value instanceof Error; +} +exports.error = error; +function func(value) { + return typeof value === 'function'; +} +exports.func = func; +function array(value) { + return Array.isArray(value); +} +exports.array = array; +function stringArray(value) { + return array(value) && value.every(elem => string(elem)); +} +exports.stringArray = stringArray; +function typedArray(value, check) { + return Array.isArray(value) && value.every(check); +} +exports.typedArray = typedArray; +function thenable(value) { + return value && func(value.then); +} +exports.thenable = thenable; +//# sourceMappingURL=is.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/utils/uuid.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/utils/uuid.d.ts" index eaa01ef92a02289134b11acd7ebf22f623612042..bebf78337ba0c812f749b5dd757bfe44a98c8143 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/utils/uuid.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/utils/uuid.d.ts" @@ -1,3 +1,22 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e02ab9eaa8f6d1a9f2fa819ba98efa5c4f7ff83cb7c1ac235583d4d765056721 -size 639 +/** + * Represents a UUID as defined by rfc4122. + */ +export interface UUID { + /** + * @returns the canonical representation in sets of hexadecimal numbers separated by dashes. + */ + asHex(): string; + equals(other: UUID): boolean; +} +/** + * An empty UUID that contains only zeros. + */ +export declare const empty: UUID; +export declare function v4(): UUID; +export declare function isUUID(value: string): boolean; +/** + * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. + * @param value A uuid string. + */ +export declare function parse(value: string): UUID; +export declare function generateUuid(): string; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/utils/uuid.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/utils/uuid.js" index 30199cd5dfa26b0350314ce896657c85b9c68278..3637330ae7ad2172013d561726c55d1c426fe04e 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/utils/uuid.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/utils/uuid.js" @@ -1,3 +1,98 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d3416c2d63a5b1d90f810885bb6c94dad2f69d9556166f6f3486b80fd04ca8cf -size 3038 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.generateUuid = exports.parse = exports.isUUID = exports.v4 = exports.empty = void 0; +class ValueUUID { + constructor(_value) { + this._value = _value; + // empty + } + asHex() { + return this._value; + } + equals(other) { + return this.asHex() === other.asHex(); + } +} +class V4UUID extends ValueUUID { + constructor() { + super([ + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + '-', + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + '-', + '4', + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + '-', + V4UUID._oneOf(V4UUID._timeHighBits), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + '-', + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + ].join('')); + } + static _oneOf(array) { + return array[Math.floor(array.length * Math.random())]; + } + static _randomHex() { + return V4UUID._oneOf(V4UUID._chars); + } +} +V4UUID._chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f']; +V4UUID._timeHighBits = ['8', '9', 'a', 'b']; +/** + * An empty UUID that contains only zeros. + */ +exports.empty = new ValueUUID('00000000-0000-0000-0000-000000000000'); +function v4() { + return new V4UUID(); +} +exports.v4 = v4; +const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; +function isUUID(value) { + return _UUIDPattern.test(value); +} +exports.isUUID = isUUID; +/** + * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. + * @param value A uuid string. + */ +function parse(value) { + if (!isUUID(value)) { + throw new Error('invalid uuid'); + } + return new ValueUUID(value); +} +exports.parse = parse; +function generateUuid() { + return v4().asHex(); +} +exports.generateUuid = generateUuid; +//# sourceMappingURL=uuid.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/workspaceFolders.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/workspaceFolders.d.ts" index 543bc24eb4d569ee7c5ce5cd61e9ffc29cc7427f..e1d5ddbd2ba2526fe03d30b319f1f85ea2bdd6ce 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/workspaceFolders.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/workspaceFolders.d.ts" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1fb68106bddae35448e5279095461a4b54c4bbb42787cd629f70924b17e9a11e -size 421 +import { Event, WorkspaceFolder, WorkspaceFoldersChangeEvent } from 'vscode-languageserver-protocol'; +import type { Feature, _RemoteWorkspace } from './server'; +export interface WorkspaceFolders { + getWorkspaceFolders(): Promise; + onDidChangeWorkspaceFolders: Event; +} +export declare const WorkspaceFoldersFeature: Feature<_RemoteWorkspace, WorkspaceFolders>; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/workspaceFolders.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/workspaceFolders.js" index 0af43855c2e38c8ae357be4ea9727e5faf618d30..fe50a10da3ae742ffcbd9c68721aaf4c6cc5b62e 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/workspaceFolders.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/common/workspaceFolders.js" @@ -1,3 +1,35 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:81356049ee23a66a8c779d3cc1cbdf254398676a96c99573ccf71192d2f908dc -size 1919 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WorkspaceFoldersFeature = void 0; +const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); +const WorkspaceFoldersFeature = (Base) => { + return class extends Base { + initialize(capabilities) { + let workspaceCapabilities = capabilities.workspace; + if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) { + this._onDidChangeWorkspaceFolders = new vscode_languageserver_protocol_1.Emitter(); + this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type, (params) => { + this._onDidChangeWorkspaceFolders.fire(params.event); + }); + } + } + getWorkspaceFolders() { + return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkspaceFoldersRequest.type); + } + get onDidChangeWorkspaceFolders() { + if (!this._onDidChangeWorkspaceFolders) { + throw new Error('Client doesn\'t support sending workspace folder change events.'); + } + if (!this._unregistration) { + this._unregistration = this.connection.client.register(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type); + } + return this._onDidChangeWorkspaceFolders.event; + } + }; +}; +exports.WorkspaceFoldersFeature = WorkspaceFoldersFeature; +//# sourceMappingURL=workspaceFolders.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/files.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/files.d.ts" index 99dcc713fe1440dd3d77a02207cd8f6a708b77ec..4feae3c6ea0625900e47c40b1dc8f00053bb507d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/files.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/files.d.ts" @@ -1,3 +1,19 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a58402dc75738c188a741ccca86ccf898b0af98d305ad075c428171f193a6cd5 -size 1184 +/** + * @deprecated Use the `vscode-uri` npm module which provides a more + * complete implementation of handling VS Code URIs. + */ +export declare function uriToFilePath(uri: string): string | undefined; +export declare function resolve(moduleName: string, nodePath: string | undefined, cwd: string | undefined, tracer: (message: string, verbose?: string) => void): Promise; +/** + * Resolve the global npm package path. + * @deprecated Since this depends on the used package manager and their version the best is that servers + * implement this themselves since they know best what kind of package managers to support. + * @param tracer the tracer to use + */ +export declare function resolveGlobalNodePath(tracer?: (message: string) => void): string | undefined; +export declare function resolveGlobalYarnPath(tracer?: (message: string) => void): string | undefined; +export declare namespace FileSystem { + function isCaseSensitive(): boolean; + function isParent(parent: string, child: string): boolean; +} +export declare function resolveModulePath(workspaceRoot: string, moduleName: string, nodePath: string, tracer: (message: string, verbose?: string) => void): Promise; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/files.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/files.js" index 1746004da42eeedcd336b9bd9f5581c57ac2af27..2afac48aea022e3427020ba102afe4b3f91bbc2c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/files.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/files.js" @@ -1,3 +1,263 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:324d7861cfafd7bc206894362039c661526ffdfb8cc445d59f584d6ec6a4b58a -size 9119 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.resolveModulePath = exports.FileSystem = exports.resolveGlobalYarnPath = exports.resolveGlobalNodePath = exports.resolve = exports.uriToFilePath = void 0; +const url = require("url"); +const path = require("path"); +const fs = require("fs"); +const child_process_1 = require("child_process"); +/** + * @deprecated Use the `vscode-uri` npm module which provides a more + * complete implementation of handling VS Code URIs. + */ +function uriToFilePath(uri) { + let parsed = url.parse(uri); + if (parsed.protocol !== 'file:' || !parsed.path) { + return undefined; + } + let segments = parsed.path.split('/'); + for (var i = 0, len = segments.length; i < len; i++) { + segments[i] = decodeURIComponent(segments[i]); + } + if (process.platform === 'win32' && segments.length > 1) { + let first = segments[0]; + let second = segments[1]; + // Do we have a drive letter and we started with a / which is the + // case if the first segement is empty (see split above) + if (first.length === 0 && second.length > 1 && second[1] === ':') { + // Remove first slash + segments.shift(); + } + } + return path.normalize(segments.join('/')); +} +exports.uriToFilePath = uriToFilePath; +function isWindows() { + return process.platform === 'win32'; +} +function resolve(moduleName, nodePath, cwd, tracer) { + const nodePathKey = 'NODE_PATH'; + const app = [ + 'var p = process;', + 'p.on(\'message\',function(m){', + 'if(m.c===\'e\'){', + 'p.exit(0);', + '}', + 'else if(m.c===\'rs\'){', + 'try{', + 'var r=require.resolve(m.a);', + 'p.send({c:\'r\',s:true,r:r});', + '}', + 'catch(err){', + 'p.send({c:\'r\',s:false});', + '}', + '}', + '});' + ].join(''); + return new Promise((resolve, reject) => { + let env = process.env; + let newEnv = Object.create(null); + Object.keys(env).forEach(key => newEnv[key] = env[key]); + if (nodePath && fs.existsSync(nodePath) /* see issue 545 */) { + if (newEnv[nodePathKey]) { + newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey]; + } + else { + newEnv[nodePathKey] = nodePath; + } + if (tracer) { + tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`); + } + } + newEnv['ELECTRON_RUN_AS_NODE'] = '1'; + try { + let cp = child_process_1.fork('', [], { + cwd: cwd, + env: newEnv, + execArgv: ['-e', app] + }); + if (cp.pid === void 0) { + reject(new Error(`Starting process to resolve node module ${moduleName} failed`)); + return; + } + cp.on('error', (error) => { + reject(error); + }); + cp.on('message', (message) => { + if (message.c === 'r') { + cp.send({ c: 'e' }); + if (message.s) { + resolve(message.r); + } + else { + reject(new Error(`Failed to resolve module: ${moduleName}`)); + } + } + }); + let message = { + c: 'rs', + a: moduleName + }; + cp.send(message); + } + catch (error) { + reject(error); + } + }); +} +exports.resolve = resolve; +/** + * Resolve the global npm package path. + * @deprecated Since this depends on the used package manager and their version the best is that servers + * implement this themselves since they know best what kind of package managers to support. + * @param tracer the tracer to use + */ +function resolveGlobalNodePath(tracer) { + let npmCommand = 'npm'; + const env = Object.create(null); + Object.keys(process.env).forEach(key => env[key] = process.env[key]); + env['NO_UPDATE_NOTIFIER'] = 'true'; + const options = { + encoding: 'utf8', + env + }; + if (isWindows()) { + npmCommand = 'npm.cmd'; + options.shell = true; + } + let handler = () => { }; + try { + process.on('SIGPIPE', handler); + let stdout = child_process_1.spawnSync(npmCommand, ['config', 'get', 'prefix'], options).stdout; + if (!stdout) { + if (tracer) { + tracer(`'npm config get prefix' didn't return a value.`); + } + return undefined; + } + let prefix = stdout.trim(); + if (tracer) { + tracer(`'npm config get prefix' value is: ${prefix}`); + } + if (prefix.length > 0) { + if (isWindows()) { + return path.join(prefix, 'node_modules'); + } + else { + return path.join(prefix, 'lib', 'node_modules'); + } + } + return undefined; + } + catch (err) { + return undefined; + } + finally { + process.removeListener('SIGPIPE', handler); + } +} +exports.resolveGlobalNodePath = resolveGlobalNodePath; +/* + * Resolve the global yarn pakage path. + * @deprecated Since this depends on the used package manager and their version the best is that servers + * implement this themselves since they know best what kind of package managers to support. + * @param tracer the tracer to use + */ +function resolveGlobalYarnPath(tracer) { + let yarnCommand = 'yarn'; + let options = { + encoding: 'utf8' + }; + if (isWindows()) { + yarnCommand = 'yarn.cmd'; + options.shell = true; + } + let handler = () => { }; + try { + process.on('SIGPIPE', handler); + let results = child_process_1.spawnSync(yarnCommand, ['global', 'dir', '--json'], options); + let stdout = results.stdout; + if (!stdout) { + if (tracer) { + tracer(`'yarn global dir' didn't return a value.`); + if (results.stderr) { + tracer(results.stderr); + } + } + return undefined; + } + let lines = stdout.trim().split(/\r?\n/); + for (let line of lines) { + try { + let yarn = JSON.parse(line); + if (yarn.type === 'log') { + return path.join(yarn.data, 'node_modules'); + } + } + catch (e) { + // Do nothing. Ignore the line + } + } + return undefined; + } + catch (err) { + return undefined; + } + finally { + process.removeListener('SIGPIPE', handler); + } +} +exports.resolveGlobalYarnPath = resolveGlobalYarnPath; +var FileSystem; +(function (FileSystem) { + let _isCaseSensitive = undefined; + function isCaseSensitive() { + if (_isCaseSensitive !== void 0) { + return _isCaseSensitive; + } + if (process.platform === 'win32') { + _isCaseSensitive = false; + } + else { + // convert current file name to upper case / lower case and check if file exists + // (guards against cases when name is already all uppercase or lowercase) + _isCaseSensitive = !fs.existsSync(__filename.toUpperCase()) || !fs.existsSync(__filename.toLowerCase()); + } + return _isCaseSensitive; + } + FileSystem.isCaseSensitive = isCaseSensitive; + function isParent(parent, child) { + if (isCaseSensitive()) { + return path.normalize(child).indexOf(path.normalize(parent)) === 0; + } + else { + return path.normalize(child).toLowerCase().indexOf(path.normalize(parent).toLowerCase()) === 0; + } + } + FileSystem.isParent = isParent; +})(FileSystem = exports.FileSystem || (exports.FileSystem = {})); +function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) { + if (nodePath) { + if (!path.isAbsolute(nodePath)) { + nodePath = path.join(workspaceRoot, nodePath); + } + return resolve(moduleName, nodePath, nodePath, tracer).then((value) => { + if (FileSystem.isParent(nodePath, value)) { + return value; + } + else { + return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`)); + } + }).then(undefined, (_error) => { + return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer); + }); + } + else { + return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer); + } +} +exports.resolveModulePath = resolveModulePath; +//# sourceMappingURL=files.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/main.d.ts" index d7459600d276cbf9ad2e1d53b955e973c51f2ee0..f8b4f29668df0c5a5f74c1936ffac07cb9257d77 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/main.d.ts" @@ -1,3 +1,61 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cf1532b11d5ec78f63dc4d0c985353b281b4a09e91d35f63fb9aba42e36674ab -size 4018 +/// +/// +import { Connection, _, _Connection, Features } from '../common/server'; +import * as fm from './files'; +import { ConnectionStrategy, ConnectionOptions, MessageReader, MessageWriter } from 'vscode-languageserver-protocol/node'; +export * from 'vscode-languageserver-protocol/node'; +export * from '../common/api'; +export declare namespace Files { + let uriToFilePath: typeof fm.uriToFilePath; + let resolveGlobalNodePath: typeof fm.resolveGlobalNodePath; + let resolveGlobalYarnPath: typeof fm.resolveGlobalYarnPath; + let resolve: typeof fm.resolve; + let resolveModulePath: typeof fm.resolveModulePath; +} +/** + * Creates a new connection based on the processes command line arguments: + * + * @param options An optional connection strategy or connection options to control additional settings + */ +export declare function createConnection(options?: ConnectionStrategy | ConnectionOptions): Connection; +/** + * Creates a new connection using a the given streams. + * + * @param inputStream The stream to read messages from. + * @param outputStream The stream to write messages to. + * @param options An optional connection strategy or connection options to control additional settings + * @return a [connection](#IConnection) + */ +export declare function createConnection(inputStream: NodeJS.ReadableStream, outputStream: NodeJS.WritableStream, options?: ConnectionStrategy | ConnectionOptions): Connection; +/** + * Creates a new connection. + * + * @param reader The message reader to read messages from. + * @param writer The message writer to write message to. + * @param options An optional connection strategy or connection options to control additional settings + */ +export declare function createConnection(reader: MessageReader, writer: MessageWriter, options?: ConnectionStrategy | ConnectionOptions): Connection; +/** + * Creates a new connection based on the processes command line arguments. The new connection surfaces proposed API + * + * @param factories: the factories to use to implement the proposed API + * @param options An optional connection strategy or connection options to control additional settings + */ +export declare function createConnection(factories: Features, options?: ConnectionStrategy | ConnectionOptions): _Connection; +/** + * Creates a new connection using a the given streams. + * + * @param inputStream The stream to read messages from. + * @param outputStream The stream to write messages to. + * @param options An optional connection strategy or connection options to control additional settings + * @return a [connection](#IConnection) + */ +export declare function createConnection(factories: Features, inputStream: NodeJS.ReadableStream, outputStream: NodeJS.WritableStream, options?: ConnectionStrategy | ConnectionOptions): _Connection; +/** + * Creates a new connection. + * + * @param reader The message reader to read messages from. + * @param writer The message writer to write message to. + * @param options An optional connection strategy or connection options to control additional settings + */ +export declare function createConnection(factories: Features, reader: MessageReader, writer: MessageWriter, options?: ConnectionStrategy | ConnectionOptions): _Connection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/main.js" index 8186712e73db962c3867decf25d282cff114a322..e89ee90322f62a81d5c8c8fc4c2683e29742630b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/main.js" @@ -1,3 +1,208 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0903e677d29b4e9b6fc404240925d8868fcb19cae1bf743e18940bc1c6be6e3e -size 7286 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +/// +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createConnection = exports.Files = void 0; +const Is = require("../common/utils/is"); +const server_1 = require("../common/server"); +const fm = require("./files"); +const node_1 = require("vscode-languageserver-protocol/node"); +__exportStar(require("vscode-languageserver-protocol/node"), exports); +__exportStar(require("../common/api"), exports); +var Files; +(function (Files) { + Files.uriToFilePath = fm.uriToFilePath; + Files.resolveGlobalNodePath = fm.resolveGlobalNodePath; + Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath; + Files.resolve = fm.resolve; + Files.resolveModulePath = fm.resolveModulePath; +})(Files = exports.Files || (exports.Files = {})); +let _protocolConnection; +function endProtocolConnection() { + if (_protocolConnection === undefined) { + return; + } + try { + _protocolConnection.end(); + } + catch (_err) { + // Ignore. The client process could have already + // did and we can't send an end into the connection. + } +} +let _shutdownReceived = false; +let exitTimer = undefined; +function setupExitTimer() { + const argName = '--clientProcessId'; + function runTimer(value) { + try { + let processId = parseInt(value); + if (!isNaN(processId)) { + exitTimer = setInterval(() => { + try { + process.kill(processId, 0); + } + catch (ex) { + // Parent process doesn't exist anymore. Exit the server. + endProtocolConnection(); + process.exit(_shutdownReceived ? 0 : 1); + } + }, 3000); + } + } + catch (e) { + // Ignore errors; + } + } + for (let i = 2; i < process.argv.length; i++) { + let arg = process.argv[i]; + if (arg === argName && i + 1 < process.argv.length) { + runTimer(process.argv[i + 1]); + return; + } + else { + let args = arg.split('='); + if (args[0] === argName) { + runTimer(args[1]); + } + } + } +} +setupExitTimer(); +const watchDog = { + initialize: (params) => { + const processId = params.processId; + if (Is.number(processId) && exitTimer === undefined) { + // We received a parent process id. Set up a timer to periodically check + // if the parent is still alive. + setInterval(() => { + try { + process.kill(processId, 0); + } + catch (ex) { + // Parent process doesn't exist anymore. Exit the server. + process.exit(_shutdownReceived ? 0 : 1); + } + }, 3000); + } + }, + get shutdownReceived() { + return _shutdownReceived; + }, + set shutdownReceived(value) { + _shutdownReceived = value; + }, + exit: (code) => { + endProtocolConnection(); + process.exit(code); + } +}; +function createConnection(arg1, arg2, arg3, arg4) { + let factories; + let input; + let output; + let options; + if (arg1 !== void 0 && arg1.__brand === 'features') { + factories = arg1; + arg1 = arg2; + arg2 = arg3; + arg3 = arg4; + } + if (node_1.ConnectionStrategy.is(arg1) || node_1.ConnectionOptions.is(arg1)) { + options = arg1; + } + else { + input = arg1; + output = arg2; + options = arg3; + } + return _createConnection(input, output, options, factories); +} +exports.createConnection = createConnection; +function _createConnection(input, output, options, factories) { + if (!input && !output && process.argv.length > 2) { + let port = void 0; + let pipeName = void 0; + let argv = process.argv.slice(2); + for (let i = 0; i < argv.length; i++) { + let arg = argv[i]; + if (arg === '--node-ipc') { + input = new node_1.IPCMessageReader(process); + output = new node_1.IPCMessageWriter(process); + break; + } + else if (arg === '--stdio') { + input = process.stdin; + output = process.stdout; + break; + } + else if (arg === '--socket') { + port = parseInt(argv[i + 1]); + break; + } + else if (arg === '--pipe') { + pipeName = argv[i + 1]; + break; + } + else { + var args = arg.split('='); + if (args[0] === '--socket') { + port = parseInt(args[1]); + break; + } + else if (args[0] === '--pipe') { + pipeName = args[1]; + break; + } + } + } + if (port) { + let transport = node_1.createServerSocketTransport(port); + input = transport[0]; + output = transport[1]; + } + else if (pipeName) { + let transport = node_1.createServerPipeTransport(pipeName); + input = transport[0]; + output = transport[1]; + } + } + var commandLineMessage = 'Use arguments of createConnection or set command line parameters: \'--node-ipc\', \'--stdio\' or \'--socket={number}\''; + if (!input) { + throw new Error('Connection input stream is not set. ' + commandLineMessage); + } + if (!output) { + throw new Error('Connection output stream is not set. ' + commandLineMessage); + } + // Backwards compatibility + if (Is.func(input.read) && Is.func(input.on)) { + let inputStream = input; + inputStream.on('end', () => { + endProtocolConnection(); + process.exit(_shutdownReceived ? 0 : 1); + }); + inputStream.on('close', () => { + endProtocolConnection(); + process.exit(_shutdownReceived ? 0 : 1); + }); + } + const connectionFactory = (logger) => { + const result = node_1.createProtocolConnection(input, output, logger, options); + return result; + }; + return server_1.createConnection(connectionFactory, watchDog, factories); +} +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/resolve.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/resolve.d.ts" index dab3249542c96306fe5442903d63d6a8c71a5410..4e765ce1e744070590e90a1206bca903c4c23816 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/resolve.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/resolve.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:06e75afe2bf6d058aae427edecc421fac2cc26e754fba6279bb5f69818238bc4 -size 100 +interface Message { + command: string; + success?: boolean; + args?: any; + result?: any; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/resolve.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/resolve.js" index d42c9f5e79c24e58bb2a365419541794a7575622..253f1a78ad19139c9265be47ec612cf4a72c33d4 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/resolve.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/lib/node/resolve.js" @@ -1,3 +1,20 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4e3a3a1462a4849a3c7151f0f5ba0febe594a4dde42f5b778953d992c26653bf -size 820 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +process.on('message', (message) => { + if (message.command === 'exit') { + process.exit(0); + } + else if (message.command === 'resolve') { + try { + let result = require.resolve(message.args); + process.send({ command: 'resolve', success: true, result: result }); + } + catch (err) { + process.send({ command: 'resolve', success: false }); + } + } +}); +//# sourceMappingURL=resolve.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node.cmd" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node.cmd" index d6820389cf905e2639588cfaf3d1dd49787060d0..791e6e36ca158adb27a1ca664413568656ce2781 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node.cmd" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node.cmd" @@ -1,3 +1,5 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fad7474018db5e3ef38b97374d82fb3b5c56a16aee423f482b6732800007f533 -size 213 +@echo off +REM This file is necessary to ensure that under Windows we don't +REM run the node.js file in the Windows Script Host when using +REM node in packakge.json scripts. See also PATHEXT setting +node.exe %* \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node.d.ts" index d4501421d4bd489c9190700a07b50dd52678f01e..b4c4fcd723edbd7b4ea066a4059cf8393e46aa88 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c98df0145d99011af92c397fa787fc39d42cc04019614ab5581febe71fb32e1 -size 382 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/node/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node.js" index 6ca9fea0ab31ba44f19549c8fa3b28a055f235c0..388e3197ebb862634cda424e9d707896b40627da 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20ed9d05087fa65ed99369c32ebaad6d2714c56d38b6b58e660ec428d1280054 -size 408 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/node/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/License.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/License.txt" index 71c73d0cbbb244fd8977b1334dae3ac9800e0c19..a07e3ae825f86b6d1f966659954bffc0768bef66 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/License.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/License.txt" @@ -1,3 +1,11 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec9ee83580841e8eb687aca9867f221503809ba6426c7f876ede17d91b9fcfd0 -size 1095 +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/README.md" index e0e0d3055798cb577ad4ac7b12eb6f5ae4d75266..604fd7975821be62011da03d2e0ee9b3afca2e61 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/README.md" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:93b8875f882268952b6ad73b2766f3a3ed0242f67477a83d3da5c5586447bef3 -size 969 +# VSCode Language Server - Protocol Module + +[![NPM Version](https://img.shields.io/npm/v/vscode-languageserver-protocol.svg)](https://npmjs.org/package/vscode-languageclient) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-languageserver-protocol.svg)](https://npmjs.org/package/vscode-languageclient) +[![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-node) + +This npm module is a tool independent implementation of the language server protocol and can be used in any type of node application. + +See [here](https://github.com/Microsoft/language-server-protocol) for a detailed documentation on the language server protocol. + +## History + +For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md) + +## License +[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt) diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/browser.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/browser.d.ts" index 0898e728f1aa9ab8ecda68d04096c898e91dbe6a..e628f1b5caf549c4b58cead28e5ca6a1d682acf8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/browser.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/browser.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99170b7257d895bb2594d7db9c255a4b0029a1363fe5e89849fda830b5c997ce -size 385 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/browser/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/browser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/browser.js" index da29a4f6ec2636f4c79c022c589b7adc67c91530..f5caebf0011feb56821400f3e85f752c80778192 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/browser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/browser.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9406802db032558d3cd8bde9f68d20c067f3a7eca251ad7d0e4473da8d457ada -size 411 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/browser/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/browser/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/browser/main.d.ts" index e4a45e968b64e31c5705e782f97a78d36f3f1fc3..9452eeaefbb9801b1ba901b571acf017b1910659 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/browser/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/browser/main.d.ts" @@ -1,3 +1,4 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:59ba6326cca505253577e9c34a601031793081c6e2b21b08ee73921fc1ecbeb3 -size 383 +import { MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, ProtocolConnection } from '../common/api'; +export * from 'vscode-jsonrpc/browser'; +export * from '../common/api'; +export declare function createProtocolConnection(reader: MessageReader, writer: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/browser/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/browser/main.js" index 64911c3011ac7c0589de547976efd123bc1bf189..632b20e862ef028c2842f427eb4be32c049b1ae4 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/browser/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/browser/main.js" @@ -1,3 +1,25 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:de01889089693a667861ba57eaf554a1c62557b8164b3413ae3aee23241742a4 -size 1385 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createProtocolConnection = void 0; +const browser_1 = require("vscode-jsonrpc/browser"); +__exportStar(require("vscode-jsonrpc/browser"), exports); +__exportStar(require("../common/api"), exports); +function createProtocolConnection(reader, writer, logger, options) { + return browser_1.createMessageConnection(reader, writer, logger, options); +} +exports.createProtocolConnection = createProtocolConnection; +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts" index 0878ff600846a3890266e37052658a24e442bbce..286df7a28b38a90ba64563f84d378fcfbc263da3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts" @@ -1,3 +1,26 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:26245b1b8452c300347a31b37a052c3244a36393dec03facfa4b31a8d8687184 -size 800 +import type { integer } from 'vscode-languageserver-types'; +export * from 'vscode-jsonrpc'; +export * from 'vscode-languageserver-types'; +export * from './messages'; +export * from './protocol'; +export { ProtocolConnection, createProtocolConnection } from './connection'; +export declare namespace LSPErrorCodes { + /** + * This is the start range of LSP reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + const lspReservedErrorRangeStart: integer; + const ContentModified: integer; + const RequestCancelled: integer; + /** + * This is the end range of LSP reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + const lspReservedErrorRangeEnd: integer; +} +export declare namespace Proposed { +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/api.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/api.js" index e9c8b45bff60bdfb461e53fc8c562b5fa98f3603..b594bb8b1a297d4368e948709c0b17d5c93bf866 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/api.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/api.js" @@ -1,3 +1,43 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d18e0b2913e676f16b21c7b5ca9fbe599cce0021f3afc003ed69e855444d7f01 -size 2039 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LSPErrorCodes = exports.createProtocolConnection = void 0; +__exportStar(require("vscode-jsonrpc"), exports); +__exportStar(require("vscode-languageserver-types"), exports); +__exportStar(require("./messages"), exports); +__exportStar(require("./protocol"), exports); +var connection_1 = require("./connection"); +Object.defineProperty(exports, "createProtocolConnection", { enumerable: true, get: function () { return connection_1.createProtocolConnection; } }); +var LSPErrorCodes; +(function (LSPErrorCodes) { + /** + * This is the start range of LSP reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + LSPErrorCodes.lspReservedErrorRangeStart = -32899; + LSPErrorCodes.ContentModified = -32801; + LSPErrorCodes.RequestCancelled = -32800; + /** + * This is the end range of LSP reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + LSPErrorCodes.lspReservedErrorRangeEnd = -32800; +})(LSPErrorCodes = exports.LSPErrorCodes || (exports.LSPErrorCodes = {})); +//# sourceMappingURL=api.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts" index f8c80a401195940b060a354989f57ffb3dfae0de..734ac9a983e50e2e4b1f51365563f511e2ba6599 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts" @@ -1,3 +1,163 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aca0e55a2961b519f8857517e2cdf6085f024bb10c6961e120c80b76569fc4d7 -size 6934 +import { Message, NotificationMessage, CancellationToken, RequestHandler0, RequestHandler, GenericRequestHandler, NotificationHandler0, NotificationHandler, GenericNotificationHandler, ProgressType, Trace, Tracer, TraceOptions, Disposable, Event, MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, RequestType0, RequestType, NotificationType0, NotificationType } from 'vscode-jsonrpc'; +import { ProtocolRequestType, ProtocolRequestType0, ProtocolNotificationType, ProtocolNotificationType0 } from './messages'; +export interface ProtocolConnection { + /** + * Sends a request and returns a promise resolving to the result of the request. + * + * @param type The type of request to sent. + * @param token An optional cancellation token. + * @returns A promise resolving to the request's result. + */ + sendRequest(type: ProtocolRequestType0, token?: CancellationToken): Promise; + sendRequest(type: RequestType0, token?: CancellationToken): Promise; + /** + * Sends a request and returns a promise resolving to the result of the request. + * + * @param type The type of request to sent. + * @param params The request's parameter. + * @param token An optional cancellation token. + * @returns A promise resolving to the request's result. + */ + sendRequest(type: ProtocolRequestType, params: P, token?: CancellationToken): Promise; + sendRequest(type: RequestType, params: P, token?: CancellationToken): Promise; + /** + * Sends a request and returns a promise resolving to the result of the request. + * + * @param method the request's method name. + * @param token An optional cancellation token. + * @returns A promise resolving to the request's result. + */ + sendRequest(method: string, token?: CancellationToken): Promise; + /** + * Sends a request and returns a promise resolving to the result of the request. + * + * @param method the request's method name. + * @param params The request's parameter. + * @param token An optional cancellation token. + * @returns A promise resolving to the request's result. + */ + sendRequest(method: string, param: any, token?: CancellationToken): Promise; + /** + * Installs a request handler. + * + * @param type The request type to install the handler for. + * @param handler The actual handler. + */ + onRequest(type: ProtocolRequestType0, handler: RequestHandler0): Disposable; + onRequest(type: RequestType0, handler: RequestHandler0): Disposable; + /** + * Installs a request handler. + * + * @param type The request type to install the handler for. + * @param handler The actual handler. + */ + onRequest(type: ProtocolRequestType, handler: RequestHandler): Disposable; + onRequest(type: RequestType, handler: RequestHandler): Disposable; + /** + * Installs a request handler. + * + * @param methods The method name to install the handler for. + * @param handler The actual handler. + */ + onRequest(method: string, handler: GenericRequestHandler): Disposable; + /** + * Sends a notification. + * + * @param type the notification's type to send. + */ + sendNotification(type: NotificationType0): void; + sendNotification(type: ProtocolNotificationType0): void; + /** + * Sends a notification. + * + * @param type the notification's type to send. + * @param params the notification's parameters. + */ + sendNotification(type: ProtocolNotificationType, params?: P): void; + sendNotification

(type: NotificationType

, params?: P): void; + /** + * Sends a notification. + * + * @param method the notification's method name. + */ + sendNotification(method: string): void; + /** + * Sends a notification. + * + * @param method the notification's method name. + * @param params the notification's parameters. + */ + sendNotification(method: string, params: any): void; + /** + * Installs a notification handler. + * + * @param type The notification type to install the handler for. + * @param handler The actual handler. + */ + onNotification(type: ProtocolNotificationType0, handler: NotificationHandler0): Disposable; + onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable; + /** + * Installs a notification handler. + * + * @param type The notification type to install the handler for. + * @param handler The actual handler. + */ + onNotification(type: ProtocolNotificationType, handler: NotificationHandler

): Disposable; + onNotification

(type: NotificationType

, handler: NotificationHandler

): Disposable; + /** + * Installs a notification handler. + * + * @param methods The method name to install the handler for. + * @param handler The actual handler. + */ + onNotification(method: string, handler: GenericNotificationHandler): Disposable; + /** + * Installs a progress handler for a given token. + * @param type the progress type + * @param token the token + * @param handler the handler + */ + onProgress

(type: ProgressType

, token: string | number, handler: NotificationHandler

): Disposable; + /** + * Sends progress. + * @param type the progress type + * @param token the token to use + * @param value the progress value + */ + sendProgress

(type: ProgressType

, token: string | number, value: P): void; + /** + * Enables tracing mode for the connection. + */ + trace(value: Trace, tracer: Tracer, sendNotification?: boolean): void; + trace(value: Trace, tracer: Tracer, traceOptions?: TraceOptions): void; + /** + * An event emitter firing when an error occurs on the connection. + */ + onError: Event<[Error, Message | undefined, number | undefined]>; + /** + * An event emitter firing when the connection got closed. + */ + onClose: Event; + /** + * An event emiiter firing when the connection receives a notification that is not + * handled. + */ + onUnhandledNotification: Event; + /** + * An event emitter firing when the connection got disposed. + */ + onDispose: Event; + /** + * Ends the connection. + */ + end(): void; + /** + * Actively disposes the connection. + */ + dispose(): void; + /** + * Turns the connection into listening mode + */ + listen(): void; +} +export declare function createProtocolConnection(input: MessageReader, output: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/connection.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/connection.js" index a976227b1d8a5bc70e51427257830801298f6d9c..691d64706d9076e96f447fe2816b340e6c2b8918 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/connection.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/connection.js" @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:de2763b086ff3c0d66e9fd130c8bedd69c5d33fde8023e7a3d8fa2b97dcecb55 -size 892 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createProtocolConnection = void 0; +const vscode_jsonrpc_1 = require("vscode-jsonrpc"); +function createProtocolConnection(input, output, logger, options) { + if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) { + options = { connectionStrategy: options }; + } + return vscode_jsonrpc_1.createMessageConnection(input, output, logger, options); +} +exports.createProtocolConnection = createProtocolConnection; +//# sourceMappingURL=connection.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts" index 3cf7125f1c7187a73658ceca271b1a1b874122e3..cd8bf05aafb2c5778fd8f57756cd81a2d3d23c48 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts" @@ -1,3 +1,44 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f22230ec7c2b08a8f8dc110bacd30c910701cb7347b3129b9cf12f6e28130656 -size 1821 +import { RequestType, RequestType0, NotificationType, NotificationType0, ProgressType, _EM } from 'vscode-jsonrpc'; +export declare class RegistrationType { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly ____: [RO, _EM] | undefined; + readonly method: string; + constructor(method: string); +} +export declare class ProtocolRequestType0 extends RequestType0 implements ProgressType, RegistrationType { + /** + * Clients must not use these properties. They are here to ensure correct typing. + * in TypeScript + */ + readonly ___: [PR, RO, _EM] | undefined; + readonly ____: [RO, _EM] | undefined; + readonly _pr: PR | undefined; + constructor(method: string); +} +export declare class ProtocolRequestType extends RequestType implements ProgressType, RegistrationType { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly ___: [PR, RO, _EM] | undefined; + readonly ____: [RO, _EM] | undefined; + readonly _pr: PR | undefined; + constructor(method: string); +} +export declare class ProtocolNotificationType0 extends NotificationType0 implements RegistrationType { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly ___: [RO, _EM] | undefined; + readonly ____: [RO, _EM] | undefined; + constructor(method: string); +} +export declare class ProtocolNotificationType extends NotificationType

implements RegistrationType { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly ___: [RO, _EM] | undefined; + readonly ____: [RO, _EM] | undefined; + constructor(method: string); +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/messages.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/messages.js" index 37023218d8b5ce8dcecd11bbba8718b9e8b5d970..865e8f45e0cc5d15afa99ab6db98847236781403 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/messages.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/messages.js" @@ -1,3 +1,42 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:78a1240d3f2f9356b0f683c0baf571491f7644e897ae96f90090dd29d14960e6 -size 1780 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProtocolNotificationType = exports.ProtocolNotificationType0 = exports.ProtocolRequestType = exports.ProtocolRequestType0 = exports.RegistrationType = void 0; +const vscode_jsonrpc_1 = require("vscode-jsonrpc"); +class RegistrationType { + constructor(method) { + this.method = method; + } +} +exports.RegistrationType = RegistrationType; +class ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 { + constructor(method) { + super(method); + } +} +exports.ProtocolRequestType0 = ProtocolRequestType0; +class ProtocolRequestType extends vscode_jsonrpc_1.RequestType { + constructor(method) { + super(method, vscode_jsonrpc_1.ParameterStructures.byName); + } +} +exports.ProtocolRequestType = ProtocolRequestType; +class ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 { + constructor(method) { + super(method); + } +} +exports.ProtocolNotificationType0 = ProtocolNotificationType0; +class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType { + constructor(method) { + super(method, vscode_jsonrpc_1.ParameterStructures.byName); + } +} +exports.ProtocolNotificationType = ProtocolNotificationType; +// let x: ProtocolNotificationType; +// let y: ProtocolNotificationType; +// x = y; +//# sourceMappingURL=messages.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts" index aedc624f7182e802f64921a05aaa1c5543cacc97..db14d3674c0604367f1eafc5f74ff8e68ef116d5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts" @@ -1,3 +1,83 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1b85664bf562d2d216d71b940d8097600b4ed626f67528c868ced65dbe7288e6 -size 3343 +import { RequestHandler } from 'vscode-jsonrpc'; +import { CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } from 'vscode-languageserver-types'; +import { ProtocolRequestType } from './messages'; +import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +/** + * @since 3.16.0 + */ +export interface CallHierarchyClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + * return value for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; +} +/** + * Call hierarchy options used during static registration. + * + * @since 3.16.0 + */ +export interface CallHierarchyOptions extends WorkDoneProgressOptions { +} +/** + * Call hierarchy options used during static or dynamic registration. + * + * @since 3.16.0 + */ +export interface CallHierarchyRegistrationOptions extends TextDocumentRegistrationOptions, CallHierarchyOptions, StaticRegistrationOptions { +} +/** + * The parameter of a `textDocument/prepareCallHierarchy` request. + * + * @since 3.16.0 + */ +export interface CallHierarchyPrepareParams extends TextDocumentPositionParams, WorkDoneProgressParams { +} +/** + * A request to result a `CallHierarchyItem` in a document at a given position. + * Can be used as an input to a incoming or outgoing call hierarchy. + * + * @since 3.16.0 + */ +export declare namespace CallHierarchyPrepareRequest { + const method: 'textDocument/prepareCallHierarchy'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * The parameter of a `callHierarchy/incomingCalls` request. + * + * @since 3.16.0 + */ +export interface CallHierarchyIncomingCallsParams extends WorkDoneProgressParams, PartialResultParams { + item: CallHierarchyItem; +} +/** + * A request to resolve the incoming calls for a given `CallHierarchyItem`. + * + * @since 3.16.0 + */ +export declare namespace CallHierarchyIncomingCallsRequest { + const method: 'callHierarchy/incomingCalls'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * The parameter of a `callHierarchy/outgoingCalls` request. + * + * @since 3.16.0 + */ +export interface CallHierarchyOutgoingCallsParams extends WorkDoneProgressParams, PartialResultParams { + item: CallHierarchyItem; +} +/** + * A request to resolve the outgoing calls for a given `CallHierarchyItem`. + * + * @since 3.16.0 + */ +export declare namespace CallHierarchyOutgoingCallsRequest { + const method: 'callHierarchy/outgoingCalls'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js" index e97ccec1e3bb5ee535968848fc44a06837f01f5f..5bc74e7ed0bf09f9e0817970f1992594a7d99305 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js" @@ -1,3 +1,40 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e6b61f1cac523df807736ff146292cffa2e31526d64acfda39d17804a675ca7a -size 2262 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) TypeFox and others. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.CallHierarchyPrepareRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to result a `CallHierarchyItem` in a document at a given position. + * Can be used as an input to a incoming or outgoing call hierarchy. + * + * @since 3.16.0 + */ +var CallHierarchyPrepareRequest; +(function (CallHierarchyPrepareRequest) { + CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy'; + CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method); +})(CallHierarchyPrepareRequest = exports.CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = {})); +/** + * A request to resolve the incoming calls for a given `CallHierarchyItem`. + * + * @since 3.16.0 + */ +var CallHierarchyIncomingCallsRequest; +(function (CallHierarchyIncomingCallsRequest) { + CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls'; + CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method); +})(CallHierarchyIncomingCallsRequest = exports.CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = {})); +/** + * A request to resolve the outgoing calls for a given `CallHierarchyItem`. + * + * @since 3.16.0 + */ +var CallHierarchyOutgoingCallsRequest; +(function (CallHierarchyOutgoingCallsRequest) { + CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls'; + CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method); +})(CallHierarchyOutgoingCallsRequest = exports.CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = {})); +//# sourceMappingURL=protocol.callHierarchy.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts" index 7324897db08c4e33adc05e99171a78854c675831..9611520e9d95be7ca24e0fcd6661b3ea447f704f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts" @@ -1,3 +1,63 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:94d6422d3c3faf923fbdff1ce7457a25f9b0b55e8a2fe0fefa8bfa7a89cf6676 -size 2799 +import { RequestHandler } from 'vscode-jsonrpc'; +import { TextDocumentIdentifier, Range, Color, ColorInformation, ColorPresentation } from 'vscode-languageserver-types'; +import { ProtocolRequestType } from './messages'; +import { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +export interface DocumentColorClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `DocumentColorRegistrationOptions` return value + * for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; +} +export interface DocumentColorOptions extends WorkDoneProgressOptions { +} +export interface DocumentColorRegistrationOptions extends TextDocumentRegistrationOptions, StaticRegistrationOptions, DocumentColorOptions { +} +/** + * Parameters for a [DocumentColorRequest](#DocumentColorRequest). + */ +export interface DocumentColorParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; +} +/** + * A request to list all color symbols found in a given text document. The request's + * parameter is of type [DocumentColorParams](#DocumentColorParams) the + * response is of type [ColorInformation[]](#ColorInformation) or a Thenable + * that resolves to such. + */ +export declare namespace DocumentColorRequest { + const method: 'textDocument/documentColor'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * Parameters for a [ColorPresentationRequest](#ColorPresentationRequest). + */ +export interface ColorPresentationParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The color to request presentations for. + */ + color: Color; + /** + * The range where the color would be inserted. Serves as a context. + */ + range: Range; +} +/** + * A request to list all presentation for a color. The request's + * parameter is of type [ColorPresentationParams](#ColorPresentationParams) the + * response is of type [ColorInformation[]](#ColorInformation) or a Thenable + * that resolves to such. + */ +export declare namespace ColorPresentationRequest { + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js" index c80967bc6c01b49e159334f026714e69cd5fc2de..4ecf725dc775ffda69bee820990e459c95f0f6ef 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js" @@ -1,3 +1,30 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fb08adf89b6a05a202a48c7b2299028a23ad2b7d997671f83782000578703ca7 -size 1718 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ColorPresentationRequest = exports.DocumentColorRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to list all color symbols found in a given text document. The request's + * parameter is of type [DocumentColorParams](#DocumentColorParams) the + * response is of type [ColorInformation[]](#ColorInformation) or a Thenable + * that resolves to such. + */ +var DocumentColorRequest; +(function (DocumentColorRequest) { + DocumentColorRequest.method = 'textDocument/documentColor'; + DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method); +})(DocumentColorRequest = exports.DocumentColorRequest || (exports.DocumentColorRequest = {})); +/** + * A request to list all presentation for a color. The request's + * parameter is of type [ColorPresentationParams](#ColorPresentationParams) the + * response is of type [ColorInformation[]](#ColorInformation) or a Thenable + * that resolves to such. + */ +var ColorPresentationRequest; +(function (ColorPresentationRequest) { + ColorPresentationRequest.type = new messages_1.ProtocolRequestType('textDocument/colorPresentation'); +})(ColorPresentationRequest = exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {})); +//# sourceMappingURL=protocol.colorProvider.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts" index 0780d64be47af86fc8d8bf8707b2e339f2132eef..1a53e740653ab931283641d875748918a93e1f10 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts" @@ -1,3 +1,46 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4acc4bccbdec774c58992a87f3ac2731f9d38c821520d06b4d53911898d0e3ec -size 1698 +import { RequestHandler, HandlerResult, CancellationToken } from 'vscode-jsonrpc'; +import { ProtocolRequestType } from './messages'; +import { PartialResultParams } from './protocol'; +export interface ConfigurationClientCapabilities { + /** + * The workspace client capabilities + */ + workspace?: { + /** + * The client supports `workspace/configuration` requests. + * + * @since 3.6.0 + */ + configuration?: boolean; + }; +} +/** + * The 'workspace/configuration' request is sent from the server to the client to fetch a certain + * configuration setting. + * + * This pull model replaces the old push model were the client signaled configuration change via an + * event. If the server still needs to react to configuration changes (since the server caches the + * result of `workspace/configuration` requests) the server should register for an empty configuration + * change event and empty the cache if such an event is received. + */ +export declare namespace ConfigurationRequest { + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; + type MiddlewareSignature = (params: ConfigurationParams, token: CancellationToken, next: HandlerSignature) => HandlerResult; +} +export interface ConfigurationItem { + /** + * The scope to get the configuration section for. + */ + scopeUri?: string; + /** + * The configuration section asked for. + */ + section?: string; +} +/** + * The parameters of a configuration request. + */ +export interface ConfigurationParams { + items: ConfigurationItem[]; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js" index 5dfc602dd70d08fae082da249df777018fbeb2a5..e53621f3896dfa7dd7d4ded6191e009f5d41d5c4 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js" @@ -1,3 +1,22 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8b5c645cd26f0405f71785697565ca0bd976c1f74c3c1b9626f04763e2b34257 -size 1313 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ConfigurationRequest = void 0; +const messages_1 = require("./messages"); +/** + * The 'workspace/configuration' request is sent from the server to the client to fetch a certain + * configuration setting. + * + * This pull model replaces the old push model were the client signaled configuration change via an + * event. If the server still needs to react to configuration changes (since the server caches the + * result of `workspace/configuration` requests) the server should register for an empty configuration + * change event and empty the cache if such an event is received. + */ +var ConfigurationRequest; +(function (ConfigurationRequest) { + ConfigurationRequest.type = new messages_1.ProtocolRequestType('workspace/configuration'); +})(ConfigurationRequest = exports.ConfigurationRequest || (exports.ConfigurationRequest = {})); +//# sourceMappingURL=protocol.configuration.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts" index c44c7bf9020145a31a5d037cdb9358ae5f8f2c10..b00d1a1d4900240640bc27b6f7eaca1441df75e7 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts" @@ -1,3 +1,2688 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:60f5fe888f5364424f9cdf43eef013cdcd6827cbec1d6d20fa191f5ebe827afd -size 94075 +import { ProgressToken } from 'vscode-jsonrpc'; +import { ProtocolRequestType, ProtocolRequestType0, ProtocolNotificationType, ProtocolNotificationType0 } from './messages'; +import { Position, Range, Location, LocationLink, Diagnostic, Command, TextEdit, WorkspaceEdit, DocumentUri, TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, CompletionItem, CompletionList, Hover, SignatureHelp, ReferenceContext, DocumentHighlight, SymbolInformation, CodeLens, CodeActionContext, FormattingOptions, DocumentLink, MarkupKind, SymbolKind, CompletionItemKind, CodeAction, CodeActionKind, DocumentSymbol, CompletionItemTag, DiagnosticTag, SymbolTag, uinteger, integer, InsertTextMode } from 'vscode-languageserver-types'; +import { ImplementationRequest, ImplementationClientCapabilities, ImplementationOptions, ImplementationRegistrationOptions, ImplementationParams } from './protocol.implementation'; +import { TypeDefinitionRequest, TypeDefinitionClientCapabilities, TypeDefinitionOptions, TypeDefinitionRegistrationOptions, TypeDefinitionParams } from './protocol.typeDefinition'; +import { WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFolder, WorkspaceFoldersChangeEvent, WorkspaceFoldersInitializeParams, WorkspaceFoldersClientCapabilities, WorkspaceFoldersServerCapabilities } from './protocol.workspaceFolders'; +import { ConfigurationRequest, ConfigurationParams, ConfigurationItem, ConfigurationClientCapabilities } from './protocol.configuration'; +import { DocumentColorRequest, ColorPresentationRequest, DocumentColorOptions, DocumentColorParams, ColorPresentationParams, DocumentColorClientCapabilities, DocumentColorRegistrationOptions } from './protocol.colorProvider'; +import { FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeRegistrationOptions } from './protocol.foldingRange'; +import { DeclarationClientCapabilities, DeclarationRequest, DeclarationOptions, DeclarationRegistrationOptions, DeclarationParams } from './protocol.declaration'; +import { SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeRequest, SelectionRangeParams, SelectionRangeRegistrationOptions } from './protocol.selectionRange'; +import { WorkDoneProgressClientCapabilities, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, WorkDoneProgress, WorkDoneProgressCreateParams, WorkDoneProgressCreateRequest, WorkDoneProgressCancelParams, WorkDoneProgressCancelNotification } from './protocol.progress'; +import { CallHierarchyClientCapabilities, CallHierarchyOptions, CallHierarchyRegistrationOptions, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCallsRequest, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCallsRequest, CallHierarchyPrepareParams, CallHierarchyPrepareRequest } from './protocol.callHierarchy'; +import { SemanticTokenTypes, SemanticTokenModifiers, SemanticTokensLegend, SemanticTokens, SemanticTokensPartialResult, SemanticTokensEdit, SemanticTokensDelta, SemanticTokensDeltaPartialResult, TokenFormat, SemanticTokensClientCapabilities, SemanticTokensOptions, SemanticTokensRegistrationOptions, SemanticTokensParams, SemanticTokensRequest, SemanticTokensDeltaParams, SemanticTokensDeltaRequest, SemanticTokensRangeParams, SemanticTokensRangeRequest, SemanticTokensRefreshRequest, SemanticTokensWorkspaceClientCapabilities, SemanticTokensRegistrationType } from './protocol.semanticTokens'; +import { ShowDocumentParams, ShowDocumentResult, ShowDocumentRequest, ShowDocumentClientCapabilities } from './protocol.showDocument'; +import { LinkedEditingRangeClientCapabilities, LinkedEditingRanges, LinkedEditingRangeOptions, LinkedEditingRangeParams, LinkedEditingRangeRegistrationOptions, LinkedEditingRangeRequest } from './protocol.linkedEditingRange'; +import { FileOperationOptions, FileOperationClientCapabilities, FileOperationRegistrationOptions, FileOperationPatternOptions, FileOperationPatternKind, DidCreateFilesNotification, CreateFilesParams, FileCreate, WillCreateFilesRequest, DidRenameFilesNotification, RenameFilesParams, FileRename, WillRenameFilesRequest, DidDeleteFilesNotification, DeleteFilesParams, FileDelete, WillDeleteFilesRequest } from './protocol.fileOperations'; +import { UniquenessLevel, MonikerKind, Moniker, MonikerClientCapabilities, MonikerOptions, MonikerRegistrationOptions, MonikerParams, MonikerRequest } from './protocol.moniker'; +/** + * A document filter denotes a document by different properties like + * the [language](#TextDocument.languageId), the [scheme](#Uri.scheme) of + * its resource, or a glob-pattern that is applied to the [path](#TextDocument.fileName). + * + * Glob patterns can have the following syntax: + * - `*` to match one or more characters in a path segment + * - `?` to match on one character in a path segment + * - `**` to match any number of path segments, including none + * - `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files) + * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`) + * + * @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }` + * @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }` + */ +export declare type DocumentFilter = { + /** A language id, like `typescript`. */ + language: string; + /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */ + scheme?: string; + /** A glob pattern, like `*.{ts,js}`. */ + pattern?: string; +} | { + /** A language id, like `typescript`. */ + language?: string; + /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */ + scheme: string; + /** A glob pattern, like `*.{ts,js}`. */ + pattern?: string; +} | { + /** A language id, like `typescript`. */ + language?: string; + /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */ + scheme?: string; + /** A glob pattern, like `*.{ts,js}`. */ + pattern: string; +}; +/** + * The DocumentFilter namespace provides helper functions to work with + * [DocumentFilter](#DocumentFilter) literals. + */ +export declare namespace DocumentFilter { + function is(value: any): value is DocumentFilter; +} +/** + * A document selector is the combination of one or many document filters. + * + * @sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`; + * + * The use of a string as a document filter is deprecated @since 3.16.0. + */ +export declare type DocumentSelector = (string | DocumentFilter)[]; +/** + * The DocumentSelector namespace provides helper functions to work with + * [DocumentSelector](#DocumentSelector)s. + */ +export declare namespace DocumentSelector { + function is(value: any[] | undefined | null): value is DocumentSelector; +} +/** + * General parameters to to register for an notification or to register a provider. + */ +export interface Registration { + /** + * The id used to register the request. The id can be used to deregister + * the request again. + */ + id: string; + /** + * The method to register for. + */ + method: string; + /** + * Options necessary for the registration. + */ + registerOptions?: any; +} +export interface RegistrationParams { + registrations: Registration[]; +} +/** + * The `client/registerCapability` request is sent from the server to the client to register a new capability + * handler on the client side. + */ +export declare namespace RegistrationRequest { + const type: ProtocolRequestType; +} +/** + * General parameters to unregister a request or notification. + */ +export interface Unregistration { + /** + * The id used to unregister the request or notification. Usually an id + * provided during the register request. + */ + id: string; + /** + * The method to unregister for. + */ + method: string; +} +export interface UnregistrationParams { + unregisterations: Unregistration[]; +} +/** + * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability + * handler on the client side. + */ +export declare namespace UnregistrationRequest { + const type: ProtocolRequestType; +} +export interface WorkDoneProgressParams { + /** + * An optional token that a server can use to report work done progress. + */ + workDoneToken?: ProgressToken; +} +export interface PartialResultParams { + /** + * An optional token that a server can use to report partial results (e.g. streaming) to + * the client. + */ + partialResultToken?: ProgressToken; +} +/** + * A parameter literal used in requests to pass a text document and a position inside that + * document. + */ +export interface TextDocumentPositionParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The position inside the text document. + */ + position: Position; +} +/** + * The kind of resource operations supported by the client. + */ +export declare type ResourceOperationKind = 'create' | 'rename' | 'delete'; +export declare namespace ResourceOperationKind { + /** + * Supports creating new files and folders. + */ + const Create: ResourceOperationKind; + /** + * Supports renaming existing files and folders. + */ + const Rename: ResourceOperationKind; + /** + * Supports deleting existing files and folders. + */ + const Delete: ResourceOperationKind; +} +export declare type FailureHandlingKind = 'abort' | 'transactional' | 'undo' | 'textOnlyTransactional'; +export declare namespace FailureHandlingKind { + /** + * Applying the workspace change is simply aborted if one of the changes provided + * fails. All operations executed before the failing operation stay executed. + */ + const Abort: FailureHandlingKind; + /** + * All operations are executed transactional. That means they either all + * succeed or no changes at all are applied to the workspace. + */ + const Transactional: FailureHandlingKind; + /** + * If the workspace edit contains only textual file changes they are executed transactional. + * If resource changes (create, rename or delete file) are part of the change the failure + * handling strategy is abort. + */ + const TextOnlyTransactional: FailureHandlingKind; + /** + * The client tries to undo the operations already executed. But there is no + * guarantee that this is succeeding. + */ + const Undo: FailureHandlingKind; +} +/** + * Workspace specific client capabilities. + */ +export interface WorkspaceClientCapabilities { + /** + * The client supports applying batch edits + * to the workspace by supporting the request + * 'workspace/applyEdit' + */ + applyEdit?: boolean; + /** + * Capabilities specific to `WorkspaceEdit`s + */ + workspaceEdit?: WorkspaceEditClientCapabilities; + /** + * Capabilities specific to the `workspace/didChangeConfiguration` notification. + */ + didChangeConfiguration?: DidChangeConfigurationClientCapabilities; + /** + * Capabilities specific to the `workspace/didChangeWatchedFiles` notification. + */ + didChangeWatchedFiles?: DidChangeWatchedFilesClientCapabilities; + /** + * Capabilities specific to the `workspace/symbol` request. + */ + symbol?: WorkspaceSymbolClientCapabilities; + /** + * Capabilities specific to the `workspace/executeCommand` request. + */ + executeCommand?: ExecuteCommandClientCapabilities; + /** + * Capabilities specific to the semantic token requests scoped to the + * workspace. + * + * @since 3.16.0. + */ + semanticTokens?: SemanticTokensWorkspaceClientCapabilities; + /** + * Capabilities specific to the code lens requests scoped to the + * workspace. + * + * @since 3.16.0. + */ + codeLens?: CodeLensWorkspaceClientCapabilities; + /** + * The client has support for file notifications/requests for user operations on files. + * + * Since 3.16.0 + */ + fileOperations?: FileOperationClientCapabilities; +} +/** + * Text document specific client capabilities. + */ +export interface TextDocumentClientCapabilities { + /** + * Defines which synchronization capabilities the client supports. + */ + synchronization?: TextDocumentSyncClientCapabilities; + /** + * Capabilities specific to the `textDocument/completion` + */ + completion?: CompletionClientCapabilities; + /** + * Capabilities specific to the `textDocument/hover` + */ + hover?: HoverClientCapabilities; + /** + * Capabilities specific to the `textDocument/signatureHelp` + */ + signatureHelp?: SignatureHelpClientCapabilities; + /** + * Capabilities specific to the `textDocument/declaration` + * + * @since 3.14.0 + */ + declaration?: DeclarationClientCapabilities; + /** + * Capabilities specific to the `textDocument/definition` + */ + definition?: DefinitionClientCapabilities; + /** + * Capabilities specific to the `textDocument/typeDefinition` + * + * @since 3.6.0 + */ + typeDefinition?: TypeDefinitionClientCapabilities; + /** + * Capabilities specific to the `textDocument/implementation` + * + * @since 3.6.0 + */ + implementation?: ImplementationClientCapabilities; + /** + * Capabilities specific to the `textDocument/references` + */ + references?: ReferenceClientCapabilities; + /** + * Capabilities specific to the `textDocument/documentHighlight` + */ + documentHighlight?: DocumentHighlightClientCapabilities; + /** + * Capabilities specific to the `textDocument/documentSymbol` + */ + documentSymbol?: DocumentSymbolClientCapabilities; + /** + * Capabilities specific to the `textDocument/codeAction` + */ + codeAction?: CodeActionClientCapabilities; + /** + * Capabilities specific to the `textDocument/codeLens` + */ + codeLens?: CodeLensClientCapabilities; + /** + * Capabilities specific to the `textDocument/documentLink` + */ + documentLink?: DocumentLinkClientCapabilities; + /** + * Capabilities specific to the `textDocument/documentColor` + */ + colorProvider?: DocumentColorClientCapabilities; + /** + * Capabilities specific to the `textDocument/formatting` + */ + formatting?: DocumentFormattingClientCapabilities; + /** + * Capabilities specific to the `textDocument/rangeFormatting` + */ + rangeFormatting?: DocumentRangeFormattingClientCapabilities; + /** + * Capabilities specific to the `textDocument/onTypeFormatting` + */ + onTypeFormatting?: DocumentOnTypeFormattingClientCapabilities; + /** + * Capabilities specific to the `textDocument/rename` + */ + rename?: RenameClientCapabilities; + /** + * Capabilities specific to `textDocument/foldingRange` request. + * + * @since 3.10.0 + */ + foldingRange?: FoldingRangeClientCapabilities; + /** + * Capabilities specific to `textDocument/selectionRange` request. + * + * @since 3.15.0 + */ + selectionRange?: SelectionRangeClientCapabilities; + /** + * Capabilities specific to `textDocument/publishDiagnostics` notification. + */ + publishDiagnostics?: PublishDiagnosticsClientCapabilities; + /** + * Capabilities specific to the various call hierarchy request. + * + * @since 3.16.0 + */ + callHierarchy?: CallHierarchyClientCapabilities; + /** + * Capabilities specific to the various semantic token request. + * + * @since 3.16.0 + */ + semanticTokens?: SemanticTokensClientCapabilities; + /** + * Capabilities specific to the linked editing range request. + * + * @since 3.16.0 + */ + linkedEditingRange?: LinkedEditingRangeClientCapabilities; + /** + * Client capabilities specific to the moniker request. + * + * @since 3.16.0 + */ + moniker: MonikerClientCapabilities; +} +export interface WindowClientCapabilities { + /** + * Whether client supports handling progress notifications. If set + * servers are allowed to report in `workDoneProgress` property in the + * request specific server capabilities. + * + * @since 3.15.0 + */ + workDoneProgress?: boolean; + /** + * Capabilities specific to the showMessage request. + * + * @since 3.16.0 + */ + showMessage?: ShowMessageRequestClientCapabilities; + /** + * Capabilities specific to the showDocument request. + * + * @since 3.16.0 + */ + showDocument?: ShowDocumentClientCapabilities; +} +/** + * Client capabilities specific to regular expressions. + * + * @since 3.16.0 + */ +export interface RegularExpressionsClientCapabilities { + /** + * The engine's name. + */ + engine: string; + /** + * The engine's version. + */ + version?: string; +} +/** + * Client capabilities specific to the used markdown parser. + * + * @since 3.16.0 + */ +export interface MarkdownClientCapabilities { + /** + * The name of the parser. + */ + parser: string; + /** + * The version of the parser. + */ + version?: string; +} +/** + * General client capabilities. + * + * @since 3.16.0 + */ +export interface GeneralClientCapabilities { + /** + * Client capabilities specific to regular expressions. + * + * @since 3.16.0 + */ + regularExpressions?: RegularExpressionsClientCapabilities; + /** + * Client capabilities specific to the client's markdown parser. + * + * @since 3.16.0 + */ + markdown?: MarkdownClientCapabilities; +} +/** + * Defines the capabilities provided by the client. + */ +export interface _ClientCapabilities { + /** + * Workspace specific client capabilities. + */ + workspace?: WorkspaceClientCapabilities; + /** + * Text document specific client capabilities. + */ + textDocument?: TextDocumentClientCapabilities; + /** + * Window specific client capabilities. + */ + window?: WindowClientCapabilities; + /** + * General client capabilities. + * + * @since 3.16.0 + */ + general?: GeneralClientCapabilities; + /** + * Experimental client capabilities. + */ + experimental?: object; +} +export declare type ClientCapabilities = _ClientCapabilities & WorkspaceFoldersClientCapabilities & ConfigurationClientCapabilities & WorkDoneProgressClientCapabilities; +/** + * Static registration options to be returned in the initialize + * request. + */ +export interface StaticRegistrationOptions { + /** + * The id used to register the request. The id can be used to deregister + * the request again. See also Registration#id. + */ + id?: string; +} +/** + * The StaticRegistrationOptions namespace provides helper functions to work with + * [StaticRegistrationOptions](#StaticRegistrationOptions) literals. + */ +export declare namespace StaticRegistrationOptions { + function hasId(value: object): value is { + id: string; + }; +} +/** + * General text document registration options. + */ +export interface TextDocumentRegistrationOptions { + /** + * A document selector to identify the scope of the registration. If set to null + * the document selector provided on the client side will be used. + */ + documentSelector: DocumentSelector | null; +} +/** + * The TextDocumentRegistrationOptions namespace provides helper functions to work with + * [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals. + */ +export declare namespace TextDocumentRegistrationOptions { + function is(value: any): value is TextDocumentRegistrationOptions; +} +/** + * Save options. + */ +export interface SaveOptions { + /** + * The client is supposed to include the content on save. + */ + includeText?: boolean; +} +export interface WorkDoneProgressOptions { + workDoneProgress?: boolean; +} +/** + * The WorkDoneProgressOptions namespace provides helper functions to work with + * [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals. + */ +export declare namespace WorkDoneProgressOptions { + function is(value: any): value is WorkDoneProgressOptions; + function hasWorkDoneProgress(value: any): value is { + workDoneProgress: boolean; + }; +} +/** + * Defines the capabilities provided by a language + * server. + */ +export interface _ServerCapabilities { + /** + * Defines how text documents are synced. Is either a detailed structure defining each notification or + * for backwards compatibility the TextDocumentSyncKind number. + */ + textDocumentSync?: TextDocumentSyncOptions | TextDocumentSyncKind; + /** + * The server provides completion support. + */ + completionProvider?: CompletionOptions; + /** + * The server provides hover support. + */ + hoverProvider?: boolean | HoverOptions; + /** + * The server provides signature help support. + */ + signatureHelpProvider?: SignatureHelpOptions; + /** + * The server provides Goto Declaration support. + */ + declarationProvider?: boolean | DeclarationOptions | DeclarationRegistrationOptions; + /** + * The server provides goto definition support. + */ + definitionProvider?: boolean | DefinitionOptions; + /** + * The server provides Goto Type Definition support. + */ + typeDefinitionProvider?: boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions; + /** + * The server provides Goto Implementation support. + */ + implementationProvider?: boolean | ImplementationOptions | ImplementationRegistrationOptions; + /** + * The server provides find references support. + */ + referencesProvider?: boolean | ReferenceOptions; + /** + * The server provides document highlight support. + */ + documentHighlightProvider?: boolean | DocumentHighlightOptions; + /** + * The server provides document symbol support. + */ + documentSymbolProvider?: boolean | DocumentSymbolOptions; + /** + * The server provides code actions. CodeActionOptions may only be + * specified if the client states that it supports + * `codeActionLiteralSupport` in its initial `initialize` request. + */ + codeActionProvider?: boolean | CodeActionOptions; + /** + * The server provides code lens. + */ + codeLensProvider?: CodeLensOptions; + /** + * The server provides document link support. + */ + documentLinkProvider?: DocumentLinkOptions; + /** + * The server provides color provider support. + */ + colorProvider?: boolean | DocumentColorOptions | DocumentColorRegistrationOptions; + /** + * The server provides workspace symbol support. + */ + workspaceSymbolProvider?: boolean | WorkspaceSymbolOptions; + /** + * The server provides document formatting. + */ + documentFormattingProvider?: boolean | DocumentFormattingOptions; + /** + * The server provides document range formatting. + */ + documentRangeFormattingProvider?: boolean | DocumentRangeFormattingOptions; + /** + * The server provides document formatting on typing. + */ + documentOnTypeFormattingProvider?: DocumentOnTypeFormattingOptions; + /** + * The server provides rename support. RenameOptions may only be + * specified if the client states that it supports + * `prepareSupport` in its initial `initialize` request. + */ + renameProvider?: boolean | RenameOptions; + /** + * The server provides folding provider support. + */ + foldingRangeProvider?: boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions; + /** + * The server provides selection range support. + */ + selectionRangeProvider?: boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions; + /** + * The server provides execute command support. + */ + executeCommandProvider?: ExecuteCommandOptions; + /** + * The server provides call hierarchy support. + * + * @since 3.16.0 + */ + callHierarchyProvider?: boolean | CallHierarchyOptions | CallHierarchyRegistrationOptions; + /** + * The server provides linked editing range support. + * + * @since 3.16.0 + */ + linkedEditingRangeProvider?: boolean | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions; + /** + * The server provides semantic tokens support. + * + * @since 3.16.0 + */ + semanticTokensProvider?: SemanticTokensOptions | SemanticTokensRegistrationOptions; + /** + * Window specific server capabilities. + */ + workspace?: { + /** + * The server is interested in notifications/requests for operations on files. + * + * @since 3.16.0 + */ + fileOperations?: FileOperationOptions; + }; + /** + * The server provides moniker support. + * + * @since 3.16.0 + */ + monikerProvider?: boolean | MonikerOptions | MonikerRegistrationOptions; + /** + * Experimental server capabilities. + */ + experimental?: T; +} +export declare type ServerCapabilities = _ServerCapabilities & WorkspaceFoldersServerCapabilities; +/** + * The initialize request is sent from the client to the server. + * It is sent once as the request after starting up the server. + * The requests parameter is of type [InitializeParams](#InitializeParams) + * the response if of type [InitializeResult](#InitializeResult) of a Thenable that + * resolves to such. + */ +export declare namespace InitializeRequest { + const type: ProtocolRequestType<_InitializeParams & WorkspaceFoldersInitializeParams & WorkDoneProgressParams, InitializeResult, never, InitializeError, void>; +} +/** + * The initialize parameters + */ +export interface _InitializeParams extends WorkDoneProgressParams { + /** + * The process Id of the parent process that started + * the server. + */ + processId: integer | null; + /** + * Information about the client + * + * @since 3.15.0 + */ + clientInfo?: { + /** + * The name of the client as defined by the client. + */ + name: string; + /** + * The client's version as defined by the client. + */ + version?: string; + }; + /** + * The locale the client is currently showing the user interface + * in. This must not necessarily be the locale of the operating + * system. + * + * Uses IETF language tags as the value's syntax + * (See https://en.wikipedia.org/wiki/IETF_language_tag) + * + * @since 3.16.0 + */ + locale?: string; + /** + * The rootPath of the workspace. Is null + * if no folder is open. + * + * @deprecated in favour of rootUri. + */ + rootPath?: string | null; + /** + * The rootUri of the workspace. Is null if no + * folder is open. If both `rootPath` and `rootUri` are set + * `rootUri` wins. + * + * @deprecated in favour of workspaceFolders. + */ + rootUri: DocumentUri | null; + /** + * The capabilities provided by the client (editor or tool) + */ + capabilities: ClientCapabilities; + /** + * User provided initialization options. + */ + initializationOptions?: any; + /** + * The initial trace setting. If omitted trace is disabled ('off'). + */ + trace?: 'off' | 'messages' | 'verbose'; +} +export declare type InitializeParams = _InitializeParams & WorkspaceFoldersInitializeParams; +/** + * The result returned from an initialize request. + */ +export interface InitializeResult { + /** + * The capabilities the language server provides. + */ + capabilities: ServerCapabilities; + /** + * Information about the server. + * + * @since 3.15.0 + */ + serverInfo?: { + /** + * The name of the server as defined by the server. + */ + name: string; + /** + * The server's version as defined by the server. + */ + version?: string; + }; + /** + * Custom initialization results. + */ + [custom: string]: any; +} +/** + * Known error codes for an `InitializeError`; + */ +export declare namespace InitializeError { + /** + * If the protocol version provided by the client can't be handled by the server. + * @deprecated This initialize error got replaced by client capabilities. There is + * no version handshake in version 3.0x + */ + const unknownProtocolVersion: 1; +} +/** + * The data type of the ResponseError if the + * initialize request fails. + */ +export interface InitializeError { + /** + * Indicates whether the client execute the following retry logic: + * (1) show the message provided by the ResponseError to the user + * (2) user selects retry or cancel + * (3) if user selected retry the initialize method is sent again. + */ + retry: boolean; +} +export interface InitializedParams { +} +/** + * The initialized notification is sent from the client to the + * server after the client is fully initialized and the server + * is allowed to send requests from the server to the client. + */ +export declare namespace InitializedNotification { + const type: ProtocolNotificationType; +} +/** + * A shutdown request is sent from the client to the server. + * It is sent once when the client decides to shutdown the + * server. The only notification that is sent after a shutdown request + * is the exit event. + */ +export declare namespace ShutdownRequest { + const type: ProtocolRequestType0; +} +/** + * The exit event is sent from the client to the server to + * ask the server to exit its process. + */ +export declare namespace ExitNotification { + const type: ProtocolNotificationType0; +} +export interface DidChangeConfigurationClientCapabilities { + /** + * Did change configuration notification supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * The configuration change notification is sent from the client to the server + * when the client's configuration has changed. The notification contains + * the changed configuration as defined by the language client. + */ +export declare namespace DidChangeConfigurationNotification { + const type: ProtocolNotificationType; +} +export interface DidChangeConfigurationRegistrationOptions { + section?: string | string[]; +} +/** + * The parameters of a change configuration notification. + */ +export interface DidChangeConfigurationParams { + /** + * The actual changed settings + */ + settings: any; +} +/** + * The message type + */ +export declare namespace MessageType { + /** + * An error message. + */ + const Error = 1; + /** + * A warning message. + */ + const Warning = 2; + /** + * An information message. + */ + const Info = 3; + /** + * A log message. + */ + const Log = 4; +} +export declare type MessageType = 1 | 2 | 3 | 4; +/** + * The parameters of a notification message. + */ +export interface ShowMessageParams { + /** + * The message type. See {@link MessageType} + */ + type: MessageType; + /** + * The actual message + */ + message: string; +} +/** + * The show message notification is sent from a server to a client to ask + * the client to display a particular message in the user interface. + */ +export declare namespace ShowMessageNotification { + const type: ProtocolNotificationType; +} +/** + * Show message request client capabilities + */ +export interface ShowMessageRequestClientCapabilities { + /** + * Capabilities specific to the `MessageActionItem` type. + */ + messageActionItem?: { + /** + * Whether the client supports additional attributes which + * are preserved and send back to the server in the + * request's response. + */ + additionalPropertiesSupport?: boolean; + }; +} +export interface MessageActionItem { + /** + * A short title like 'Retry', 'Open Log' etc. + */ + title: string; + /** + * Additional attributes that the client preserves and + * sends back to the server. This depends on the client + * capability window.messageActionItem.additionalPropertiesSupport + */ + [key: string]: string | boolean | integer | object; +} +export interface ShowMessageRequestParams { + /** + * The message type. See {@link MessageType} + */ + type: MessageType; + /** + * The actual message + */ + message: string; + /** + * The message action items to present. + */ + actions?: MessageActionItem[]; +} +/** + * The show message request is sent from the server to the client to show a message + * and a set of options actions to the user. + */ +export declare namespace ShowMessageRequest { + const type: ProtocolRequestType; +} +/** + * The log message notification is sent from the server to the client to ask + * the client to log a particular message. + */ +export declare namespace LogMessageNotification { + const type: ProtocolNotificationType; +} +/** + * The log message parameters. + */ +export interface LogMessageParams { + /** + * The message type. See {@link MessageType} + */ + type: MessageType; + /** + * The actual message + */ + message: string; +} +/** + * The telemetry event notification is sent from the server to the client to ask + * the client to log telemetry data. + */ +export declare namespace TelemetryEventNotification { + const type: ProtocolNotificationType; +} +export interface TextDocumentSyncClientCapabilities { + /** + * Whether text document synchronization supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * The client supports sending will save notifications. + */ + willSave?: boolean; + /** + * The client supports sending a will save request and + * waits for a response providing text edits which will + * be applied to the document before it is saved. + */ + willSaveWaitUntil?: boolean; + /** + * The client supports did save notifications. + */ + didSave?: boolean; +} +/** + * Defines how the host (editor) should sync + * document changes to the language server. + */ +export declare namespace TextDocumentSyncKind { + /** + * Documents should not be synced at all. + */ + const None = 0; + /** + * Documents are synced by always sending the full content + * of the document. + */ + const Full = 1; + /** + * Documents are synced by sending the full content on open. + * After that only incremental updates to the document are + * send. + */ + const Incremental = 2; +} +export declare type TextDocumentSyncKind = 0 | 1 | 2; +export interface TextDocumentSyncOptions { + /** + * Open and close notifications are sent to the server. If omitted open close notification should not + * be sent. + */ + openClose?: boolean; + /** + * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full + * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None. + */ + change?: TextDocumentSyncKind; + /** + * If present will save notifications are sent to the server. If omitted the notification should not be + * sent. + */ + willSave?: boolean; + /** + * If present will save wait until requests are sent to the server. If omitted the request should not be + * sent. + */ + willSaveWaitUntil?: boolean; + /** + * If present save notifications are sent to the server. If omitted the notification should not be + * sent. + */ + save?: boolean | SaveOptions; +} +/** + * The parameters send in a open text document notification + */ +export interface DidOpenTextDocumentParams { + /** + * The document that was opened. + */ + textDocument: TextDocumentItem; +} +/** + * The document open notification is sent from the client to the server to signal + * newly opened text documents. The document's truth is now managed by the client + * and the server must not try to read the document's truth using the document's + * uri. Open in this sense means it is managed by the client. It doesn't necessarily + * mean that its content is presented in an editor. An open notification must not + * be sent more than once without a corresponding close notification send before. + * This means open and close notification must be balanced and the max open count + * is one. + */ +export declare namespace DidOpenTextDocumentNotification { + const method: 'textDocument/didOpen'; + const type: ProtocolNotificationType; +} +/** + * An event describing a change to a text document. If range and rangeLength are omitted + * the new text is considered to be the full content of the document. + */ +export declare type TextDocumentContentChangeEvent = { + /** + * The range of the document that changed. + */ + range: Range; + /** + * The optional length of the range that got replaced. + * + * @deprecated use range instead. + */ + rangeLength?: uinteger; + /** + * The new text for the provided range. + */ + text: string; +} | { + /** + * The new text of the whole document. + */ + text: string; +}; +export declare namespace TextDocumentContentChangeEvent { + /** + * Checks whether the information describes a delta event. + */ + function isIncremental(event: TextDocumentContentChangeEvent): event is { + range: Range; + rangeLength?: uinteger; + text: string; + }; + /** + * Checks whether the information describes a full replacement event. + */ + function isFull(event: TextDocumentContentChangeEvent): event is { + text: string; + }; +} +/** + * The change text document notification's parameters. + */ +export interface DidChangeTextDocumentParams { + /** + * The document that did change. The version number points + * to the version after all provided content changes have + * been applied. + */ + textDocument: VersionedTextDocumentIdentifier; + /** + * The actual content changes. The content changes describe single state changes + * to the document. So if there are two content changes c1 (at array index 0) and + * c2 (at array index 1) for a document in state S then c1 moves the document from + * S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed + * on the state S'. + * + * To mirror the content of a document using change events use the following approach: + * - start with the same initial content + * - apply the 'textDocument/didChange' notifications in the order you receive them. + * - apply the `TextDocumentContentChangeEvent`s in a single notification in the order + * you receive them. + */ + contentChanges: TextDocumentContentChangeEvent[]; +} +/** + * Describe options to be used when registered for text document change events. + */ +export interface TextDocumentChangeRegistrationOptions extends TextDocumentRegistrationOptions { + /** + * How documents are synced to the server. + */ + syncKind: TextDocumentSyncKind; +} +/** + * The document change notification is sent from the client to the server to signal + * changes to a text document. + */ +export declare namespace DidChangeTextDocumentNotification { + const method: 'textDocument/didChange'; + const type: ProtocolNotificationType; +} +/** + * The parameters send in a close text document notification + */ +export interface DidCloseTextDocumentParams { + /** + * The document that was closed. + */ + textDocument: TextDocumentIdentifier; +} +/** + * The document close notification is sent from the client to the server when + * the document got closed in the client. The document's truth now exists where + * the document's uri points to (e.g. if the document's uri is a file uri the + * truth now exists on disk). As with the open notification the close notification + * is about managing the document's content. Receiving a close notification + * doesn't mean that the document was open in an editor before. A close + * notification requires a previous open notification to be sent. + */ +export declare namespace DidCloseTextDocumentNotification { + const method: 'textDocument/didClose'; + const type: ProtocolNotificationType; +} +/** + * The parameters send in a save text document notification + */ +export interface DidSaveTextDocumentParams { + /** + * The document that was closed. + */ + textDocument: TextDocumentIdentifier; + /** + * Optional the content when saved. Depends on the includeText value + * when the save notification was requested. + */ + text?: string; +} +/** + * Save registration options. + */ +export interface TextDocumentSaveRegistrationOptions extends TextDocumentRegistrationOptions, SaveOptions { +} +/** + * The document save notification is sent from the client to the server when + * the document got saved in the client. + */ +export declare namespace DidSaveTextDocumentNotification { + const method: 'textDocument/didSave'; + const type: ProtocolNotificationType; +} +/** + * Represents reasons why a text document is saved. + */ +export declare namespace TextDocumentSaveReason { + /** + * Manually triggered, e.g. by the user pressing save, by starting debugging, + * or by an API call. + */ + const Manual: 1; + /** + * Automatic after a delay. + */ + const AfterDelay: 2; + /** + * When the editor lost focus. + */ + const FocusOut: 3; +} +export declare type TextDocumentSaveReason = 1 | 2 | 3; +/** + * The parameters send in a will save text document notification. + */ +export interface WillSaveTextDocumentParams { + /** + * The document that will be saved. + */ + textDocument: TextDocumentIdentifier; + /** + * The 'TextDocumentSaveReason'. + */ + reason: TextDocumentSaveReason; +} +/** + * A document will save notification is sent from the client to the server before + * the document is actually saved. + */ +export declare namespace WillSaveTextDocumentNotification { + const method: 'textDocument/willSave'; + const type: ProtocolNotificationType; +} +/** + * A document will save request is sent from the client to the server before + * the document is actually saved. The request can return an array of TextEdits + * which will be applied to the text document before it is saved. Please note that + * clients might drop results if computing the text edits took too long or if a + * server constantly fails on this request. This is done to keep the save fast and + * reliable. + */ +export declare namespace WillSaveTextDocumentWaitUntilRequest { + const method: 'textDocument/willSaveWaitUntil'; + const type: ProtocolRequestType; +} +export interface DidChangeWatchedFilesClientCapabilities { + /** + * Did change watched files notification supports dynamic registration. Please note + * that the current protocol doesn't support static configuration for file changes + * from the server side. + */ + dynamicRegistration?: boolean; +} +/** + * The watched files notification is sent from the client to the server when + * the client detects changes to file watched by the language client. + */ +export declare namespace DidChangeWatchedFilesNotification { + const type: ProtocolNotificationType; +} +/** + * The watched files change notification's parameters. + */ +export interface DidChangeWatchedFilesParams { + /** + * The actual file events. + */ + changes: FileEvent[]; +} +/** + * The file event type + */ +export declare namespace FileChangeType { + /** + * The file got created. + */ + const Created = 1; + /** + * The file got changed. + */ + const Changed = 2; + /** + * The file got deleted. + */ + const Deleted = 3; +} +export declare type FileChangeType = 1 | 2 | 3; +/** + * An event describing a file change. + */ +export interface FileEvent { + /** + * The file's uri. + */ + uri: DocumentUri; + /** + * The change type. + */ + type: FileChangeType; +} +/** + * Describe options to be used when registered for text document change events. + */ +export interface DidChangeWatchedFilesRegistrationOptions { + /** + * The watchers to register. + */ + watchers: FileSystemWatcher[]; +} +export interface FileSystemWatcher { + /** + * The glob pattern to watch. Glob patterns can have the following syntax: + * - `*` to match one or more characters in a path segment + * - `?` to match on one character in a path segment + * - `**` to match any number of path segments, including none + * - `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files) + * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`) + */ + globPattern: string; + /** + * The kind of events of interest. If omitted it defaults + * to WatchKind.Create | WatchKind.Change | WatchKind.Delete + * which is 7. + */ + kind?: uinteger; +} +export declare namespace WatchKind { + /** + * Interested in create events. + */ + const Create = 1; + /** + * Interested in change events + */ + const Change = 2; + /** + * Interested in delete events + */ + const Delete = 4; +} +/** + * The publish diagnostic client capabilities. + */ +export interface PublishDiagnosticsClientCapabilities { + /** + * Whether the clients accepts diagnostics with related information. + */ + relatedInformation?: boolean; + /** + * Client supports the tag property to provide meta data about a diagnostic. + * Clients supporting tags have to handle unknown tags gracefully. + * + * @since 3.15.0 + */ + tagSupport?: { + /** + * The tags supported by the client. + */ + valueSet: DiagnosticTag[]; + }; + /** + * Whether the client interprets the version property of the + * `textDocument/publishDiagnostics` notification`s parameter. + * + * @since 3.15.0 + */ + versionSupport?: boolean; + /** + * Client supports a codeDescription property + * + * @since 3.16.0 + */ + codeDescriptionSupport?: boolean; + /** + * Whether code action supports the `data` property which is + * preserved between a `textDocument/publishDiagnostics` and + * `textDocument/codeAction` request. + * + * @since 3.16.0 + */ + dataSupport?: boolean; +} +/** + * The publish diagnostic notification's parameters. + */ +export interface PublishDiagnosticsParams { + /** + * The URI for which diagnostic information is reported. + */ + uri: DocumentUri; + /** + * Optional the version number of the document the diagnostics are published for. + * + * @since 3.15.0 + */ + version?: integer; + /** + * An array of diagnostic information items. + */ + diagnostics: Diagnostic[]; +} +/** + * Diagnostics notification are sent from the server to the client to signal + * results of validation runs. + */ +export declare namespace PublishDiagnosticsNotification { + const type: ProtocolNotificationType; +} +/** + * Completion client capabilities + */ +export interface CompletionClientCapabilities { + /** + * Whether completion supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * The client supports the following `CompletionItem` specific + * capabilities. + */ + completionItem?: { + /** + * Client supports snippets as insert text. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Placeholders with equal identifiers are linked, + * that is typing in one will update others too. + */ + snippetSupport?: boolean; + /** + * Client supports commit characters on a completion item. + */ + commitCharactersSupport?: boolean; + /** + * Client supports the follow content formats for the documentation + * property. The order describes the preferred format of the client. + */ + documentationFormat?: MarkupKind[]; + /** + * Client supports the deprecated property on a completion item. + */ + deprecatedSupport?: boolean; + /** + * Client supports the preselect property on a completion item. + */ + preselectSupport?: boolean; + /** + * Client supports to kee + */ + /** + * Client supports the tag property on a completion item. Clients supporting + * tags have to handle unknown tags gracefully. Clients especially need to + * preserve unknown tags when sending a completion item back to the server in + * a resolve call. + * + * @since 3.15.0 + */ + tagSupport?: { + /** + * The tags supported by the client. + */ + valueSet: CompletionItemTag[]; + }; + /** + * Client support insert replace edit to control different behavior if a + * completion item is inserted in the text or should replace text. + * + * @since 3.16.0 + */ + insertReplaceSupport?: boolean; + /** + * Indicates which properties a client can resolve lazily on a completion + * item. Before version 3.16.0 only the predefined properties `documentation` + * and `details` could be resolved lazily. + * + * @since 3.16.0 + */ + resolveSupport?: { + /** + * The properties that a client can resolve lazily. + */ + properties: string[]; + }; + /** + * The client supports the `insertTextMode` property on + * a completion item to override the whitespace handling mode + * as defined by the client (see `insertTextMode`). + * + * @since 3.16.0 + */ + insertTextModeSupport?: { + valueSet: InsertTextMode[]; + }; + }; + completionItemKind?: { + /** + * The completion item kind values the client supports. When this + * property exists the client also guarantees that it will + * handle values outside its set gracefully and falls back + * to a default value when unknown. + * + * If this property is not present the client only supports + * the completion items kinds from `Text` to `Reference` as defined in + * the initial version of the protocol. + */ + valueSet?: CompletionItemKind[]; + }; + /** + * Defines how the client handles whitespace and indentation + * when accepting a completion item that uses multi line + * text in either `insertText` or `textEdit`. + * + * @since 3.16.0 + */ + insertTextMode?: InsertTextMode; + /** + * The client supports to send additional context information for a + * `textDocument/completion` request. + */ + contextSupport?: boolean; +} +/** + * How a completion was triggered + */ +export declare namespace CompletionTriggerKind { + /** + * Completion was triggered by typing an identifier (24x7 code + * complete), manual invocation (e.g Ctrl+Space) or via API. + */ + const Invoked: 1; + /** + * Completion was triggered by a trigger character specified by + * the `triggerCharacters` properties of the `CompletionRegistrationOptions`. + */ + const TriggerCharacter: 2; + /** + * Completion was re-triggered as current completion list is incomplete + */ + const TriggerForIncompleteCompletions: 3; +} +export declare type CompletionTriggerKind = 1 | 2 | 3; +/** + * Contains additional information about the context in which a completion request is triggered. + */ +export interface CompletionContext { + /** + * How the completion was triggered. + */ + triggerKind: CompletionTriggerKind; + /** + * The trigger character (a single character) that has trigger code complete. + * Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter` + */ + triggerCharacter?: string; +} +/** + * Completion parameters + */ +export interface CompletionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { + /** + * The completion context. This is only available it the client specifies + * to send this using the client capability `textDocument.completion.contextSupport === true` + */ + context?: CompletionContext; +} +/** + * Completion options. + */ +export interface CompletionOptions extends WorkDoneProgressOptions { + /** + * Most tools trigger completion request automatically without explicitly requesting + * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user + * starts to type an identifier. For example if the user types `c` in a JavaScript file + * code complete will automatically pop up present `console` besides others as a + * completion item. Characters that make up identifiers don't need to be listed here. + * + * If code complete should automatically be trigger on characters not being valid inside + * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`. + */ + triggerCharacters?: string[]; + /** + * The list of all possible characters that commit a completion. This field can be used + * if clients don't support individual commit characters per completion item. See + * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport` + * + * If a server provides both `allCommitCharacters` and commit characters on an individual + * completion item the ones on the completion item win. + * + * @since 3.2.0 + */ + allCommitCharacters?: string[]; + /** + * The server provides support to resolve additional + * information for a completion item. + */ + resolveProvider?: boolean; +} +/** + * Registration options for a [CompletionRequest](#CompletionRequest). + */ +export interface CompletionRegistrationOptions extends TextDocumentRegistrationOptions, CompletionOptions { +} +/** + * Request to request completion at a given text document position. The request's + * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response + * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList) + * or a Thenable that resolves to such. + * + * The request can delay the computation of the [`detail`](#CompletionItem.detail) + * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve` + * request. However, properties that are needed for the initial sorting and filtering, like `sortText`, + * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve. + */ +export declare namespace CompletionRequest { + const method: 'textDocument/completion'; + const type: ProtocolRequestType; +} +/** + * Request to resolve additional information for a given completion item.The request's + * parameter is of type [CompletionItem](#CompletionItem) the response + * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such. + */ +export declare namespace CompletionResolveRequest { + const method: 'completionItem/resolve'; + const type: ProtocolRequestType; +} +export interface HoverClientCapabilities { + /** + * Whether hover supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Client supports the follow content formats for the content + * property. The order describes the preferred format of the client. + */ + contentFormat?: MarkupKind[]; +} +/** + * Hover options. + */ +export interface HoverOptions extends WorkDoneProgressOptions { +} +/** + * Parameters for a [HoverRequest](#HoverRequest). + */ +export interface HoverParams extends TextDocumentPositionParams, WorkDoneProgressParams { +} +/** + * Registration options for a [HoverRequest](#HoverRequest). + */ +export interface HoverRegistrationOptions extends TextDocumentRegistrationOptions, HoverOptions { +} +/** + * Request to request hover information at a given text document position. The request's + * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of + * type [Hover](#Hover) or a Thenable that resolves to such. + */ +export declare namespace HoverRequest { + const method: 'textDocument/hover'; + const type: ProtocolRequestType; +} +/** + * Client Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest). + */ +export interface SignatureHelpClientCapabilities { + /** + * Whether signature help supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * The client supports the following `SignatureInformation` + * specific properties. + */ + signatureInformation?: { + /** + * Client supports the follow content formats for the documentation + * property. The order describes the preferred format of the client. + */ + documentationFormat?: MarkupKind[]; + /** + * Client capabilities specific to parameter information. + */ + parameterInformation?: { + /** + * The client supports processing label offsets instead of a + * simple label string. + * + * @since 3.14.0 + */ + labelOffsetSupport?: boolean; + }; + /** + * The client support the `activeParameter` property on `SignatureInformation` + * literal. + * + * @since 3.16.0 + */ + activeParameterSupport?: boolean; + }; + /** + * The client supports to send additional context information for a + * `textDocument/signatureHelp` request. A client that opts into + * contextSupport will also support the `retriggerCharacters` on + * `SignatureHelpOptions`. + * + * @since 3.15.0 + */ + contextSupport?: boolean; +} +/** + * Server Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest). + */ +export interface SignatureHelpOptions extends WorkDoneProgressOptions { + /** + * List of characters that trigger signature help. + */ + triggerCharacters?: string[]; + /** + * List of characters that re-trigger signature help. + * + * These trigger characters are only active when signature help is already showing. All trigger characters + * are also counted as re-trigger characters. + * + * @since 3.15.0 + */ + retriggerCharacters?: string[]; +} +/** + * How a signature help was triggered. + * + * @since 3.15.0 + */ +export declare namespace SignatureHelpTriggerKind { + /** + * Signature help was invoked manually by the user or by a command. + */ + const Invoked: 1; + /** + * Signature help was triggered by a trigger character. + */ + const TriggerCharacter: 2; + /** + * Signature help was triggered by the cursor moving or by the document content changing. + */ + const ContentChange: 3; +} +export declare type SignatureHelpTriggerKind = 1 | 2 | 3; +/** + * Additional information about the context in which a signature help request was triggered. + * + * @since 3.15.0 + */ +export interface SignatureHelpContext { + /** + * Action that caused signature help to be triggered. + */ + triggerKind: SignatureHelpTriggerKind; + /** + * Character that caused signature help to be triggered. + * + * This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter` + */ + triggerCharacter?: string; + /** + * `true` if signature help was already showing when it was triggered. + * + * Retrigger occurs when the signature help is already active and can be caused by actions such as + * typing a trigger character, a cursor move, or document content changes. + */ + isRetrigger: boolean; + /** + * The currently active `SignatureHelp`. + * + * The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on + * the user navigating through available signatures. + */ + activeSignatureHelp?: SignatureHelp; +} +/** + * Parameters for a [SignatureHelpRequest](#SignatureHelpRequest). + */ +export interface SignatureHelpParams extends TextDocumentPositionParams, WorkDoneProgressParams { + /** + * The signature help context. This is only available if the client specifies + * to send this using the client capability `textDocument.signatureHelp.contextSupport === true` + * + * @since 3.15.0 + */ + context?: SignatureHelpContext; +} +/** + * Registration options for a [SignatureHelpRequest](#SignatureHelpRequest). + */ +export interface SignatureHelpRegistrationOptions extends TextDocumentRegistrationOptions, SignatureHelpOptions { +} +export declare namespace SignatureHelpRequest { + const method: 'textDocument/signatureHelp'; + const type: ProtocolRequestType; +} +/** + * Client Capabilities for a [DefinitionRequest](#DefinitionRequest). + */ +export interface DefinitionClientCapabilities { + /** + * Whether definition supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * The client supports additional metadata in the form of definition links. + * + * @since 3.14.0 + */ + linkSupport?: boolean; +} +/** + * Server Capabilities for a [DefinitionRequest](#DefinitionRequest). + */ +export interface DefinitionOptions extends WorkDoneProgressOptions { +} +/** + * Parameters for a [DefinitionRequest](#DefinitionRequest). + */ +export interface DefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * Registration options for a [DefinitionRequest](#DefinitionRequest). + */ +export interface DefinitionRegistrationOptions extends TextDocumentRegistrationOptions, DefinitionOptions { +} +/** + * A request to resolve the definition location of a symbol at a given text + * document position. The request's parameter is of type [TextDocumentPosition] + * (#TextDocumentPosition) the response is of either type [Definition](#Definition) + * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves + * to such. + */ +export declare namespace DefinitionRequest { + const method: 'textDocument/definition'; + const type: ProtocolRequestType; +} +/** + * Client Capabilities for a [ReferencesRequest](#ReferencesRequest). + */ +export interface ReferenceClientCapabilities { + /** + * Whether references supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * Parameters for a [ReferencesRequest](#ReferencesRequest). + */ +export interface ReferenceParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { + context: ReferenceContext; +} +/** + * Reference options. + */ +export interface ReferenceOptions extends WorkDoneProgressOptions { +} +/** + * Registration options for a [ReferencesRequest](#ReferencesRequest). + */ +export interface ReferenceRegistrationOptions extends TextDocumentRegistrationOptions, ReferenceOptions { +} +/** + * A request to resolve project-wide references for the symbol denoted + * by the given text document position. The request's parameter is of + * type [ReferenceParams](#ReferenceParams) the response is of type + * [Location[]](#Location) or a Thenable that resolves to such. + */ +export declare namespace ReferencesRequest { + const method: 'textDocument/references'; + const type: ProtocolRequestType; +} +/** + * Client Capabilities for a [DocumentHighlightRequest](#DocumentHighlightRequest). + */ +export interface DocumentHighlightClientCapabilities { + /** + * Whether document highlight supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * Parameters for a [DocumentHighlightRequest](#DocumentHighlightRequest). + */ +export interface DocumentHighlightParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * Provider options for a [DocumentHighlightRequest](#DocumentHighlightRequest). + */ +export interface DocumentHighlightOptions extends WorkDoneProgressOptions { +} +/** + * Registration options for a [DocumentHighlightRequest](#DocumentHighlightRequest). + */ +export interface DocumentHighlightRegistrationOptions extends TextDocumentRegistrationOptions, DocumentHighlightOptions { +} +/** + * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given + * text document position. The request's parameter is of type [TextDocumentPosition] + * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]] + * (#DocumentHighlight) or a Thenable that resolves to such. + */ +export declare namespace DocumentHighlightRequest { + const method: 'textDocument/documentHighlight'; + const type: ProtocolRequestType; +} +/** + * Client Capabilities for a [DocumentSymbolRequest](#DocumentSymbolRequest). + */ +export interface DocumentSymbolClientCapabilities { + /** + * Whether document symbol supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Specific capabilities for the `SymbolKind`. + */ + symbolKind?: { + /** + * The symbol kind values the client supports. When this + * property exists the client also guarantees that it will + * handle values outside its set gracefully and falls back + * to a default value when unknown. + * + * If this property is not present the client only supports + * the symbol kinds from `File` to `Array` as defined in + * the initial version of the protocol. + */ + valueSet?: SymbolKind[]; + }; + /** + * The client support hierarchical document symbols. + */ + hierarchicalDocumentSymbolSupport?: boolean; + /** + * The client supports tags on `SymbolInformation`. Tags are supported on + * `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. + * Clients supporting tags have to handle unknown tags gracefully. + * + * @since 3.16.0 + */ + tagSupport?: { + /** + * The tags supported by the client. + */ + valueSet: SymbolTag[]; + }; + /** + * The client supports an additional label presented in the UI when + * registering a document symbol provider. + * + * @since 3.16.0 + */ + labelSupport?: boolean; +} +/** + * Parameters for a [DocumentSymbolRequest](#DocumentSymbolRequest). + */ +export interface DocumentSymbolParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; +} +/** + * Provider options for a [DocumentSymbolRequest](#DocumentSymbolRequest). + */ +export interface DocumentSymbolOptions extends WorkDoneProgressOptions { + /** + * A human-readable string that is shown when multiple outlines trees + * are shown for the same document. + * + * @since 3.16.0 + */ + label?: string; +} +/** + * Registration options for a [DocumentSymbolRequest](#DocumentSymbolRequest). + */ +export interface DocumentSymbolRegistrationOptions extends TextDocumentRegistrationOptions, DocumentSymbolOptions { +} +/** + * A request to list all symbols found in a given text document. The request's + * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the + * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable + * that resolves to such. + */ +export declare namespace DocumentSymbolRequest { + const method: 'textDocument/documentSymbol'; + const type: ProtocolRequestType; +} +/** + * The Client Capabilities of a [CodeActionRequest](#CodeActionRequest). + */ +export interface CodeActionClientCapabilities { + /** + * Whether code action supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * The client support code action literals of type `CodeAction` as a valid + * response of the `textDocument/codeAction` request. If the property is not + * set the request can only return `Command` literals. + * + * @since 3.8.0 + */ + codeActionLiteralSupport?: { + /** + * The code action kind is support with the following value + * set. + */ + codeActionKind: { + /** + * The code action kind values the client supports. When this + * property exists the client also guarantees that it will + * handle values outside its set gracefully and falls back + * to a default value when unknown. + */ + valueSet: CodeActionKind[]; + }; + }; + /** + * Whether code action supports the `isPreferred` property. + * + * @since 3.15.0 + */ + isPreferredSupport?: boolean; + /** + * Whether code action supports the `disabled` property. + * + * @since 3.16.0 + */ + disabledSupport?: boolean; + /** + * Whether code action supports the `data` property which is + * preserved between a `textDocument/codeAction` and a + * `codeAction/resolve` request. + * + * @since 3.16.0 + */ + dataSupport?: boolean; + /** + * Whether the client support resolving additional code action + * properties via a separate `codeAction/resolve` request. + * + * @since 3.16.0 + */ + resolveSupport?: { + /** + * The properties that a client can resolve lazily. + */ + properties: string[]; + }; + /** + * Whether th client honors the change annotations in + * text edits and resource operations returned via the + * `CodeAction#edit` property by for example presenting + * the workspace edit in the user interface and asking + * for confirmation. + * + * @since 3.16.0 + */ + honorsChangeAnnotations?: boolean; +} +/** + * The parameters of a [CodeActionRequest](#CodeActionRequest). + */ +export interface CodeActionParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The document in which the command was invoked. + */ + textDocument: TextDocumentIdentifier; + /** + * The range for which the command was invoked. + */ + range: Range; + /** + * Context carrying additional information. + */ + context: CodeActionContext; +} +/** + * Provider options for a [CodeActionRequest](#CodeActionRequest). + */ +export interface CodeActionOptions extends WorkDoneProgressOptions { + /** + * CodeActionKinds that this server may return. + * + * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server + * may list out every specific kind they provide. + */ + codeActionKinds?: CodeActionKind[]; + /** + * The server provides support to resolve additional + * information for a code action. + * + * @since 3.16.0 + */ + resolveProvider?: boolean; +} +/** + * Registration options for a [CodeActionRequest](#CodeActionRequest). + */ +export interface CodeActionRegistrationOptions extends TextDocumentRegistrationOptions, CodeActionOptions { +} +/** + * A request to provide commands for the given text document and range. + */ +export declare namespace CodeActionRequest { + const method: 'textDocument/codeAction'; + const type: ProtocolRequestType; +} +/** + * Request to resolve additional information for a given code action.The request's + * parameter is of type [CodeAction](#CodeAction) the response + * is of type [CodeAction](#CodeAction) or a Thenable that resolves to such. + */ +export declare namespace CodeActionResolveRequest { + const method: 'codeAction/resolve'; + const type: ProtocolRequestType; +} +/** + * Client capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest). + */ +export interface WorkspaceSymbolClientCapabilities { + /** + * Symbol request supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request. + */ + symbolKind?: { + /** + * The symbol kind values the client supports. When this + * property exists the client also guarantees that it will + * handle values outside its set gracefully and falls back + * to a default value when unknown. + * + * If this property is not present the client only supports + * the symbol kinds from `File` to `Array` as defined in + * the initial version of the protocol. + */ + valueSet?: SymbolKind[]; + }; + /** + * The client supports tags on `SymbolInformation`. + * Clients supporting tags have to handle unknown tags gracefully. + * + * @since 3.16.0 + */ + tagSupport?: { + /** + * The tags supported by the client. + */ + valueSet: SymbolTag[]; + }; +} +/** + * The parameters of a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest). + */ +export interface WorkspaceSymbolParams extends WorkDoneProgressParams, PartialResultParams { + /** + * A query string to filter symbols by. Clients may send an empty + * string here to request all symbols. + */ + query: string; +} +/** + * Server capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest). + */ +export interface WorkspaceSymbolOptions extends WorkDoneProgressOptions { +} +/** + * Registration options for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest). + */ +export interface WorkspaceSymbolRegistrationOptions extends WorkspaceSymbolOptions { +} +/** + * A request to list project-wide symbols matching the query string given + * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is + * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that + * resolves to such. + */ +export declare namespace WorkspaceSymbolRequest { + const method: 'workspace/symbol'; + const type: ProtocolRequestType; +} +/** + * The client capabilities of a [CodeLensRequest](#CodeLensRequest). + */ +export interface CodeLensClientCapabilities { + /** + * Whether code lens supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * @since 3.16.0 + */ +export interface CodeLensWorkspaceClientCapabilities { + /** + * Whether the client implementation supports a refresh request sent from the + * server to the client. + * + * Note that this event is global and will force the client to refresh all + * code lenses currently shown. It should be used with absolute care and is + * useful for situation where a server for example detect a project wide + * change that requires such a calculation. + */ + refreshSupport?: boolean; +} +/** + * The parameters of a [CodeLensRequest](#CodeLensRequest). + */ +export interface CodeLensParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The document to request code lens for. + */ + textDocument: TextDocumentIdentifier; +} +/** + * Code Lens provider options of a [CodeLensRequest](#CodeLensRequest). + */ +export interface CodeLensOptions extends WorkDoneProgressOptions { + /** + * Code lens has a resolve provider as well. + */ + resolveProvider?: boolean; +} +/** + * Registration options for a [CodeLensRequest](#CodeLensRequest). + */ +export interface CodeLensRegistrationOptions extends TextDocumentRegistrationOptions, CodeLensOptions { +} +/** + * A request to provide code lens for the given text document. + */ +export declare namespace CodeLensRequest { + const method: 'textDocument/codeLens'; + const type: ProtocolRequestType; +} +/** + * A request to resolve a command for a given code lens. + */ +export declare namespace CodeLensResolveRequest { + const method: 'codeLens/resolve'; + const type: ProtocolRequestType; +} +/** + * A request to refresh all code actions + * + * @since 3.16.0 + */ +export declare namespace CodeLensRefreshRequest { + const method: `workspace/codeLens/refresh`; + const type: ProtocolRequestType0; +} +/** + * The client capabilities of a [DocumentLinkRequest](#DocumentLinkRequest). + */ +export interface DocumentLinkClientCapabilities { + /** + * Whether document link supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Whether the client support the `tooltip` property on `DocumentLink`. + * + * @since 3.15.0 + */ + tooltipSupport?: boolean; +} +/** + * The parameters of a [DocumentLinkRequest](#DocumentLinkRequest). + */ +export interface DocumentLinkParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The document to provide document links for. + */ + textDocument: TextDocumentIdentifier; +} +/** + * Provider options for a [DocumentLinkRequest](#DocumentLinkRequest). + */ +export interface DocumentLinkOptions extends WorkDoneProgressOptions { + /** + * Document links have a resolve provider as well. + */ + resolveProvider?: boolean; +} +/** + * Registration options for a [DocumentLinkRequest](#DocumentLinkRequest). + */ +export interface DocumentLinkRegistrationOptions extends TextDocumentRegistrationOptions, DocumentLinkOptions { +} +/** + * A request to provide document links + */ +export declare namespace DocumentLinkRequest { + const method: 'textDocument/documentLink'; + const type: ProtocolRequestType; +} +/** + * Request to resolve additional information for a given document link. The request's + * parameter is of type [DocumentLink](#DocumentLink) the response + * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such. + */ +export declare namespace DocumentLinkResolveRequest { + const method: 'documentLink/resolve'; + const type: ProtocolRequestType; +} +/** + * Client capabilities of a [DocumentFormattingRequest](#DocumentFormattingRequest). + */ +export interface DocumentFormattingClientCapabilities { + /** + * Whether formatting supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * The parameters of a [DocumentFormattingRequest](#DocumentFormattingRequest). + */ +export interface DocumentFormattingParams extends WorkDoneProgressParams { + /** + * The document to format. + */ + textDocument: TextDocumentIdentifier; + /** + * The format options + */ + options: FormattingOptions; +} +/** + * Provider options for a [DocumentFormattingRequest](#DocumentFormattingRequest). + */ +export interface DocumentFormattingOptions extends WorkDoneProgressOptions { +} +/** + * Registration options for a [DocumentFormattingRequest](#DocumentFormattingRequest). + */ +export interface DocumentFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentFormattingOptions { +} +/** + * A request to to format a whole document. + */ +export declare namespace DocumentFormattingRequest { + const method: 'textDocument/formatting'; + const type: ProtocolRequestType; +} +/** + * Client capabilities of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest). + */ +export interface DocumentRangeFormattingClientCapabilities { + /** + * Whether range formatting supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * The parameters of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest). + */ +export interface DocumentRangeFormattingParams extends WorkDoneProgressParams { + /** + * The document to format. + */ + textDocument: TextDocumentIdentifier; + /** + * The range to format + */ + range: Range; + /** + * The format options + */ + options: FormattingOptions; +} +/** + * Provider options for a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest). + */ +export interface DocumentRangeFormattingOptions extends WorkDoneProgressOptions { +} +/** + * Registration options for a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest). + */ +export interface DocumentRangeFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentRangeFormattingOptions { +} +/** + * A request to to format a range in a document. + */ +export declare namespace DocumentRangeFormattingRequest { + const method: 'textDocument/rangeFormatting'; + const type: ProtocolRequestType; +} +/** + * Client capabilities of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest). + */ +export interface DocumentOnTypeFormattingClientCapabilities { + /** + * Whether on type formatting supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * The parameters of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest). + */ +export interface DocumentOnTypeFormattingParams { + /** + * The document to format. + */ + textDocument: TextDocumentIdentifier; + /** + * The position at which this request was send. + */ + position: Position; + /** + * The character that has been typed. + */ + ch: string; + /** + * The format options. + */ + options: FormattingOptions; +} +/** + * Provider options for a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest). + */ +export interface DocumentOnTypeFormattingOptions { + /** + * A character on which formatting should be triggered, like `}`. + */ + firstTriggerCharacter: string; + /** + * More trigger characters. + */ + moreTriggerCharacter?: string[]; +} +/** + * Registration options for a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest). + */ +export interface DocumentOnTypeFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentOnTypeFormattingOptions { +} +/** + * A request to format a document on type. + */ +export declare namespace DocumentOnTypeFormattingRequest { + const method: 'textDocument/onTypeFormatting'; + const type: ProtocolRequestType; +} +export declare namespace PrepareSupportDefaultBehavior { + /** + * The client's default behavior is to select the identifier + * according the to language's syntax rule. + */ + const Identifier: 1; +} +export declare type PrepareSupportDefaultBehavior = 1; +export interface RenameClientCapabilities { + /** + * Whether rename supports dynamic registration. + */ + dynamicRegistration?: boolean; + /** + * Client supports testing for validity of rename operations + * before execution. + * + * @since 3.12.0 + */ + prepareSupport?: boolean; + /** + * Client supports the default behavior result. + * + * The value indicates the default behavior used by the + * client. + * + * @since 3.16.0 + */ + prepareSupportDefaultBehavior?: PrepareSupportDefaultBehavior; + /** + * Whether th client honors the change annotations in + * text edits and resource operations returned via the + * rename request's workspace edit by for example presenting + * the workspace edit in the user interface and asking + * for confirmation. + * + * @since 3.16.0 + */ + honorsChangeAnnotations?: boolean; +} +/** + * The parameters of a [RenameRequest](#RenameRequest). + */ +export interface RenameParams extends WorkDoneProgressParams { + /** + * The document to rename. + */ + textDocument: TextDocumentIdentifier; + /** + * The position at which this request was sent. + */ + position: Position; + /** + * The new name of the symbol. If the given name is not valid the + * request must return a [ResponseError](#ResponseError) with an + * appropriate message set. + */ + newName: string; +} +/** + * Provider options for a [RenameRequest](#RenameRequest). + */ +export interface RenameOptions extends WorkDoneProgressOptions { + /** + * Renames should be checked and tested before being executed. + * + * @since version 3.12.0 + */ + prepareProvider?: boolean; +} +/** + * Registration options for a [RenameRequest](#RenameRequest). + */ +export interface RenameRegistrationOptions extends TextDocumentRegistrationOptions, RenameOptions { +} +/** + * A request to rename a symbol. + */ +export declare namespace RenameRequest { + const method: 'textDocument/rename'; + const type: ProtocolRequestType; +} +export interface PrepareRenameParams extends TextDocumentPositionParams, WorkDoneProgressParams { +} +/** + * A request to test and perform the setup necessary for a rename. + * + * @since 3.16 - support for default behavior + */ +export declare namespace PrepareRenameRequest { + const method: 'textDocument/prepareRename'; + const type: ProtocolRequestType; +} +/** + * The client capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest). + */ +export interface ExecuteCommandClientCapabilities { + /** + * Execute command supports dynamic registration. + */ + dynamicRegistration?: boolean; +} +/** + * The parameters of a [ExecuteCommandRequest](#ExecuteCommandRequest). + */ +export interface ExecuteCommandParams extends WorkDoneProgressParams { + /** + * The identifier of the actual command handler. + */ + command: string; + /** + * Arguments that the command should be invoked with. + */ + arguments?: any[]; +} +/** + * The server capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest). + */ +export interface ExecuteCommandOptions extends WorkDoneProgressOptions { + /** + * The commands to be executed on the server + */ + commands: string[]; +} +/** + * Registration options for a [ExecuteCommandRequest](#ExecuteCommandRequest). + */ +export interface ExecuteCommandRegistrationOptions extends ExecuteCommandOptions { +} +/** + * A request send from the client to the server to execute a command. The request might return + * a workspace edit which the client will apply to the workspace. + */ +export declare namespace ExecuteCommandRequest { + const type: ProtocolRequestType; +} +export interface WorkspaceEditClientCapabilities { + /** + * The client supports versioned document changes in `WorkspaceEdit`s + */ + documentChanges?: boolean; + /** + * The resource operations the client supports. Clients should at least + * support 'create', 'rename' and 'delete' files and folders. + * + * @since 3.13.0 + */ + resourceOperations?: ResourceOperationKind[]; + /** + * The failure handling strategy of a client if applying the workspace edit + * fails. + * + * @since 3.13.0 + */ + failureHandling?: FailureHandlingKind; + /** + * Whether the client normalizes line endings to the client specific + * setting. + * If set to `true` the client will normalize line ending characters + * in a workspace edit containing to the client specific new line + * character. + * + * @since 3.16.0 + */ + normalizesLineEndings?: boolean; + /** + * Whether the client in general supports change annotations on text edits, + * create file, rename file and delete file changes. + * + * @since 3.16.0 + */ + changeAnnotationSupport?: { + /** + * Whether the client groups edits with equal labels into tree nodes, + * for instance all edits labelled with "Changes in Strings" would + * be a tree node. + */ + groupsOnLabel?: boolean; + }; +} +/** + * The parameters passed via a apply workspace edit request. + */ +export interface ApplyWorkspaceEditParams { + /** + * An optional label of the workspace edit. This label is + * presented in the user interface for example on an undo + * stack to undo the workspace edit. + */ + label?: string; + /** + * The edits to apply. + */ + edit: WorkspaceEdit; +} +/** + * A response returned from the apply workspace edit request. + */ +export interface ApplyWorkspaceEditResponse { + /** + * Indicates whether the edit was applied or not. + */ + applied: boolean; + /** + * An optional textual description for why the edit was not applied. + * This may be used by the server for diagnostic logging or to provide + * a suitable error for a request that triggered the edit. + */ + failureReason?: string; + /** + * Depending on the client's failure handling strategy `failedChange` might + * contain the index of the change that failed. This property is only available + * if the client signals a `failureHandlingStrategy` in its client capabilities. + */ + failedChange?: uinteger; +} +/** + * A request sent from the server to the client to modified certain resources. + */ +export declare namespace ApplyWorkspaceEditRequest { + const type: ProtocolRequestType; +} +export { ImplementationRequest, ImplementationParams, ImplementationRegistrationOptions, ImplementationOptions, TypeDefinitionRequest, TypeDefinitionParams, TypeDefinitionRegistrationOptions, TypeDefinitionOptions, WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFolder, WorkspaceFoldersChangeEvent, ConfigurationRequest, ConfigurationParams, ConfigurationItem, DocumentColorRequest, ColorPresentationRequest, DocumentColorOptions, DocumentColorParams, ColorPresentationParams, DocumentColorRegistrationOptions, FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeRegistrationOptions, DeclarationClientCapabilities, DeclarationRequest, DeclarationParams, DeclarationRegistrationOptions, DeclarationOptions, SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeParams, SelectionRangeRequest, SelectionRangeRegistrationOptions, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, WorkDoneProgress, WorkDoneProgressCreateParams, WorkDoneProgressCreateRequest, WorkDoneProgressCancelParams, WorkDoneProgressCancelNotification, CallHierarchyClientCapabilities, CallHierarchyOptions, CallHierarchyRegistrationOptions, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCallsRequest, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCallsRequest, CallHierarchyPrepareParams, CallHierarchyPrepareRequest, SemanticTokenTypes, SemanticTokenModifiers, SemanticTokensLegend, SemanticTokens, SemanticTokensPartialResult, SemanticTokensEdit, SemanticTokensDelta, SemanticTokensDeltaPartialResult, TokenFormat, SemanticTokensClientCapabilities, SemanticTokensOptions, SemanticTokensRegistrationOptions, SemanticTokensParams, SemanticTokensRequest, SemanticTokensDeltaParams, SemanticTokensDeltaRequest, SemanticTokensRangeParams, SemanticTokensRangeRequest, SemanticTokensRefreshRequest, SemanticTokensRegistrationType, ShowDocumentParams, ShowDocumentRequest, ShowDocumentResult, ShowDocumentClientCapabilities, LinkedEditingRangeClientCapabilities, LinkedEditingRanges, LinkedEditingRangeOptions, LinkedEditingRangeParams, LinkedEditingRangeRegistrationOptions, LinkedEditingRangeRequest, FileOperationOptions, FileOperationClientCapabilities, FileOperationRegistrationOptions, FileOperationPatternOptions, FileOperationPatternKind, DidCreateFilesNotification, CreateFilesParams, FileCreate, WillCreateFilesRequest, DidRenameFilesNotification, RenameFilesParams, FileRename, WillRenameFilesRequest, DidDeleteFilesNotification, DeleteFilesParams, FileDelete, WillDeleteFilesRequest, UniquenessLevel, MonikerKind, Moniker, MonikerClientCapabilities, MonikerOptions, MonikerRegistrationOptions, MonikerParams, MonikerRequest }; +export { DocumentColorOptions as ColorProviderOptions, DocumentColorOptions as ColorOptions, FoldingRangeOptions as FoldingRangeProviderOptions, SelectionRangeOptions as SelectionRangeProviderOptions, DocumentColorRegistrationOptions as ColorRegistrationOptions }; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts" index 1846df01fa6e3f9d1c8ce8d10371b3d4e7547e54..6234ad7bb517c18aadeaab09ddc9acecf94d6017 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts" @@ -1,3 +1,37 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0eef4cf077011e3d1839dfb93ab894cd611cf552c26eb995c822e8d9b71d93a1 -size 1919 +import { RequestHandler } from 'vscode-jsonrpc'; +import { Declaration, DeclarationLink, Location, LocationLink } from 'vscode-languageserver-types'; +import { ProtocolRequestType } from './messages'; +import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +/** + * @since 3.14.0 + */ +export interface DeclarationClientCapabilities { + /** + * Whether declaration supports dynamic registration. If this is set to `true` + * the client supports the new `DeclarationRegistrationOptions` return value + * for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; + /** + * The client supports additional metadata in the form of declaration links. + */ + linkSupport?: boolean; +} +export interface DeclarationOptions extends WorkDoneProgressOptions { +} +export interface DeclarationRegistrationOptions extends DeclarationOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions { +} +export interface DeclarationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * A request to resolve the type definition locations of a symbol at a given text + * document position. The request's parameter is of type [TextDocumentPositioParams] + * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration) + * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves + * to such. + */ +export declare namespace DeclarationRequest { + const method: 'textDocument/declaration'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js" index f3695a21eec6fdb3654de46e190361c321b9a930..b2347defce31f9beba6ce79ca4b7676bd385de92 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js" @@ -1,3 +1,23 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e7b23357aa6fd2b16eeee479ebb842477f0726a2e7d8667220163b35f8b74184 -size 1299 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DeclarationRequest = void 0; +const messages_1 = require("./messages"); +// @ts-ignore: to avoid inlining LocatioLink as dynamic import +let __noDynamicImport; +/** + * A request to resolve the type definition locations of a symbol at a given text + * document position. The request's parameter is of type [TextDocumentPositioParams] + * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration) + * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves + * to such. + */ +var DeclarationRequest; +(function (DeclarationRequest) { + DeclarationRequest.method = 'textDocument/declaration'; + DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method); +})(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {})); +//# sourceMappingURL=protocol.declaration.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts" index c922729d573d93b73cd18bab9fcfd6b83063b673..b6bf7d3bca1d251e17e81bfd31b2471a6c11f406 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts" @@ -1,3 +1,293 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5bee6b675b1a0ece9d5082d438e923f112343685d4bc54b20a4dfbed09dbe323 -size 8902 +import { NotificationHandler, RequestHandler } from 'vscode-jsonrpc'; +import { WorkspaceEdit } from 'vscode-languageserver-types'; +import { ProtocolNotificationType, ProtocolRequestType } from './messages'; +/** + * Options for notifications/requests for user operations on files. + * + * @since 3.16.0 + */ +export interface FileOperationOptions { + /** + * The server is interested in didCreateFiles notifications. + */ + didCreate?: FileOperationRegistrationOptions; + /** + * The server is interested in willCreateFiles requests. + */ + willCreate?: FileOperationRegistrationOptions; + /** + * The server is interested in didRenameFiles notifications. + */ + didRename?: FileOperationRegistrationOptions; + /** + * The server is interested in willRenameFiles requests. + */ + willRename?: FileOperationRegistrationOptions; + /** + * The server is interested in didDeleteFiles file notifications. + */ + didDelete?: FileOperationRegistrationOptions; + /** + * The server is interested in willDeleteFiles file requests. + */ + willDelete?: FileOperationRegistrationOptions; +} +/** + * The options to register for file operations. + * + * @since 3.16.0 + */ +export interface FileOperationRegistrationOptions { + /** + * The actual filters. + */ + filters: FileOperationFilter[]; +} +/** + * A pattern kind describing if a glob pattern matches a file a folder or + * both. + * + * @since 3.16.0 + */ +export declare namespace FileOperationPatternKind { + /** + * The pattern matches a file only. + */ + const file: 'file'; + /** + * The pattern matches a folder only. + */ + const folder: 'folder'; +} +export declare type FileOperationPatternKind = 'file' | 'folder'; +/** + * Matching options for the file operation pattern. + * + * @since 3.16.0 + */ +export interface FileOperationPatternOptions { + /** + * The pattern should be matched ignoring casing. + */ + ignoreCase?: boolean; +} +/** + * A pattern to describe in which file operation requests or notifications + * the server is interested in. + * + * @since 3.16.0 + */ +interface FileOperationPattern { + /** + * The glob pattern to match. Glob patterns can have the following syntax: + * - `*` to match one or more characters in a path segment + * - `?` to match on one character in a path segment + * - `**` to match any number of path segments, including none + * - `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files) + * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`) + */ + glob: string; + /** + * Whether to match files or folders with this pattern. + * + * Matches both if undefined. + */ + matches?: FileOperationPatternKind; + /** + * Additional options used during matching. + */ + options?: FileOperationPatternOptions; +} +/** + * A filter to describe in which file operation requests or notifications + * the server is interested in. + * + * @since 3.16.0 + */ +export interface FileOperationFilter { + /** + * A Uri like `file` or `untitled`. + */ + scheme?: string; + /** + * The actual file operation pattern. + */ + pattern: FileOperationPattern; +} +/** + * Capabilities relating to events from file operations by the user in the client. + * + * These events do not come from the file system, they come from user operations + * like renaming a file in the UI. + * + * @since 3.16.0 + */ +export interface FileOperationClientCapabilities { + /** + * Whether the client supports dynamic registration for file requests/notifications. + */ + dynamicRegistration?: boolean; + /** + * The client has support for sending didCreateFiles notifications. + */ + didCreate?: boolean; + /** + * The client has support for willCreateFiles requests. + */ + willCreate?: boolean; + /** + * The client has support for sending didRenameFiles notifications. + */ + didRename?: boolean; + /** + * The client has support for willRenameFiles requests. + */ + willRename?: boolean; + /** + * The client has support for sending didDeleteFiles notifications. + */ + didDelete?: boolean; + /** + * The client has support for willDeleteFiles requests. + */ + willDelete?: boolean; +} +/** + * The parameters sent in file create requests/notifications. + * + * @since 3.16.0 + */ +export interface CreateFilesParams { + /** + * An array of all files/folders created in this operation. + */ + files: FileCreate[]; +} +/** + * Represents information on a file/folder create. + * + * @since 3.16.0 + */ +export interface FileCreate { + /** + * A file:// URI for the location of the file/folder being created. + */ + uri: string; +} +/** + * The parameters sent in file rename requests/notifications. + * + * @since 3.16.0 + */ +export interface RenameFilesParams { + /** + * An array of all files/folders renamed in this operation. When a folder is renamed, only + * the folder will be included, and not its children. + */ + files: FileRename[]; +} +/** + * Represents information on a file/folder rename. + * + * @since 3.16.0 + */ +export interface FileRename { + /** + * A file:// URI for the original location of the file/folder being renamed. + */ + oldUri: string; + /** + * A file:// URI for the new location of the file/folder being renamed. + */ + newUri: string; +} +/** + * The parameters sent in file delete requests/notifications. + * + * @since 3.16.0 + */ +export interface DeleteFilesParams { + /** + * An array of all files/folders deleted in this operation. + */ + files: FileDelete[]; +} +/** + * Represents information on a file/folder delete. + * + * @since 3.16.0 + */ +export interface FileDelete { + /** + * A file:// URI for the location of the file/folder being deleted. + */ + uri: string; +} +/** + * The will create files request is sent from the client to the server before files are actually + * created as long as the creation is triggered from within the client. + * + * @since 3.16.0 + */ +export declare namespace WillCreateFilesRequest { + const method: 'workspace/willCreateFiles'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * The did create files notification is sent from the client to the server when + * files were created from within the client. + * + * @since 3.16.0 + */ +export declare namespace DidCreateFilesNotification { + const method: 'workspace/didCreateFiles'; + const type: ProtocolNotificationType; + type HandlerSignature = NotificationHandler; +} +/** + * The will rename files request is sent from the client to the server before files are actually + * renamed as long as the rename is triggered from within the client. + * + * @since 3.16.0 + */ +export declare namespace WillRenameFilesRequest { + const method: 'workspace/willRenameFiles'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * The did rename files notification is sent from the client to the server when + * files were renamed from within the client. + * + * @since 3.16.0 + */ +export declare namespace DidRenameFilesNotification { + const method: 'workspace/didRenameFiles'; + const type: ProtocolNotificationType; + type HandlerSignature = NotificationHandler; +} +/** + * The will delete files request is sent from the client to the server before files are actually + * deleted as long as the deletion is triggered from within the client. + * + * @since 3.16.0 + */ +export declare namespace DidDeleteFilesNotification { + const method: 'workspace/didDeleteFiles'; + const type: ProtocolNotificationType; + type HandlerSignature = NotificationHandler; +} +/** + * The did delete files notification is sent from the client to the server when + * files were deleted from within the client. + * + * @since 3.16.0 + */ +export declare namespace WillDeleteFilesRequest { + const method: 'workspace/willDeleteFiles'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js" index 2b5078cf1e89d5752b5d332dc0a564907c9de16c..f35dadb61ee667c068a2d2557c7471494732dcb1 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js" @@ -1,3 +1,92 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d4d7ed24cf9a303fc0acdad3ea4427a3f0407b57b9c77b568d4c13d0b055e13d -size 4424 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.DidRenameFilesNotification = exports.WillRenameFilesRequest = exports.DidCreateFilesNotification = exports.WillCreateFilesRequest = exports.FileOperationPatternKind = void 0; +const messages_1 = require("./messages"); +/** + * A pattern kind describing if a glob pattern matches a file a folder or + * both. + * + * @since 3.16.0 + */ +var FileOperationPatternKind; +(function (FileOperationPatternKind) { + /** + * The pattern matches a file only. + */ + FileOperationPatternKind.file = 'file'; + /** + * The pattern matches a folder only. + */ + FileOperationPatternKind.folder = 'folder'; +})(FileOperationPatternKind = exports.FileOperationPatternKind || (exports.FileOperationPatternKind = {})); +/** + * The will create files request is sent from the client to the server before files are actually + * created as long as the creation is triggered from within the client. + * + * @since 3.16.0 + */ +var WillCreateFilesRequest; +(function (WillCreateFilesRequest) { + WillCreateFilesRequest.method = 'workspace/willCreateFiles'; + WillCreateFilesRequest.type = new messages_1.ProtocolRequestType(WillCreateFilesRequest.method); +})(WillCreateFilesRequest = exports.WillCreateFilesRequest || (exports.WillCreateFilesRequest = {})); +/** + * The did create files notification is sent from the client to the server when + * files were created from within the client. + * + * @since 3.16.0 + */ +var DidCreateFilesNotification; +(function (DidCreateFilesNotification) { + DidCreateFilesNotification.method = 'workspace/didCreateFiles'; + DidCreateFilesNotification.type = new messages_1.ProtocolNotificationType(DidCreateFilesNotification.method); +})(DidCreateFilesNotification = exports.DidCreateFilesNotification || (exports.DidCreateFilesNotification = {})); +/** + * The will rename files request is sent from the client to the server before files are actually + * renamed as long as the rename is triggered from within the client. + * + * @since 3.16.0 + */ +var WillRenameFilesRequest; +(function (WillRenameFilesRequest) { + WillRenameFilesRequest.method = 'workspace/willRenameFiles'; + WillRenameFilesRequest.type = new messages_1.ProtocolRequestType(WillRenameFilesRequest.method); +})(WillRenameFilesRequest = exports.WillRenameFilesRequest || (exports.WillRenameFilesRequest = {})); +/** + * The did rename files notification is sent from the client to the server when + * files were renamed from within the client. + * + * @since 3.16.0 + */ +var DidRenameFilesNotification; +(function (DidRenameFilesNotification) { + DidRenameFilesNotification.method = 'workspace/didRenameFiles'; + DidRenameFilesNotification.type = new messages_1.ProtocolNotificationType(DidRenameFilesNotification.method); +})(DidRenameFilesNotification = exports.DidRenameFilesNotification || (exports.DidRenameFilesNotification = {})); +/** + * The will delete files request is sent from the client to the server before files are actually + * deleted as long as the deletion is triggered from within the client. + * + * @since 3.16.0 + */ +var DidDeleteFilesNotification; +(function (DidDeleteFilesNotification) { + DidDeleteFilesNotification.method = 'workspace/didDeleteFiles'; + DidDeleteFilesNotification.type = new messages_1.ProtocolNotificationType(DidDeleteFilesNotification.method); +})(DidDeleteFilesNotification = exports.DidDeleteFilesNotification || (exports.DidDeleteFilesNotification = {})); +/** + * The did delete files notification is sent from the client to the server when + * files were deleted from within the client. + * + * @since 3.16.0 + */ +var WillDeleteFilesRequest; +(function (WillDeleteFilesRequest) { + WillDeleteFilesRequest.method = 'workspace/willDeleteFiles'; + WillDeleteFilesRequest.type = new messages_1.ProtocolRequestType(WillDeleteFilesRequest.method); +})(WillDeleteFilesRequest = exports.WillDeleteFilesRequest || (exports.WillDeleteFilesRequest = {})); +//# sourceMappingURL=protocol.fileOperations.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts" index 8e0d0827d0a9edd065f81af3761102f9588e7474..38fc42361902b0f790ea051d0ae655617b608a75 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts" @@ -1,3 +1,63 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1c775cb43c5edae0a7b4a5e543c07baab07f751e5cccc60a22c5bc3f6e38309c -size 2518 +import { RequestHandler } from 'vscode-jsonrpc'; +import { TextDocumentIdentifier, uinteger, FoldingRange } from 'vscode-languageserver-types'; +import { ProtocolRequestType } from './messages'; +import { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +export interface FoldingRangeClientCapabilities { + /** + * Whether implementation supports dynamic registration for folding range providers. If this is set to `true` + * the client supports the new `FoldingRangeRegistrationOptions` return value for the corresponding server + * capability as well. + */ + dynamicRegistration?: boolean; + /** + * The maximum number of folding ranges that the client prefers to receive per document. The value serves as a + * hint, servers are free to follow the limit. + */ + rangeLimit?: uinteger; + /** + * If set, the client signals that it only supports folding complete lines. If set, client will + * ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange. + */ + lineFoldingOnly?: boolean; +} +export interface FoldingRangeOptions extends WorkDoneProgressOptions { +} +export interface FoldingRangeRegistrationOptions extends TextDocumentRegistrationOptions, FoldingRangeOptions, StaticRegistrationOptions { +} +/** + * Enum of known range kinds + */ +export declare enum FoldingRangeKind { + /** + * Folding range for a comment + */ + Comment = "comment", + /** + * Folding range for a imports or includes + */ + Imports = "imports", + /** + * Folding range for a region (e.g. `#region`) + */ + Region = "region" +} +/** + * Parameters for a [FoldingRangeRequest](#FoldingRangeRequest). + */ +export interface FoldingRangeParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; +} +/** + * A request to provide folding ranges in a document. The request's + * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the + * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable + * that resolves to such. + */ +export declare namespace FoldingRangeRequest { + const method: 'textDocument/foldingRange'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js" index 49a97651f7098dd670f13c9969c6e8104193454e..5bd0e8361ae62c0850401b6f46ce728e6bb217ab 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js" @@ -1,3 +1,38 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7d947acbd94f87ccbcdc99318b3591aedf77776cbc58b5bf29ab946307f5c458 -size 1630 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FoldingRangeRequest = exports.FoldingRangeKind = void 0; +const messages_1 = require("./messages"); +/** + * Enum of known range kinds + */ +var FoldingRangeKind; +(function (FoldingRangeKind) { + /** + * Folding range for a comment + */ + FoldingRangeKind["Comment"] = "comment"; + /** + * Folding range for a imports or includes + */ + FoldingRangeKind["Imports"] = "imports"; + /** + * Folding range for a region (e.g. `#region`) + */ + FoldingRangeKind["Region"] = "region"; +})(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {})); +/** + * A request to provide folding ranges in a document. The request's + * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the + * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable + * that resolves to such. + */ +var FoldingRangeRequest; +(function (FoldingRangeRequest) { + FoldingRangeRequest.method = 'textDocument/foldingRange'; + FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method); +})(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {})); +//# sourceMappingURL=protocol.foldingRange.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts" index 625f92f4bd04be7b1a9fc7475c69f7318e5cd6d1..5b2b242b8de0ab3c9a2b74343eb5eda7d467b319 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts" @@ -1,3 +1,38 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:73623979b2b6f47b9af0efea985d91197a3c3303466ed786163757f0aa6b45bc -size 1915 +import { RequestHandler } from 'vscode-jsonrpc'; +import { Definition, DefinitionLink, Location, LocationLink } from 'vscode-languageserver-types'; +import { ProtocolRequestType } from './messages'; +import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +/** + * @since 3.6.0 + */ +export interface ImplementationClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `ImplementationRegistrationOptions` return value + * for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; + /** + * The client supports additional metadata in the form of definition links. + * + * @since 3.14.0 + */ + linkSupport?: boolean; +} +export interface ImplementationOptions extends WorkDoneProgressOptions { +} +export interface ImplementationRegistrationOptions extends TextDocumentRegistrationOptions, ImplementationOptions, StaticRegistrationOptions { +} +export interface ImplementationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * A request to resolve the implementation locations of a symbol at a given text + * document position. The request's parameter is of type [TextDocumentPositioParams] + * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a + * Thenable that resolves to such. + */ +export declare namespace ImplementationRequest { + const method: 'textDocument/implementation'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js" index 07db4abd16068616d22a518efeba60f9ab91ab37..4ea726c3f4bf55fd3b75cf62bd01b9efd32d8770 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js" @@ -1,3 +1,22 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ff04c6b30d72cf1c6d37b6feb492870ca2bd07d0a1ec4c0255b079621a230b8e -size 1270 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ImplementationRequest = void 0; +const messages_1 = require("./messages"); +// @ts-ignore: to avoid inlining LocatioLink as dynamic import +let __noDynamicImport; +/** + * A request to resolve the implementation locations of a symbol at a given text + * document position. The request's parameter is of type [TextDocumentPositioParams] + * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a + * Thenable that resolves to such. + */ +var ImplementationRequest; +(function (ImplementationRequest) { + ImplementationRequest.method = 'textDocument/implementation'; + ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method); +})(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {})); +//# sourceMappingURL=protocol.implementation.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.js" index 1e85c697fde057f65c7040dee66d2cb1a5ed71ca..b756efec5be58bd560b94d46102419b0035dbcf2 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.js" @@ -1,3 +1,755 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:046d429f52251dc93979abd12783fc6607efd9688ccbf1f2ca5ea45e12428c80 -size 42711 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = exports.CodeLensRequest = exports.WorkspaceSymbolRequest = exports.CodeActionResolveRequest = exports.CodeActionRequest = exports.DocumentSymbolRequest = exports.DocumentHighlightRequest = exports.ReferencesRequest = exports.DefinitionRequest = exports.SignatureHelpRequest = exports.SignatureHelpTriggerKind = exports.HoverRequest = exports.CompletionResolveRequest = exports.CompletionRequest = exports.CompletionTriggerKind = exports.PublishDiagnosticsNotification = exports.WatchKind = exports.FileChangeType = exports.DidChangeWatchedFilesNotification = exports.WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentNotification = exports.TextDocumentSaveReason = exports.DidSaveTextDocumentNotification = exports.DidCloseTextDocumentNotification = exports.DidChangeTextDocumentNotification = exports.TextDocumentContentChangeEvent = exports.DidOpenTextDocumentNotification = exports.TextDocumentSyncKind = exports.TelemetryEventNotification = exports.LogMessageNotification = exports.ShowMessageRequest = exports.ShowMessageNotification = exports.MessageType = exports.DidChangeConfigurationNotification = exports.ExitNotification = exports.ShutdownRequest = exports.InitializedNotification = exports.InitializeError = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.DocumentFilter = void 0; +exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.SemanticTokens = exports.SemanticTokenModifiers = exports.SemanticTokenTypes = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = void 0; +const Is = require("./utils/is"); +const messages_1 = require("./messages"); +const protocol_implementation_1 = require("./protocol.implementation"); +Object.defineProperty(exports, "ImplementationRequest", { enumerable: true, get: function () { return protocol_implementation_1.ImplementationRequest; } }); +const protocol_typeDefinition_1 = require("./protocol.typeDefinition"); +Object.defineProperty(exports, "TypeDefinitionRequest", { enumerable: true, get: function () { return protocol_typeDefinition_1.TypeDefinitionRequest; } }); +const protocol_workspaceFolders_1 = require("./protocol.workspaceFolders"); +Object.defineProperty(exports, "WorkspaceFoldersRequest", { enumerable: true, get: function () { return protocol_workspaceFolders_1.WorkspaceFoldersRequest; } }); +Object.defineProperty(exports, "DidChangeWorkspaceFoldersNotification", { enumerable: true, get: function () { return protocol_workspaceFolders_1.DidChangeWorkspaceFoldersNotification; } }); +const protocol_configuration_1 = require("./protocol.configuration"); +Object.defineProperty(exports, "ConfigurationRequest", { enumerable: true, get: function () { return protocol_configuration_1.ConfigurationRequest; } }); +const protocol_colorProvider_1 = require("./protocol.colorProvider"); +Object.defineProperty(exports, "DocumentColorRequest", { enumerable: true, get: function () { return protocol_colorProvider_1.DocumentColorRequest; } }); +Object.defineProperty(exports, "ColorPresentationRequest", { enumerable: true, get: function () { return protocol_colorProvider_1.ColorPresentationRequest; } }); +const protocol_foldingRange_1 = require("./protocol.foldingRange"); +Object.defineProperty(exports, "FoldingRangeRequest", { enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRequest; } }); +const protocol_declaration_1 = require("./protocol.declaration"); +Object.defineProperty(exports, "DeclarationRequest", { enumerable: true, get: function () { return protocol_declaration_1.DeclarationRequest; } }); +const protocol_selectionRange_1 = require("./protocol.selectionRange"); +Object.defineProperty(exports, "SelectionRangeRequest", { enumerable: true, get: function () { return protocol_selectionRange_1.SelectionRangeRequest; } }); +const protocol_progress_1 = require("./protocol.progress"); +Object.defineProperty(exports, "WorkDoneProgress", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgress; } }); +Object.defineProperty(exports, "WorkDoneProgressCreateRequest", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCreateRequest; } }); +Object.defineProperty(exports, "WorkDoneProgressCancelNotification", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCancelNotification; } }); +const protocol_callHierarchy_1 = require("./protocol.callHierarchy"); +Object.defineProperty(exports, "CallHierarchyIncomingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyIncomingCallsRequest; } }); +Object.defineProperty(exports, "CallHierarchyOutgoingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest; } }); +Object.defineProperty(exports, "CallHierarchyPrepareRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyPrepareRequest; } }); +const protocol_semanticTokens_1 = require("./protocol.semanticTokens"); +Object.defineProperty(exports, "SemanticTokenTypes", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokenTypes; } }); +Object.defineProperty(exports, "SemanticTokenModifiers", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokenModifiers; } }); +Object.defineProperty(exports, "SemanticTokens", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokens; } }); +Object.defineProperty(exports, "TokenFormat", { enumerable: true, get: function () { return protocol_semanticTokens_1.TokenFormat; } }); +Object.defineProperty(exports, "SemanticTokensRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRequest; } }); +Object.defineProperty(exports, "SemanticTokensDeltaRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensDeltaRequest; } }); +Object.defineProperty(exports, "SemanticTokensRangeRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRangeRequest; } }); +Object.defineProperty(exports, "SemanticTokensRefreshRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRefreshRequest; } }); +Object.defineProperty(exports, "SemanticTokensRegistrationType", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRegistrationType; } }); +const protocol_showDocument_1 = require("./protocol.showDocument"); +Object.defineProperty(exports, "ShowDocumentRequest", { enumerable: true, get: function () { return protocol_showDocument_1.ShowDocumentRequest; } }); +const protocol_linkedEditingRange_1 = require("./protocol.linkedEditingRange"); +Object.defineProperty(exports, "LinkedEditingRangeRequest", { enumerable: true, get: function () { return protocol_linkedEditingRange_1.LinkedEditingRangeRequest; } }); +const protocol_fileOperations_1 = require("./protocol.fileOperations"); +Object.defineProperty(exports, "FileOperationPatternKind", { enumerable: true, get: function () { return protocol_fileOperations_1.FileOperationPatternKind; } }); +Object.defineProperty(exports, "DidCreateFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidCreateFilesNotification; } }); +Object.defineProperty(exports, "WillCreateFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillCreateFilesRequest; } }); +Object.defineProperty(exports, "DidRenameFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidRenameFilesNotification; } }); +Object.defineProperty(exports, "WillRenameFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillRenameFilesRequest; } }); +Object.defineProperty(exports, "DidDeleteFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidDeleteFilesNotification; } }); +Object.defineProperty(exports, "WillDeleteFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillDeleteFilesRequest; } }); +const protocol_moniker_1 = require("./protocol.moniker"); +Object.defineProperty(exports, "UniquenessLevel", { enumerable: true, get: function () { return protocol_moniker_1.UniquenessLevel; } }); +Object.defineProperty(exports, "MonikerKind", { enumerable: true, get: function () { return protocol_moniker_1.MonikerKind; } }); +Object.defineProperty(exports, "MonikerRequest", { enumerable: true, get: function () { return protocol_moniker_1.MonikerRequest; } }); +// @ts-ignore: to avoid inlining LocationLink as dynamic import +let __noDynamicImport; +/** + * The DocumentFilter namespace provides helper functions to work with + * [DocumentFilter](#DocumentFilter) literals. + */ +var DocumentFilter; +(function (DocumentFilter) { + function is(value) { + const candidate = value; + return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern); + } + DocumentFilter.is = is; +})(DocumentFilter = exports.DocumentFilter || (exports.DocumentFilter = {})); +/** + * The DocumentSelector namespace provides helper functions to work with + * [DocumentSelector](#DocumentSelector)s. + */ +var DocumentSelector; +(function (DocumentSelector) { + function is(value) { + if (!Array.isArray(value)) { + return false; + } + for (let elem of value) { + if (!Is.string(elem) && !DocumentFilter.is(elem)) { + return false; + } + } + return true; + } + DocumentSelector.is = is; +})(DocumentSelector = exports.DocumentSelector || (exports.DocumentSelector = {})); +/** + * The `client/registerCapability` request is sent from the server to the client to register a new capability + * handler on the client side. + */ +var RegistrationRequest; +(function (RegistrationRequest) { + RegistrationRequest.type = new messages_1.ProtocolRequestType('client/registerCapability'); +})(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {})); +/** + * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability + * handler on the client side. + */ +var UnregistrationRequest; +(function (UnregistrationRequest) { + UnregistrationRequest.type = new messages_1.ProtocolRequestType('client/unregisterCapability'); +})(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {})); +var ResourceOperationKind; +(function (ResourceOperationKind) { + /** + * Supports creating new files and folders. + */ + ResourceOperationKind.Create = 'create'; + /** + * Supports renaming existing files and folders. + */ + ResourceOperationKind.Rename = 'rename'; + /** + * Supports deleting existing files and folders. + */ + ResourceOperationKind.Delete = 'delete'; +})(ResourceOperationKind = exports.ResourceOperationKind || (exports.ResourceOperationKind = {})); +var FailureHandlingKind; +(function (FailureHandlingKind) { + /** + * Applying the workspace change is simply aborted if one of the changes provided + * fails. All operations executed before the failing operation stay executed. + */ + FailureHandlingKind.Abort = 'abort'; + /** + * All operations are executed transactional. That means they either all + * succeed or no changes at all are applied to the workspace. + */ + FailureHandlingKind.Transactional = 'transactional'; + /** + * If the workspace edit contains only textual file changes they are executed transactional. + * If resource changes (create, rename or delete file) are part of the change the failure + * handling strategy is abort. + */ + FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional'; + /** + * The client tries to undo the operations already executed. But there is no + * guarantee that this is succeeding. + */ + FailureHandlingKind.Undo = 'undo'; +})(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {})); +/** + * The StaticRegistrationOptions namespace provides helper functions to work with + * [StaticRegistrationOptions](#StaticRegistrationOptions) literals. + */ +var StaticRegistrationOptions; +(function (StaticRegistrationOptions) { + function hasId(value) { + const candidate = value; + return candidate && Is.string(candidate.id) && candidate.id.length > 0; + } + StaticRegistrationOptions.hasId = hasId; +})(StaticRegistrationOptions = exports.StaticRegistrationOptions || (exports.StaticRegistrationOptions = {})); +/** + * The TextDocumentRegistrationOptions namespace provides helper functions to work with + * [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals. + */ +var TextDocumentRegistrationOptions; +(function (TextDocumentRegistrationOptions) { + function is(value) { + const candidate = value; + return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector)); + } + TextDocumentRegistrationOptions.is = is; +})(TextDocumentRegistrationOptions = exports.TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = {})); +/** + * The WorkDoneProgressOptions namespace provides helper functions to work with + * [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals. + */ +var WorkDoneProgressOptions; +(function (WorkDoneProgressOptions) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress)); + } + WorkDoneProgressOptions.is = is; + function hasWorkDoneProgress(value) { + const candidate = value; + return candidate && Is.boolean(candidate.workDoneProgress); + } + WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress; +})(WorkDoneProgressOptions = exports.WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = {})); +/** + * The initialize request is sent from the client to the server. + * It is sent once as the request after starting up the server. + * The requests parameter is of type [InitializeParams](#InitializeParams) + * the response if of type [InitializeResult](#InitializeResult) of a Thenable that + * resolves to such. + */ +var InitializeRequest; +(function (InitializeRequest) { + InitializeRequest.type = new messages_1.ProtocolRequestType('initialize'); +})(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {})); +/** + * Known error codes for an `InitializeError`; + */ +var InitializeError; +(function (InitializeError) { + /** + * If the protocol version provided by the client can't be handled by the server. + * @deprecated This initialize error got replaced by client capabilities. There is + * no version handshake in version 3.0x + */ + InitializeError.unknownProtocolVersion = 1; +})(InitializeError = exports.InitializeError || (exports.InitializeError = {})); +/** + * The initialized notification is sent from the client to the + * server after the client is fully initialized and the server + * is allowed to send requests from the server to the client. + */ +var InitializedNotification; +(function (InitializedNotification) { + InitializedNotification.type = new messages_1.ProtocolNotificationType('initialized'); +})(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {})); +//---- Shutdown Method ---- +/** + * A shutdown request is sent from the client to the server. + * It is sent once when the client decides to shutdown the + * server. The only notification that is sent after a shutdown request + * is the exit event. + */ +var ShutdownRequest; +(function (ShutdownRequest) { + ShutdownRequest.type = new messages_1.ProtocolRequestType0('shutdown'); +})(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {})); +//---- Exit Notification ---- +/** + * The exit event is sent from the client to the server to + * ask the server to exit its process. + */ +var ExitNotification; +(function (ExitNotification) { + ExitNotification.type = new messages_1.ProtocolNotificationType0('exit'); +})(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {})); +/** + * The configuration change notification is sent from the client to the server + * when the client's configuration has changed. The notification contains + * the changed configuration as defined by the language client. + */ +var DidChangeConfigurationNotification; +(function (DidChangeConfigurationNotification) { + DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeConfiguration'); +})(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {})); +//---- Message show and log notifications ---- +/** + * The message type + */ +var MessageType; +(function (MessageType) { + /** + * An error message. + */ + MessageType.Error = 1; + /** + * A warning message. + */ + MessageType.Warning = 2; + /** + * An information message. + */ + MessageType.Info = 3; + /** + * A log message. + */ + MessageType.Log = 4; +})(MessageType = exports.MessageType || (exports.MessageType = {})); +/** + * The show message notification is sent from a server to a client to ask + * the client to display a particular message in the user interface. + */ +var ShowMessageNotification; +(function (ShowMessageNotification) { + ShowMessageNotification.type = new messages_1.ProtocolNotificationType('window/showMessage'); +})(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {})); +/** + * The show message request is sent from the server to the client to show a message + * and a set of options actions to the user. + */ +var ShowMessageRequest; +(function (ShowMessageRequest) { + ShowMessageRequest.type = new messages_1.ProtocolRequestType('window/showMessageRequest'); +})(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {})); +/** + * The log message notification is sent from the server to the client to ask + * the client to log a particular message. + */ +var LogMessageNotification; +(function (LogMessageNotification) { + LogMessageNotification.type = new messages_1.ProtocolNotificationType('window/logMessage'); +})(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {})); +//---- Telemetry notification +/** + * The telemetry event notification is sent from the server to the client to ask + * the client to log telemetry data. + */ +var TelemetryEventNotification; +(function (TelemetryEventNotification) { + TelemetryEventNotification.type = new messages_1.ProtocolNotificationType('telemetry/event'); +})(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {})); +/** + * Defines how the host (editor) should sync + * document changes to the language server. + */ +var TextDocumentSyncKind; +(function (TextDocumentSyncKind) { + /** + * Documents should not be synced at all. + */ + TextDocumentSyncKind.None = 0; + /** + * Documents are synced by always sending the full content + * of the document. + */ + TextDocumentSyncKind.Full = 1; + /** + * Documents are synced by sending the full content on open. + * After that only incremental updates to the document are + * send. + */ + TextDocumentSyncKind.Incremental = 2; +})(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {})); +/** + * The document open notification is sent from the client to the server to signal + * newly opened text documents. The document's truth is now managed by the client + * and the server must not try to read the document's truth using the document's + * uri. Open in this sense means it is managed by the client. It doesn't necessarily + * mean that its content is presented in an editor. An open notification must not + * be sent more than once without a corresponding close notification send before. + * This means open and close notification must be balanced and the max open count + * is one. + */ +var DidOpenTextDocumentNotification; +(function (DidOpenTextDocumentNotification) { + DidOpenTextDocumentNotification.method = 'textDocument/didOpen'; + DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method); +})(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {})); +var TextDocumentContentChangeEvent; +(function (TextDocumentContentChangeEvent) { + /** + * Checks whether the information describes a delta event. + */ + function isIncremental(event) { + let candidate = event; + return candidate !== undefined && candidate !== null && + typeof candidate.text === 'string' && candidate.range !== undefined && + (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number'); + } + TextDocumentContentChangeEvent.isIncremental = isIncremental; + /** + * Checks whether the information describes a full replacement event. + */ + function isFull(event) { + let candidate = event; + return candidate !== undefined && candidate !== null && + typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined; + } + TextDocumentContentChangeEvent.isFull = isFull; +})(TextDocumentContentChangeEvent = exports.TextDocumentContentChangeEvent || (exports.TextDocumentContentChangeEvent = {})); +/** + * The document change notification is sent from the client to the server to signal + * changes to a text document. + */ +var DidChangeTextDocumentNotification; +(function (DidChangeTextDocumentNotification) { + DidChangeTextDocumentNotification.method = 'textDocument/didChange'; + DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method); +})(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {})); +/** + * The document close notification is sent from the client to the server when + * the document got closed in the client. The document's truth now exists where + * the document's uri points to (e.g. if the document's uri is a file uri the + * truth now exists on disk). As with the open notification the close notification + * is about managing the document's content. Receiving a close notification + * doesn't mean that the document was open in an editor before. A close + * notification requires a previous open notification to be sent. + */ +var DidCloseTextDocumentNotification; +(function (DidCloseTextDocumentNotification) { + DidCloseTextDocumentNotification.method = 'textDocument/didClose'; + DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method); +})(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {})); +/** + * The document save notification is sent from the client to the server when + * the document got saved in the client. + */ +var DidSaveTextDocumentNotification; +(function (DidSaveTextDocumentNotification) { + DidSaveTextDocumentNotification.method = 'textDocument/didSave'; + DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method); +})(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {})); +/** + * Represents reasons why a text document is saved. + */ +var TextDocumentSaveReason; +(function (TextDocumentSaveReason) { + /** + * Manually triggered, e.g. by the user pressing save, by starting debugging, + * or by an API call. + */ + TextDocumentSaveReason.Manual = 1; + /** + * Automatic after a delay. + */ + TextDocumentSaveReason.AfterDelay = 2; + /** + * When the editor lost focus. + */ + TextDocumentSaveReason.FocusOut = 3; +})(TextDocumentSaveReason = exports.TextDocumentSaveReason || (exports.TextDocumentSaveReason = {})); +/** + * A document will save notification is sent from the client to the server before + * the document is actually saved. + */ +var WillSaveTextDocumentNotification; +(function (WillSaveTextDocumentNotification) { + WillSaveTextDocumentNotification.method = 'textDocument/willSave'; + WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method); +})(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {})); +/** + * A document will save request is sent from the client to the server before + * the document is actually saved. The request can return an array of TextEdits + * which will be applied to the text document before it is saved. Please note that + * clients might drop results if computing the text edits took too long or if a + * server constantly fails on this request. This is done to keep the save fast and + * reliable. + */ +var WillSaveTextDocumentWaitUntilRequest; +(function (WillSaveTextDocumentWaitUntilRequest) { + WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil'; + WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method); +})(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {})); +/** + * The watched files notification is sent from the client to the server when + * the client detects changes to file watched by the language client. + */ +var DidChangeWatchedFilesNotification; +(function (DidChangeWatchedFilesNotification) { + DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWatchedFiles'); +})(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {})); +/** + * The file event type + */ +var FileChangeType; +(function (FileChangeType) { + /** + * The file got created. + */ + FileChangeType.Created = 1; + /** + * The file got changed. + */ + FileChangeType.Changed = 2; + /** + * The file got deleted. + */ + FileChangeType.Deleted = 3; +})(FileChangeType = exports.FileChangeType || (exports.FileChangeType = {})); +var WatchKind; +(function (WatchKind) { + /** + * Interested in create events. + */ + WatchKind.Create = 1; + /** + * Interested in change events + */ + WatchKind.Change = 2; + /** + * Interested in delete events + */ + WatchKind.Delete = 4; +})(WatchKind = exports.WatchKind || (exports.WatchKind = {})); +/** + * Diagnostics notification are sent from the server to the client to signal + * results of validation runs. + */ +var PublishDiagnosticsNotification; +(function (PublishDiagnosticsNotification) { + PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType('textDocument/publishDiagnostics'); +})(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {})); +/** + * How a completion was triggered + */ +var CompletionTriggerKind; +(function (CompletionTriggerKind) { + /** + * Completion was triggered by typing an identifier (24x7 code + * complete), manual invocation (e.g Ctrl+Space) or via API. + */ + CompletionTriggerKind.Invoked = 1; + /** + * Completion was triggered by a trigger character specified by + * the `triggerCharacters` properties of the `CompletionRegistrationOptions`. + */ + CompletionTriggerKind.TriggerCharacter = 2; + /** + * Completion was re-triggered as current completion list is incomplete + */ + CompletionTriggerKind.TriggerForIncompleteCompletions = 3; +})(CompletionTriggerKind = exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {})); +/** + * Request to request completion at a given text document position. The request's + * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response + * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList) + * or a Thenable that resolves to such. + * + * The request can delay the computation of the [`detail`](#CompletionItem.detail) + * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve` + * request. However, properties that are needed for the initial sorting and filtering, like `sortText`, + * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve. + */ +var CompletionRequest; +(function (CompletionRequest) { + CompletionRequest.method = 'textDocument/completion'; + CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method); +})(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {})); +/** + * Request to resolve additional information for a given completion item.The request's + * parameter is of type [CompletionItem](#CompletionItem) the response + * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such. + */ +var CompletionResolveRequest; +(function (CompletionResolveRequest) { + CompletionResolveRequest.method = 'completionItem/resolve'; + CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method); +})(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {})); +/** + * Request to request hover information at a given text document position. The request's + * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of + * type [Hover](#Hover) or a Thenable that resolves to such. + */ +var HoverRequest; +(function (HoverRequest) { + HoverRequest.method = 'textDocument/hover'; + HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method); +})(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {})); +/** + * How a signature help was triggered. + * + * @since 3.15.0 + */ +var SignatureHelpTriggerKind; +(function (SignatureHelpTriggerKind) { + /** + * Signature help was invoked manually by the user or by a command. + */ + SignatureHelpTriggerKind.Invoked = 1; + /** + * Signature help was triggered by a trigger character. + */ + SignatureHelpTriggerKind.TriggerCharacter = 2; + /** + * Signature help was triggered by the cursor moving or by the document content changing. + */ + SignatureHelpTriggerKind.ContentChange = 3; +})(SignatureHelpTriggerKind = exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {})); +var SignatureHelpRequest; +(function (SignatureHelpRequest) { + SignatureHelpRequest.method = 'textDocument/signatureHelp'; + SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method); +})(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {})); +/** + * A request to resolve the definition location of a symbol at a given text + * document position. The request's parameter is of type [TextDocumentPosition] + * (#TextDocumentPosition) the response is of either type [Definition](#Definition) + * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves + * to such. + */ +var DefinitionRequest; +(function (DefinitionRequest) { + DefinitionRequest.method = 'textDocument/definition'; + DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method); +})(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {})); +/** + * A request to resolve project-wide references for the symbol denoted + * by the given text document position. The request's parameter is of + * type [ReferenceParams](#ReferenceParams) the response is of type + * [Location[]](#Location) or a Thenable that resolves to such. + */ +var ReferencesRequest; +(function (ReferencesRequest) { + ReferencesRequest.method = 'textDocument/references'; + ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method); +})(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {})); +/** + * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given + * text document position. The request's parameter is of type [TextDocumentPosition] + * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]] + * (#DocumentHighlight) or a Thenable that resolves to such. + */ +var DocumentHighlightRequest; +(function (DocumentHighlightRequest) { + DocumentHighlightRequest.method = 'textDocument/documentHighlight'; + DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method); +})(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {})); +/** + * A request to list all symbols found in a given text document. The request's + * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the + * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable + * that resolves to such. + */ +var DocumentSymbolRequest; +(function (DocumentSymbolRequest) { + DocumentSymbolRequest.method = 'textDocument/documentSymbol'; + DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method); +})(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {})); +/** + * A request to provide commands for the given text document and range. + */ +var CodeActionRequest; +(function (CodeActionRequest) { + CodeActionRequest.method = 'textDocument/codeAction'; + CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method); +})(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {})); +/** + * Request to resolve additional information for a given code action.The request's + * parameter is of type [CodeAction](#CodeAction) the response + * is of type [CodeAction](#CodeAction) or a Thenable that resolves to such. + */ +var CodeActionResolveRequest; +(function (CodeActionResolveRequest) { + CodeActionResolveRequest.method = 'codeAction/resolve'; + CodeActionResolveRequest.type = new messages_1.ProtocolRequestType(CodeActionResolveRequest.method); +})(CodeActionResolveRequest = exports.CodeActionResolveRequest || (exports.CodeActionResolveRequest = {})); +/** + * A request to list project-wide symbols matching the query string given + * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is + * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that + * resolves to such. + */ +var WorkspaceSymbolRequest; +(function (WorkspaceSymbolRequest) { + WorkspaceSymbolRequest.method = 'workspace/symbol'; + WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method); +})(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {})); +/** + * A request to provide code lens for the given text document. + */ +var CodeLensRequest; +(function (CodeLensRequest) { + CodeLensRequest.method = 'textDocument/codeLens'; + CodeLensRequest.type = new messages_1.ProtocolRequestType(CodeLensRequest.method); +})(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {})); +/** + * A request to resolve a command for a given code lens. + */ +var CodeLensResolveRequest; +(function (CodeLensResolveRequest) { + CodeLensResolveRequest.method = 'codeLens/resolve'; + CodeLensResolveRequest.type = new messages_1.ProtocolRequestType(CodeLensResolveRequest.method); +})(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {})); +/** + * A request to refresh all code actions + * + * @since 3.16.0 + */ +var CodeLensRefreshRequest; +(function (CodeLensRefreshRequest) { + CodeLensRefreshRequest.method = `workspace/codeLens/refresh`; + CodeLensRefreshRequest.type = new messages_1.ProtocolRequestType0(CodeLensRefreshRequest.method); +})(CodeLensRefreshRequest = exports.CodeLensRefreshRequest || (exports.CodeLensRefreshRequest = {})); +/** + * A request to provide document links + */ +var DocumentLinkRequest; +(function (DocumentLinkRequest) { + DocumentLinkRequest.method = 'textDocument/documentLink'; + DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method); +})(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {})); +/** + * Request to resolve additional information for a given document link. The request's + * parameter is of type [DocumentLink](#DocumentLink) the response + * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such. + */ +var DocumentLinkResolveRequest; +(function (DocumentLinkResolveRequest) { + DocumentLinkResolveRequest.method = 'documentLink/resolve'; + DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType(DocumentLinkResolveRequest.method); +})(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {})); +/** + * A request to to format a whole document. + */ +var DocumentFormattingRequest; +(function (DocumentFormattingRequest) { + DocumentFormattingRequest.method = 'textDocument/formatting'; + DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method); +})(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {})); +/** + * A request to to format a range in a document. + */ +var DocumentRangeFormattingRequest; +(function (DocumentRangeFormattingRequest) { + DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting'; + DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method); +})(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {})); +/** + * A request to format a document on type. + */ +var DocumentOnTypeFormattingRequest; +(function (DocumentOnTypeFormattingRequest) { + DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting'; + DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method); +})(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {})); +//---- Rename ---------------------------------------------- +var PrepareSupportDefaultBehavior; +(function (PrepareSupportDefaultBehavior) { + /** + * The client's default behavior is to select the identifier + * according the to language's syntax rule. + */ + PrepareSupportDefaultBehavior.Identifier = 1; +})(PrepareSupportDefaultBehavior = exports.PrepareSupportDefaultBehavior || (exports.PrepareSupportDefaultBehavior = {})); +/** + * A request to rename a symbol. + */ +var RenameRequest; +(function (RenameRequest) { + RenameRequest.method = 'textDocument/rename'; + RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method); +})(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {})); +/** + * A request to test and perform the setup necessary for a rename. + * + * @since 3.16 - support for default behavior + */ +var PrepareRenameRequest; +(function (PrepareRenameRequest) { + PrepareRenameRequest.method = 'textDocument/prepareRename'; + PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method); +})(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {})); +/** + * A request send from the client to the server to execute a command. The request might return + * a workspace edit which the client will apply to the workspace. + */ +var ExecuteCommandRequest; +(function (ExecuteCommandRequest) { + ExecuteCommandRequest.type = new messages_1.ProtocolRequestType('workspace/executeCommand'); +})(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {})); +/** + * A request sent from the server to the client to modified certain resources. + */ +var ApplyWorkspaceEditRequest; +(function (ApplyWorkspaceEditRequest) { + ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit'); +})(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {})); +//# sourceMappingURL=protocol.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts" index 6108577ccf0d0685663382a4c1a75b0336cfeea3..6dd7e43175eff8b8787bccdde7f4fde5f758ba89 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts" @@ -1,3 +1,51 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2a9788e7789f4ab603d4d3982fe5a98ff51b699b8ec4653fceb3192e147337dc -size 2106 +import { RequestHandler } from 'vscode-jsonrpc'; +import { Range } from 'vscode-languageserver-types'; +import { ProtocolRequestType } from './messages'; +import { StaticRegistrationOptions, TextDocumentPositionParams, TextDocumentRegistrationOptions, WorkDoneProgressOptions, WorkDoneProgressParams } from './protocol'; +/** + * Client capabilities for the linked editing range request. + * + * @since 3.16.0 + */ +export interface LinkedEditingRangeClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + * return value for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; +} +export interface LinkedEditingRangeParams extends TextDocumentPositionParams, WorkDoneProgressParams { +} +export interface LinkedEditingRangeOptions extends WorkDoneProgressOptions { +} +export interface LinkedEditingRangeRegistrationOptions extends TextDocumentRegistrationOptions, LinkedEditingRangeOptions, StaticRegistrationOptions { +} +/** + * The result of a linked editing range request. + * + * @since 3.16.0 + */ +export interface LinkedEditingRanges { + /** + * A list of ranges that can be edited together. The ranges must have + * identical length and contain identical text content. The ranges cannot overlap. + */ + ranges: Range[]; + /** + * An optional word pattern (regular expression) that describes valid contents for + * the given ranges. If no pattern is provided, the client configuration's word + * pattern will be used. + */ + wordPattern?: string; +} +/** + * A request to provide ranges that can be edited together. + * + * @since 3.16.0 + */ +export declare namespace LinkedEditingRangeRequest { + const method: 'textDocument/linkedEditingRange'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js" index 5241020ca48ae83819a729ac4a5c5fc7c348333b..c7cf018e08c173fb9f7a52bc25c688b034553142 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js" @@ -1,3 +1,19 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:659d495ef5a2150b7e06e8b21e825a3b72086dea68f661f392b0f92c085573de -size 1021 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LinkedEditingRangeRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to provide ranges that can be edited together. + * + * @since 3.16.0 + */ +var LinkedEditingRangeRequest; +(function (LinkedEditingRangeRequest) { + LinkedEditingRangeRequest.method = 'textDocument/linkedEditingRange'; + LinkedEditingRangeRequest.type = new messages_1.ProtocolRequestType(LinkedEditingRangeRequest.method); +})(LinkedEditingRangeRequest = exports.LinkedEditingRangeRequest || (exports.LinkedEditingRangeRequest = {})); +//# sourceMappingURL=protocol.linkedEditingRange.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts" index e81361b5879084907d556c1676f5e54e071d4d57..3a75fae8a82be179fdca00667af8532c80dae3e2 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts" @@ -1,3 +1,103 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ebd7209e5b648af7b6e3677280368b3c8ccef579a27c2386f7f5d376f1e14533 -size 3063 +import { ProtocolRequestType } from './messages'; +import { WorkDoneProgressOptions, WorkDoneProgressParams, PartialResultParams, TextDocumentRegistrationOptions, TextDocumentPositionParams } from './protocol'; +/** + * Moniker uniqueness level to define scope of the moniker. + * + * @since 3.16.0 + */ +export declare enum UniquenessLevel { + /** + * The moniker is only unique inside a document + */ + document = "document", + /** + * The moniker is unique inside a project for which a dump got created + */ + project = "project", + /** + * The moniker is unique inside the group to which a project belongs + */ + group = "group", + /** + * The moniker is unique inside the moniker scheme. + */ + scheme = "scheme", + /** + * The moniker is globally unique + */ + global = "global" +} +/** + * The moniker kind. + * + * @since 3.16.0 + */ +export declare enum MonikerKind { + /** + * The moniker represent a symbol that is imported into a project + */ + import = "import", + /** + * The moniker represents a symbol that is exported from a project + */ + export = "export", + /** + * The moniker represents a symbol that is local to a project (e.g. a local + * variable of a function, a class not visible outside the project, ...) + */ + local = "local" +} +/** + * Moniker definition to match LSIF 0.5 moniker definition. + * + * @since 3.16.0 + */ +export interface Moniker { + /** + * The scheme of the moniker. For example tsc or .Net + */ + scheme: string; + /** + * The identifier of the moniker. The value is opaque in LSIF however + * schema owners are allowed to define the structure if they want. + */ + identifier: string; + /** + * The scope in which the moniker is unique + */ + unique: UniquenessLevel; + /** + * The moniker kind if known. + */ + kind?: MonikerKind; +} +/** + * Client capabilities specific to the moniker request. + * + * @since 3.16.0 + */ +export interface MonikerClientCapabilities { + /** + * Whether moniker supports dynamic registration. If this is set to `true` + * the client supports the new `MonikerRegistrationOptions` return value + * for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; +} +export interface MonikerServerCapabilities { +} +export interface MonikerOptions extends WorkDoneProgressOptions { +} +export interface MonikerRegistrationOptions extends TextDocumentRegistrationOptions, MonikerOptions { +} +export interface MonikerParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * A request to get the moniker of a symbol at a given text document position. + * The request parameter is of type [TextDocumentPositionParams](#TextDocumentPositionParams). + * The response is of type [Moniker[]](#Moniker[]) or `null`. + */ +export declare namespace MonikerRequest { + const method: 'textDocument/moniker'; + const type: ProtocolRequestType; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js" index a97f1b95901271f12f2379088dd1c13103e6b12c..34d9b2daadc8dbaa107a16533ca11d3fd07c310a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js" @@ -1,3 +1,68 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dd01b66aa3b4704ef2810ab27da4c0dd29af79a63cb9fc0c20f334fd0038de99 -size 2529 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = void 0; +const messages_1 = require("./messages"); +/** + * Moniker uniqueness level to define scope of the moniker. + * + * @since 3.16.0 + */ +var UniquenessLevel; +(function (UniquenessLevel) { + /** + * The moniker is only unique inside a document + */ + UniquenessLevel["document"] = "document"; + /** + * The moniker is unique inside a project for which a dump got created + */ + UniquenessLevel["project"] = "project"; + /** + * The moniker is unique inside the group to which a project belongs + */ + UniquenessLevel["group"] = "group"; + /** + * The moniker is unique inside the moniker scheme. + */ + UniquenessLevel["scheme"] = "scheme"; + /** + * The moniker is globally unique + */ + UniquenessLevel["global"] = "global"; +})(UniquenessLevel = exports.UniquenessLevel || (exports.UniquenessLevel = {})); +/** + * The moniker kind. + * + * @since 3.16.0 + */ +var MonikerKind; +(function (MonikerKind) { + /** + * The moniker represent a symbol that is imported into a project + */ + MonikerKind["import"] = "import"; + /** + * The moniker represents a symbol that is exported from a project + */ + MonikerKind["export"] = "export"; + /** + * The moniker represents a symbol that is local to a project (e.g. a local + * variable of a function, a class not visible outside the project, ...) + */ + MonikerKind["local"] = "local"; +})(MonikerKind = exports.MonikerKind || (exports.MonikerKind = {})); +/** + * A request to get the moniker of a symbol at a given text document position. + * The request parameter is of type [TextDocumentPositionParams](#TextDocumentPositionParams). + * The response is of type [Moniker[]](#Moniker[]) or `null`. + */ +var MonikerRequest; +(function (MonikerRequest) { + MonikerRequest.method = 'textDocument/moniker'; + MonikerRequest.type = new messages_1.ProtocolRequestType(MonikerRequest.method); +})(MonikerRequest = exports.MonikerRequest || (exports.MonikerRequest = {})); +//# sourceMappingURL=protocol.moniker.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts" index 13061c7228865951880e3206ca62f516a9ecc62b..df0b84fae4af2a21dc649e9a009aa915f8f6c19c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts" @@ -1,3 +1,117 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:254265a792bdf31050dc2524733465d3ace0b179779e1ff8a97b2752a9b56656 -size 4363 +import { NotificationHandler, RequestHandler, ProgressType, ProgressToken } from 'vscode-jsonrpc'; +import { uinteger } from 'vscode-languageserver-types'; +import { ProtocolRequestType, ProtocolNotificationType } from './messages'; +export interface WorkDoneProgressClientCapabilities { + /** + * Window specific client capabilities. + */ + window?: { + /** + * Whether client supports server initiated progress using the + * `window/workDoneProgress/create` request. + * + * Since 3.15.0 + */ + workDoneProgress?: boolean; + }; +} +export interface WorkDoneProgressBegin { + kind: 'begin'; + /** + * Mandatory title of the progress operation. Used to briefly inform about + * the kind of operation being performed. + * + * Examples: "Indexing" or "Linking dependencies". + */ + title: string; + /** + * Controls if a cancel button should show to allow the user to cancel the + * long running operation. Clients that don't support cancellation are allowed + * to ignore the setting. + */ + cancellable?: boolean; + /** + * Optional, more detailed associated progress message. Contains + * complementary information to the `title`. + * + * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". + * If unset, the previous progress message (if any) is still valid. + */ + message?: string; + /** + * Optional progress percentage to display (value 100 is considered 100%). + * If not provided infinite progress is assumed and clients are allowed + * to ignore the `percentage` value in subsequent in report notifications. + * + * The value should be steadily rising. Clients are free to ignore values + * that are not following this rule. The value range is [0, 100]. + */ + percentage?: uinteger; +} +export interface WorkDoneProgressReport { + kind: 'report'; + /** + * Controls enablement state of a cancel button. + * + * Clients that don't support cancellation or don't support controlling the button's + * enablement state are allowed to ignore the property. + */ + cancellable?: boolean; + /** + * Optional, more detailed associated progress message. Contains + * complementary information to the `title`. + * + * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". + * If unset, the previous progress message (if any) is still valid. + */ + message?: string; + /** + * Optional progress percentage to display (value 100 is considered 100%). + * If not provided infinite progress is assumed and clients are allowed + * to ignore the `percentage` value in subsequent in report notifications. + * + * The value should be steadily rising. Clients are free to ignore values + * that are not following this rule. The value range is [0, 100] + */ + percentage?: uinteger; +} +export interface WorkDoneProgressEnd { + kind: 'end'; + /** + * Optional, a final message indicating to for example indicate the outcome + * of the operation. + */ + message?: string; +} +export declare namespace WorkDoneProgress { + const type: ProgressType; + function is(value: ProgressType): value is typeof type; +} +export interface WorkDoneProgressCreateParams { + /** + * The token to be used to report progress. + */ + token: ProgressToken; +} +/** + * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress + * reporting from the server. + */ +export declare namespace WorkDoneProgressCreateRequest { + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +export interface WorkDoneProgressCancelParams { + /** + * The token to be used to report progress. + */ + token: ProgressToken; +} +/** + * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress + * initiated on the server side. + */ +export declare namespace WorkDoneProgressCancelNotification { + const type: ProtocolNotificationType; + type HandlerSignature = NotificationHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js" index f397fc22db65952016bc49219cc0a07c31f6b94f..47a33ccbb4c5cf368b6ba9faac812adcba893b69 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js" @@ -1,3 +1,34 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8cc223d85acc62baa5f55bd9bf6be1a58ec1ccafbda0b0af9ab35069b5bdc402 -size 1957 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = void 0; +const vscode_jsonrpc_1 = require("vscode-jsonrpc"); +const messages_1 = require("./messages"); +var WorkDoneProgress; +(function (WorkDoneProgress) { + WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType(); + function is(value) { + return value === WorkDoneProgress.type; + } + WorkDoneProgress.is = is; +})(WorkDoneProgress = exports.WorkDoneProgress || (exports.WorkDoneProgress = {})); +/** + * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress + * reporting from the server. + */ +var WorkDoneProgressCreateRequest; +(function (WorkDoneProgressCreateRequest) { + WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType('window/workDoneProgress/create'); +})(WorkDoneProgressCreateRequest = exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {})); +/** + * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress + * initiated on the server side. + */ +var WorkDoneProgressCancelNotification; +(function (WorkDoneProgressCancelNotification) { + WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType('window/workDoneProgress/cancel'); +})(WorkDoneProgressCancelNotification = exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {})); +//# sourceMappingURL=protocol.progress.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts" index 937935d8687916d9602e771c7863191d252a9ddf..5d7a9dda9f3da5b2ecfba1bbdbbae56e13eb4524 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts" @@ -1,3 +1,40 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f356e7999affebf5745d8ffdf0cb70426bc966da461166408099e4dac35e98c2 -size 1861 +import { RequestHandler } from 'vscode-jsonrpc'; +import { TextDocumentIdentifier, Position, SelectionRange } from 'vscode-languageserver-types'; +import { ProtocolRequestType } from './messages'; +import { TextDocumentRegistrationOptions, WorkDoneProgressOptions, StaticRegistrationOptions, WorkDoneProgressParams, PartialResultParams } from './protocol'; +export interface SelectionRangeClientCapabilities { + /** + * Whether implementation supports dynamic registration for selection range providers. If this is set to `true` + * the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server + * capability as well. + */ + dynamicRegistration?: boolean; +} +export interface SelectionRangeOptions extends WorkDoneProgressOptions { +} +export interface SelectionRangeRegistrationOptions extends SelectionRangeOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions { +} +/** + * A parameter literal used in selection range requests. + */ +export interface SelectionRangeParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The positions inside the text document. + */ + positions: Position[]; +} +/** + * A request to provide selection ranges in a document. The request's + * parameter is of type [SelectionRangeParams](#SelectionRangeParams), the + * response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable + * that resolves to such. + */ +export declare namespace SelectionRangeRequest { + const method: 'textDocument/selectionRange'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js" index ed80563299ef3549090fe315ed5b7b3f1398bcab..f15e70d5926c9b52cbfb8055097e265e4caaecda 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js" @@ -1,3 +1,20 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:73b793db0711748a9a0407dd84468009673cb44dbe12ac7b211d460767b9622c -size 1143 +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SelectionRangeRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to provide selection ranges in a document. The request's + * parameter is of type [SelectionRangeParams](#SelectionRangeParams), the + * response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable + * that resolves to such. + */ +var SelectionRangeRequest; +(function (SelectionRangeRequest) { + SelectionRangeRequest.method = 'textDocument/selectionRange'; + SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method); +})(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {})); +//# sourceMappingURL=protocol.selectionRange.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts" index be2ff20a0342a414b02c54271de0437561b0db5d..96336dd75615fd49b393abd08a64d4bfb4a267fd 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts" @@ -1,3 +1,307 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7891c7290f213b63911a1391b3dfe08c9bfa54d401f28e167d0c57553eee80c0 -size 9441 +import { TextDocumentIdentifier, Range, uinteger } from 'vscode-languageserver-types'; +import { RequestHandler0, RequestHandler } from 'vscode-jsonrpc'; +import { ProtocolRequestType, ProtocolRequestType0, RegistrationType } from './messages'; +import { PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions } from './protocol'; +/** + * A set of predefined token types. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ +export declare enum SemanticTokenTypes { + namespace = "namespace", + /** + * Represents a generic type. Acts as a fallback for types which can't be mapped to + * a specific type like class or enum. + */ + type = "type", + class = "class", + enum = "enum", + interface = "interface", + struct = "struct", + typeParameter = "typeParameter", + parameter = "parameter", + variable = "variable", + property = "property", + enumMember = "enumMember", + event = "event", + function = "function", + method = "method", + macro = "macro", + keyword = "keyword", + modifier = "modifier", + comment = "comment", + string = "string", + number = "number", + regexp = "regexp", + operator = "operator" +} +/** + * A set of predefined token modifiers. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ +export declare enum SemanticTokenModifiers { + declaration = "declaration", + definition = "definition", + readonly = "readonly", + static = "static", + deprecated = "deprecated", + abstract = "abstract", + async = "async", + modification = "modification", + documentation = "documentation", + defaultLibrary = "defaultLibrary" +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensLegend { + /** + * The token types a server uses. + */ + tokenTypes: string[]; + /** + * The token modifiers a server uses. + */ + tokenModifiers: string[]; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokens { + /** + * An optional result id. If provided and clients support delta updating + * the client will include the result id in the next semantic token request. + * A server can then instead of computing all semantic tokens again simply + * send a delta. + */ + resultId?: string; + /** + * The actual tokens. + */ + data: uinteger[]; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokens { + function is(value: any): value is SemanticTokens; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensPartialResult { + data: uinteger[]; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensEdit { + /** + * The start offset of the edit. + */ + start: uinteger; + /** + * The count of elements to remove. + */ + deleteCount: uinteger; + /** + * The elements to insert. + */ + data?: uinteger[]; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensDelta { + readonly resultId?: string; + /** + * The semantic token edits to transform a previous result into a new result. + */ + edits: SemanticTokensEdit[]; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensDeltaPartialResult { + edits: SemanticTokensEdit[]; +} +export declare namespace TokenFormat { + const Relative: 'relative'; +} +export declare type TokenFormat = 'relative'; +/** + * @since 3.16.0 + */ +export interface SemanticTokensClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + * return value for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; + /** + * Which requests the client supports and might send to the server + * depending on the server's capability. Please note that clients might not + * show semantic tokens or degrade some of the user experience if a range + * or full request is advertised by the client but not provided by the + * server. If for example the client capability `requests.full` and + * `request.range` are both set to true but the server only provides a + * range provider the client might not render a minimap correctly or might + * even decide to not show any semantic tokens at all. + */ + requests: { + /** + * The client will send the `textDocument/semanticTokens/range` request if + * the server provides a corresponding handler. + */ + range?: boolean | {}; + /** + * The client will send the `textDocument/semanticTokens/full` request if + * the server provides a corresponding handler. + */ + full?: boolean | { + /** + * The client will send the `textDocument/semanticTokens/full/delta` request if + * the server provides a corresponding handler. + */ + delta?: boolean; + }; + }; + /** + * The token types that the client supports. + */ + tokenTypes: string[]; + /** + * The token modifiers that the client supports. + */ + tokenModifiers: string[]; + /** + * The token formats the clients supports. + */ + formats: TokenFormat[]; + /** + * Whether the client supports tokens that can overlap each other. + */ + overlappingTokenSupport?: boolean; + /** + * Whether the client supports tokens that can span multiple lines. + */ + multilineTokenSupport?: boolean; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensOptions extends WorkDoneProgressOptions { + /** + * The legend used by the server + */ + legend: SemanticTokensLegend; + /** + * Server supports providing semantic tokens for a specific range + * of a document. + */ + range?: boolean | {}; + /** + * Server supports providing semantic tokens for a full document. + */ + full?: boolean | { + /** + * The server supports deltas for full documents. + */ + delta?: boolean; + }; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensRegistrationOptions extends TextDocumentRegistrationOptions, SemanticTokensOptions, StaticRegistrationOptions { +} +export declare namespace SemanticTokensRegistrationType { + const method: 'textDocument/semanticTokens'; + const type: RegistrationType; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokensRequest { + const method: 'textDocument/semanticTokens/full'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensDeltaParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The result id of a previous response. The result Id can either point to a full response + * or a delta response depending on what was received last. + */ + previousResultId: string; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokensDeltaRequest { + const method: 'textDocument/semanticTokens/full/delta'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +/** + * @since 3.16.0 + */ +export interface SemanticTokensRangeParams extends WorkDoneProgressParams, PartialResultParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The range the semantic tokens are requested for. + */ + range: Range; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokensRangeRequest { + const method: 'textDocument/semanticTokens/range'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} +export interface SemanticTokensWorkspaceClientCapabilities { + /** + * Whether the client implementation supports a refresh request sent from + * the server to the client. + * + * Note that this event is global and will force the client to refresh all + * semantic tokens currently shown. It should be used with absolute care + * and is useful for situation where a server for example detect a project + * wide change that requires such a calculation. + */ + refreshSupport?: boolean; +} +/** + * @since 3.16.0 + */ +export declare namespace SemanticTokensRefreshRequest { + const method: `workspace/semanticTokens/refresh`; + const type: ProtocolRequestType0; + type HandlerSignature = RequestHandler0; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js" index ee6ebacb48e3c9255cfbd9bb99abd673a385c92b..e7689be2caa2a057d6e440385709e205235b439c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js" @@ -1,3 +1,119 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f0efe1d26c9cfb1f51bce8b36a6174dcfd70a4e89c73205c51256d4c85c3cc86 -size 5902 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.SemanticTokensRegistrationType = exports.TokenFormat = exports.SemanticTokens = exports.SemanticTokenModifiers = exports.SemanticTokenTypes = void 0; +const messages_1 = require("./messages"); +/** + * A set of predefined token types. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ +var SemanticTokenTypes; +(function (SemanticTokenTypes) { + SemanticTokenTypes["namespace"] = "namespace"; + /** + * Represents a generic type. Acts as a fallback for types which can't be mapped to + * a specific type like class or enum. + */ + SemanticTokenTypes["type"] = "type"; + SemanticTokenTypes["class"] = "class"; + SemanticTokenTypes["enum"] = "enum"; + SemanticTokenTypes["interface"] = "interface"; + SemanticTokenTypes["struct"] = "struct"; + SemanticTokenTypes["typeParameter"] = "typeParameter"; + SemanticTokenTypes["parameter"] = "parameter"; + SemanticTokenTypes["variable"] = "variable"; + SemanticTokenTypes["property"] = "property"; + SemanticTokenTypes["enumMember"] = "enumMember"; + SemanticTokenTypes["event"] = "event"; + SemanticTokenTypes["function"] = "function"; + SemanticTokenTypes["method"] = "method"; + SemanticTokenTypes["macro"] = "macro"; + SemanticTokenTypes["keyword"] = "keyword"; + SemanticTokenTypes["modifier"] = "modifier"; + SemanticTokenTypes["comment"] = "comment"; + SemanticTokenTypes["string"] = "string"; + SemanticTokenTypes["number"] = "number"; + SemanticTokenTypes["regexp"] = "regexp"; + SemanticTokenTypes["operator"] = "operator"; +})(SemanticTokenTypes = exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {})); +/** + * A set of predefined token modifiers. This set is not fixed + * an clients can specify additional token types via the + * corresponding client capabilities. + * + * @since 3.16.0 + */ +var SemanticTokenModifiers; +(function (SemanticTokenModifiers) { + SemanticTokenModifiers["declaration"] = "declaration"; + SemanticTokenModifiers["definition"] = "definition"; + SemanticTokenModifiers["readonly"] = "readonly"; + SemanticTokenModifiers["static"] = "static"; + SemanticTokenModifiers["deprecated"] = "deprecated"; + SemanticTokenModifiers["abstract"] = "abstract"; + SemanticTokenModifiers["async"] = "async"; + SemanticTokenModifiers["modification"] = "modification"; + SemanticTokenModifiers["documentation"] = "documentation"; + SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary"; +})(SemanticTokenModifiers = exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {})); +/** + * @since 3.16.0 + */ +var SemanticTokens; +(function (SemanticTokens) { + function is(value) { + const candidate = value; + return candidate !== undefined && (candidate.resultId === undefined || typeof candidate.resultId === 'string') && + Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number'); + } + SemanticTokens.is = is; +})(SemanticTokens = exports.SemanticTokens || (exports.SemanticTokens = {})); +//------- 'textDocument/semanticTokens' ----- +var TokenFormat; +(function (TokenFormat) { + TokenFormat.Relative = 'relative'; +})(TokenFormat = exports.TokenFormat || (exports.TokenFormat = {})); +var SemanticTokensRegistrationType; +(function (SemanticTokensRegistrationType) { + SemanticTokensRegistrationType.method = 'textDocument/semanticTokens'; + SemanticTokensRegistrationType.type = new messages_1.RegistrationType(SemanticTokensRegistrationType.method); +})(SemanticTokensRegistrationType = exports.SemanticTokensRegistrationType || (exports.SemanticTokensRegistrationType = {})); +/** + * @since 3.16.0 + */ +var SemanticTokensRequest; +(function (SemanticTokensRequest) { + SemanticTokensRequest.method = 'textDocument/semanticTokens/full'; + SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method); +})(SemanticTokensRequest = exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {})); +/** + * @since 3.16.0 + */ +var SemanticTokensDeltaRequest; +(function (SemanticTokensDeltaRequest) { + SemanticTokensDeltaRequest.method = 'textDocument/semanticTokens/full/delta'; + SemanticTokensDeltaRequest.type = new messages_1.ProtocolRequestType(SemanticTokensDeltaRequest.method); +})(SemanticTokensDeltaRequest = exports.SemanticTokensDeltaRequest || (exports.SemanticTokensDeltaRequest = {})); +/** + * @since 3.16.0 + */ +var SemanticTokensRangeRequest; +(function (SemanticTokensRangeRequest) { + SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range'; + SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method); +})(SemanticTokensRangeRequest = exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {})); +/** + * @since 3.16.0 + */ +var SemanticTokensRefreshRequest; +(function (SemanticTokensRefreshRequest) { + SemanticTokensRefreshRequest.method = `workspace/semanticTokens/refresh`; + SemanticTokensRefreshRequest.type = new messages_1.ProtocolRequestType0(SemanticTokensRefreshRequest.method); +})(SemanticTokensRefreshRequest = exports.SemanticTokensRefreshRequest || (exports.SemanticTokensRefreshRequest = {})); +//# sourceMappingURL=protocol.semanticTokens.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts" index 145d8158b252c42e2a6fe130db751c76943e7943..90f0a4e2a9b8b67b2820d898877f65579f4d5ed2 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts" @@ -1,3 +1,71 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:707db20cf8a4ee166e63861c0a7d355b44595555e0248565479e745f6c1034d0 -size 2139 +import { HandlerResult, RequestHandler } from 'vscode-jsonrpc'; +import { Range, URI } from 'vscode-languageserver-types'; +import { ProtocolRequestType } from './messages'; +/** + * Client capabilities for the show document request. + * + * @since 3.16.0 + */ +export interface ShowDocumentClientCapabilities { + /** + * The client has support for the show document + * request. + */ + support: boolean; +} +/** + * Params to show a document. + * + * @since 3.16.0 + */ +export interface ShowDocumentParams { + /** + * The document uri to show. + */ + uri: URI; + /** + * Indicates to show the resource in an external program. + * To show for example `https://code.visualstudio.com/` + * in the default WEB browser set `external` to `true`. + */ + external?: boolean; + /** + * An optional property to indicate whether the editor + * showing the document should take focus or not. + * Clients might ignore this property if an external + * program in started. + */ + takeFocus?: boolean; + /** + * An optional selection range if the document is a text + * document. Clients might ignore the property if an + * external program is started or the file is not a text + * file. + */ + selection?: Range; +} +/** + * The result of an show document request. + * + * @since 3.16.0 + */ +export interface ShowDocumentResult { + /** + * A boolean indicating if the show was successful. + */ + success: boolean; +} +/** + * A request to show a document. This request might open an + * external program depending on the value of the URI to open. + * For example a request to open `https://code.visualstudio.com/` + * will very likely open the URI in a WEB browser. + * + * @since 3.16.0 +*/ +export declare namespace ShowDocumentRequest { + const method: 'window/showDocument'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; + type MiddlewareSignature = (params: ShowDocumentParams, next: HandlerSignature) => HandlerResult; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js" index f2986c9c68556eb603aa3a74d45e53aa4d4fce16..73637d7446773f34ea92c6a1cb462570d4b23f49 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js" @@ -1,3 +1,22 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4fc9ddb5dce1eafd6a3aa36c2cdbde38409a5f92f8183a1c329b975006b83c74 -size 1126 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ShowDocumentRequest = void 0; +const messages_1 = require("./messages"); +/** + * A request to show a document. This request might open an + * external program depending on the value of the URI to open. + * For example a request to open `https://code.visualstudio.com/` + * will very likely open the URI in a WEB browser. + * + * @since 3.16.0 +*/ +var ShowDocumentRequest; +(function (ShowDocumentRequest) { + ShowDocumentRequest.method = 'window/showDocument'; + ShowDocumentRequest.type = new messages_1.ProtocolRequestType(ShowDocumentRequest.method); +})(ShowDocumentRequest = exports.ShowDocumentRequest || (exports.ShowDocumentRequest = {})); +//# sourceMappingURL=protocol.showDocument.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts" index bcd94c8280d18bee8fd6606d8d799f89d2e00c5b..56e34a64901ac28579fb63497c4e3067dd59232d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts" @@ -1,3 +1,38 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ad91f5cc45805d17ac94b01428f82b182c6ff0ebe6343d72fd298945478d203d -size 1914 +import { RequestHandler } from 'vscode-jsonrpc'; +import { Definition, DefinitionLink, LocationLink, Location } from 'vscode-languageserver-types'; +import { ProtocolRequestType } from './messages'; +import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; +/** + * Since 3.6.0 + */ +export interface TypeDefinitionClientCapabilities { + /** + * Whether implementation supports dynamic registration. If this is set to `true` + * the client supports the new `TypeDefinitionRegistrationOptions` return value + * for the corresponding server capability as well. + */ + dynamicRegistration?: boolean; + /** + * The client supports additional metadata in the form of definition links. + * + * Since 3.14.0 + */ + linkSupport?: boolean; +} +export interface TypeDefinitionOptions extends WorkDoneProgressOptions { +} +export interface TypeDefinitionRegistrationOptions extends TextDocumentRegistrationOptions, TypeDefinitionOptions, StaticRegistrationOptions { +} +export interface TypeDefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { +} +/** + * A request to resolve the type definition locations of a symbol at a given text + * document position. The request's parameter is of type [TextDocumentPositioParams] + * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a + * Thenable that resolves to such. + */ +export declare namespace TypeDefinitionRequest { + const method: 'textDocument/typeDefinition'; + const type: ProtocolRequestType; + type HandlerSignature = RequestHandler; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js" index 8b4b48583333ff44efa1d8efe190dbe08bfda2c7..4fce708c521557773d4e2b9a74d1f0e689bf156d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js" @@ -1,3 +1,22 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fc434d28a7694a849ac0034c77fc3564dacace0002d554b33e2373d63ade3193 -size 1271 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypeDefinitionRequest = void 0; +const messages_1 = require("./messages"); +// @ts-ignore: to avoid inlining LocatioLink as dynamic import +let __noDynamicImport; +/** + * A request to resolve the type definition locations of a symbol at a given text + * document position. The request's parameter is of type [TextDocumentPositioParams] + * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a + * Thenable that resolves to such. + */ +var TypeDefinitionRequest; +(function (TypeDefinitionRequest) { + TypeDefinitionRequest.method = 'textDocument/typeDefinition'; + TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method); +})(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {})); +//# sourceMappingURL=protocol.typeDefinition.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolders.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolders.d.ts" index ce54af087f84385bd218f58e089f0cdd766ba9d8..8b2e274b6918319535280ba5edea8fe7c508171b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolders.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolders.d.ts" @@ -1,3 +1,94 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:df4ba08679bfd850b787d662118aae3c4741dcaa661cf8689a768dab462cfd90 -size 3168 +import { RequestHandler0, NotificationHandler, HandlerResult, CancellationToken } from 'vscode-jsonrpc'; +import { ProtocolRequestType0, ProtocolNotificationType } from './messages'; +export interface WorkspaceFoldersInitializeParams { + /** + * The actual configured workspace folders. + */ + workspaceFolders: WorkspaceFolder[] | null; +} +export interface WorkspaceFoldersClientCapabilities { + /** + * The workspace client capabilities + */ + workspace?: { + /** + * The client has support for workspace folders + * + * @since 3.6.0 + */ + workspaceFolders?: boolean; + }; +} +export interface WorkspaceFoldersServerCapabilities { + /** + * The workspace server capabilities + */ + workspace?: { + workspaceFolders?: { + /** + * The Server has support for workspace folders + */ + supported?: boolean; + /** + * Whether the server wants to receive workspace folder + * change notifications. + * + * If a strings is provided the string is treated as a ID + * under which the notification is registered on the client + * side. The ID can be used to unregister for these events + * using the `client/unregisterCapability` request. + */ + changeNotifications?: string | boolean; + }; + }; +} +export interface WorkspaceFolder { + /** + * The associated URI for this workspace folder. + */ + uri: string; + /** + * The name of the workspace folder. Used to refer to this + * workspace folder in the user interface. + */ + name: string; +} +/** + * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders. + */ +export declare namespace WorkspaceFoldersRequest { + const type: ProtocolRequestType0; + type HandlerSignature = RequestHandler0; + type MiddlewareSignature = (token: CancellationToken, next: HandlerSignature) => HandlerResult; +} +/** + * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace + * folder configuration changes. + */ +export declare namespace DidChangeWorkspaceFoldersNotification { + const type: ProtocolNotificationType; + type HandlerSignature = NotificationHandler; + type MiddlewareSignature = (params: DidChangeWorkspaceFoldersParams, next: HandlerSignature) => void; +} +/** + * The parameters of a `workspace/didChangeWorkspaceFolders` notification. + */ +export interface DidChangeWorkspaceFoldersParams { + /** + * The actual workspace folder change event. + */ + event: WorkspaceFoldersChangeEvent; +} +/** + * The workspace folder change event. + */ +export interface WorkspaceFoldersChangeEvent { + /** + * The array of added workspace folders + */ + added: WorkspaceFolder[]; + /** + * The array of the removed workspace folders + */ + removed: WorkspaceFolder[]; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolders.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolders.js" index 02cc478c23061a53f4bcdfdef67ec23cb8ae3578..94f859a39f6a0dd0369e87783730a8e99e6e2ee4 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolders.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolders.js" @@ -1,3 +1,24 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cabb45f6480ec03a726c357570a6aca50c2b82fb2b7c9ffdd2ad231856e2c63a -size 1532 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = void 0; +const messages_1 = require("./messages"); +/** + * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders. + */ +var WorkspaceFoldersRequest; +(function (WorkspaceFoldersRequest) { + WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0('workspace/workspaceFolders'); +})(WorkspaceFoldersRequest = exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {})); +/** + * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace + * folder configuration changes. + */ +var DidChangeWorkspaceFoldersNotification; +(function (DidChangeWorkspaceFoldersNotification) { + DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWorkspaceFolders'); +})(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {})); +//# sourceMappingURL=protocol.workspaceFolders.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/utils/is.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/utils/is.d.ts" index e2651b0bf450668ca327da059dfa56728e734fb7..e486414296582e8ec316818c46d076a993d34b77 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/utils/is.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/utils/is.d.ts" @@ -1,3 +1,9 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d7a48988ed49ecb85bf47987be5652cdf9cbca8d9ce336642a2a3350a368ab2f -size 598 +export declare function boolean(value: any): value is boolean; +export declare function string(value: any): value is string; +export declare function number(value: any): value is number; +export declare function error(value: any): value is Error; +export declare function func(value: any): value is Function; +export declare function array(value: any): value is T[]; +export declare function stringArray(value: any): value is string[]; +export declare function typedArray(value: any, check: (value: any) => boolean): value is T[]; +export declare function objectLiteral(value: any): value is object; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js" index cbe47b3860a5e24aadefbfd870164e4037ee377e..8b88e81407f43938d56e7a6ee06ebad086cdb505 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js" @@ -1,3 +1,47 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:639aaa9588ea20578bbac44c956af44a7c09921285df4701c05e7f2ca011c9b3 -size 1844 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.objectLiteral = exports.typedArray = exports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0; +function boolean(value) { + return value === true || value === false; +} +exports.boolean = boolean; +function string(value) { + return typeof value === 'string' || value instanceof String; +} +exports.string = string; +function number(value) { + return typeof value === 'number' || value instanceof Number; +} +exports.number = number; +function error(value) { + return value instanceof Error; +} +exports.error = error; +function func(value) { + return typeof value === 'function'; +} +exports.func = func; +function array(value) { + return Array.isArray(value); +} +exports.array = array; +function stringArray(value) { + return array(value) && value.every(elem => string(elem)); +} +exports.stringArray = stringArray; +function typedArray(value, check) { + return Array.isArray(value) && value.every(check); +} +exports.typedArray = typedArray; +function objectLiteral(value) { + // Strictly speaking class instances pass this check as well. Since the LSP + // doesn't use classes we ignore this for now. If we do we need to add something + // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null` + return value !== null && typeof value === 'object'; +} +exports.objectLiteral = objectLiteral; +//# sourceMappingURL=is.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts" index 5603ef6a8c1b3655d4262d25c46657b5035c11fc..06e8b5f84c9b3b40a177dcb064b2b1f01adadb65 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d789022bf705385490fe89811bc7850225c207f37dd706ada2509eb1d8f31f12 -size 608 +/// +import { MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, ProtocolConnection } from '../common/api'; +export * from 'vscode-jsonrpc/node'; +export * from '../common/api'; +export declare function createProtocolConnection(input: MessageReader, output: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection; +export declare function createProtocolConnection(input: NodeJS.ReadableStream, output: NodeJS.WritableStream, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/node/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/node/main.js" index 493d8e978d379a6f5de678c578b56eb338154f67..eab98089a6d3d936cb5f494a351e694e665f47fc 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/node/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/lib/node/main.js" @@ -1,3 +1,25 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ad18d4c4351c05787d104ff42519b740483680f78f06dd0cc385312d5eb77248 -size 1371 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createProtocolConnection = void 0; +const node_1 = require("vscode-jsonrpc/node"); +__exportStar(require("vscode-jsonrpc/node"), exports); +__exportStar(require("../common/api"), exports); +function createProtocolConnection(input, output, logger, options) { + return node_1.createMessageConnection(input, output, logger, options); +} +exports.createProtocolConnection = createProtocolConnection; +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/node.cmd" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/node.cmd" index d6820389cf905e2639588cfaf3d1dd49787060d0..791e6e36ca158adb27a1ca664413568656ce2781 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/node.cmd" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/node.cmd" @@ -1,3 +1,5 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fad7474018db5e3ef38b97374d82fb3b5c56a16aee423f482b6732800007f533 -size 213 +@echo off +REM This file is necessary to ensure that under Windows we don't +REM run the node.js file in the Windows Script Host when using +REM node in packakge.json scripts. See also PATHEXT setting +node.exe %* \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/node.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/node.d.ts" index d4501421d4bd489c9190700a07b50dd52678f01e..b4c4fcd723edbd7b4ea066a4059cf8393e46aa88 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/node.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/node.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c98df0145d99011af92c397fa787fc39d42cc04019614ab5581febe71fb32e1 -size 382 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/node/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/node.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/node.js" index 6ca9fea0ab31ba44f19549c8fa3b28a055f235c0..388e3197ebb862634cda424e9d707896b40627da 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/node.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/node.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20ed9d05087fa65ed99369c32ebaad6d2714c56d38b6b58e660ec428d1280054 -size 408 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/node/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/package.json" index 43c8718df066806990453efb197cbecb5575e4fa..4f39d92c674c3b4cf700713c3188997e15cb25f1 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/package.json" @@ -1,3 +1,37 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fb77f6847dd8dcdd5ef260671d788f00fc341fb631f2d7ac47b4295a7c3f25fb -size 1651 +{ + "name": "vscode-languageserver-protocol", + "description": "VSCode Language Server Protocol implementation", + "version": "3.16.0", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-languageserver-node.git", + "directory": "protocol" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "main": "./lib/node/main.js", + "browser": { + "./lib/node/main.js": "./lib/browser/main.js" + }, + "typings": "./lib/common/api.d.ts", + "dependencies": { + "vscode-jsonrpc": "6.0.0", + "vscode-languageserver-types": "3.16.0" + }, + "scripts": { + "prepublishOnly": "git clean -xfd . && npm install && npm run clean && npm run compile && npm test", + "postpublish": "node ../build/npm/post-publish.js", + "preversion": "npm test", + "compile": "node ../build/bin/tsc -b ./tsconfig.json", + "watch": "node ../build/bin/tsc -b ./tsconfig-watch.json -w", + "clean": "node ../node_modules/rimraf/bin.js lib && node ../node_modules/rimraf/bin.js dist", + "test": "npm run test:node && npm run test:browser", + "test:node": "node ../node_modules/mocha/bin/_mocha", + "test:browser": "npm run webpack:test:silent && node ../build/bin/runBrowserTests.js http://127.0.0.1:8080/protocol/src/browser/test/", + "webpack:test": "cd ../types && npm run compile:esm && cd ../protocol && node ../build/bin/webpack --mode none --config ./src/browser/test/webpack.config.js", + "webpack:test:silent": "cd ../types && npm run compile:esm && cd ../protocol && node ../build/bin/webpack --no-stats --mode none --config ./src/browser/test/webpack.config.js" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/thirdpartynotices.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/thirdpartynotices.txt" index 54a2efc3a3447e903f30209d65107ca6f758e3f2..b7a903077dd86a250f408b0f0ae6120c6fd2e9a5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/thirdpartynotices.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol/thirdpartynotices.txt" @@ -1,3 +1,31 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9265d27cf75775aa5ae19c5ba01846fb70ecd5121f8c39c81bef7e03f007072c -size 1823 +THIRD-PARTY SOFTWARE NOTICES AND INFORMATION +For Microsoft vscode-languageclient + +This project incorporates material from the project(s) listed below (collectively, “Third Party Code”). +Microsoft is not the original author of the Third Party Code. The original copyright notice and license +under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed +to you under their original license terms set forth below. Microsoft reserves all other rights not expressly +granted, whether by implication, estoppel or otherwise. + +1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped) + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/License.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/License.txt" index 71c73d0cbbb244fd8977b1334dae3ac9800e0c19..a07e3ae825f86b6d1f966659954bffc0768bef66 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/License.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/License.txt" @@ -1,3 +1,11 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec9ee83580841e8eb687aca9867f221503809ba6426c7f876ede17d91b9fcfd0 -size 1095 +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/README.md" index 9f70bbcc45463bc7e2445f4267ccf708f8cbcbe6..d47c6d873bb025765df353d1b7f5a40c3efd8ac3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/README.md" @@ -1,3 +1,17 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:53b5e27821b28f8b28f6f13f72d31bfb54793b8ba14bc9d039f1d537d5073043 -size 1023 +# VSCode Language Server Types + +[![NPM Version](https://img.shields.io/npm/v/vscode-languageserver-types.svg)](https://npmjs.org/package/vscode-languageserver-types) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-languageserver-types.svg)](https://npmjs.org/package/vscode-languageserver-types) +[![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-types-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-types-node) + +Npm module containing the types used by the VSCode language client and [Node.js](https://nodejs.org/) language server + +Click [here](https://code.visualstudio.com/docs/extensions/example-language-server) for a detailed document on how +to implement language servers for [VSCode](https://code.visualstudio.com/). + +## History + +For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md) + +## License +[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt) diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/lib/esm/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/lib/esm/main.d.ts" index 190bbc7ca1bc53d5485f0559fd33ebb6f557a235..bcfb8a8d71f0de540d020b494ba6fb80e41cbdea 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/lib/esm/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/lib/esm/main.d.ts" @@ -1,3 +1,2323 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a337b9716b16c46e80a8810209cb162d32af16c6c93b331edcc01cdce5d82eba -size 75262 +/** + * A tagging type for string properties that are actually document URIs. + */ +export declare type DocumentUri = string; +/** + * A tagging type for string properties that are actually URIs + * + * @since 3.16.0 + */ +export declare type URI = string; +/** + * Defines an integer in the range of -2^31 to 2^31 - 1. + */ +export declare type integer = number; +export declare namespace integer { + const MIN_VALUE = -2147483648; + const MAX_VALUE = 2147483647; +} +/** + * Defines an unsigned integer in the range of 0 to 2^31 - 1. + */ +export declare type uinteger = number; +export declare namespace uinteger { + const MIN_VALUE = 0; + const MAX_VALUE = 2147483647; +} +/** + * Defines a decimal number. Since decimal numbers are very + * rare in the language server specification we denote the + * exact range with every decimal using the mathematics + * interval notations (e.g. [0, 1] denotes all decimals d with + * 0 <= d <= 1. + */ +export declare type decimal = number; +/** + * Position in a text document expressed as zero-based line and character offset. + * The offsets are based on a UTF-16 string representation. So a string of the form + * `a𐐀b` the character offset of the character `a` is 0, the character offset of `𐐀` + * is 1 and the character offset of b is 3 since `𐐀` is represented using two code + * units in UTF-16. + * + * Positions are line end character agnostic. So you can not specify a position that + * denotes `\r|\n` or `\n|` where `|` represents the character offset. + */ +export interface Position { + /** + * Line position in a document (zero-based). + */ + line: uinteger; + /** + * Character offset on a line in a document (zero-based). Assuming that the line is + * represented as a string, the `character` value represents the gap between the + * `character` and `character + 1`. + * + * If the character value is greater than the line length it defaults back to the + * line length. + */ + character: uinteger; +} +/** + * The Position namespace provides helper functions to work with + * [Position](#Position) literals. + */ +export declare namespace Position { + /** + * Creates a new Position literal from the given line and character. + * @param line The position's line. + * @param character The position's character. + */ + function create(line: uinteger, character: uinteger): Position; + /** + * Checks whether the given literal conforms to the [Position](#Position) interface. + */ + function is(value: any): value is Position; +} +/** + * A range in a text document expressed as (zero-based) start and end positions. + * + * If you want to specify a range that contains a line including the line ending + * character(s) then use an end position denoting the start of the next line. + * For example: + * ```ts + * { + * start: { line: 5, character: 23 } + * end : { line 6, character : 0 } + * } + * ``` + */ +export interface Range { + /** + * The range's start position + */ + start: Position; + /** + * The range's end position. + */ + end: Position; +} +/** + * The Range namespace provides helper functions to work with + * [Range](#Range) literals. + */ +export declare namespace Range { + /** + * Create a new Range literal. + * @param start The range's start position. + * @param end The range's end position. + */ + function create(start: Position, end: Position): Range; + /** + * Create a new Range literal. + * @param startLine The start line number. + * @param startCharacter The start character. + * @param endLine The end line number. + * @param endCharacter The end character. + */ + function create(startLine: uinteger, startCharacter: uinteger, endLine: uinteger, endCharacter: uinteger): Range; + /** + * Checks whether the given literal conforms to the [Range](#Range) interface. + */ + function is(value: any): value is Range; +} +/** + * Represents a location inside a resource, such as a line + * inside a text file. + */ +export interface Location { + uri: DocumentUri; + range: Range; +} +/** + * The Location namespace provides helper functions to work with + * [Location](#Location) literals. + */ +export declare namespace Location { + /** + * Creates a Location literal. + * @param uri The location's uri. + * @param range The location's range. + */ + function create(uri: DocumentUri, range: Range): Location; + /** + * Checks whether the given literal conforms to the [Location](#Location) interface. + */ + function is(value: any): value is Location; +} +/** + * Represents the connection of two locations. Provides additional metadata over normal [locations](#Location), + * including an origin range. + */ +export interface LocationLink { + /** + * Span of the origin of this link. + * + * Used as the underlined span for mouse definition hover. Defaults to the word range at + * the definition position. + */ + originSelectionRange?: Range; + /** + * The target resource identifier of this link. + */ + targetUri: DocumentUri; + /** + * The full target range of this link. If the target for example is a symbol then target range is the + * range enclosing this symbol not including leading/trailing whitespace but everything else + * like comments. This information is typically used to highlight the range in the editor. + */ + targetRange: Range; + /** + * The range that should be selected and revealed when this link is being followed, e.g the name of a function. + * Must be contained by the the `targetRange`. See also `DocumentSymbol#range` + */ + targetSelectionRange: Range; +} +/** + * The LocationLink namespace provides helper functions to work with + * [LocationLink](#LocationLink) literals. + */ +export declare namespace LocationLink { + /** + * Creates a LocationLink literal. + * @param targetUri The definition's uri. + * @param targetRange The full range of the definition. + * @param targetSelectionRange The span of the symbol definition at the target. + * @param originSelectionRange The span of the symbol being defined in the originating source file. + */ + function create(targetUri: DocumentUri, targetRange: Range, targetSelectionRange: Range, originSelectionRange?: Range): LocationLink; + /** + * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface. + */ + function is(value: any): value is LocationLink; +} +/** + * Represents a color in RGBA space. + */ +export interface Color { + /** + * The red component of this color in the range [0-1]. + */ + readonly red: decimal; + /** + * The green component of this color in the range [0-1]. + */ + readonly green: decimal; + /** + * The blue component of this color in the range [0-1]. + */ + readonly blue: decimal; + /** + * The alpha component of this color in the range [0-1]. + */ + readonly alpha: decimal; +} +/** + * The Color namespace provides helper functions to work with + * [Color](#Color) literals. + */ +export declare namespace Color { + /** + * Creates a new Color literal. + */ + function create(red: decimal, green: decimal, blue: decimal, alpha: decimal): Color; + /** + * Checks whether the given literal conforms to the [Color](#Color) interface. + */ + function is(value: any): value is Color; +} +/** + * Represents a color range from a document. + */ +export interface ColorInformation { + /** + * The range in the document where this color appears. + */ + range: Range; + /** + * The actual color value for this color range. + */ + color: Color; +} +/** + * The ColorInformation namespace provides helper functions to work with + * [ColorInformation](#ColorInformation) literals. + */ +export declare namespace ColorInformation { + /** + * Creates a new ColorInformation literal. + */ + function create(range: Range, color: Color): ColorInformation; + /** + * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface. + */ + function is(value: any): value is ColorInformation; +} +export interface ColorPresentation { + /** + * The label of this color presentation. It will be shown on the color + * picker header. By default this is also the text that is inserted when selecting + * this color presentation. + */ + label: string; + /** + * An [edit](#TextEdit) which is applied to a document when selecting + * this presentation for the color. When `falsy` the [label](#ColorPresentation.label) + * is used. + */ + textEdit?: TextEdit; + /** + * An optional array of additional [text edits](#TextEdit) that are applied when + * selecting this color presentation. Edits must not overlap with the main [edit](#ColorPresentation.textEdit) nor with themselves. + */ + additionalTextEdits?: TextEdit[]; +} +/** + * The Color namespace provides helper functions to work with + * [ColorPresentation](#ColorPresentation) literals. + */ +export declare namespace ColorPresentation { + /** + * Creates a new ColorInformation literal. + */ + function create(label: string, textEdit?: TextEdit, additionalTextEdits?: TextEdit[]): ColorPresentation; + /** + * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface. + */ + function is(value: any): value is ColorPresentation; +} +/** + * Enum of known range kinds + */ +export declare enum FoldingRangeKind { + /** + * Folding range for a comment + */ + Comment = "comment", + /** + * Folding range for a imports or includes + */ + Imports = "imports", + /** + * Folding range for a region (e.g. `#region`) + */ + Region = "region" +} +/** + * Represents a folding range. To be valid, start and end line must be bigger than zero and smaller + * than the number of lines in the document. Clients are free to ignore invalid ranges. + */ +export interface FoldingRange { + /** + * The zero-based start line of the range to fold. The folded area starts after the line's last character. + * To be valid, the end must be zero or larger and smaller than the number of lines in the document. + */ + startLine: uinteger; + /** + * The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line. + */ + startCharacter?: uinteger; + /** + * The zero-based end line of the range to fold. The folded area ends with the line's last character. + * To be valid, the end must be zero or larger and smaller than the number of lines in the document. + */ + endLine: uinteger; + /** + * The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line. + */ + endCharacter?: uinteger; + /** + * Describes the kind of the folding range such as `comment' or 'region'. The kind + * is used to categorize folding ranges and used by commands like 'Fold all comments'. See + * [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds. + */ + kind?: string; +} +/** + * The folding range namespace provides helper functions to work with + * [FoldingRange](#FoldingRange) literals. + */ +export declare namespace FoldingRange { + /** + * Creates a new FoldingRange literal. + */ + function create(startLine: uinteger, endLine: uinteger, startCharacter?: uinteger, endCharacter?: uinteger, kind?: string): FoldingRange; + /** + * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface. + */ + function is(value: any): value is FoldingRange; +} +/** + * Represents a related message and source code location for a diagnostic. This should be + * used to point to code locations that cause or related to a diagnostics, e.g when duplicating + * a symbol in a scope. + */ +export interface DiagnosticRelatedInformation { + /** + * The location of this related diagnostic information. + */ + location: Location; + /** + * The message of this related diagnostic information. + */ + message: string; +} +/** + * The DiagnosticRelatedInformation namespace provides helper functions to work with + * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals. + */ +export declare namespace DiagnosticRelatedInformation { + /** + * Creates a new DiagnosticRelatedInformation literal. + */ + function create(location: Location, message: string): DiagnosticRelatedInformation; + /** + * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface. + */ + function is(value: any): value is DiagnosticRelatedInformation; +} +/** + * The diagnostic's severity. + */ +export declare namespace DiagnosticSeverity { + /** + * Reports an error. + */ + const Error: 1; + /** + * Reports a warning. + */ + const Warning: 2; + /** + * Reports an information. + */ + const Information: 3; + /** + * Reports a hint. + */ + const Hint: 4; +} +export declare type DiagnosticSeverity = 1 | 2 | 3 | 4; +/** + * The diagnostic tags. + * + * @since 3.15.0 + */ +export declare namespace DiagnosticTag { + /** + * Unused or unnecessary code. + * + * Clients are allowed to render diagnostics with this tag faded out instead of having + * an error squiggle. + */ + const Unnecessary: 1; + /** + * Deprecated or obsolete code. + * + * Clients are allowed to rendered diagnostics with this tag strike through. + */ + const Deprecated: 2; +} +export declare type DiagnosticTag = 1 | 2; +/** + * Structure to capture a description for an error code. + * + * @since 3.16.0 + */ +export interface CodeDescription { + /** + * An URI to open with more information about the diagnostic error. + */ + href: URI; +} +/** + * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes. + * + * @since 3.16.0 + */ +export declare namespace CodeDescription { + function is(value: CodeDescription | undefined | null): value is CodeDescription; +} +/** + * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects + * are only valid in the scope of a resource. + */ +export interface Diagnostic { + /** + * The range at which the message applies + */ + range: Range; + /** + * The diagnostic's severity. Can be omitted. If omitted it is up to the + * client to interpret diagnostics as error, warning, info or hint. + */ + severity?: DiagnosticSeverity; + /** + * The diagnostic's code, which usually appear in the user interface. + */ + code?: integer | string; + /** + * An optional property to describe the error code. + * + * @since 3.16.0 + */ + codeDescription?: CodeDescription; + /** + * A human-readable string describing the source of this + * diagnostic, e.g. 'typescript' or 'super lint'. It usually + * appears in the user interface. + */ + source?: string; + /** + * The diagnostic's message. It usually appears in the user interface + */ + message: string; + /** + * Additional metadata about the diagnostic. + * + * @since 3.15.0 + */ + tags?: DiagnosticTag[]; + /** + * An array of related diagnostic information, e.g. when symbol-names within + * a scope collide all definitions can be marked via this property. + */ + relatedInformation?: DiagnosticRelatedInformation[]; + /** + * A data entry field that is preserved between a `textDocument/publishDiagnostics` + * notification and `textDocument/codeAction` request. + * + * @since 3.16.0 + */ + data?: unknown; +} +/** + * The Diagnostic namespace provides helper functions to work with + * [Diagnostic](#Diagnostic) literals. + */ +export declare namespace Diagnostic { + /** + * Creates a new Diagnostic literal. + */ + function create(range: Range, message: string, severity?: DiagnosticSeverity, code?: integer | string, source?: string, relatedInformation?: DiagnosticRelatedInformation[]): Diagnostic; + /** + * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface. + */ + function is(value: any): value is Diagnostic; +} +/** + * Represents a reference to a command. Provides a title which + * will be used to represent a command in the UI and, optionally, + * an array of arguments which will be passed to the command handler + * function when invoked. + */ +export interface Command { + /** + * Title of the command, like `save`. + */ + title: string; + /** + * The identifier of the actual command handler. + */ + command: string; + /** + * Arguments that the command handler should be + * invoked with. + */ + arguments?: any[]; +} +/** + * The Command namespace provides helper functions to work with + * [Command](#Command) literals. + */ +export declare namespace Command { + /** + * Creates a new Command literal. + */ + function create(title: string, command: string, ...args: any[]): Command; + /** + * Checks whether the given literal conforms to the [Command](#Command) interface. + */ + function is(value: any): value is Command; +} +/** + * A text edit applicable to a text document. + */ +export interface TextEdit { + /** + * The range of the text document to be manipulated. To insert + * text into a document create a range where start === end. + */ + range: Range; + /** + * The string to be inserted. For delete operations use an + * empty string. + */ + newText: string; +} +/** + * The TextEdit namespace provides helper function to create replace, + * insert and delete edits more easily. + */ +export declare namespace TextEdit { + /** + * Creates a replace text edit. + * @param range The range of text to be replaced. + * @param newText The new text. + */ + function replace(range: Range, newText: string): TextEdit; + /** + * Creates a insert text edit. + * @param position The position to insert the text at. + * @param newText The text to be inserted. + */ + function insert(position: Position, newText: string): TextEdit; + /** + * Creates a delete text edit. + * @param range The range of text to be deleted. + */ + function del(range: Range): TextEdit; + function is(value: any): value is TextEdit; +} +/** + * Additional information that describes document changes. + * + * @since 3.16.0 + */ +export interface ChangeAnnotation { + /** + * A human-readable string describing the actual change. The string + * is rendered prominent in the user interface. + */ + label: string; + /** + * A flag which indicates that user confirmation is needed + * before applying the change. + */ + needsConfirmation?: boolean; + /** + * A human-readable string which is rendered less prominent in + * the user interface. + */ + description?: string; +} +export declare namespace ChangeAnnotation { + function create(label: string, needsConfirmation?: boolean, description?: string): ChangeAnnotation; + function is(value: any): value is ChangeAnnotation; +} +export declare namespace ChangeAnnotationIdentifier { + function is(value: any): value is ChangeAnnotationIdentifier; +} +/** + * An identifier to refer to a change annotation stored with a workspace edit. + */ +export declare type ChangeAnnotationIdentifier = string; +/** + * A special text edit with an additional change annotation. + * + * @since 3.16.0. + */ +export interface AnnotatedTextEdit extends TextEdit { + /** + * The actual identifier of the change annotation + */ + annotationId: ChangeAnnotationIdentifier; +} +export declare namespace AnnotatedTextEdit { + /** + * Creates an annotated replace text edit. + * + * @param range The range of text to be replaced. + * @param newText The new text. + * @param annotation The annotation. + */ + function replace(range: Range, newText: string, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + /** + * Creates an annotated insert text edit. + * + * @param position The position to insert the text at. + * @param newText The text to be inserted. + * @param annotation The annotation. + */ + function insert(position: Position, newText: string, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + /** + * Creates an annotated delete text edit. + * + * @param range The range of text to be deleted. + * @param annotation The annotation. + */ + function del(range: Range, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + function is(value: any): value is AnnotatedTextEdit; +} +/** + * Describes textual changes on a text document. A TextDocumentEdit describes all changes + * on a document version Si and after they are applied move the document to version Si+1. + * So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any + * kind of ordering. However the edits must be non overlapping. + */ +export interface TextDocumentEdit { + /** + * The text document to change. + */ + textDocument: OptionalVersionedTextDocumentIdentifier; + /** + * The edits to be applied. + * + * @since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a + * client capability. + */ + edits: (TextEdit | AnnotatedTextEdit)[]; +} +/** + * The TextDocumentEdit namespace provides helper function to create + * an edit that manipulates a text document. + */ +export declare namespace TextDocumentEdit { + /** + * Creates a new `TextDocumentEdit` + */ + function create(textDocument: OptionalVersionedTextDocumentIdentifier, edits: (TextEdit | AnnotatedTextEdit)[]): TextDocumentEdit; + function is(value: any): value is TextDocumentEdit; +} +/** + * A generic resource operation. + */ +interface ResourceOperation { + /** + * The resource operation kind. + */ + kind: string; + /** + * An optional annotation identifier describing the operation. + * + * @since 3.16.0 + */ + annotationId?: ChangeAnnotationIdentifier; +} +/** + * Options to create a file. + */ +export interface CreateFileOptions { + /** + * Overwrite existing file. Overwrite wins over `ignoreIfExists` + */ + overwrite?: boolean; + /** + * Ignore if exists. + */ + ignoreIfExists?: boolean; +} +/** + * Create file operation. + */ +export interface CreateFile extends ResourceOperation { + /** + * A create + */ + kind: 'create'; + /** + * The resource to create. + */ + uri: DocumentUri; + /** + * Additional options + */ + options?: CreateFileOptions; +} +export declare namespace CreateFile { + function create(uri: DocumentUri, options?: CreateFileOptions, annotation?: ChangeAnnotationIdentifier): CreateFile; + function is(value: any): value is CreateFile; +} +/** + * Rename file options + */ +export interface RenameFileOptions { + /** + * Overwrite target if existing. Overwrite wins over `ignoreIfExists` + */ + overwrite?: boolean; + /** + * Ignores if target exists. + */ + ignoreIfExists?: boolean; +} +/** + * Rename file operation + */ +export interface RenameFile extends ResourceOperation { + /** + * A rename + */ + kind: 'rename'; + /** + * The old (existing) location. + */ + oldUri: DocumentUri; + /** + * The new location. + */ + newUri: DocumentUri; + /** + * Rename options. + */ + options?: RenameFileOptions; +} +export declare namespace RenameFile { + function create(oldUri: DocumentUri, newUri: DocumentUri, options?: RenameFileOptions, annotation?: ChangeAnnotationIdentifier): RenameFile; + function is(value: any): value is RenameFile; +} +/** + * Delete file options + */ +export interface DeleteFileOptions { + /** + * Delete the content recursively if a folder is denoted. + */ + recursive?: boolean; + /** + * Ignore the operation if the file doesn't exist. + */ + ignoreIfNotExists?: boolean; +} +/** + * Delete file operation + */ +export interface DeleteFile extends ResourceOperation { + /** + * A delete + */ + kind: 'delete'; + /** + * The file to delete. + */ + uri: DocumentUri; + /** + * Delete options. + */ + options?: DeleteFileOptions; +} +export declare namespace DeleteFile { + function create(uri: DocumentUri, options?: DeleteFileOptions, annotation?: ChangeAnnotationIdentifier): DeleteFile; + function is(value: any): value is DeleteFile; +} +/** + * A workspace edit represents changes to many resources managed in the workspace. The edit + * should either provide `changes` or `documentChanges`. If documentChanges are present + * they are preferred over `changes` if the client can handle versioned document edits. + */ +export interface WorkspaceEdit { + /** + * Holds changes to existing resources. + */ + changes?: { + [uri: string]: TextEdit[]; + }; + /** + * Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes + * are either an array of `TextDocumentEdit`s to express changes to n different text documents + * where each text document edit addresses a specific version of a text document. Or it can contain + * above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations. + * + * Whether a client supports versioned document edits is expressed via + * `workspace.workspaceEdit.documentChanges` client capability. + * + * If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then + * only plain `TextEdit`s using the `changes` property are supported. + */ + documentChanges?: (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[]; + /** + * A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and + * delete file / folder operations. + * + * Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`. + * + * @since 3.16.0 + */ + changeAnnotations?: { + [id: string]: ChangeAnnotation; + }; +} +export declare namespace WorkspaceEdit { + function is(value: any): value is WorkspaceEdit; +} +/** + * A change to capture text edits for existing resources. + */ +export interface TextEditChange { + /** + * Gets all text edits for this change. + * + * @return An array of text edits. + * + * @since 3.16.0 - support for annotated text edits. This is usually + * guarded using a client capability. + */ + all(): (TextEdit | AnnotatedTextEdit)[]; + /** + * Clears the edits for this change. + */ + clear(): void; + /** + * Adds a text edit. + * + * @param edit the text edit to add. + * + * @since 3.16.0 - support for annotated text edits. This is usually + * guarded using a client capability. + */ + add(edit: TextEdit | AnnotatedTextEdit): void; + /** + * Insert the given text at the given position. + * + * @param position A position. + * @param newText A string. + * @param annotation An optional annotation. + */ + insert(position: Position, newText: string): void; + insert(position: Position, newText: string, annotation: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; + /** + * Replace the given range with given text for the given resource. + * + * @param range A range. + * @param newText A string. + * @param annotation An optional annotation. + */ + replace(range: Range, newText: string): void; + replace(range: Range, newText: string, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; + /** + * Delete the text at the given range. + * + * @param range A range. + * @param annotation An optional annotation. + */ + delete(range: Range): void; + delete(range: Range, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; +} +/** + * A workspace change helps constructing changes to a workspace. + */ +export declare class WorkspaceChange { + private _workspaceEdit; + private _textEditChanges; + private _changeAnnotations; + constructor(workspaceEdit?: WorkspaceEdit); + /** + * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal + * use to be returned from a workspace edit operation like rename. + */ + get edit(): WorkspaceEdit; + /** + * Returns the [TextEditChange](#TextEditChange) to manage text edits + * for resources. + */ + getTextEditChange(textDocument: OptionalVersionedTextDocumentIdentifier): TextEditChange; + getTextEditChange(uri: DocumentUri): TextEditChange; + private initDocumentChanges; + private initChanges; + createFile(uri: DocumentUri, options?: CreateFileOptions): void; + createFile(uri: DocumentUri, annotation: ChangeAnnotation | ChangeAnnotationIdentifier, options?: CreateFileOptions): ChangeAnnotationIdentifier; + renameFile(oldUri: DocumentUri, newUri: DocumentUri, options?: RenameFileOptions): void; + renameFile(oldUri: DocumentUri, newUri: DocumentUri, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier, options?: RenameFileOptions): ChangeAnnotationIdentifier; + deleteFile(uri: DocumentUri, options?: DeleteFileOptions): void; + deleteFile(uri: DocumentUri, annotation: ChangeAnnotation | ChangeAnnotationIdentifier, options?: DeleteFileOptions): ChangeAnnotationIdentifier; +} +/** + * A literal to identify a text document in the client. + */ +export interface TextDocumentIdentifier { + /** + * The text document's uri. + */ + uri: DocumentUri; +} +/** + * The TextDocumentIdentifier namespace provides helper functions to work with + * [TextDocumentIdentifier](#TextDocumentIdentifier) literals. + */ +export declare namespace TextDocumentIdentifier { + /** + * Creates a new TextDocumentIdentifier literal. + * @param uri The document's uri. + */ + function create(uri: DocumentUri): TextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface. + */ + function is(value: any): value is TextDocumentIdentifier; +} +/** + * A text document identifier to denote a specific version of a text document. + */ +export interface VersionedTextDocumentIdentifier extends TextDocumentIdentifier { + /** + * The version number of this document. + */ + version: integer; +} +/** + * The VersionedTextDocumentIdentifier namespace provides helper functions to work with + * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals. + */ +export declare namespace VersionedTextDocumentIdentifier { + /** + * Creates a new VersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param uri The document's text. + */ + function create(uri: DocumentUri, version: integer): VersionedTextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface. + */ + function is(value: any): value is VersionedTextDocumentIdentifier; +} +/** + * A text document identifier to optionally denote a specific version of a text document. + */ +export interface OptionalVersionedTextDocumentIdentifier extends TextDocumentIdentifier { + /** + * The version number of this document. If a versioned text document identifier + * is sent from the server to the client and the file is not open in the editor + * (the server has not received an open notification before) the server can send + * `null` to indicate that the version is unknown and the content on disk is the + * truth (as specified with document content ownership). + */ + version: integer | null; +} +/** + * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with + * [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) literals. + */ +export declare namespace OptionalVersionedTextDocumentIdentifier { + /** + * Creates a new OptionalVersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param uri The document's text. + */ + function create(uri: DocumentUri, version: integer | null): OptionalVersionedTextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) interface. + */ + function is(value: any): value is OptionalVersionedTextDocumentIdentifier; +} +/** + * An item to transfer a text document from the client to the + * server. + */ +export interface TextDocumentItem { + /** + * The text document's uri. + */ + uri: DocumentUri; + /** + * The text document's language identifier + */ + languageId: string; + /** + * The version number of this document (it will increase after each + * change, including undo/redo). + */ + version: integer; + /** + * The content of the opened text document. + */ + text: string; +} +/** + * The TextDocumentItem namespace provides helper functions to work with + * [TextDocumentItem](#TextDocumentItem) literals. + */ +export declare namespace TextDocumentItem { + /** + * Creates a new TextDocumentItem literal. + * @param uri The document's uri. + * @param languageId The document's language identifier. + * @param version The document's version number. + * @param text The document's text. + */ + function create(uri: DocumentUri, languageId: string, version: integer, text: string): TextDocumentItem; + /** + * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface. + */ + function is(value: any): value is TextDocumentItem; +} +/** + * Describes the content type that a client supports in various + * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. + * + * Please note that `MarkupKinds` must not start with a `$`. This kinds + * are reserved for internal usage. + */ +export declare namespace MarkupKind { + /** + * Plain text is supported as a content format + */ + const PlainText: 'plaintext'; + /** + * Markdown is supported as a content format + */ + const Markdown: 'markdown'; +} +export declare type MarkupKind = 'plaintext' | 'markdown'; +export declare namespace MarkupKind { + /** + * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type. + */ + function is(value: any): value is MarkupKind; +} +/** + * A `MarkupContent` literal represents a string value which content is interpreted base on its + * kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds. + * + * If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues. + * See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting + * + * Here is an example how such a string can be constructed using JavaScript / TypeScript: + * ```ts + * let markdown: MarkdownContent = { + * kind: MarkupKind.Markdown, + * value: [ + * '# Header', + * 'Some text', + * '```typescript', + * 'someCode();', + * '```' + * ].join('\n') + * }; + * ``` + * + * *Please Note* that clients might sanitize the return markdown. A client could decide to + * remove HTML from the markdown to avoid script execution. + */ +export interface MarkupContent { + /** + * The type of the Markup + */ + kind: MarkupKind; + /** + * The content itself + */ + value: string; +} +export declare namespace MarkupContent { + /** + * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface. + */ + function is(value: any): value is MarkupContent; +} +/** + * The kind of a completion entry. + */ +export declare namespace CompletionItemKind { + const Text: 1; + const Method: 2; + const Function: 3; + const Constructor: 4; + const Field: 5; + const Variable: 6; + const Class: 7; + const Interface: 8; + const Module: 9; + const Property: 10; + const Unit: 11; + const Value: 12; + const Enum: 13; + const Keyword: 14; + const Snippet: 15; + const Color: 16; + const File: 17; + const Reference: 18; + const Folder: 19; + const EnumMember: 20; + const Constant: 21; + const Struct: 22; + const Event: 23; + const Operator: 24; + const TypeParameter: 25; +} +export declare type CompletionItemKind = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25; +/** + * Defines whether the insert text in a completion item should be interpreted as + * plain text or a snippet. + */ +export declare namespace InsertTextFormat { + /** + * The primary text to be inserted is treated as a plain string. + */ + const PlainText: 1; + /** + * The primary text to be inserted is treated as a snippet. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Placeholders with equal identifiers are linked, + * that is typing in one will update others too. + * + * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax + */ + const Snippet: 2; +} +export declare type InsertTextFormat = 1 | 2; +/** + * Completion item tags are extra annotations that tweak the rendering of a completion + * item. + * + * @since 3.15.0 + */ +export declare namespace CompletionItemTag { + /** + * Render a completion as obsolete, usually using a strike-out. + */ + const Deprecated = 1; +} +export declare type CompletionItemTag = 1; +/** + * A special text edit to provide an insert and a replace operation. + * + * @since 3.16.0 + */ +export interface InsertReplaceEdit { + /** + * The string to be inserted. + */ + newText: string; + /** + * The range if the insert is requested + */ + insert: Range; + /** + * The range if the replace is requested. + */ + replace: Range; +} +/** + * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits. + * + * @since 3.16.0 + */ +export declare namespace InsertReplaceEdit { + /** + * Creates a new insert / replace edit + */ + function create(newText: string, insert: Range, replace: Range): InsertReplaceEdit; + /** + * Checks whether the given literal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface. + */ + function is(value: TextEdit | InsertReplaceEdit): value is InsertReplaceEdit; +} +/** + * How whitespace and indentation is handled during completion + * item insertion. + * + * @since 3.16.0 + */ +export declare namespace InsertTextMode { + /** + * The insertion or replace strings is taken as it is. If the + * value is multi line the lines below the cursor will be + * inserted using the indentation defined in the string value. + * The client will not apply any kind of adjustments to the + * string. + */ + const asIs: 1; + /** + * The editor adjusts leading whitespace of new lines so that + * they match the indentation up to the cursor of the line for + * which the item is accepted. + * + * Consider a line like this: <2tabs><3tabs>foo. Accepting a + * multi line completion item is indented using 2 tabs and all + * following lines inserted will be indented using 2 tabs as well. + */ + const adjustIndentation: 2; +} +export declare type InsertTextMode = 1 | 2; +/** + * A completion item represents a text snippet that is + * proposed to complete text that is being typed. + */ +export interface CompletionItem { + /** + * The label of this completion item. By default + * also the text that is inserted when selecting + * this completion. + */ + label: string; + /** + * The kind of this completion item. Based of the kind + * an icon is chosen by the editor. + */ + kind?: CompletionItemKind; + /** + * Tags for this completion item. + * + * @since 3.15.0 + */ + tags?: CompletionItemTag[]; + /** + * A human-readable string with additional information + * about this item, like type or symbol information. + */ + detail?: string; + /** + * A human-readable string that represents a doc-comment. + */ + documentation?: string | MarkupContent; + /** + * Indicates if this item is deprecated. + * @deprecated Use `tags` instead. + */ + deprecated?: boolean; + /** + * Select this item when showing. + * + * *Note* that only one completion item can be selected and that the + * tool / client decides which item that is. The rule is that the *first* + * item of those that match best is selected. + */ + preselect?: boolean; + /** + * A string that should be used when comparing this item + * with other items. When `falsy` the [label](#CompletionItem.label) + * is used. + */ + sortText?: string; + /** + * A string that should be used when filtering a set of + * completion items. When `falsy` the [label](#CompletionItem.label) + * is used. + */ + filterText?: string; + /** + * A string that should be inserted into a document when selecting + * this completion. When `falsy` the [label](#CompletionItem.label) + * is used. + * + * The `insertText` is subject to interpretation by the client side. + * Some tools might not take the string literally. For example + * VS Code when code complete is requested in this example `con` + * and a completion item with an `insertText` of `console` is provided it + * will only insert `sole`. Therefore it is recommended to use `textEdit` instead + * since it avoids additional client side interpretation. + */ + insertText?: string; + /** + * The format of the insert text. The format applies to both the `insertText` property + * and the `newText` property of a provided `textEdit`. If omitted defaults to + * `InsertTextFormat.PlainText`. + */ + insertTextFormat?: InsertTextFormat; + /** + * How whitespace and indentation is handled during completion + * item insertion. If ignored the clients default value depends on + * the `textDocument.completion.insertTextMode` client capability. + * + * @since 3.16.0 + */ + insertTextMode?: InsertTextMode; + /** + * An [edit](#TextEdit) which is applied to a document when selecting + * this completion. When an edit is provided the value of + * [insertText](#CompletionItem.insertText) is ignored. + * + * Most editors support two different operation when accepting a completion item. One is to insert a + * completion text and the other is to replace an existing text with a completion text. Since this can + * usually not predetermined by a server it can report both ranges. Clients need to signal support for + * `InsertReplaceEdits` via the `textDocument.completion.insertReplaceSupport` client capability + * property. + * + * *Note 1:* The text edit's range as well as both ranges from a insert replace edit must be a + * [single line] and they must contain the position at which completion has been requested. + * *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range must be a prefix of + * the edit's replace range, that means it must be contained and starting at the same position. + * + * @since 3.16.0 additional type `InsertReplaceEdit` + */ + textEdit?: TextEdit | InsertReplaceEdit; + /** + * An optional array of additional [text edits](#TextEdit) that are applied when + * selecting this completion. Edits must not overlap (including the same insert position) + * with the main [edit](#CompletionItem.textEdit) nor with themselves. + * + * Additional text edits should be used to change text unrelated to the current cursor position + * (for example adding an import statement at the top of the file if the completion item will + * insert an unqualified type). + */ + additionalTextEdits?: TextEdit[]; + /** + * An optional set of characters that when pressed while this completion is active will accept it first and + * then type that character. *Note* that all commit characters should have `length=1` and that superfluous + * characters will be ignored. + */ + commitCharacters?: string[]; + /** + * An optional [command](#Command) that is executed *after* inserting this completion. *Note* that + * additional modifications to the current document should be described with the + * [additionalTextEdits](#CompletionItem.additionalTextEdits)-property. + */ + command?: Command; + /** + * A data entry field that is preserved on a completion item between + * a [CompletionRequest](#CompletionRequest) and a [CompletionResolveRequest] + * (#CompletionResolveRequest) + */ + data?: any; +} +/** + * The CompletionItem namespace provides functions to deal with + * completion items. + */ +export declare namespace CompletionItem { + /** + * Create a completion item and seed it with a label. + * @param label The completion item's label + */ + function create(label: string): CompletionItem; +} +/** + * Represents a collection of [completion items](#CompletionItem) to be presented + * in the editor. + */ +export interface CompletionList { + /** + * This list it not complete. Further typing results in recomputing this list. + */ + isIncomplete: boolean; + /** + * The completion items. + */ + items: CompletionItem[]; +} +/** + * The CompletionList namespace provides functions to deal with + * completion lists. + */ +export declare namespace CompletionList { + /** + * Creates a new completion list. + * + * @param items The completion items. + * @param isIncomplete The list is not complete. + */ + function create(items?: CompletionItem[], isIncomplete?: boolean): CompletionList; +} +/** + * MarkedString can be used to render human readable text. It is either a markdown string + * or a code-block that provides a language and a code snippet. The language identifier + * is semantically equal to the optional language identifier in fenced code blocks in GitHub + * issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting + * + * The pair of a language and a value is an equivalent to markdown: + * ```${language} + * ${value} + * ``` + * + * Note that markdown strings will be sanitized - that means html will be escaped. + * @deprecated use MarkupContent instead. + */ +export declare type MarkedString = string | { + language: string; + value: string; +}; +export declare namespace MarkedString { + /** + * Creates a marked string from plain text. + * + * @param plainText The plain text. + */ + function fromPlainText(plainText: string): string; + /** + * Checks whether the given value conforms to the [MarkedString](#MarkedString) type. + */ + function is(value: any): value is MarkedString; +} +/** + * The result of a hover request. + */ +export interface Hover { + /** + * The hover's content + */ + contents: MarkupContent | MarkedString | MarkedString[]; + /** + * An optional range + */ + range?: Range; +} +export declare namespace Hover { + /** + * Checks whether the given value conforms to the [Hover](#Hover) interface. + */ + function is(value: any): value is Hover; +} +/** + * Represents a parameter of a callable-signature. A parameter can + * have a label and a doc-comment. + */ +export interface ParameterInformation { + /** + * The label of this parameter information. + * + * Either a string or an inclusive start and exclusive end offsets within its containing + * signature label. (see SignatureInformation.label). The offsets are based on a UTF-16 + * string representation as `Position` and `Range` does. + * + * *Note*: a label of type string should be a substring of its containing signature label. + * Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`. + */ + label: string | [uinteger, uinteger]; + /** + * The human-readable doc-comment of this signature. Will be shown + * in the UI but can be omitted. + */ + documentation?: string | MarkupContent; +} +/** + * The ParameterInformation namespace provides helper functions to work with + * [ParameterInformation](#ParameterInformation) literals. + */ +export declare namespace ParameterInformation { + /** + * Creates a new parameter information literal. + * + * @param label A label string. + * @param documentation A doc string. + */ + function create(label: string | [uinteger, uinteger], documentation?: string): ParameterInformation; +} +/** + * Represents the signature of something callable. A signature + * can have a label, like a function-name, a doc-comment, and + * a set of parameters. + */ +export interface SignatureInformation { + /** + * The label of this signature. Will be shown in + * the UI. + */ + label: string; + /** + * The human-readable doc-comment of this signature. Will be shown + * in the UI but can be omitted. + */ + documentation?: string | MarkupContent; + /** + * The parameters of this signature. + */ + parameters?: ParameterInformation[]; + /** + * The index of the active parameter. + * + * If provided, this is used in place of `SignatureHelp.activeParameter`. + * + * @since 3.16.0 + */ + activeParameter?: uinteger; +} +/** + * The SignatureInformation namespace provides helper functions to work with + * [SignatureInformation](#SignatureInformation) literals. + */ +export declare namespace SignatureInformation { + function create(label: string, documentation?: string, ...parameters: ParameterInformation[]): SignatureInformation; +} +/** + * Signature help represents the signature of something + * callable. There can be multiple signature but only one + * active and only one active parameter. + */ +export interface SignatureHelp { + /** + * One or more signatures. + */ + signatures: SignatureInformation[]; + /** + * The active signature. Set to `null` if no + * signatures exist. + */ + activeSignature: uinteger | null; + /** + * The active parameter of the active signature. Set to `null` + * if the active signature has no parameters. + */ + activeParameter: uinteger | null; +} +/** + * The definition of a symbol represented as one or many [locations](#Location). + * For most programming languages there is only one location at which a symbol is + * defined. + * + * Servers should prefer returning `DefinitionLink` over `Definition` if supported + * by the client. + */ +export declare type Definition = Location | Location[]; +/** + * Information about where a symbol is defined. + * + * Provides additional metadata over normal [location](#Location) definitions, including the range of + * the defining symbol + */ +export declare type DefinitionLink = LocationLink; +/** + * The declaration of a symbol representation as one or many [locations](#Location). + */ +export declare type Declaration = Location | Location[]; +/** + * Information about where a symbol is declared. + * + * Provides additional metadata over normal [location](#Location) declarations, including the range of + * the declaring symbol. + * + * Servers should prefer returning `DeclarationLink` over `Declaration` if supported + * by the client. + */ +export declare type DeclarationLink = LocationLink; +/** + * Value-object that contains additional information when + * requesting references. + */ +export interface ReferenceContext { + /** + * Include the declaration of the current symbol. + */ + includeDeclaration: boolean; +} +/** + * A document highlight kind. + */ +export declare namespace DocumentHighlightKind { + /** + * A textual occurrence. + */ + const Text: 1; + /** + * Read-access of a symbol, like reading a variable. + */ + const Read: 2; + /** + * Write-access of a symbol, like writing to a variable. + */ + const Write: 3; +} +export declare type DocumentHighlightKind = 1 | 2 | 3; +/** + * A document highlight is a range inside a text document which deserves + * special attention. Usually a document highlight is visualized by changing + * the background color of its range. + */ +export interface DocumentHighlight { + /** + * The range this highlight applies to. + */ + range: Range; + /** + * The highlight kind, default is [text](#DocumentHighlightKind.Text). + */ + kind?: DocumentHighlightKind; +} +/** + * DocumentHighlight namespace to provide helper functions to work with + * [DocumentHighlight](#DocumentHighlight) literals. + */ +export declare namespace DocumentHighlight { + /** + * Create a DocumentHighlight object. + * @param range The range the highlight applies to. + */ + function create(range: Range, kind?: DocumentHighlightKind): DocumentHighlight; +} +/** + * A symbol kind. + */ +export declare namespace SymbolKind { + const File: 1; + const Module: 2; + const Namespace: 3; + const Package: 4; + const Class: 5; + const Method: 6; + const Property: 7; + const Field: 8; + const Constructor: 9; + const Enum: 10; + const Interface: 11; + const Function: 12; + const Variable: 13; + const Constant: 14; + const String: 15; + const Number: 16; + const Boolean: 17; + const Array: 18; + const Object: 19; + const Key: 20; + const Null: 21; + const EnumMember: 22; + const Struct: 23; + const Event: 24; + const Operator: 25; + const TypeParameter: 26; +} +export declare type SymbolKind = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26; +/** + * Symbol tags are extra annotations that tweak the rendering of a symbol. + * @since 3.16 + */ +export declare namespace SymbolTag { + /** + * Render a symbol as obsolete, usually using a strike-out. + */ + const Deprecated: 1; +} +export declare type SymbolTag = 1; +/** + * Represents information about programming constructs like variables, classes, + * interfaces etc. + */ +export interface SymbolInformation { + /** + * The name of this symbol. + */ + name: string; + /** + * The kind of this symbol. + */ + kind: SymbolKind; + /** + * Tags for this completion item. + * + * @since 3.16.0 + */ + tags?: SymbolTag[]; + /** + * Indicates if this symbol is deprecated. + * + * @deprecated Use tags instead + */ + deprecated?: boolean; + /** + * The location of this symbol. The location's range is used by a tool + * to reveal the location in the editor. If the symbol is selected in the + * tool the range's start information is used to position the cursor. So + * the range usually spans more than the actual symbol's name and does + * normally include thinks like visibility modifiers. + * + * The range doesn't have to denote a node range in the sense of a abstract + * syntax tree. It can therefore not be used to re-construct a hierarchy of + * the symbols. + */ + location: Location; + /** + * The name of the symbol containing this symbol. This information is for + * user interface purposes (e.g. to render a qualifier in the user interface + * if necessary). It can't be used to re-infer a hierarchy for the document + * symbols. + */ + containerName?: string; +} +export declare namespace SymbolInformation { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the location of the symbol. + * @param uri The resource of the location of symbol, defaults to the current document. + * @param containerName The name of the symbol containing the symbol. + */ + function create(name: string, kind: SymbolKind, range: Range, uri?: string, containerName?: string): SymbolInformation; +} +/** + * Represents programming constructs like variables, classes, interfaces etc. + * that appear in a document. Document symbols can be hierarchical and they + * have two ranges: one that encloses its definition and one that points to + * its most interesting range, e.g. the range of an identifier. + */ +export interface DocumentSymbol { + /** + * The name of this symbol. Will be displayed in the user interface and therefore must not be + * an empty string or a string only consisting of white spaces. + */ + name: string; + /** + * More detail for this symbol, e.g the signature of a function. + */ + detail?: string; + /** + * The kind of this symbol. + */ + kind: SymbolKind; + /** + * Tags for this completion item. + * + * @since 3.16.0 + */ + tags?: SymbolTag[]; + /** + * Indicates if this symbol is deprecated. + * + * @deprecated Use tags instead + */ + deprecated?: boolean; + /** + * The range enclosing this symbol not including leading/trailing whitespace but everything else + * like comments. This information is typically used to determine if the the clients cursor is + * inside the symbol to reveal in the symbol in the UI. + */ + range: Range; + /** + * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. + * Must be contained by the the `range`. + */ + selectionRange: Range; + /** + * Children of this symbol, e.g. properties of a class. + */ + children?: DocumentSymbol[]; +} +export declare namespace DocumentSymbol { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param detail The detail of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the symbol. + * @param selectionRange The selectionRange of the symbol. + * @param children Children of the symbol. + */ + function create(name: string, detail: string | undefined, kind: SymbolKind, range: Range, selectionRange: Range, children?: DocumentSymbol[]): DocumentSymbol; + /** + * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface. + */ + function is(value: any): value is DocumentSymbol; +} +/** + * The kind of a code action. + * + * Kinds are a hierarchical list of identifiers separated by `.`, e.g. `"refactor.extract.function"`. + * + * The set of kinds is open and client needs to announce the kinds it supports to the server during + * initialization. + */ +export declare type CodeActionKind = string; +/** + * A set of predefined code action kinds + */ +export declare namespace CodeActionKind { + /** + * Empty kind. + */ + const Empty: CodeActionKind; + /** + * Base kind for quickfix actions: 'quickfix' + */ + const QuickFix: CodeActionKind; + /** + * Base kind for refactoring actions: 'refactor' + */ + const Refactor: CodeActionKind; + /** + * Base kind for refactoring extraction actions: 'refactor.extract' + * + * Example extract actions: + * + * - Extract method + * - Extract function + * - Extract variable + * - Extract interface from class + * - ... + */ + const RefactorExtract: CodeActionKind; + /** + * Base kind for refactoring inline actions: 'refactor.inline' + * + * Example inline actions: + * + * - Inline function + * - Inline variable + * - Inline constant + * - ... + */ + const RefactorInline: CodeActionKind; + /** + * Base kind for refactoring rewrite actions: 'refactor.rewrite' + * + * Example rewrite actions: + * + * - Convert JavaScript function to class + * - Add or remove parameter + * - Encapsulate field + * - Make method static + * - Move method to base class + * - ... + */ + const RefactorRewrite: CodeActionKind; + /** + * Base kind for source actions: `source` + * + * Source code actions apply to the entire file. + */ + const Source: CodeActionKind; + /** + * Base kind for an organize imports source action: `source.organizeImports` + */ + const SourceOrganizeImports: CodeActionKind; + /** + * Base kind for auto-fix source actions: `source.fixAll`. + * + * Fix all actions automatically fix errors that have a clear fix that do not require user input. + * They should not suppress errors or perform unsafe fixes such as generating new types or classes. + * + * @since 3.15.0 + */ + const SourceFixAll: CodeActionKind; +} +/** + * Contains additional diagnostic information about the context in which + * a [code action](#CodeActionProvider.provideCodeActions) is run. + */ +export interface CodeActionContext { + /** + * An array of diagnostics known on the client side overlapping the range provided to the + * `textDocument/codeAction` request. They are provided so that the server knows which + * errors are currently presented to the user for the given range. There is no guarantee + * that these accurately reflect the error state of the resource. The primary parameter + * to compute code actions is the provided range. + */ + diagnostics: Diagnostic[]; + /** + * Requested kind of actions to return. + * + * Actions not of this kind are filtered out by the client before being shown. So servers + * can omit computing them. + */ + only?: CodeActionKind[]; +} +/** + * The CodeActionContext namespace provides helper functions to work with + * [CodeActionContext](#CodeActionContext) literals. + */ +export declare namespace CodeActionContext { + /** + * Creates a new CodeActionContext literal. + */ + function create(diagnostics: Diagnostic[], only?: CodeActionKind[]): CodeActionContext; + /** + * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface. + */ + function is(value: any): value is CodeActionContext; +} +/** + * A code action represents a change that can be performed in code, e.g. to fix a problem or + * to refactor code. + * + * A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed. + */ +export interface CodeAction { + /** + * A short, human-readable, title for this code action. + */ + title: string; + /** + * The kind of the code action. + * + * Used to filter code actions. + */ + kind?: CodeActionKind; + /** + * The diagnostics that this code action resolves. + */ + diagnostics?: Diagnostic[]; + /** + * Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted + * by keybindings. + * + * A quick fix should be marked preferred if it properly addresses the underlying error. + * A refactoring should be marked preferred if it is the most reasonable choice of actions to take. + * + * @since 3.15.0 + */ + isPreferred?: boolean; + /** + * Marks that the code action cannot currently be applied. + * + * Clients should follow the following guidelines regarding disabled code actions: + * + * - Disabled code actions are not shown in automatic [lightbulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) + * code action menu. + * + * - Disabled actions are shown as faded out in the code action menu when the user request a more specific type + * of code action, such as refactorings. + * + * - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions) + * that auto applies a code action and only a disabled code actions are returned, the client should show the user an + * error message with `reason` in the editor. + * + * @since 3.16.0 + */ + disabled?: { + /** + * Human readable description of why the code action is currently disabled. + * + * This is displayed in the code actions UI. + */ + reason: string; + }; + /** + * The workspace edit this code action performs. + */ + edit?: WorkspaceEdit; + /** + * A command this code action executes. If a code action + * provides a edit and a command, first the edit is + * executed and then the command. + */ + command?: Command; + /** + * A data entry field that is preserved on a code action between + * a `textDocument/codeAction` and a `codeAction/resolve` request. + * + * @since 3.16.0 + */ + data?: unknown; +} +export declare namespace CodeAction { + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param kind The kind of the code action. + */ + function create(title: string, kind?: CodeActionKind): CodeAction; + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param command The command to execute. + * @param kind The kind of the code action. + */ + function create(title: string, command: Command, kind?: CodeActionKind): CodeAction; + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param command The command to execute. + * @param kind The kind of the code action. + */ + function create(title: string, edit: WorkspaceEdit, kind?: CodeActionKind): CodeAction; + function is(value: any): value is CodeAction; +} +/** + * A code lens represents a [command](#Command) that should be shown along with + * source text, like the number of references, a way to run tests, etc. + * + * A code lens is _unresolved_ when no command is associated to it. For performance + * reasons the creation of a code lens and resolving should be done to two stages. + */ +export interface CodeLens { + /** + * The range in which this code lens is valid. Should only span a single line. + */ + range: Range; + /** + * The command this code lens represents. + */ + command?: Command; + /** + * A data entry field that is preserved on a code lens item between + * a [CodeLensRequest](#CodeLensRequest) and a [CodeLensResolveRequest] + * (#CodeLensResolveRequest) + */ + data?: any; +} +/** + * The CodeLens namespace provides helper functions to work with + * [CodeLens](#CodeLens) literals. + */ +export declare namespace CodeLens { + /** + * Creates a new CodeLens literal. + */ + function create(range: Range, data?: any): CodeLens; + /** + * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface. + */ + function is(value: any): value is CodeLens; +} +/** + * Value-object describing what options formatting should use. + */ +export interface FormattingOptions { + /** + * Size of a tab in spaces. + */ + tabSize: uinteger; + /** + * Prefer spaces over tabs. + */ + insertSpaces: boolean; + /** + * Trim trailing whitespaces on a line. + * + * @since 3.15.0 + */ + trimTrailingWhitespace?: boolean; + /** + * Insert a newline character at the end of the file if one does not exist. + * + * @since 3.15.0 + */ + insertFinalNewline?: boolean; + /** + * Trim all newlines after the final newline at the end of the file. + * + * @since 3.15.0 + */ + trimFinalNewlines?: boolean; + /** + * Signature for further properties. + */ + [key: string]: boolean | integer | string | undefined; +} +/** + * The FormattingOptions namespace provides helper functions to work with + * [FormattingOptions](#FormattingOptions) literals. + */ +export declare namespace FormattingOptions { + /** + * Creates a new FormattingOptions literal. + */ + function create(tabSize: uinteger, insertSpaces: boolean): FormattingOptions; + /** + * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface. + */ + function is(value: any): value is FormattingOptions; +} +/** + * A document link is a range in a text document that links to an internal or external resource, like another + * text document or a web site. + */ +export interface DocumentLink { + /** + * The range this link applies to. + */ + range: Range; + /** + * The uri this link points to. + */ + target?: string; + /** + * The tooltip text when you hover over this link. + * + * If a tooltip is provided, is will be displayed in a string that includes instructions on how to + * trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS, + * user settings, and localization. + * + * @since 3.15.0 + */ + tooltip?: string; + /** + * A data entry field that is preserved on a document link between a + * DocumentLinkRequest and a DocumentLinkResolveRequest. + */ + data?: any; +} +/** + * The DocumentLink namespace provides helper functions to work with + * [DocumentLink](#DocumentLink) literals. + */ +export declare namespace DocumentLink { + /** + * Creates a new DocumentLink literal. + */ + function create(range: Range, target?: string, data?: any): DocumentLink; + /** + * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface. + */ + function is(value: any): value is DocumentLink; +} +/** + * A selection range represents a part of a selection hierarchy. A selection range + * may have a parent selection range that contains it. + */ +export interface SelectionRange { + /** + * The [range](#Range) of this selection range. + */ + range: Range; + /** + * The parent selection range containing this range. Therefore `parent.range` must contain `this.range`. + */ + parent?: SelectionRange; +} +/** + * The SelectionRange namespace provides helper function to work with + * SelectionRange literals. + */ +export declare namespace SelectionRange { + /** + * Creates a new SelectionRange + * @param range the range. + * @param parent an optional parent. + */ + function create(range: Range, parent?: SelectionRange): SelectionRange; + function is(value: any): value is SelectionRange; +} +/** + * Represents programming constructs like functions or constructors in the context + * of call hierarchy. + * + * @since 3.16.0 + */ +export interface CallHierarchyItem { + /** + * The name of this item. + */ + name: string; + /** + * The kind of this item. + */ + kind: SymbolKind; + /** + * Tags for this item. + */ + tags?: SymbolTag[]; + /** + * More detail for this item, e.g. the signature of a function. + */ + detail?: string; + /** + * The resource identifier of this item. + */ + uri: DocumentUri; + /** + * The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code. + */ + range: Range; + /** + * The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function. + * Must be contained by the [`range`](#CallHierarchyItem.range). + */ + selectionRange: Range; + /** + * A data entry field that is preserved between a call hierarchy prepare and + * incoming calls or outgoing calls requests. + */ + data?: unknown; +} +/** + * Represents an incoming call, e.g. a caller of a method or constructor. + * + * @since 3.16.0 + */ +export interface CallHierarchyIncomingCall { + /** + * The item that makes the call. + */ + from: CallHierarchyItem; + /** + * The ranges at which the calls appear. This is relative to the caller + * denoted by [`this.from`](#CallHierarchyIncomingCall.from). + */ + fromRanges: Range[]; +} +/** + * Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc. + * + * @since 3.16.0 + */ +export interface CallHierarchyOutgoingCall { + /** + * The item that is called. + */ + to: CallHierarchyItem; + /** + * The range at which this item is called. This is the range relative to the caller, e.g the item + * passed to [`provideCallHierarchyOutgoingCalls`](#CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls) + * and not [`this.to`](#CallHierarchyOutgoingCall.to). + */ + fromRanges: Range[]; +} +export declare const EOL: string[]; +/** + * A simple text document. Not to be implemented. The document keeps the content + * as string. + * + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +export interface TextDocument { + /** + * The associated URI for this document. Most documents have the __file__-scheme, indicating that they + * represent files on disk. However, some documents may have other schemes indicating that they are not + * available on disk. + * + * @readonly + */ + readonly uri: DocumentUri; + /** + * The identifier of the language associated with this document. + * + * @readonly + */ + readonly languageId: string; + /** + * The version number of this document (it will increase after each + * change, including undo/redo). + * + * @readonly + */ + readonly version: integer; + /** + * Get the text of this document. A substring can be retrieved by + * providing a range. + * + * @param range (optional) An range within the document to return. + * If no range is passed, the full content is returned. + * Invalid range positions are adjusted as described in [Position.line](#Position.line) + * and [Position.character](#Position.character). + * If the start range position is greater than the end range position, + * then the effect of getText is as if the two positions were swapped. + + * @return The text of this document or a substring of the text if a + * range is provided. + */ + getText(range?: Range): string; + /** + * Converts a zero-based offset to a position. + * + * @param offset A zero-based offset. + * @return A valid [position](#Position). + */ + positionAt(offset: uinteger): Position; + /** + * Converts the position to a zero-based offset. + * Invalid positions are adjusted as described in [Position.line](#Position.line) + * and [Position.character](#Position.character). + * + * @param position A position. + * @return A valid zero-based offset. + */ + offsetAt(position: Position): uinteger; + /** + * The number of lines in this document. + * + * @readonly + */ + readonly lineCount: uinteger; +} +/** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +export declare namespace TextDocument { + /** + * Creates a new ITextDocument literal from the given uri and content. + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param content The document's content. + */ + function create(uri: DocumentUri, languageId: string, version: integer, content: string): TextDocument; + /** + * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface. + */ + function is(value: any): value is TextDocument; + function applyEdits(document: TextDocument, edits: TextEdit[]): string; +} +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/lib/esm/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/lib/esm/main.js" index 9e9e674e3b683bd205dd78f8f560810f141ccd73..fd0c7d65420c8220dc68417100e8c86bb241506c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/lib/esm/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/lib/esm/main.js" @@ -1,3 +1,1908 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1adcb7cc0756472bc16ace850f3f5b6d5746ea4af2d75ad0785b967dd07bf9f1 -size 68104 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +export var integer; +(function (integer) { + integer.MIN_VALUE = -2147483648; + integer.MAX_VALUE = 2147483647; +})(integer || (integer = {})); +export var uinteger; +(function (uinteger) { + uinteger.MIN_VALUE = 0; + uinteger.MAX_VALUE = 2147483647; +})(uinteger || (uinteger = {})); +/** + * The Position namespace provides helper functions to work with + * [Position](#Position) literals. + */ +export var Position; +(function (Position) { + /** + * Creates a new Position literal from the given line and character. + * @param line The position's line. + * @param character The position's character. + */ + function create(line, character) { + if (line === Number.MAX_VALUE) { + line = uinteger.MAX_VALUE; + } + if (character === Number.MAX_VALUE) { + character = uinteger.MAX_VALUE; + } + return { line: line, character: character }; + } + Position.create = create; + /** + * Checks whether the given literal conforms to the [Position](#Position) interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character); + } + Position.is = is; +})(Position || (Position = {})); +/** + * The Range namespace provides helper functions to work with + * [Range](#Range) literals. + */ +export var Range; +(function (Range) { + function create(one, two, three, four) { + if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) { + return { start: Position.create(one, two), end: Position.create(three, four) }; + } + else if (Position.is(one) && Position.is(two)) { + return { start: one, end: two }; + } + else { + throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]"); + } + } + Range.create = create; + /** + * Checks whether the given literal conforms to the [Range](#Range) interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end); + } + Range.is = is; +})(Range || (Range = {})); +/** + * The Location namespace provides helper functions to work with + * [Location](#Location) literals. + */ +export var Location; +(function (Location) { + /** + * Creates a Location literal. + * @param uri The location's uri. + * @param range The location's range. + */ + function create(uri, range) { + return { uri: uri, range: range }; + } + Location.create = create; + /** + * Checks whether the given literal conforms to the [Location](#Location) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri)); + } + Location.is = is; +})(Location || (Location = {})); +/** + * The LocationLink namespace provides helper functions to work with + * [LocationLink](#LocationLink) literals. + */ +export var LocationLink; +(function (LocationLink) { + /** + * Creates a LocationLink literal. + * @param targetUri The definition's uri. + * @param targetRange The full range of the definition. + * @param targetSelectionRange The span of the symbol definition at the target. + * @param originSelectionRange The span of the symbol being defined in the originating source file. + */ + function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) { + return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange }; + } + LocationLink.create = create; + /** + * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri) + && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange)) + && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange)); + } + LocationLink.is = is; +})(LocationLink || (LocationLink = {})); +/** + * The Color namespace provides helper functions to work with + * [Color](#Color) literals. + */ +export var Color; +(function (Color) { + /** + * Creates a new Color literal. + */ + function create(red, green, blue, alpha) { + return { + red: red, + green: green, + blue: blue, + alpha: alpha, + }; + } + Color.create = create; + /** + * Checks whether the given literal conforms to the [Color](#Color) interface. + */ + function is(value) { + var candidate = value; + return Is.numberRange(candidate.red, 0, 1) + && Is.numberRange(candidate.green, 0, 1) + && Is.numberRange(candidate.blue, 0, 1) + && Is.numberRange(candidate.alpha, 0, 1); + } + Color.is = is; +})(Color || (Color = {})); +/** + * The ColorInformation namespace provides helper functions to work with + * [ColorInformation](#ColorInformation) literals. + */ +export var ColorInformation; +(function (ColorInformation) { + /** + * Creates a new ColorInformation literal. + */ + function create(range, color) { + return { + range: range, + color: color, + }; + } + ColorInformation.create = create; + /** + * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface. + */ + function is(value) { + var candidate = value; + return Range.is(candidate.range) && Color.is(candidate.color); + } + ColorInformation.is = is; +})(ColorInformation || (ColorInformation = {})); +/** + * The Color namespace provides helper functions to work with + * [ColorPresentation](#ColorPresentation) literals. + */ +export var ColorPresentation; +(function (ColorPresentation) { + /** + * Creates a new ColorInformation literal. + */ + function create(label, textEdit, additionalTextEdits) { + return { + label: label, + textEdit: textEdit, + additionalTextEdits: additionalTextEdits, + }; + } + ColorPresentation.create = create; + /** + * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface. + */ + function is(value) { + var candidate = value; + return Is.string(candidate.label) + && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate)) + && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is)); + } + ColorPresentation.is = is; +})(ColorPresentation || (ColorPresentation = {})); +/** + * Enum of known range kinds + */ +export var FoldingRangeKind; +(function (FoldingRangeKind) { + /** + * Folding range for a comment + */ + FoldingRangeKind["Comment"] = "comment"; + /** + * Folding range for a imports or includes + */ + FoldingRangeKind["Imports"] = "imports"; + /** + * Folding range for a region (e.g. `#region`) + */ + FoldingRangeKind["Region"] = "region"; +})(FoldingRangeKind || (FoldingRangeKind = {})); +/** + * The folding range namespace provides helper functions to work with + * [FoldingRange](#FoldingRange) literals. + */ +export var FoldingRange; +(function (FoldingRange) { + /** + * Creates a new FoldingRange literal. + */ + function create(startLine, endLine, startCharacter, endCharacter, kind) { + var result = { + startLine: startLine, + endLine: endLine + }; + if (Is.defined(startCharacter)) { + result.startCharacter = startCharacter; + } + if (Is.defined(endCharacter)) { + result.endCharacter = endCharacter; + } + if (Is.defined(kind)) { + result.kind = kind; + } + return result; + } + FoldingRange.create = create; + /** + * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface. + */ + function is(value) { + var candidate = value; + return Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine) + && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter)) + && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter)) + && (Is.undefined(candidate.kind) || Is.string(candidate.kind)); + } + FoldingRange.is = is; +})(FoldingRange || (FoldingRange = {})); +/** + * The DiagnosticRelatedInformation namespace provides helper functions to work with + * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals. + */ +export var DiagnosticRelatedInformation; +(function (DiagnosticRelatedInformation) { + /** + * Creates a new DiagnosticRelatedInformation literal. + */ + function create(location, message) { + return { + location: location, + message: message + }; + } + DiagnosticRelatedInformation.create = create; + /** + * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message); + } + DiagnosticRelatedInformation.is = is; +})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {})); +/** + * The diagnostic's severity. + */ +export var DiagnosticSeverity; +(function (DiagnosticSeverity) { + /** + * Reports an error. + */ + DiagnosticSeverity.Error = 1; + /** + * Reports a warning. + */ + DiagnosticSeverity.Warning = 2; + /** + * Reports an information. + */ + DiagnosticSeverity.Information = 3; + /** + * Reports a hint. + */ + DiagnosticSeverity.Hint = 4; +})(DiagnosticSeverity || (DiagnosticSeverity = {})); +/** + * The diagnostic tags. + * + * @since 3.15.0 + */ +export var DiagnosticTag; +(function (DiagnosticTag) { + /** + * Unused or unnecessary code. + * + * Clients are allowed to render diagnostics with this tag faded out instead of having + * an error squiggle. + */ + DiagnosticTag.Unnecessary = 1; + /** + * Deprecated or obsolete code. + * + * Clients are allowed to rendered diagnostics with this tag strike through. + */ + DiagnosticTag.Deprecated = 2; +})(DiagnosticTag || (DiagnosticTag = {})); +/** + * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes. + * + * @since 3.16.0 + */ +export var CodeDescription; +(function (CodeDescription) { + function is(value) { + var candidate = value; + return candidate !== undefined && candidate !== null && Is.string(candidate.href); + } + CodeDescription.is = is; +})(CodeDescription || (CodeDescription = {})); +/** + * The Diagnostic namespace provides helper functions to work with + * [Diagnostic](#Diagnostic) literals. + */ +export var Diagnostic; +(function (Diagnostic) { + /** + * Creates a new Diagnostic literal. + */ + function create(range, message, severity, code, source, relatedInformation) { + var result = { range: range, message: message }; + if (Is.defined(severity)) { + result.severity = severity; + } + if (Is.defined(code)) { + result.code = code; + } + if (Is.defined(source)) { + result.source = source; + } + if (Is.defined(relatedInformation)) { + result.relatedInformation = relatedInformation; + } + return result; + } + Diagnostic.create = create; + /** + * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface. + */ + function is(value) { + var _a; + var candidate = value; + return Is.defined(candidate) + && Range.is(candidate.range) + && Is.string(candidate.message) + && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) + && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) + && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href))) + && (Is.string(candidate.source) || Is.undefined(candidate.source)) + && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is)); + } + Diagnostic.is = is; +})(Diagnostic || (Diagnostic = {})); +/** + * The Command namespace provides helper functions to work with + * [Command](#Command) literals. + */ +export var Command; +(function (Command) { + /** + * Creates a new Command literal. + */ + function create(title, command) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var result = { title: title, command: command }; + if (Is.defined(args) && args.length > 0) { + result.arguments = args; + } + return result; + } + Command.create = create; + /** + * Checks whether the given literal conforms to the [Command](#Command) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command); + } + Command.is = is; +})(Command || (Command = {})); +/** + * The TextEdit namespace provides helper function to create replace, + * insert and delete edits more easily. + */ +export var TextEdit; +(function (TextEdit) { + /** + * Creates a replace text edit. + * @param range The range of text to be replaced. + * @param newText The new text. + */ + function replace(range, newText) { + return { range: range, newText: newText }; + } + TextEdit.replace = replace; + /** + * Creates a insert text edit. + * @param position The position to insert the text at. + * @param newText The text to be inserted. + */ + function insert(position, newText) { + return { range: { start: position, end: position }, newText: newText }; + } + TextEdit.insert = insert; + /** + * Creates a delete text edit. + * @param range The range of text to be deleted. + */ + function del(range) { + return { range: range, newText: '' }; + } + TextEdit.del = del; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) + && Is.string(candidate.newText) + && Range.is(candidate.range); + } + TextEdit.is = is; +})(TextEdit || (TextEdit = {})); +export var ChangeAnnotation; +(function (ChangeAnnotation) { + function create(label, needsConfirmation, description) { + var result = { label: label }; + if (needsConfirmation !== undefined) { + result.needsConfirmation = needsConfirmation; + } + if (description !== undefined) { + result.description = description; + } + return result; + } + ChangeAnnotation.create = create; + function is(value) { + var candidate = value; + return candidate !== undefined && Is.objectLiteral(candidate) && Is.string(candidate.label) && + (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) && + (Is.string(candidate.description) || candidate.description === undefined); + } + ChangeAnnotation.is = is; +})(ChangeAnnotation || (ChangeAnnotation = {})); +export var ChangeAnnotationIdentifier; +(function (ChangeAnnotationIdentifier) { + function is(value) { + var candidate = value; + return typeof candidate === 'string'; + } + ChangeAnnotationIdentifier.is = is; +})(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {})); +export var AnnotatedTextEdit; +(function (AnnotatedTextEdit) { + /** + * Creates an annotated replace text edit. + * + * @param range The range of text to be replaced. + * @param newText The new text. + * @param annotation The annotation. + */ + function replace(range, newText, annotation) { + return { range: range, newText: newText, annotationId: annotation }; + } + AnnotatedTextEdit.replace = replace; + /** + * Creates an annotated insert text edit. + * + * @param position The position to insert the text at. + * @param newText The text to be inserted. + * @param annotation The annotation. + */ + function insert(position, newText, annotation) { + return { range: { start: position, end: position }, newText: newText, annotationId: annotation }; + } + AnnotatedTextEdit.insert = insert; + /** + * Creates an annotated delete text edit. + * + * @param range The range of text to be deleted. + * @param annotation The annotation. + */ + function del(range, annotation) { + return { range: range, newText: '', annotationId: annotation }; + } + AnnotatedTextEdit.del = del; + function is(value) { + var candidate = value; + return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + AnnotatedTextEdit.is = is; +})(AnnotatedTextEdit || (AnnotatedTextEdit = {})); +/** + * The TextDocumentEdit namespace provides helper function to create + * an edit that manipulates a text document. + */ +export var TextDocumentEdit; +(function (TextDocumentEdit) { + /** + * Creates a new `TextDocumentEdit` + */ + function create(textDocument, edits) { + return { textDocument: textDocument, edits: edits }; + } + TextDocumentEdit.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) + && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument) + && Array.isArray(candidate.edits); + } + TextDocumentEdit.is = is; +})(TextDocumentEdit || (TextDocumentEdit = {})); +export var CreateFile; +(function (CreateFile) { + function create(uri, options, annotation) { + var result = { + kind: 'create', + uri: uri + }; + if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + CreateFile.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined || + ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + CreateFile.is = is; +})(CreateFile || (CreateFile = {})); +export var RenameFile; +(function (RenameFile) { + function create(oldUri, newUri, options, annotation) { + var result = { + kind: 'rename', + oldUri: oldUri, + newUri: newUri + }; + if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + RenameFile.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined || + ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + RenameFile.is = is; +})(RenameFile || (RenameFile = {})); +export var DeleteFile; +(function (DeleteFile) { + function create(uri, options, annotation) { + var result = { + kind: 'delete', + uri: uri + }; + if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + DeleteFile.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined || + ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + DeleteFile.is = is; +})(DeleteFile || (DeleteFile = {})); +export var WorkspaceEdit; +(function (WorkspaceEdit) { + function is(value) { + var candidate = value; + return candidate && + (candidate.changes !== undefined || candidate.documentChanges !== undefined) && + (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) { + if (Is.string(change.kind)) { + return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change); + } + else { + return TextDocumentEdit.is(change); + } + })); + } + WorkspaceEdit.is = is; +})(WorkspaceEdit || (WorkspaceEdit = {})); +var TextEditChangeImpl = /** @class */ (function () { + function TextEditChangeImpl(edits, changeAnnotations) { + this.edits = edits; + this.changeAnnotations = changeAnnotations; + } + TextEditChangeImpl.prototype.insert = function (position, newText, annotation) { + var edit; + var id; + if (annotation === undefined) { + edit = TextEdit.insert(position, newText); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.insert(position, newText, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.insert(position, newText, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + }; + TextEditChangeImpl.prototype.replace = function (range, newText, annotation) { + var edit; + var id; + if (annotation === undefined) { + edit = TextEdit.replace(range, newText); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.replace(range, newText, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.replace(range, newText, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + }; + TextEditChangeImpl.prototype.delete = function (range, annotation) { + var edit; + var id; + if (annotation === undefined) { + edit = TextEdit.del(range); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.del(range, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.del(range, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + }; + TextEditChangeImpl.prototype.add = function (edit) { + this.edits.push(edit); + }; + TextEditChangeImpl.prototype.all = function () { + return this.edits; + }; + TextEditChangeImpl.prototype.clear = function () { + this.edits.splice(0, this.edits.length); + }; + TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) { + if (value === undefined) { + throw new Error("Text edit change is not configured to manage change annotations."); + } + }; + return TextEditChangeImpl; +}()); +/** + * A helper class + */ +var ChangeAnnotations = /** @class */ (function () { + function ChangeAnnotations(annotations) { + this._annotations = annotations === undefined ? Object.create(null) : annotations; + this._counter = 0; + this._size = 0; + } + ChangeAnnotations.prototype.all = function () { + return this._annotations; + }; + Object.defineProperty(ChangeAnnotations.prototype, "size", { + get: function () { + return this._size; + }, + enumerable: false, + configurable: true + }); + ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) { + var id; + if (ChangeAnnotationIdentifier.is(idOrAnnotation)) { + id = idOrAnnotation; + } + else { + id = this.nextId(); + annotation = idOrAnnotation; + } + if (this._annotations[id] !== undefined) { + throw new Error("Id " + id + " is already in use."); + } + if (annotation === undefined) { + throw new Error("No annotation provided for id " + id); + } + this._annotations[id] = annotation; + this._size++; + return id; + }; + ChangeAnnotations.prototype.nextId = function () { + this._counter++; + return this._counter.toString(); + }; + return ChangeAnnotations; +}()); +/** + * A workspace change helps constructing changes to a workspace. + */ +var WorkspaceChange = /** @class */ (function () { + function WorkspaceChange(workspaceEdit) { + var _this = this; + this._textEditChanges = Object.create(null); + if (workspaceEdit !== undefined) { + this._workspaceEdit = workspaceEdit; + if (workspaceEdit.documentChanges) { + this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations); + workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + workspaceEdit.documentChanges.forEach(function (change) { + if (TextDocumentEdit.is(change)) { + var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations); + _this._textEditChanges[change.textDocument.uri] = textEditChange; + } + }); + } + else if (workspaceEdit.changes) { + Object.keys(workspaceEdit.changes).forEach(function (key) { + var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]); + _this._textEditChanges[key] = textEditChange; + }); + } + } + else { + this._workspaceEdit = {}; + } + } + Object.defineProperty(WorkspaceChange.prototype, "edit", { + /** + * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal + * use to be returned from a workspace edit operation like rename. + */ + get: function () { + this.initDocumentChanges(); + if (this._changeAnnotations !== undefined) { + if (this._changeAnnotations.size === 0) { + this._workspaceEdit.changeAnnotations = undefined; + } + else { + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + } + return this._workspaceEdit; + }, + enumerable: false, + configurable: true + }); + WorkspaceChange.prototype.getTextEditChange = function (key) { + if (OptionalVersionedTextDocumentIdentifier.is(key)) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var textDocument = { uri: key.uri, version: key.version }; + var result = this._textEditChanges[textDocument.uri]; + if (!result) { + var edits = []; + var textDocumentEdit = { + textDocument: textDocument, + edits: edits + }; + this._workspaceEdit.documentChanges.push(textDocumentEdit); + result = new TextEditChangeImpl(edits, this._changeAnnotations); + this._textEditChanges[textDocument.uri] = result; + } + return result; + } + else { + this.initChanges(); + if (this._workspaceEdit.changes === undefined) { + throw new Error('Workspace edit is not configured for normal text edit changes.'); + } + var result = this._textEditChanges[key]; + if (!result) { + var edits = []; + this._workspaceEdit.changes[key] = edits; + result = new TextEditChangeImpl(edits); + this._textEditChanges[key] = result; + } + return result; + } + }; + WorkspaceChange.prototype.initDocumentChanges = function () { + if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) { + this._changeAnnotations = new ChangeAnnotations(); + this._workspaceEdit.documentChanges = []; + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + }; + WorkspaceChange.prototype.initChanges = function () { + if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) { + this._workspaceEdit.changes = Object.create(null); + } + }; + WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + var operation; + var id; + if (annotation === undefined) { + operation = CreateFile.create(uri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = CreateFile.create(uri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + }; + WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + var operation; + var id; + if (annotation === undefined) { + operation = RenameFile.create(oldUri, newUri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = RenameFile.create(oldUri, newUri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + }; + WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + var operation; + var id; + if (annotation === undefined) { + operation = DeleteFile.create(uri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = DeleteFile.create(uri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + }; + return WorkspaceChange; +}()); +export { WorkspaceChange }; +/** + * The TextDocumentIdentifier namespace provides helper functions to work with + * [TextDocumentIdentifier](#TextDocumentIdentifier) literals. + */ +export var TextDocumentIdentifier; +(function (TextDocumentIdentifier) { + /** + * Creates a new TextDocumentIdentifier literal. + * @param uri The document's uri. + */ + function create(uri) { + return { uri: uri }; + } + TextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri); + } + TextDocumentIdentifier.is = is; +})(TextDocumentIdentifier || (TextDocumentIdentifier = {})); +/** + * The VersionedTextDocumentIdentifier namespace provides helper functions to work with + * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals. + */ +export var VersionedTextDocumentIdentifier; +(function (VersionedTextDocumentIdentifier) { + /** + * Creates a new VersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param uri The document's text. + */ + function create(uri, version) { + return { uri: uri, version: version }; + } + VersionedTextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version); + } + VersionedTextDocumentIdentifier.is = is; +})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {})); +/** + * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with + * [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) literals. + */ +export var OptionalVersionedTextDocumentIdentifier; +(function (OptionalVersionedTextDocumentIdentifier) { + /** + * Creates a new OptionalVersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param uri The document's text. + */ + function create(uri, version) { + return { uri: uri, version: version }; + } + OptionalVersionedTextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version)); + } + OptionalVersionedTextDocumentIdentifier.is = is; +})(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {})); +/** + * The TextDocumentItem namespace provides helper functions to work with + * [TextDocumentItem](#TextDocumentItem) literals. + */ +export var TextDocumentItem; +(function (TextDocumentItem) { + /** + * Creates a new TextDocumentItem literal. + * @param uri The document's uri. + * @param languageId The document's language identifier. + * @param version The document's version number. + * @param text The document's text. + */ + function create(uri, languageId, version, text) { + return { uri: uri, languageId: languageId, version: version, text: text }; + } + TextDocumentItem.create = create; + /** + * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text); + } + TextDocumentItem.is = is; +})(TextDocumentItem || (TextDocumentItem = {})); +/** + * Describes the content type that a client supports in various + * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. + * + * Please note that `MarkupKinds` must not start with a `$`. This kinds + * are reserved for internal usage. + */ +export var MarkupKind; +(function (MarkupKind) { + /** + * Plain text is supported as a content format + */ + MarkupKind.PlainText = 'plaintext'; + /** + * Markdown is supported as a content format + */ + MarkupKind.Markdown = 'markdown'; +})(MarkupKind || (MarkupKind = {})); +(function (MarkupKind) { + /** + * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type. + */ + function is(value) { + var candidate = value; + return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown; + } + MarkupKind.is = is; +})(MarkupKind || (MarkupKind = {})); +export var MarkupContent; +(function (MarkupContent) { + /** + * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value); + } + MarkupContent.is = is; +})(MarkupContent || (MarkupContent = {})); +/** + * The kind of a completion entry. + */ +export var CompletionItemKind; +(function (CompletionItemKind) { + CompletionItemKind.Text = 1; + CompletionItemKind.Method = 2; + CompletionItemKind.Function = 3; + CompletionItemKind.Constructor = 4; + CompletionItemKind.Field = 5; + CompletionItemKind.Variable = 6; + CompletionItemKind.Class = 7; + CompletionItemKind.Interface = 8; + CompletionItemKind.Module = 9; + CompletionItemKind.Property = 10; + CompletionItemKind.Unit = 11; + CompletionItemKind.Value = 12; + CompletionItemKind.Enum = 13; + CompletionItemKind.Keyword = 14; + CompletionItemKind.Snippet = 15; + CompletionItemKind.Color = 16; + CompletionItemKind.File = 17; + CompletionItemKind.Reference = 18; + CompletionItemKind.Folder = 19; + CompletionItemKind.EnumMember = 20; + CompletionItemKind.Constant = 21; + CompletionItemKind.Struct = 22; + CompletionItemKind.Event = 23; + CompletionItemKind.Operator = 24; + CompletionItemKind.TypeParameter = 25; +})(CompletionItemKind || (CompletionItemKind = {})); +/** + * Defines whether the insert text in a completion item should be interpreted as + * plain text or a snippet. + */ +export var InsertTextFormat; +(function (InsertTextFormat) { + /** + * The primary text to be inserted is treated as a plain string. + */ + InsertTextFormat.PlainText = 1; + /** + * The primary text to be inserted is treated as a snippet. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Placeholders with equal identifiers are linked, + * that is typing in one will update others too. + * + * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax + */ + InsertTextFormat.Snippet = 2; +})(InsertTextFormat || (InsertTextFormat = {})); +/** + * Completion item tags are extra annotations that tweak the rendering of a completion + * item. + * + * @since 3.15.0 + */ +export var CompletionItemTag; +(function (CompletionItemTag) { + /** + * Render a completion as obsolete, usually using a strike-out. + */ + CompletionItemTag.Deprecated = 1; +})(CompletionItemTag || (CompletionItemTag = {})); +/** + * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits. + * + * @since 3.16.0 + */ +export var InsertReplaceEdit; +(function (InsertReplaceEdit) { + /** + * Creates a new insert / replace edit + */ + function create(newText, insert, replace) { + return { newText: newText, insert: insert, replace: replace }; + } + InsertReplaceEdit.create = create; + /** + * Checks whether the given literal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface. + */ + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace); + } + InsertReplaceEdit.is = is; +})(InsertReplaceEdit || (InsertReplaceEdit = {})); +/** + * How whitespace and indentation is handled during completion + * item insertion. + * + * @since 3.16.0 + */ +export var InsertTextMode; +(function (InsertTextMode) { + /** + * The insertion or replace strings is taken as it is. If the + * value is multi line the lines below the cursor will be + * inserted using the indentation defined in the string value. + * The client will not apply any kind of adjustments to the + * string. + */ + InsertTextMode.asIs = 1; + /** + * The editor adjusts leading whitespace of new lines so that + * they match the indentation up to the cursor of the line for + * which the item is accepted. + * + * Consider a line like this: <2tabs><3tabs>foo. Accepting a + * multi line completion item is indented using 2 tabs and all + * following lines inserted will be indented using 2 tabs as well. + */ + InsertTextMode.adjustIndentation = 2; +})(InsertTextMode || (InsertTextMode = {})); +/** + * The CompletionItem namespace provides functions to deal with + * completion items. + */ +export var CompletionItem; +(function (CompletionItem) { + /** + * Create a completion item and seed it with a label. + * @param label The completion item's label + */ + function create(label) { + return { label: label }; + } + CompletionItem.create = create; +})(CompletionItem || (CompletionItem = {})); +/** + * The CompletionList namespace provides functions to deal with + * completion lists. + */ +export var CompletionList; +(function (CompletionList) { + /** + * Creates a new completion list. + * + * @param items The completion items. + * @param isIncomplete The list is not complete. + */ + function create(items, isIncomplete) { + return { items: items ? items : [], isIncomplete: !!isIncomplete }; + } + CompletionList.create = create; +})(CompletionList || (CompletionList = {})); +export var MarkedString; +(function (MarkedString) { + /** + * Creates a marked string from plain text. + * + * @param plainText The plain text. + */ + function fromPlainText(plainText) { + return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash + } + MarkedString.fromPlainText = fromPlainText; + /** + * Checks whether the given value conforms to the [MarkedString](#MarkedString) type. + */ + function is(value) { + var candidate = value; + return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value)); + } + MarkedString.is = is; +})(MarkedString || (MarkedString = {})); +export var Hover; +(function (Hover) { + /** + * Checks whether the given value conforms to the [Hover](#Hover) interface. + */ + function is(value) { + var candidate = value; + return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) || + MarkedString.is(candidate.contents) || + Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range)); + } + Hover.is = is; +})(Hover || (Hover = {})); +/** + * The ParameterInformation namespace provides helper functions to work with + * [ParameterInformation](#ParameterInformation) literals. + */ +export var ParameterInformation; +(function (ParameterInformation) { + /** + * Creates a new parameter information literal. + * + * @param label A label string. + * @param documentation A doc string. + */ + function create(label, documentation) { + return documentation ? { label: label, documentation: documentation } : { label: label }; + } + ParameterInformation.create = create; +})(ParameterInformation || (ParameterInformation = {})); +/** + * The SignatureInformation namespace provides helper functions to work with + * [SignatureInformation](#SignatureInformation) literals. + */ +export var SignatureInformation; +(function (SignatureInformation) { + function create(label, documentation) { + var parameters = []; + for (var _i = 2; _i < arguments.length; _i++) { + parameters[_i - 2] = arguments[_i]; + } + var result = { label: label }; + if (Is.defined(documentation)) { + result.documentation = documentation; + } + if (Is.defined(parameters)) { + result.parameters = parameters; + } + else { + result.parameters = []; + } + return result; + } + SignatureInformation.create = create; +})(SignatureInformation || (SignatureInformation = {})); +/** + * A document highlight kind. + */ +export var DocumentHighlightKind; +(function (DocumentHighlightKind) { + /** + * A textual occurrence. + */ + DocumentHighlightKind.Text = 1; + /** + * Read-access of a symbol, like reading a variable. + */ + DocumentHighlightKind.Read = 2; + /** + * Write-access of a symbol, like writing to a variable. + */ + DocumentHighlightKind.Write = 3; +})(DocumentHighlightKind || (DocumentHighlightKind = {})); +/** + * DocumentHighlight namespace to provide helper functions to work with + * [DocumentHighlight](#DocumentHighlight) literals. + */ +export var DocumentHighlight; +(function (DocumentHighlight) { + /** + * Create a DocumentHighlight object. + * @param range The range the highlight applies to. + */ + function create(range, kind) { + var result = { range: range }; + if (Is.number(kind)) { + result.kind = kind; + } + return result; + } + DocumentHighlight.create = create; +})(DocumentHighlight || (DocumentHighlight = {})); +/** + * A symbol kind. + */ +export var SymbolKind; +(function (SymbolKind) { + SymbolKind.File = 1; + SymbolKind.Module = 2; + SymbolKind.Namespace = 3; + SymbolKind.Package = 4; + SymbolKind.Class = 5; + SymbolKind.Method = 6; + SymbolKind.Property = 7; + SymbolKind.Field = 8; + SymbolKind.Constructor = 9; + SymbolKind.Enum = 10; + SymbolKind.Interface = 11; + SymbolKind.Function = 12; + SymbolKind.Variable = 13; + SymbolKind.Constant = 14; + SymbolKind.String = 15; + SymbolKind.Number = 16; + SymbolKind.Boolean = 17; + SymbolKind.Array = 18; + SymbolKind.Object = 19; + SymbolKind.Key = 20; + SymbolKind.Null = 21; + SymbolKind.EnumMember = 22; + SymbolKind.Struct = 23; + SymbolKind.Event = 24; + SymbolKind.Operator = 25; + SymbolKind.TypeParameter = 26; +})(SymbolKind || (SymbolKind = {})); +/** + * Symbol tags are extra annotations that tweak the rendering of a symbol. + * @since 3.16 + */ +export var SymbolTag; +(function (SymbolTag) { + /** + * Render a symbol as obsolete, usually using a strike-out. + */ + SymbolTag.Deprecated = 1; +})(SymbolTag || (SymbolTag = {})); +export var SymbolInformation; +(function (SymbolInformation) { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the location of the symbol. + * @param uri The resource of the location of symbol, defaults to the current document. + * @param containerName The name of the symbol containing the symbol. + */ + function create(name, kind, range, uri, containerName) { + var result = { + name: name, + kind: kind, + location: { uri: uri, range: range } + }; + if (containerName) { + result.containerName = containerName; + } + return result; + } + SymbolInformation.create = create; +})(SymbolInformation || (SymbolInformation = {})); +export var DocumentSymbol; +(function (DocumentSymbol) { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param detail The detail of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the symbol. + * @param selectionRange The selectionRange of the symbol. + * @param children Children of the symbol. + */ + function create(name, detail, kind, range, selectionRange, children) { + var result = { + name: name, + detail: detail, + kind: kind, + range: range, + selectionRange: selectionRange + }; + if (children !== undefined) { + result.children = children; + } + return result; + } + DocumentSymbol.create = create; + /** + * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface. + */ + function is(value) { + var candidate = value; + return candidate && + Is.string(candidate.name) && Is.number(candidate.kind) && + Range.is(candidate.range) && Range.is(candidate.selectionRange) && + (candidate.detail === undefined || Is.string(candidate.detail)) && + (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) && + (candidate.children === undefined || Array.isArray(candidate.children)) && + (candidate.tags === undefined || Array.isArray(candidate.tags)); + } + DocumentSymbol.is = is; +})(DocumentSymbol || (DocumentSymbol = {})); +/** + * A set of predefined code action kinds + */ +export var CodeActionKind; +(function (CodeActionKind) { + /** + * Empty kind. + */ + CodeActionKind.Empty = ''; + /** + * Base kind for quickfix actions: 'quickfix' + */ + CodeActionKind.QuickFix = 'quickfix'; + /** + * Base kind for refactoring actions: 'refactor' + */ + CodeActionKind.Refactor = 'refactor'; + /** + * Base kind for refactoring extraction actions: 'refactor.extract' + * + * Example extract actions: + * + * - Extract method + * - Extract function + * - Extract variable + * - Extract interface from class + * - ... + */ + CodeActionKind.RefactorExtract = 'refactor.extract'; + /** + * Base kind for refactoring inline actions: 'refactor.inline' + * + * Example inline actions: + * + * - Inline function + * - Inline variable + * - Inline constant + * - ... + */ + CodeActionKind.RefactorInline = 'refactor.inline'; + /** + * Base kind for refactoring rewrite actions: 'refactor.rewrite' + * + * Example rewrite actions: + * + * - Convert JavaScript function to class + * - Add or remove parameter + * - Encapsulate field + * - Make method static + * - Move method to base class + * - ... + */ + CodeActionKind.RefactorRewrite = 'refactor.rewrite'; + /** + * Base kind for source actions: `source` + * + * Source code actions apply to the entire file. + */ + CodeActionKind.Source = 'source'; + /** + * Base kind for an organize imports source action: `source.organizeImports` + */ + CodeActionKind.SourceOrganizeImports = 'source.organizeImports'; + /** + * Base kind for auto-fix source actions: `source.fixAll`. + * + * Fix all actions automatically fix errors that have a clear fix that do not require user input. + * They should not suppress errors or perform unsafe fixes such as generating new types or classes. + * + * @since 3.15.0 + */ + CodeActionKind.SourceFixAll = 'source.fixAll'; +})(CodeActionKind || (CodeActionKind = {})); +/** + * The CodeActionContext namespace provides helper functions to work with + * [CodeActionContext](#CodeActionContext) literals. + */ +export var CodeActionContext; +(function (CodeActionContext) { + /** + * Creates a new CodeActionContext literal. + */ + function create(diagnostics, only) { + var result = { diagnostics: diagnostics }; + if (only !== undefined && only !== null) { + result.only = only; + } + return result; + } + CodeActionContext.create = create; + /** + * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string)); + } + CodeActionContext.is = is; +})(CodeActionContext || (CodeActionContext = {})); +export var CodeAction; +(function (CodeAction) { + function create(title, kindOrCommandOrEdit, kind) { + var result = { title: title }; + var checkKind = true; + if (typeof kindOrCommandOrEdit === 'string') { + checkKind = false; + result.kind = kindOrCommandOrEdit; + } + else if (Command.is(kindOrCommandOrEdit)) { + result.command = kindOrCommandOrEdit; + } + else { + result.edit = kindOrCommandOrEdit; + } + if (checkKind && kind !== undefined) { + result.kind = kind; + } + return result; + } + CodeAction.create = create; + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.title) && + (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) && + (candidate.kind === undefined || Is.string(candidate.kind)) && + (candidate.edit !== undefined || candidate.command !== undefined) && + (candidate.command === undefined || Command.is(candidate.command)) && + (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) && + (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit)); + } + CodeAction.is = is; +})(CodeAction || (CodeAction = {})); +/** + * The CodeLens namespace provides helper functions to work with + * [CodeLens](#CodeLens) literals. + */ +export var CodeLens; +(function (CodeLens) { + /** + * Creates a new CodeLens literal. + */ + function create(range, data) { + var result = { range: range }; + if (Is.defined(data)) { + result.data = data; + } + return result; + } + CodeLens.create = create; + /** + * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command)); + } + CodeLens.is = is; +})(CodeLens || (CodeLens = {})); +/** + * The FormattingOptions namespace provides helper functions to work with + * [FormattingOptions](#FormattingOptions) literals. + */ +export var FormattingOptions; +(function (FormattingOptions) { + /** + * Creates a new FormattingOptions literal. + */ + function create(tabSize, insertSpaces) { + return { tabSize: tabSize, insertSpaces: insertSpaces }; + } + FormattingOptions.create = create; + /** + * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces); + } + FormattingOptions.is = is; +})(FormattingOptions || (FormattingOptions = {})); +/** + * The DocumentLink namespace provides helper functions to work with + * [DocumentLink](#DocumentLink) literals. + */ +export var DocumentLink; +(function (DocumentLink) { + /** + * Creates a new DocumentLink literal. + */ + function create(range, target, data) { + return { range: range, target: target, data: data }; + } + DocumentLink.create = create; + /** + * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target)); + } + DocumentLink.is = is; +})(DocumentLink || (DocumentLink = {})); +/** + * The SelectionRange namespace provides helper function to work with + * SelectionRange literals. + */ +export var SelectionRange; +(function (SelectionRange) { + /** + * Creates a new SelectionRange + * @param range the range. + * @param parent an optional parent. + */ + function create(range, parent) { + return { range: range, parent: parent }; + } + SelectionRange.create = create; + function is(value) { + var candidate = value; + return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent)); + } + SelectionRange.is = is; +})(SelectionRange || (SelectionRange = {})); +export var EOL = ['\n', '\r\n', '\r']; +/** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +export var TextDocument; +(function (TextDocument) { + /** + * Creates a new ITextDocument literal from the given uri and content. + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param content The document's content. + */ + function create(uri, languageId, version, content) { + return new FullTextDocument(uri, languageId, version, content); + } + TextDocument.create = create; + /** + * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount) + && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false; + } + TextDocument.is = is; + function applyEdits(document, edits) { + var text = document.getText(); + var sortedEdits = mergeSort(edits, function (a, b) { + var diff = a.range.start.line - b.range.start.line; + if (diff === 0) { + return a.range.start.character - b.range.start.character; + } + return diff; + }); + var lastModifiedOffset = text.length; + for (var i = sortedEdits.length - 1; i >= 0; i--) { + var e = sortedEdits[i]; + var startOffset = document.offsetAt(e.range.start); + var endOffset = document.offsetAt(e.range.end); + if (endOffset <= lastModifiedOffset) { + text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length); + } + else { + throw new Error('Overlapping edit'); + } + lastModifiedOffset = startOffset; + } + return text; + } + TextDocument.applyEdits = applyEdits; + function mergeSort(data, compare) { + if (data.length <= 1) { + // sorted + return data; + } + var p = (data.length / 2) | 0; + var left = data.slice(0, p); + var right = data.slice(p); + mergeSort(left, compare); + mergeSort(right, compare); + var leftIdx = 0; + var rightIdx = 0; + var i = 0; + while (leftIdx < left.length && rightIdx < right.length) { + var ret = compare(left[leftIdx], right[rightIdx]); + if (ret <= 0) { + // smaller_equal -> take left to preserve order + data[i++] = left[leftIdx++]; + } + else { + // greater -> take right + data[i++] = right[rightIdx++]; + } + } + while (leftIdx < left.length) { + data[i++] = left[leftIdx++]; + } + while (rightIdx < right.length) { + data[i++] = right[rightIdx++]; + } + return data; + } +})(TextDocument || (TextDocument = {})); +/** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +var FullTextDocument = /** @class */ (function () { + function FullTextDocument(uri, languageId, version, content) { + this._uri = uri; + this._languageId = languageId; + this._version = version; + this._content = content; + this._lineOffsets = undefined; + } + Object.defineProperty(FullTextDocument.prototype, "uri", { + get: function () { + return this._uri; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(FullTextDocument.prototype, "languageId", { + get: function () { + return this._languageId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(FullTextDocument.prototype, "version", { + get: function () { + return this._version; + }, + enumerable: false, + configurable: true + }); + FullTextDocument.prototype.getText = function (range) { + if (range) { + var start = this.offsetAt(range.start); + var end = this.offsetAt(range.end); + return this._content.substring(start, end); + } + return this._content; + }; + FullTextDocument.prototype.update = function (event, version) { + this._content = event.text; + this._version = version; + this._lineOffsets = undefined; + }; + FullTextDocument.prototype.getLineOffsets = function () { + if (this._lineOffsets === undefined) { + var lineOffsets = []; + var text = this._content; + var isLineStart = true; + for (var i = 0; i < text.length; i++) { + if (isLineStart) { + lineOffsets.push(i); + isLineStart = false; + } + var ch = text.charAt(i); + isLineStart = (ch === '\r' || ch === '\n'); + if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') { + i++; + } + } + if (isLineStart && text.length > 0) { + lineOffsets.push(text.length); + } + this._lineOffsets = lineOffsets; + } + return this._lineOffsets; + }; + FullTextDocument.prototype.positionAt = function (offset) { + offset = Math.max(Math.min(offset, this._content.length), 0); + var lineOffsets = this.getLineOffsets(); + var low = 0, high = lineOffsets.length; + if (high === 0) { + return Position.create(0, offset); + } + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (lineOffsets[mid] > offset) { + high = mid; + } + else { + low = mid + 1; + } + } + // low is the least x for which the line offset is larger than the current offset + // or array.length if no line offset is larger than the current offset + var line = low - 1; + return Position.create(line, offset - lineOffsets[line]); + }; + FullTextDocument.prototype.offsetAt = function (position) { + var lineOffsets = this.getLineOffsets(); + if (position.line >= lineOffsets.length) { + return this._content.length; + } + else if (position.line < 0) { + return 0; + } + var lineOffset = lineOffsets[position.line]; + var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length; + return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset); + }; + Object.defineProperty(FullTextDocument.prototype, "lineCount", { + get: function () { + return this.getLineOffsets().length; + }, + enumerable: false, + configurable: true + }); + return FullTextDocument; +}()); +var Is; +(function (Is) { + var toString = Object.prototype.toString; + function defined(value) { + return typeof value !== 'undefined'; + } + Is.defined = defined; + function undefined(value) { + return typeof value === 'undefined'; + } + Is.undefined = undefined; + function boolean(value) { + return value === true || value === false; + } + Is.boolean = boolean; + function string(value) { + return toString.call(value) === '[object String]'; + } + Is.string = string; + function number(value) { + return toString.call(value) === '[object Number]'; + } + Is.number = number; + function numberRange(value, min, max) { + return toString.call(value) === '[object Number]' && min <= value && value <= max; + } + Is.numberRange = numberRange; + function integer(value) { + return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647; + } + Is.integer = integer; + function uinteger(value) { + return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647; + } + Is.uinteger = uinteger; + function func(value) { + return toString.call(value) === '[object Function]'; + } + Is.func = func; + function objectLiteral(value) { + // Strictly speaking class instances pass this check as well. Since the LSP + // doesn't use classes we ignore this for now. If we do we need to add something + // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null` + return value !== null && typeof value === 'object'; + } + Is.objectLiteral = objectLiteral; + function typedArray(value, check) { + return Array.isArray(value) && value.every(check); + } + Is.typedArray = typedArray; +})(Is || (Is = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/lib/umd/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/lib/umd/main.d.ts" index 190bbc7ca1bc53d5485f0559fd33ebb6f557a235..bcfb8a8d71f0de540d020b494ba6fb80e41cbdea 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/lib/umd/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/lib/umd/main.d.ts" @@ -1,3 +1,2323 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a337b9716b16c46e80a8810209cb162d32af16c6c93b331edcc01cdce5d82eba -size 75262 +/** + * A tagging type for string properties that are actually document URIs. + */ +export declare type DocumentUri = string; +/** + * A tagging type for string properties that are actually URIs + * + * @since 3.16.0 + */ +export declare type URI = string; +/** + * Defines an integer in the range of -2^31 to 2^31 - 1. + */ +export declare type integer = number; +export declare namespace integer { + const MIN_VALUE = -2147483648; + const MAX_VALUE = 2147483647; +} +/** + * Defines an unsigned integer in the range of 0 to 2^31 - 1. + */ +export declare type uinteger = number; +export declare namespace uinteger { + const MIN_VALUE = 0; + const MAX_VALUE = 2147483647; +} +/** + * Defines a decimal number. Since decimal numbers are very + * rare in the language server specification we denote the + * exact range with every decimal using the mathematics + * interval notations (e.g. [0, 1] denotes all decimals d with + * 0 <= d <= 1. + */ +export declare type decimal = number; +/** + * Position in a text document expressed as zero-based line and character offset. + * The offsets are based on a UTF-16 string representation. So a string of the form + * `a𐐀b` the character offset of the character `a` is 0, the character offset of `𐐀` + * is 1 and the character offset of b is 3 since `𐐀` is represented using two code + * units in UTF-16. + * + * Positions are line end character agnostic. So you can not specify a position that + * denotes `\r|\n` or `\n|` where `|` represents the character offset. + */ +export interface Position { + /** + * Line position in a document (zero-based). + */ + line: uinteger; + /** + * Character offset on a line in a document (zero-based). Assuming that the line is + * represented as a string, the `character` value represents the gap between the + * `character` and `character + 1`. + * + * If the character value is greater than the line length it defaults back to the + * line length. + */ + character: uinteger; +} +/** + * The Position namespace provides helper functions to work with + * [Position](#Position) literals. + */ +export declare namespace Position { + /** + * Creates a new Position literal from the given line and character. + * @param line The position's line. + * @param character The position's character. + */ + function create(line: uinteger, character: uinteger): Position; + /** + * Checks whether the given literal conforms to the [Position](#Position) interface. + */ + function is(value: any): value is Position; +} +/** + * A range in a text document expressed as (zero-based) start and end positions. + * + * If you want to specify a range that contains a line including the line ending + * character(s) then use an end position denoting the start of the next line. + * For example: + * ```ts + * { + * start: { line: 5, character: 23 } + * end : { line 6, character : 0 } + * } + * ``` + */ +export interface Range { + /** + * The range's start position + */ + start: Position; + /** + * The range's end position. + */ + end: Position; +} +/** + * The Range namespace provides helper functions to work with + * [Range](#Range) literals. + */ +export declare namespace Range { + /** + * Create a new Range literal. + * @param start The range's start position. + * @param end The range's end position. + */ + function create(start: Position, end: Position): Range; + /** + * Create a new Range literal. + * @param startLine The start line number. + * @param startCharacter The start character. + * @param endLine The end line number. + * @param endCharacter The end character. + */ + function create(startLine: uinteger, startCharacter: uinteger, endLine: uinteger, endCharacter: uinteger): Range; + /** + * Checks whether the given literal conforms to the [Range](#Range) interface. + */ + function is(value: any): value is Range; +} +/** + * Represents a location inside a resource, such as a line + * inside a text file. + */ +export interface Location { + uri: DocumentUri; + range: Range; +} +/** + * The Location namespace provides helper functions to work with + * [Location](#Location) literals. + */ +export declare namespace Location { + /** + * Creates a Location literal. + * @param uri The location's uri. + * @param range The location's range. + */ + function create(uri: DocumentUri, range: Range): Location; + /** + * Checks whether the given literal conforms to the [Location](#Location) interface. + */ + function is(value: any): value is Location; +} +/** + * Represents the connection of two locations. Provides additional metadata over normal [locations](#Location), + * including an origin range. + */ +export interface LocationLink { + /** + * Span of the origin of this link. + * + * Used as the underlined span for mouse definition hover. Defaults to the word range at + * the definition position. + */ + originSelectionRange?: Range; + /** + * The target resource identifier of this link. + */ + targetUri: DocumentUri; + /** + * The full target range of this link. If the target for example is a symbol then target range is the + * range enclosing this symbol not including leading/trailing whitespace but everything else + * like comments. This information is typically used to highlight the range in the editor. + */ + targetRange: Range; + /** + * The range that should be selected and revealed when this link is being followed, e.g the name of a function. + * Must be contained by the the `targetRange`. See also `DocumentSymbol#range` + */ + targetSelectionRange: Range; +} +/** + * The LocationLink namespace provides helper functions to work with + * [LocationLink](#LocationLink) literals. + */ +export declare namespace LocationLink { + /** + * Creates a LocationLink literal. + * @param targetUri The definition's uri. + * @param targetRange The full range of the definition. + * @param targetSelectionRange The span of the symbol definition at the target. + * @param originSelectionRange The span of the symbol being defined in the originating source file. + */ + function create(targetUri: DocumentUri, targetRange: Range, targetSelectionRange: Range, originSelectionRange?: Range): LocationLink; + /** + * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface. + */ + function is(value: any): value is LocationLink; +} +/** + * Represents a color in RGBA space. + */ +export interface Color { + /** + * The red component of this color in the range [0-1]. + */ + readonly red: decimal; + /** + * The green component of this color in the range [0-1]. + */ + readonly green: decimal; + /** + * The blue component of this color in the range [0-1]. + */ + readonly blue: decimal; + /** + * The alpha component of this color in the range [0-1]. + */ + readonly alpha: decimal; +} +/** + * The Color namespace provides helper functions to work with + * [Color](#Color) literals. + */ +export declare namespace Color { + /** + * Creates a new Color literal. + */ + function create(red: decimal, green: decimal, blue: decimal, alpha: decimal): Color; + /** + * Checks whether the given literal conforms to the [Color](#Color) interface. + */ + function is(value: any): value is Color; +} +/** + * Represents a color range from a document. + */ +export interface ColorInformation { + /** + * The range in the document where this color appears. + */ + range: Range; + /** + * The actual color value for this color range. + */ + color: Color; +} +/** + * The ColorInformation namespace provides helper functions to work with + * [ColorInformation](#ColorInformation) literals. + */ +export declare namespace ColorInformation { + /** + * Creates a new ColorInformation literal. + */ + function create(range: Range, color: Color): ColorInformation; + /** + * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface. + */ + function is(value: any): value is ColorInformation; +} +export interface ColorPresentation { + /** + * The label of this color presentation. It will be shown on the color + * picker header. By default this is also the text that is inserted when selecting + * this color presentation. + */ + label: string; + /** + * An [edit](#TextEdit) which is applied to a document when selecting + * this presentation for the color. When `falsy` the [label](#ColorPresentation.label) + * is used. + */ + textEdit?: TextEdit; + /** + * An optional array of additional [text edits](#TextEdit) that are applied when + * selecting this color presentation. Edits must not overlap with the main [edit](#ColorPresentation.textEdit) nor with themselves. + */ + additionalTextEdits?: TextEdit[]; +} +/** + * The Color namespace provides helper functions to work with + * [ColorPresentation](#ColorPresentation) literals. + */ +export declare namespace ColorPresentation { + /** + * Creates a new ColorInformation literal. + */ + function create(label: string, textEdit?: TextEdit, additionalTextEdits?: TextEdit[]): ColorPresentation; + /** + * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface. + */ + function is(value: any): value is ColorPresentation; +} +/** + * Enum of known range kinds + */ +export declare enum FoldingRangeKind { + /** + * Folding range for a comment + */ + Comment = "comment", + /** + * Folding range for a imports or includes + */ + Imports = "imports", + /** + * Folding range for a region (e.g. `#region`) + */ + Region = "region" +} +/** + * Represents a folding range. To be valid, start and end line must be bigger than zero and smaller + * than the number of lines in the document. Clients are free to ignore invalid ranges. + */ +export interface FoldingRange { + /** + * The zero-based start line of the range to fold. The folded area starts after the line's last character. + * To be valid, the end must be zero or larger and smaller than the number of lines in the document. + */ + startLine: uinteger; + /** + * The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line. + */ + startCharacter?: uinteger; + /** + * The zero-based end line of the range to fold. The folded area ends with the line's last character. + * To be valid, the end must be zero or larger and smaller than the number of lines in the document. + */ + endLine: uinteger; + /** + * The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line. + */ + endCharacter?: uinteger; + /** + * Describes the kind of the folding range such as `comment' or 'region'. The kind + * is used to categorize folding ranges and used by commands like 'Fold all comments'. See + * [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds. + */ + kind?: string; +} +/** + * The folding range namespace provides helper functions to work with + * [FoldingRange](#FoldingRange) literals. + */ +export declare namespace FoldingRange { + /** + * Creates a new FoldingRange literal. + */ + function create(startLine: uinteger, endLine: uinteger, startCharacter?: uinteger, endCharacter?: uinteger, kind?: string): FoldingRange; + /** + * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface. + */ + function is(value: any): value is FoldingRange; +} +/** + * Represents a related message and source code location for a diagnostic. This should be + * used to point to code locations that cause or related to a diagnostics, e.g when duplicating + * a symbol in a scope. + */ +export interface DiagnosticRelatedInformation { + /** + * The location of this related diagnostic information. + */ + location: Location; + /** + * The message of this related diagnostic information. + */ + message: string; +} +/** + * The DiagnosticRelatedInformation namespace provides helper functions to work with + * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals. + */ +export declare namespace DiagnosticRelatedInformation { + /** + * Creates a new DiagnosticRelatedInformation literal. + */ + function create(location: Location, message: string): DiagnosticRelatedInformation; + /** + * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface. + */ + function is(value: any): value is DiagnosticRelatedInformation; +} +/** + * The diagnostic's severity. + */ +export declare namespace DiagnosticSeverity { + /** + * Reports an error. + */ + const Error: 1; + /** + * Reports a warning. + */ + const Warning: 2; + /** + * Reports an information. + */ + const Information: 3; + /** + * Reports a hint. + */ + const Hint: 4; +} +export declare type DiagnosticSeverity = 1 | 2 | 3 | 4; +/** + * The diagnostic tags. + * + * @since 3.15.0 + */ +export declare namespace DiagnosticTag { + /** + * Unused or unnecessary code. + * + * Clients are allowed to render diagnostics with this tag faded out instead of having + * an error squiggle. + */ + const Unnecessary: 1; + /** + * Deprecated or obsolete code. + * + * Clients are allowed to rendered diagnostics with this tag strike through. + */ + const Deprecated: 2; +} +export declare type DiagnosticTag = 1 | 2; +/** + * Structure to capture a description for an error code. + * + * @since 3.16.0 + */ +export interface CodeDescription { + /** + * An URI to open with more information about the diagnostic error. + */ + href: URI; +} +/** + * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes. + * + * @since 3.16.0 + */ +export declare namespace CodeDescription { + function is(value: CodeDescription | undefined | null): value is CodeDescription; +} +/** + * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects + * are only valid in the scope of a resource. + */ +export interface Diagnostic { + /** + * The range at which the message applies + */ + range: Range; + /** + * The diagnostic's severity. Can be omitted. If omitted it is up to the + * client to interpret diagnostics as error, warning, info or hint. + */ + severity?: DiagnosticSeverity; + /** + * The diagnostic's code, which usually appear in the user interface. + */ + code?: integer | string; + /** + * An optional property to describe the error code. + * + * @since 3.16.0 + */ + codeDescription?: CodeDescription; + /** + * A human-readable string describing the source of this + * diagnostic, e.g. 'typescript' or 'super lint'. It usually + * appears in the user interface. + */ + source?: string; + /** + * The diagnostic's message. It usually appears in the user interface + */ + message: string; + /** + * Additional metadata about the diagnostic. + * + * @since 3.15.0 + */ + tags?: DiagnosticTag[]; + /** + * An array of related diagnostic information, e.g. when symbol-names within + * a scope collide all definitions can be marked via this property. + */ + relatedInformation?: DiagnosticRelatedInformation[]; + /** + * A data entry field that is preserved between a `textDocument/publishDiagnostics` + * notification and `textDocument/codeAction` request. + * + * @since 3.16.0 + */ + data?: unknown; +} +/** + * The Diagnostic namespace provides helper functions to work with + * [Diagnostic](#Diagnostic) literals. + */ +export declare namespace Diagnostic { + /** + * Creates a new Diagnostic literal. + */ + function create(range: Range, message: string, severity?: DiagnosticSeverity, code?: integer | string, source?: string, relatedInformation?: DiagnosticRelatedInformation[]): Diagnostic; + /** + * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface. + */ + function is(value: any): value is Diagnostic; +} +/** + * Represents a reference to a command. Provides a title which + * will be used to represent a command in the UI and, optionally, + * an array of arguments which will be passed to the command handler + * function when invoked. + */ +export interface Command { + /** + * Title of the command, like `save`. + */ + title: string; + /** + * The identifier of the actual command handler. + */ + command: string; + /** + * Arguments that the command handler should be + * invoked with. + */ + arguments?: any[]; +} +/** + * The Command namespace provides helper functions to work with + * [Command](#Command) literals. + */ +export declare namespace Command { + /** + * Creates a new Command literal. + */ + function create(title: string, command: string, ...args: any[]): Command; + /** + * Checks whether the given literal conforms to the [Command](#Command) interface. + */ + function is(value: any): value is Command; +} +/** + * A text edit applicable to a text document. + */ +export interface TextEdit { + /** + * The range of the text document to be manipulated. To insert + * text into a document create a range where start === end. + */ + range: Range; + /** + * The string to be inserted. For delete operations use an + * empty string. + */ + newText: string; +} +/** + * The TextEdit namespace provides helper function to create replace, + * insert and delete edits more easily. + */ +export declare namespace TextEdit { + /** + * Creates a replace text edit. + * @param range The range of text to be replaced. + * @param newText The new text. + */ + function replace(range: Range, newText: string): TextEdit; + /** + * Creates a insert text edit. + * @param position The position to insert the text at. + * @param newText The text to be inserted. + */ + function insert(position: Position, newText: string): TextEdit; + /** + * Creates a delete text edit. + * @param range The range of text to be deleted. + */ + function del(range: Range): TextEdit; + function is(value: any): value is TextEdit; +} +/** + * Additional information that describes document changes. + * + * @since 3.16.0 + */ +export interface ChangeAnnotation { + /** + * A human-readable string describing the actual change. The string + * is rendered prominent in the user interface. + */ + label: string; + /** + * A flag which indicates that user confirmation is needed + * before applying the change. + */ + needsConfirmation?: boolean; + /** + * A human-readable string which is rendered less prominent in + * the user interface. + */ + description?: string; +} +export declare namespace ChangeAnnotation { + function create(label: string, needsConfirmation?: boolean, description?: string): ChangeAnnotation; + function is(value: any): value is ChangeAnnotation; +} +export declare namespace ChangeAnnotationIdentifier { + function is(value: any): value is ChangeAnnotationIdentifier; +} +/** + * An identifier to refer to a change annotation stored with a workspace edit. + */ +export declare type ChangeAnnotationIdentifier = string; +/** + * A special text edit with an additional change annotation. + * + * @since 3.16.0. + */ +export interface AnnotatedTextEdit extends TextEdit { + /** + * The actual identifier of the change annotation + */ + annotationId: ChangeAnnotationIdentifier; +} +export declare namespace AnnotatedTextEdit { + /** + * Creates an annotated replace text edit. + * + * @param range The range of text to be replaced. + * @param newText The new text. + * @param annotation The annotation. + */ + function replace(range: Range, newText: string, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + /** + * Creates an annotated insert text edit. + * + * @param position The position to insert the text at. + * @param newText The text to be inserted. + * @param annotation The annotation. + */ + function insert(position: Position, newText: string, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + /** + * Creates an annotated delete text edit. + * + * @param range The range of text to be deleted. + * @param annotation The annotation. + */ + function del(range: Range, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit; + function is(value: any): value is AnnotatedTextEdit; +} +/** + * Describes textual changes on a text document. A TextDocumentEdit describes all changes + * on a document version Si and after they are applied move the document to version Si+1. + * So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any + * kind of ordering. However the edits must be non overlapping. + */ +export interface TextDocumentEdit { + /** + * The text document to change. + */ + textDocument: OptionalVersionedTextDocumentIdentifier; + /** + * The edits to be applied. + * + * @since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a + * client capability. + */ + edits: (TextEdit | AnnotatedTextEdit)[]; +} +/** + * The TextDocumentEdit namespace provides helper function to create + * an edit that manipulates a text document. + */ +export declare namespace TextDocumentEdit { + /** + * Creates a new `TextDocumentEdit` + */ + function create(textDocument: OptionalVersionedTextDocumentIdentifier, edits: (TextEdit | AnnotatedTextEdit)[]): TextDocumentEdit; + function is(value: any): value is TextDocumentEdit; +} +/** + * A generic resource operation. + */ +interface ResourceOperation { + /** + * The resource operation kind. + */ + kind: string; + /** + * An optional annotation identifier describing the operation. + * + * @since 3.16.0 + */ + annotationId?: ChangeAnnotationIdentifier; +} +/** + * Options to create a file. + */ +export interface CreateFileOptions { + /** + * Overwrite existing file. Overwrite wins over `ignoreIfExists` + */ + overwrite?: boolean; + /** + * Ignore if exists. + */ + ignoreIfExists?: boolean; +} +/** + * Create file operation. + */ +export interface CreateFile extends ResourceOperation { + /** + * A create + */ + kind: 'create'; + /** + * The resource to create. + */ + uri: DocumentUri; + /** + * Additional options + */ + options?: CreateFileOptions; +} +export declare namespace CreateFile { + function create(uri: DocumentUri, options?: CreateFileOptions, annotation?: ChangeAnnotationIdentifier): CreateFile; + function is(value: any): value is CreateFile; +} +/** + * Rename file options + */ +export interface RenameFileOptions { + /** + * Overwrite target if existing. Overwrite wins over `ignoreIfExists` + */ + overwrite?: boolean; + /** + * Ignores if target exists. + */ + ignoreIfExists?: boolean; +} +/** + * Rename file operation + */ +export interface RenameFile extends ResourceOperation { + /** + * A rename + */ + kind: 'rename'; + /** + * The old (existing) location. + */ + oldUri: DocumentUri; + /** + * The new location. + */ + newUri: DocumentUri; + /** + * Rename options. + */ + options?: RenameFileOptions; +} +export declare namespace RenameFile { + function create(oldUri: DocumentUri, newUri: DocumentUri, options?: RenameFileOptions, annotation?: ChangeAnnotationIdentifier): RenameFile; + function is(value: any): value is RenameFile; +} +/** + * Delete file options + */ +export interface DeleteFileOptions { + /** + * Delete the content recursively if a folder is denoted. + */ + recursive?: boolean; + /** + * Ignore the operation if the file doesn't exist. + */ + ignoreIfNotExists?: boolean; +} +/** + * Delete file operation + */ +export interface DeleteFile extends ResourceOperation { + /** + * A delete + */ + kind: 'delete'; + /** + * The file to delete. + */ + uri: DocumentUri; + /** + * Delete options. + */ + options?: DeleteFileOptions; +} +export declare namespace DeleteFile { + function create(uri: DocumentUri, options?: DeleteFileOptions, annotation?: ChangeAnnotationIdentifier): DeleteFile; + function is(value: any): value is DeleteFile; +} +/** + * A workspace edit represents changes to many resources managed in the workspace. The edit + * should either provide `changes` or `documentChanges`. If documentChanges are present + * they are preferred over `changes` if the client can handle versioned document edits. + */ +export interface WorkspaceEdit { + /** + * Holds changes to existing resources. + */ + changes?: { + [uri: string]: TextEdit[]; + }; + /** + * Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes + * are either an array of `TextDocumentEdit`s to express changes to n different text documents + * where each text document edit addresses a specific version of a text document. Or it can contain + * above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations. + * + * Whether a client supports versioned document edits is expressed via + * `workspace.workspaceEdit.documentChanges` client capability. + * + * If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then + * only plain `TextEdit`s using the `changes` property are supported. + */ + documentChanges?: (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[]; + /** + * A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and + * delete file / folder operations. + * + * Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`. + * + * @since 3.16.0 + */ + changeAnnotations?: { + [id: string]: ChangeAnnotation; + }; +} +export declare namespace WorkspaceEdit { + function is(value: any): value is WorkspaceEdit; +} +/** + * A change to capture text edits for existing resources. + */ +export interface TextEditChange { + /** + * Gets all text edits for this change. + * + * @return An array of text edits. + * + * @since 3.16.0 - support for annotated text edits. This is usually + * guarded using a client capability. + */ + all(): (TextEdit | AnnotatedTextEdit)[]; + /** + * Clears the edits for this change. + */ + clear(): void; + /** + * Adds a text edit. + * + * @param edit the text edit to add. + * + * @since 3.16.0 - support for annotated text edits. This is usually + * guarded using a client capability. + */ + add(edit: TextEdit | AnnotatedTextEdit): void; + /** + * Insert the given text at the given position. + * + * @param position A position. + * @param newText A string. + * @param annotation An optional annotation. + */ + insert(position: Position, newText: string): void; + insert(position: Position, newText: string, annotation: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; + /** + * Replace the given range with given text for the given resource. + * + * @param range A range. + * @param newText A string. + * @param annotation An optional annotation. + */ + replace(range: Range, newText: string): void; + replace(range: Range, newText: string, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; + /** + * Delete the text at the given range. + * + * @param range A range. + * @param annotation An optional annotation. + */ + delete(range: Range): void; + delete(range: Range, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier; +} +/** + * A workspace change helps constructing changes to a workspace. + */ +export declare class WorkspaceChange { + private _workspaceEdit; + private _textEditChanges; + private _changeAnnotations; + constructor(workspaceEdit?: WorkspaceEdit); + /** + * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal + * use to be returned from a workspace edit operation like rename. + */ + get edit(): WorkspaceEdit; + /** + * Returns the [TextEditChange](#TextEditChange) to manage text edits + * for resources. + */ + getTextEditChange(textDocument: OptionalVersionedTextDocumentIdentifier): TextEditChange; + getTextEditChange(uri: DocumentUri): TextEditChange; + private initDocumentChanges; + private initChanges; + createFile(uri: DocumentUri, options?: CreateFileOptions): void; + createFile(uri: DocumentUri, annotation: ChangeAnnotation | ChangeAnnotationIdentifier, options?: CreateFileOptions): ChangeAnnotationIdentifier; + renameFile(oldUri: DocumentUri, newUri: DocumentUri, options?: RenameFileOptions): void; + renameFile(oldUri: DocumentUri, newUri: DocumentUri, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier, options?: RenameFileOptions): ChangeAnnotationIdentifier; + deleteFile(uri: DocumentUri, options?: DeleteFileOptions): void; + deleteFile(uri: DocumentUri, annotation: ChangeAnnotation | ChangeAnnotationIdentifier, options?: DeleteFileOptions): ChangeAnnotationIdentifier; +} +/** + * A literal to identify a text document in the client. + */ +export interface TextDocumentIdentifier { + /** + * The text document's uri. + */ + uri: DocumentUri; +} +/** + * The TextDocumentIdentifier namespace provides helper functions to work with + * [TextDocumentIdentifier](#TextDocumentIdentifier) literals. + */ +export declare namespace TextDocumentIdentifier { + /** + * Creates a new TextDocumentIdentifier literal. + * @param uri The document's uri. + */ + function create(uri: DocumentUri): TextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface. + */ + function is(value: any): value is TextDocumentIdentifier; +} +/** + * A text document identifier to denote a specific version of a text document. + */ +export interface VersionedTextDocumentIdentifier extends TextDocumentIdentifier { + /** + * The version number of this document. + */ + version: integer; +} +/** + * The VersionedTextDocumentIdentifier namespace provides helper functions to work with + * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals. + */ +export declare namespace VersionedTextDocumentIdentifier { + /** + * Creates a new VersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param uri The document's text. + */ + function create(uri: DocumentUri, version: integer): VersionedTextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface. + */ + function is(value: any): value is VersionedTextDocumentIdentifier; +} +/** + * A text document identifier to optionally denote a specific version of a text document. + */ +export interface OptionalVersionedTextDocumentIdentifier extends TextDocumentIdentifier { + /** + * The version number of this document. If a versioned text document identifier + * is sent from the server to the client and the file is not open in the editor + * (the server has not received an open notification before) the server can send + * `null` to indicate that the version is unknown and the content on disk is the + * truth (as specified with document content ownership). + */ + version: integer | null; +} +/** + * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with + * [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) literals. + */ +export declare namespace OptionalVersionedTextDocumentIdentifier { + /** + * Creates a new OptionalVersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param uri The document's text. + */ + function create(uri: DocumentUri, version: integer | null): OptionalVersionedTextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) interface. + */ + function is(value: any): value is OptionalVersionedTextDocumentIdentifier; +} +/** + * An item to transfer a text document from the client to the + * server. + */ +export interface TextDocumentItem { + /** + * The text document's uri. + */ + uri: DocumentUri; + /** + * The text document's language identifier + */ + languageId: string; + /** + * The version number of this document (it will increase after each + * change, including undo/redo). + */ + version: integer; + /** + * The content of the opened text document. + */ + text: string; +} +/** + * The TextDocumentItem namespace provides helper functions to work with + * [TextDocumentItem](#TextDocumentItem) literals. + */ +export declare namespace TextDocumentItem { + /** + * Creates a new TextDocumentItem literal. + * @param uri The document's uri. + * @param languageId The document's language identifier. + * @param version The document's version number. + * @param text The document's text. + */ + function create(uri: DocumentUri, languageId: string, version: integer, text: string): TextDocumentItem; + /** + * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface. + */ + function is(value: any): value is TextDocumentItem; +} +/** + * Describes the content type that a client supports in various + * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. + * + * Please note that `MarkupKinds` must not start with a `$`. This kinds + * are reserved for internal usage. + */ +export declare namespace MarkupKind { + /** + * Plain text is supported as a content format + */ + const PlainText: 'plaintext'; + /** + * Markdown is supported as a content format + */ + const Markdown: 'markdown'; +} +export declare type MarkupKind = 'plaintext' | 'markdown'; +export declare namespace MarkupKind { + /** + * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type. + */ + function is(value: any): value is MarkupKind; +} +/** + * A `MarkupContent` literal represents a string value which content is interpreted base on its + * kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds. + * + * If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues. + * See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting + * + * Here is an example how such a string can be constructed using JavaScript / TypeScript: + * ```ts + * let markdown: MarkdownContent = { + * kind: MarkupKind.Markdown, + * value: [ + * '# Header', + * 'Some text', + * '```typescript', + * 'someCode();', + * '```' + * ].join('\n') + * }; + * ``` + * + * *Please Note* that clients might sanitize the return markdown. A client could decide to + * remove HTML from the markdown to avoid script execution. + */ +export interface MarkupContent { + /** + * The type of the Markup + */ + kind: MarkupKind; + /** + * The content itself + */ + value: string; +} +export declare namespace MarkupContent { + /** + * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface. + */ + function is(value: any): value is MarkupContent; +} +/** + * The kind of a completion entry. + */ +export declare namespace CompletionItemKind { + const Text: 1; + const Method: 2; + const Function: 3; + const Constructor: 4; + const Field: 5; + const Variable: 6; + const Class: 7; + const Interface: 8; + const Module: 9; + const Property: 10; + const Unit: 11; + const Value: 12; + const Enum: 13; + const Keyword: 14; + const Snippet: 15; + const Color: 16; + const File: 17; + const Reference: 18; + const Folder: 19; + const EnumMember: 20; + const Constant: 21; + const Struct: 22; + const Event: 23; + const Operator: 24; + const TypeParameter: 25; +} +export declare type CompletionItemKind = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25; +/** + * Defines whether the insert text in a completion item should be interpreted as + * plain text or a snippet. + */ +export declare namespace InsertTextFormat { + /** + * The primary text to be inserted is treated as a plain string. + */ + const PlainText: 1; + /** + * The primary text to be inserted is treated as a snippet. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Placeholders with equal identifiers are linked, + * that is typing in one will update others too. + * + * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax + */ + const Snippet: 2; +} +export declare type InsertTextFormat = 1 | 2; +/** + * Completion item tags are extra annotations that tweak the rendering of a completion + * item. + * + * @since 3.15.0 + */ +export declare namespace CompletionItemTag { + /** + * Render a completion as obsolete, usually using a strike-out. + */ + const Deprecated = 1; +} +export declare type CompletionItemTag = 1; +/** + * A special text edit to provide an insert and a replace operation. + * + * @since 3.16.0 + */ +export interface InsertReplaceEdit { + /** + * The string to be inserted. + */ + newText: string; + /** + * The range if the insert is requested + */ + insert: Range; + /** + * The range if the replace is requested. + */ + replace: Range; +} +/** + * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits. + * + * @since 3.16.0 + */ +export declare namespace InsertReplaceEdit { + /** + * Creates a new insert / replace edit + */ + function create(newText: string, insert: Range, replace: Range): InsertReplaceEdit; + /** + * Checks whether the given literal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface. + */ + function is(value: TextEdit | InsertReplaceEdit): value is InsertReplaceEdit; +} +/** + * How whitespace and indentation is handled during completion + * item insertion. + * + * @since 3.16.0 + */ +export declare namespace InsertTextMode { + /** + * The insertion or replace strings is taken as it is. If the + * value is multi line the lines below the cursor will be + * inserted using the indentation defined in the string value. + * The client will not apply any kind of adjustments to the + * string. + */ + const asIs: 1; + /** + * The editor adjusts leading whitespace of new lines so that + * they match the indentation up to the cursor of the line for + * which the item is accepted. + * + * Consider a line like this: <2tabs><3tabs>foo. Accepting a + * multi line completion item is indented using 2 tabs and all + * following lines inserted will be indented using 2 tabs as well. + */ + const adjustIndentation: 2; +} +export declare type InsertTextMode = 1 | 2; +/** + * A completion item represents a text snippet that is + * proposed to complete text that is being typed. + */ +export interface CompletionItem { + /** + * The label of this completion item. By default + * also the text that is inserted when selecting + * this completion. + */ + label: string; + /** + * The kind of this completion item. Based of the kind + * an icon is chosen by the editor. + */ + kind?: CompletionItemKind; + /** + * Tags for this completion item. + * + * @since 3.15.0 + */ + tags?: CompletionItemTag[]; + /** + * A human-readable string with additional information + * about this item, like type or symbol information. + */ + detail?: string; + /** + * A human-readable string that represents a doc-comment. + */ + documentation?: string | MarkupContent; + /** + * Indicates if this item is deprecated. + * @deprecated Use `tags` instead. + */ + deprecated?: boolean; + /** + * Select this item when showing. + * + * *Note* that only one completion item can be selected and that the + * tool / client decides which item that is. The rule is that the *first* + * item of those that match best is selected. + */ + preselect?: boolean; + /** + * A string that should be used when comparing this item + * with other items. When `falsy` the [label](#CompletionItem.label) + * is used. + */ + sortText?: string; + /** + * A string that should be used when filtering a set of + * completion items. When `falsy` the [label](#CompletionItem.label) + * is used. + */ + filterText?: string; + /** + * A string that should be inserted into a document when selecting + * this completion. When `falsy` the [label](#CompletionItem.label) + * is used. + * + * The `insertText` is subject to interpretation by the client side. + * Some tools might not take the string literally. For example + * VS Code when code complete is requested in this example `con` + * and a completion item with an `insertText` of `console` is provided it + * will only insert `sole`. Therefore it is recommended to use `textEdit` instead + * since it avoids additional client side interpretation. + */ + insertText?: string; + /** + * The format of the insert text. The format applies to both the `insertText` property + * and the `newText` property of a provided `textEdit`. If omitted defaults to + * `InsertTextFormat.PlainText`. + */ + insertTextFormat?: InsertTextFormat; + /** + * How whitespace and indentation is handled during completion + * item insertion. If ignored the clients default value depends on + * the `textDocument.completion.insertTextMode` client capability. + * + * @since 3.16.0 + */ + insertTextMode?: InsertTextMode; + /** + * An [edit](#TextEdit) which is applied to a document when selecting + * this completion. When an edit is provided the value of + * [insertText](#CompletionItem.insertText) is ignored. + * + * Most editors support two different operation when accepting a completion item. One is to insert a + * completion text and the other is to replace an existing text with a completion text. Since this can + * usually not predetermined by a server it can report both ranges. Clients need to signal support for + * `InsertReplaceEdits` via the `textDocument.completion.insertReplaceSupport` client capability + * property. + * + * *Note 1:* The text edit's range as well as both ranges from a insert replace edit must be a + * [single line] and they must contain the position at which completion has been requested. + * *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range must be a prefix of + * the edit's replace range, that means it must be contained and starting at the same position. + * + * @since 3.16.0 additional type `InsertReplaceEdit` + */ + textEdit?: TextEdit | InsertReplaceEdit; + /** + * An optional array of additional [text edits](#TextEdit) that are applied when + * selecting this completion. Edits must not overlap (including the same insert position) + * with the main [edit](#CompletionItem.textEdit) nor with themselves. + * + * Additional text edits should be used to change text unrelated to the current cursor position + * (for example adding an import statement at the top of the file if the completion item will + * insert an unqualified type). + */ + additionalTextEdits?: TextEdit[]; + /** + * An optional set of characters that when pressed while this completion is active will accept it first and + * then type that character. *Note* that all commit characters should have `length=1` and that superfluous + * characters will be ignored. + */ + commitCharacters?: string[]; + /** + * An optional [command](#Command) that is executed *after* inserting this completion. *Note* that + * additional modifications to the current document should be described with the + * [additionalTextEdits](#CompletionItem.additionalTextEdits)-property. + */ + command?: Command; + /** + * A data entry field that is preserved on a completion item between + * a [CompletionRequest](#CompletionRequest) and a [CompletionResolveRequest] + * (#CompletionResolveRequest) + */ + data?: any; +} +/** + * The CompletionItem namespace provides functions to deal with + * completion items. + */ +export declare namespace CompletionItem { + /** + * Create a completion item and seed it with a label. + * @param label The completion item's label + */ + function create(label: string): CompletionItem; +} +/** + * Represents a collection of [completion items](#CompletionItem) to be presented + * in the editor. + */ +export interface CompletionList { + /** + * This list it not complete. Further typing results in recomputing this list. + */ + isIncomplete: boolean; + /** + * The completion items. + */ + items: CompletionItem[]; +} +/** + * The CompletionList namespace provides functions to deal with + * completion lists. + */ +export declare namespace CompletionList { + /** + * Creates a new completion list. + * + * @param items The completion items. + * @param isIncomplete The list is not complete. + */ + function create(items?: CompletionItem[], isIncomplete?: boolean): CompletionList; +} +/** + * MarkedString can be used to render human readable text. It is either a markdown string + * or a code-block that provides a language and a code snippet. The language identifier + * is semantically equal to the optional language identifier in fenced code blocks in GitHub + * issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting + * + * The pair of a language and a value is an equivalent to markdown: + * ```${language} + * ${value} + * ``` + * + * Note that markdown strings will be sanitized - that means html will be escaped. + * @deprecated use MarkupContent instead. + */ +export declare type MarkedString = string | { + language: string; + value: string; +}; +export declare namespace MarkedString { + /** + * Creates a marked string from plain text. + * + * @param plainText The plain text. + */ + function fromPlainText(plainText: string): string; + /** + * Checks whether the given value conforms to the [MarkedString](#MarkedString) type. + */ + function is(value: any): value is MarkedString; +} +/** + * The result of a hover request. + */ +export interface Hover { + /** + * The hover's content + */ + contents: MarkupContent | MarkedString | MarkedString[]; + /** + * An optional range + */ + range?: Range; +} +export declare namespace Hover { + /** + * Checks whether the given value conforms to the [Hover](#Hover) interface. + */ + function is(value: any): value is Hover; +} +/** + * Represents a parameter of a callable-signature. A parameter can + * have a label and a doc-comment. + */ +export interface ParameterInformation { + /** + * The label of this parameter information. + * + * Either a string or an inclusive start and exclusive end offsets within its containing + * signature label. (see SignatureInformation.label). The offsets are based on a UTF-16 + * string representation as `Position` and `Range` does. + * + * *Note*: a label of type string should be a substring of its containing signature label. + * Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`. + */ + label: string | [uinteger, uinteger]; + /** + * The human-readable doc-comment of this signature. Will be shown + * in the UI but can be omitted. + */ + documentation?: string | MarkupContent; +} +/** + * The ParameterInformation namespace provides helper functions to work with + * [ParameterInformation](#ParameterInformation) literals. + */ +export declare namespace ParameterInformation { + /** + * Creates a new parameter information literal. + * + * @param label A label string. + * @param documentation A doc string. + */ + function create(label: string | [uinteger, uinteger], documentation?: string): ParameterInformation; +} +/** + * Represents the signature of something callable. A signature + * can have a label, like a function-name, a doc-comment, and + * a set of parameters. + */ +export interface SignatureInformation { + /** + * The label of this signature. Will be shown in + * the UI. + */ + label: string; + /** + * The human-readable doc-comment of this signature. Will be shown + * in the UI but can be omitted. + */ + documentation?: string | MarkupContent; + /** + * The parameters of this signature. + */ + parameters?: ParameterInformation[]; + /** + * The index of the active parameter. + * + * If provided, this is used in place of `SignatureHelp.activeParameter`. + * + * @since 3.16.0 + */ + activeParameter?: uinteger; +} +/** + * The SignatureInformation namespace provides helper functions to work with + * [SignatureInformation](#SignatureInformation) literals. + */ +export declare namespace SignatureInformation { + function create(label: string, documentation?: string, ...parameters: ParameterInformation[]): SignatureInformation; +} +/** + * Signature help represents the signature of something + * callable. There can be multiple signature but only one + * active and only one active parameter. + */ +export interface SignatureHelp { + /** + * One or more signatures. + */ + signatures: SignatureInformation[]; + /** + * The active signature. Set to `null` if no + * signatures exist. + */ + activeSignature: uinteger | null; + /** + * The active parameter of the active signature. Set to `null` + * if the active signature has no parameters. + */ + activeParameter: uinteger | null; +} +/** + * The definition of a symbol represented as one or many [locations](#Location). + * For most programming languages there is only one location at which a symbol is + * defined. + * + * Servers should prefer returning `DefinitionLink` over `Definition` if supported + * by the client. + */ +export declare type Definition = Location | Location[]; +/** + * Information about where a symbol is defined. + * + * Provides additional metadata over normal [location](#Location) definitions, including the range of + * the defining symbol + */ +export declare type DefinitionLink = LocationLink; +/** + * The declaration of a symbol representation as one or many [locations](#Location). + */ +export declare type Declaration = Location | Location[]; +/** + * Information about where a symbol is declared. + * + * Provides additional metadata over normal [location](#Location) declarations, including the range of + * the declaring symbol. + * + * Servers should prefer returning `DeclarationLink` over `Declaration` if supported + * by the client. + */ +export declare type DeclarationLink = LocationLink; +/** + * Value-object that contains additional information when + * requesting references. + */ +export interface ReferenceContext { + /** + * Include the declaration of the current symbol. + */ + includeDeclaration: boolean; +} +/** + * A document highlight kind. + */ +export declare namespace DocumentHighlightKind { + /** + * A textual occurrence. + */ + const Text: 1; + /** + * Read-access of a symbol, like reading a variable. + */ + const Read: 2; + /** + * Write-access of a symbol, like writing to a variable. + */ + const Write: 3; +} +export declare type DocumentHighlightKind = 1 | 2 | 3; +/** + * A document highlight is a range inside a text document which deserves + * special attention. Usually a document highlight is visualized by changing + * the background color of its range. + */ +export interface DocumentHighlight { + /** + * The range this highlight applies to. + */ + range: Range; + /** + * The highlight kind, default is [text](#DocumentHighlightKind.Text). + */ + kind?: DocumentHighlightKind; +} +/** + * DocumentHighlight namespace to provide helper functions to work with + * [DocumentHighlight](#DocumentHighlight) literals. + */ +export declare namespace DocumentHighlight { + /** + * Create a DocumentHighlight object. + * @param range The range the highlight applies to. + */ + function create(range: Range, kind?: DocumentHighlightKind): DocumentHighlight; +} +/** + * A symbol kind. + */ +export declare namespace SymbolKind { + const File: 1; + const Module: 2; + const Namespace: 3; + const Package: 4; + const Class: 5; + const Method: 6; + const Property: 7; + const Field: 8; + const Constructor: 9; + const Enum: 10; + const Interface: 11; + const Function: 12; + const Variable: 13; + const Constant: 14; + const String: 15; + const Number: 16; + const Boolean: 17; + const Array: 18; + const Object: 19; + const Key: 20; + const Null: 21; + const EnumMember: 22; + const Struct: 23; + const Event: 24; + const Operator: 25; + const TypeParameter: 26; +} +export declare type SymbolKind = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26; +/** + * Symbol tags are extra annotations that tweak the rendering of a symbol. + * @since 3.16 + */ +export declare namespace SymbolTag { + /** + * Render a symbol as obsolete, usually using a strike-out. + */ + const Deprecated: 1; +} +export declare type SymbolTag = 1; +/** + * Represents information about programming constructs like variables, classes, + * interfaces etc. + */ +export interface SymbolInformation { + /** + * The name of this symbol. + */ + name: string; + /** + * The kind of this symbol. + */ + kind: SymbolKind; + /** + * Tags for this completion item. + * + * @since 3.16.0 + */ + tags?: SymbolTag[]; + /** + * Indicates if this symbol is deprecated. + * + * @deprecated Use tags instead + */ + deprecated?: boolean; + /** + * The location of this symbol. The location's range is used by a tool + * to reveal the location in the editor. If the symbol is selected in the + * tool the range's start information is used to position the cursor. So + * the range usually spans more than the actual symbol's name and does + * normally include thinks like visibility modifiers. + * + * The range doesn't have to denote a node range in the sense of a abstract + * syntax tree. It can therefore not be used to re-construct a hierarchy of + * the symbols. + */ + location: Location; + /** + * The name of the symbol containing this symbol. This information is for + * user interface purposes (e.g. to render a qualifier in the user interface + * if necessary). It can't be used to re-infer a hierarchy for the document + * symbols. + */ + containerName?: string; +} +export declare namespace SymbolInformation { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the location of the symbol. + * @param uri The resource of the location of symbol, defaults to the current document. + * @param containerName The name of the symbol containing the symbol. + */ + function create(name: string, kind: SymbolKind, range: Range, uri?: string, containerName?: string): SymbolInformation; +} +/** + * Represents programming constructs like variables, classes, interfaces etc. + * that appear in a document. Document symbols can be hierarchical and they + * have two ranges: one that encloses its definition and one that points to + * its most interesting range, e.g. the range of an identifier. + */ +export interface DocumentSymbol { + /** + * The name of this symbol. Will be displayed in the user interface and therefore must not be + * an empty string or a string only consisting of white spaces. + */ + name: string; + /** + * More detail for this symbol, e.g the signature of a function. + */ + detail?: string; + /** + * The kind of this symbol. + */ + kind: SymbolKind; + /** + * Tags for this completion item. + * + * @since 3.16.0 + */ + tags?: SymbolTag[]; + /** + * Indicates if this symbol is deprecated. + * + * @deprecated Use tags instead + */ + deprecated?: boolean; + /** + * The range enclosing this symbol not including leading/trailing whitespace but everything else + * like comments. This information is typically used to determine if the the clients cursor is + * inside the symbol to reveal in the symbol in the UI. + */ + range: Range; + /** + * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. + * Must be contained by the the `range`. + */ + selectionRange: Range; + /** + * Children of this symbol, e.g. properties of a class. + */ + children?: DocumentSymbol[]; +} +export declare namespace DocumentSymbol { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param detail The detail of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the symbol. + * @param selectionRange The selectionRange of the symbol. + * @param children Children of the symbol. + */ + function create(name: string, detail: string | undefined, kind: SymbolKind, range: Range, selectionRange: Range, children?: DocumentSymbol[]): DocumentSymbol; + /** + * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface. + */ + function is(value: any): value is DocumentSymbol; +} +/** + * The kind of a code action. + * + * Kinds are a hierarchical list of identifiers separated by `.`, e.g. `"refactor.extract.function"`. + * + * The set of kinds is open and client needs to announce the kinds it supports to the server during + * initialization. + */ +export declare type CodeActionKind = string; +/** + * A set of predefined code action kinds + */ +export declare namespace CodeActionKind { + /** + * Empty kind. + */ + const Empty: CodeActionKind; + /** + * Base kind for quickfix actions: 'quickfix' + */ + const QuickFix: CodeActionKind; + /** + * Base kind for refactoring actions: 'refactor' + */ + const Refactor: CodeActionKind; + /** + * Base kind for refactoring extraction actions: 'refactor.extract' + * + * Example extract actions: + * + * - Extract method + * - Extract function + * - Extract variable + * - Extract interface from class + * - ... + */ + const RefactorExtract: CodeActionKind; + /** + * Base kind for refactoring inline actions: 'refactor.inline' + * + * Example inline actions: + * + * - Inline function + * - Inline variable + * - Inline constant + * - ... + */ + const RefactorInline: CodeActionKind; + /** + * Base kind for refactoring rewrite actions: 'refactor.rewrite' + * + * Example rewrite actions: + * + * - Convert JavaScript function to class + * - Add or remove parameter + * - Encapsulate field + * - Make method static + * - Move method to base class + * - ... + */ + const RefactorRewrite: CodeActionKind; + /** + * Base kind for source actions: `source` + * + * Source code actions apply to the entire file. + */ + const Source: CodeActionKind; + /** + * Base kind for an organize imports source action: `source.organizeImports` + */ + const SourceOrganizeImports: CodeActionKind; + /** + * Base kind for auto-fix source actions: `source.fixAll`. + * + * Fix all actions automatically fix errors that have a clear fix that do not require user input. + * They should not suppress errors or perform unsafe fixes such as generating new types or classes. + * + * @since 3.15.0 + */ + const SourceFixAll: CodeActionKind; +} +/** + * Contains additional diagnostic information about the context in which + * a [code action](#CodeActionProvider.provideCodeActions) is run. + */ +export interface CodeActionContext { + /** + * An array of diagnostics known on the client side overlapping the range provided to the + * `textDocument/codeAction` request. They are provided so that the server knows which + * errors are currently presented to the user for the given range. There is no guarantee + * that these accurately reflect the error state of the resource. The primary parameter + * to compute code actions is the provided range. + */ + diagnostics: Diagnostic[]; + /** + * Requested kind of actions to return. + * + * Actions not of this kind are filtered out by the client before being shown. So servers + * can omit computing them. + */ + only?: CodeActionKind[]; +} +/** + * The CodeActionContext namespace provides helper functions to work with + * [CodeActionContext](#CodeActionContext) literals. + */ +export declare namespace CodeActionContext { + /** + * Creates a new CodeActionContext literal. + */ + function create(diagnostics: Diagnostic[], only?: CodeActionKind[]): CodeActionContext; + /** + * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface. + */ + function is(value: any): value is CodeActionContext; +} +/** + * A code action represents a change that can be performed in code, e.g. to fix a problem or + * to refactor code. + * + * A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed. + */ +export interface CodeAction { + /** + * A short, human-readable, title for this code action. + */ + title: string; + /** + * The kind of the code action. + * + * Used to filter code actions. + */ + kind?: CodeActionKind; + /** + * The diagnostics that this code action resolves. + */ + diagnostics?: Diagnostic[]; + /** + * Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted + * by keybindings. + * + * A quick fix should be marked preferred if it properly addresses the underlying error. + * A refactoring should be marked preferred if it is the most reasonable choice of actions to take. + * + * @since 3.15.0 + */ + isPreferred?: boolean; + /** + * Marks that the code action cannot currently be applied. + * + * Clients should follow the following guidelines regarding disabled code actions: + * + * - Disabled code actions are not shown in automatic [lightbulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) + * code action menu. + * + * - Disabled actions are shown as faded out in the code action menu when the user request a more specific type + * of code action, such as refactorings. + * + * - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions) + * that auto applies a code action and only a disabled code actions are returned, the client should show the user an + * error message with `reason` in the editor. + * + * @since 3.16.0 + */ + disabled?: { + /** + * Human readable description of why the code action is currently disabled. + * + * This is displayed in the code actions UI. + */ + reason: string; + }; + /** + * The workspace edit this code action performs. + */ + edit?: WorkspaceEdit; + /** + * A command this code action executes. If a code action + * provides a edit and a command, first the edit is + * executed and then the command. + */ + command?: Command; + /** + * A data entry field that is preserved on a code action between + * a `textDocument/codeAction` and a `codeAction/resolve` request. + * + * @since 3.16.0 + */ + data?: unknown; +} +export declare namespace CodeAction { + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param kind The kind of the code action. + */ + function create(title: string, kind?: CodeActionKind): CodeAction; + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param command The command to execute. + * @param kind The kind of the code action. + */ + function create(title: string, command: Command, kind?: CodeActionKind): CodeAction; + /** + * Creates a new code action. + * + * @param title The title of the code action. + * @param command The command to execute. + * @param kind The kind of the code action. + */ + function create(title: string, edit: WorkspaceEdit, kind?: CodeActionKind): CodeAction; + function is(value: any): value is CodeAction; +} +/** + * A code lens represents a [command](#Command) that should be shown along with + * source text, like the number of references, a way to run tests, etc. + * + * A code lens is _unresolved_ when no command is associated to it. For performance + * reasons the creation of a code lens and resolving should be done to two stages. + */ +export interface CodeLens { + /** + * The range in which this code lens is valid. Should only span a single line. + */ + range: Range; + /** + * The command this code lens represents. + */ + command?: Command; + /** + * A data entry field that is preserved on a code lens item between + * a [CodeLensRequest](#CodeLensRequest) and a [CodeLensResolveRequest] + * (#CodeLensResolveRequest) + */ + data?: any; +} +/** + * The CodeLens namespace provides helper functions to work with + * [CodeLens](#CodeLens) literals. + */ +export declare namespace CodeLens { + /** + * Creates a new CodeLens literal. + */ + function create(range: Range, data?: any): CodeLens; + /** + * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface. + */ + function is(value: any): value is CodeLens; +} +/** + * Value-object describing what options formatting should use. + */ +export interface FormattingOptions { + /** + * Size of a tab in spaces. + */ + tabSize: uinteger; + /** + * Prefer spaces over tabs. + */ + insertSpaces: boolean; + /** + * Trim trailing whitespaces on a line. + * + * @since 3.15.0 + */ + trimTrailingWhitespace?: boolean; + /** + * Insert a newline character at the end of the file if one does not exist. + * + * @since 3.15.0 + */ + insertFinalNewline?: boolean; + /** + * Trim all newlines after the final newline at the end of the file. + * + * @since 3.15.0 + */ + trimFinalNewlines?: boolean; + /** + * Signature for further properties. + */ + [key: string]: boolean | integer | string | undefined; +} +/** + * The FormattingOptions namespace provides helper functions to work with + * [FormattingOptions](#FormattingOptions) literals. + */ +export declare namespace FormattingOptions { + /** + * Creates a new FormattingOptions literal. + */ + function create(tabSize: uinteger, insertSpaces: boolean): FormattingOptions; + /** + * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface. + */ + function is(value: any): value is FormattingOptions; +} +/** + * A document link is a range in a text document that links to an internal or external resource, like another + * text document or a web site. + */ +export interface DocumentLink { + /** + * The range this link applies to. + */ + range: Range; + /** + * The uri this link points to. + */ + target?: string; + /** + * The tooltip text when you hover over this link. + * + * If a tooltip is provided, is will be displayed in a string that includes instructions on how to + * trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS, + * user settings, and localization. + * + * @since 3.15.0 + */ + tooltip?: string; + /** + * A data entry field that is preserved on a document link between a + * DocumentLinkRequest and a DocumentLinkResolveRequest. + */ + data?: any; +} +/** + * The DocumentLink namespace provides helper functions to work with + * [DocumentLink](#DocumentLink) literals. + */ +export declare namespace DocumentLink { + /** + * Creates a new DocumentLink literal. + */ + function create(range: Range, target?: string, data?: any): DocumentLink; + /** + * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface. + */ + function is(value: any): value is DocumentLink; +} +/** + * A selection range represents a part of a selection hierarchy. A selection range + * may have a parent selection range that contains it. + */ +export interface SelectionRange { + /** + * The [range](#Range) of this selection range. + */ + range: Range; + /** + * The parent selection range containing this range. Therefore `parent.range` must contain `this.range`. + */ + parent?: SelectionRange; +} +/** + * The SelectionRange namespace provides helper function to work with + * SelectionRange literals. + */ +export declare namespace SelectionRange { + /** + * Creates a new SelectionRange + * @param range the range. + * @param parent an optional parent. + */ + function create(range: Range, parent?: SelectionRange): SelectionRange; + function is(value: any): value is SelectionRange; +} +/** + * Represents programming constructs like functions or constructors in the context + * of call hierarchy. + * + * @since 3.16.0 + */ +export interface CallHierarchyItem { + /** + * The name of this item. + */ + name: string; + /** + * The kind of this item. + */ + kind: SymbolKind; + /** + * Tags for this item. + */ + tags?: SymbolTag[]; + /** + * More detail for this item, e.g. the signature of a function. + */ + detail?: string; + /** + * The resource identifier of this item. + */ + uri: DocumentUri; + /** + * The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code. + */ + range: Range; + /** + * The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function. + * Must be contained by the [`range`](#CallHierarchyItem.range). + */ + selectionRange: Range; + /** + * A data entry field that is preserved between a call hierarchy prepare and + * incoming calls or outgoing calls requests. + */ + data?: unknown; +} +/** + * Represents an incoming call, e.g. a caller of a method or constructor. + * + * @since 3.16.0 + */ +export interface CallHierarchyIncomingCall { + /** + * The item that makes the call. + */ + from: CallHierarchyItem; + /** + * The ranges at which the calls appear. This is relative to the caller + * denoted by [`this.from`](#CallHierarchyIncomingCall.from). + */ + fromRanges: Range[]; +} +/** + * Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc. + * + * @since 3.16.0 + */ +export interface CallHierarchyOutgoingCall { + /** + * The item that is called. + */ + to: CallHierarchyItem; + /** + * The range at which this item is called. This is the range relative to the caller, e.g the item + * passed to [`provideCallHierarchyOutgoingCalls`](#CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls) + * and not [`this.to`](#CallHierarchyOutgoingCall.to). + */ + fromRanges: Range[]; +} +export declare const EOL: string[]; +/** + * A simple text document. Not to be implemented. The document keeps the content + * as string. + * + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +export interface TextDocument { + /** + * The associated URI for this document. Most documents have the __file__-scheme, indicating that they + * represent files on disk. However, some documents may have other schemes indicating that they are not + * available on disk. + * + * @readonly + */ + readonly uri: DocumentUri; + /** + * The identifier of the language associated with this document. + * + * @readonly + */ + readonly languageId: string; + /** + * The version number of this document (it will increase after each + * change, including undo/redo). + * + * @readonly + */ + readonly version: integer; + /** + * Get the text of this document. A substring can be retrieved by + * providing a range. + * + * @param range (optional) An range within the document to return. + * If no range is passed, the full content is returned. + * Invalid range positions are adjusted as described in [Position.line](#Position.line) + * and [Position.character](#Position.character). + * If the start range position is greater than the end range position, + * then the effect of getText is as if the two positions were swapped. + + * @return The text of this document or a substring of the text if a + * range is provided. + */ + getText(range?: Range): string; + /** + * Converts a zero-based offset to a position. + * + * @param offset A zero-based offset. + * @return A valid [position](#Position). + */ + positionAt(offset: uinteger): Position; + /** + * Converts the position to a zero-based offset. + * Invalid positions are adjusted as described in [Position.line](#Position.line) + * and [Position.character](#Position.character). + * + * @param position A position. + * @return A valid zero-based offset. + */ + offsetAt(position: Position): uinteger; + /** + * The number of lines in this document. + * + * @readonly + */ + readonly lineCount: uinteger; +} +/** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ +export declare namespace TextDocument { + /** + * Creates a new ITextDocument literal from the given uri and content. + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param content The document's content. + */ + function create(uri: DocumentUri, languageId: string, version: integer, content: string): TextDocument; + /** + * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface. + */ + function is(value: any): value is TextDocument; + function applyEdits(document: TextDocument, edits: TextEdit[]): string; +} +export {}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/lib/umd/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/lib/umd/main.js" index 49e71a0d0ab55a01b763b3a023ae8195c82f7e26..9b212261bf27aa1e1f8310354530e2afd132d55b 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/lib/umd/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/lib/umd/main.js" @@ -1,3 +1,1921 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bc54d0255c6527858d4b2a6c9fd366dd5bdc08d627aa6a81ebb52b27fe1bb17d -size 79228 +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + /* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ + 'use strict'; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.TextDocument = exports.EOL = exports.SelectionRange = exports.DocumentLink = exports.FormattingOptions = exports.CodeLens = exports.CodeAction = exports.CodeActionContext = exports.CodeActionKind = exports.DocumentSymbol = exports.SymbolInformation = exports.SymbolTag = exports.SymbolKind = exports.DocumentHighlight = exports.DocumentHighlightKind = exports.SignatureInformation = exports.ParameterInformation = exports.Hover = exports.MarkedString = exports.CompletionList = exports.CompletionItem = exports.InsertTextMode = exports.InsertReplaceEdit = exports.CompletionItemTag = exports.InsertTextFormat = exports.CompletionItemKind = exports.MarkupContent = exports.MarkupKind = exports.TextDocumentItem = exports.OptionalVersionedTextDocumentIdentifier = exports.VersionedTextDocumentIdentifier = exports.TextDocumentIdentifier = exports.WorkspaceChange = exports.WorkspaceEdit = exports.DeleteFile = exports.RenameFile = exports.CreateFile = exports.TextDocumentEdit = exports.AnnotatedTextEdit = exports.ChangeAnnotationIdentifier = exports.ChangeAnnotation = exports.TextEdit = exports.Command = exports.Diagnostic = exports.CodeDescription = exports.DiagnosticTag = exports.DiagnosticSeverity = exports.DiagnosticRelatedInformation = exports.FoldingRange = exports.FoldingRangeKind = exports.ColorPresentation = exports.ColorInformation = exports.Color = exports.LocationLink = exports.Location = exports.Range = exports.Position = exports.uinteger = exports.integer = void 0; + var integer; + (function (integer) { + integer.MIN_VALUE = -2147483648; + integer.MAX_VALUE = 2147483647; + })(integer = exports.integer || (exports.integer = {})); + var uinteger; + (function (uinteger) { + uinteger.MIN_VALUE = 0; + uinteger.MAX_VALUE = 2147483647; + })(uinteger = exports.uinteger || (exports.uinteger = {})); + /** + * The Position namespace provides helper functions to work with + * [Position](#Position) literals. + */ + var Position; + (function (Position) { + /** + * Creates a new Position literal from the given line and character. + * @param line The position's line. + * @param character The position's character. + */ + function create(line, character) { + if (line === Number.MAX_VALUE) { + line = uinteger.MAX_VALUE; + } + if (character === Number.MAX_VALUE) { + character = uinteger.MAX_VALUE; + } + return { line: line, character: character }; + } + Position.create = create; + /** + * Checks whether the given literal conforms to the [Position](#Position) interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character); + } + Position.is = is; + })(Position = exports.Position || (exports.Position = {})); + /** + * The Range namespace provides helper functions to work with + * [Range](#Range) literals. + */ + var Range; + (function (Range) { + function create(one, two, three, four) { + if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) { + return { start: Position.create(one, two), end: Position.create(three, four) }; + } + else if (Position.is(one) && Position.is(two)) { + return { start: one, end: two }; + } + else { + throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]"); + } + } + Range.create = create; + /** + * Checks whether the given literal conforms to the [Range](#Range) interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end); + } + Range.is = is; + })(Range = exports.Range || (exports.Range = {})); + /** + * The Location namespace provides helper functions to work with + * [Location](#Location) literals. + */ + var Location; + (function (Location) { + /** + * Creates a Location literal. + * @param uri The location's uri. + * @param range The location's range. + */ + function create(uri, range) { + return { uri: uri, range: range }; + } + Location.create = create; + /** + * Checks whether the given literal conforms to the [Location](#Location) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri)); + } + Location.is = is; + })(Location = exports.Location || (exports.Location = {})); + /** + * The LocationLink namespace provides helper functions to work with + * [LocationLink](#LocationLink) literals. + */ + var LocationLink; + (function (LocationLink) { + /** + * Creates a LocationLink literal. + * @param targetUri The definition's uri. + * @param targetRange The full range of the definition. + * @param targetSelectionRange The span of the symbol definition at the target. + * @param originSelectionRange The span of the symbol being defined in the originating source file. + */ + function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) { + return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange }; + } + LocationLink.create = create; + /** + * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri) + && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange)) + && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange)); + } + LocationLink.is = is; + })(LocationLink = exports.LocationLink || (exports.LocationLink = {})); + /** + * The Color namespace provides helper functions to work with + * [Color](#Color) literals. + */ + var Color; + (function (Color) { + /** + * Creates a new Color literal. + */ + function create(red, green, blue, alpha) { + return { + red: red, + green: green, + blue: blue, + alpha: alpha, + }; + } + Color.create = create; + /** + * Checks whether the given literal conforms to the [Color](#Color) interface. + */ + function is(value) { + var candidate = value; + return Is.numberRange(candidate.red, 0, 1) + && Is.numberRange(candidate.green, 0, 1) + && Is.numberRange(candidate.blue, 0, 1) + && Is.numberRange(candidate.alpha, 0, 1); + } + Color.is = is; + })(Color = exports.Color || (exports.Color = {})); + /** + * The ColorInformation namespace provides helper functions to work with + * [ColorInformation](#ColorInformation) literals. + */ + var ColorInformation; + (function (ColorInformation) { + /** + * Creates a new ColorInformation literal. + */ + function create(range, color) { + return { + range: range, + color: color, + }; + } + ColorInformation.create = create; + /** + * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface. + */ + function is(value) { + var candidate = value; + return Range.is(candidate.range) && Color.is(candidate.color); + } + ColorInformation.is = is; + })(ColorInformation = exports.ColorInformation || (exports.ColorInformation = {})); + /** + * The Color namespace provides helper functions to work with + * [ColorPresentation](#ColorPresentation) literals. + */ + var ColorPresentation; + (function (ColorPresentation) { + /** + * Creates a new ColorInformation literal. + */ + function create(label, textEdit, additionalTextEdits) { + return { + label: label, + textEdit: textEdit, + additionalTextEdits: additionalTextEdits, + }; + } + ColorPresentation.create = create; + /** + * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface. + */ + function is(value) { + var candidate = value; + return Is.string(candidate.label) + && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate)) + && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is)); + } + ColorPresentation.is = is; + })(ColorPresentation = exports.ColorPresentation || (exports.ColorPresentation = {})); + /** + * Enum of known range kinds + */ + var FoldingRangeKind; + (function (FoldingRangeKind) { + /** + * Folding range for a comment + */ + FoldingRangeKind["Comment"] = "comment"; + /** + * Folding range for a imports or includes + */ + FoldingRangeKind["Imports"] = "imports"; + /** + * Folding range for a region (e.g. `#region`) + */ + FoldingRangeKind["Region"] = "region"; + })(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {})); + /** + * The folding range namespace provides helper functions to work with + * [FoldingRange](#FoldingRange) literals. + */ + var FoldingRange; + (function (FoldingRange) { + /** + * Creates a new FoldingRange literal. + */ + function create(startLine, endLine, startCharacter, endCharacter, kind) { + var result = { + startLine: startLine, + endLine: endLine + }; + if (Is.defined(startCharacter)) { + result.startCharacter = startCharacter; + } + if (Is.defined(endCharacter)) { + result.endCharacter = endCharacter; + } + if (Is.defined(kind)) { + result.kind = kind; + } + return result; + } + FoldingRange.create = create; + /** + * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface. + */ + function is(value) { + var candidate = value; + return Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine) + && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter)) + && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter)) + && (Is.undefined(candidate.kind) || Is.string(candidate.kind)); + } + FoldingRange.is = is; + })(FoldingRange = exports.FoldingRange || (exports.FoldingRange = {})); + /** + * The DiagnosticRelatedInformation namespace provides helper functions to work with + * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals. + */ + var DiagnosticRelatedInformation; + (function (DiagnosticRelatedInformation) { + /** + * Creates a new DiagnosticRelatedInformation literal. + */ + function create(location, message) { + return { + location: location, + message: message + }; + } + DiagnosticRelatedInformation.create = create; + /** + * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message); + } + DiagnosticRelatedInformation.is = is; + })(DiagnosticRelatedInformation = exports.DiagnosticRelatedInformation || (exports.DiagnosticRelatedInformation = {})); + /** + * The diagnostic's severity. + */ + var DiagnosticSeverity; + (function (DiagnosticSeverity) { + /** + * Reports an error. + */ + DiagnosticSeverity.Error = 1; + /** + * Reports a warning. + */ + DiagnosticSeverity.Warning = 2; + /** + * Reports an information. + */ + DiagnosticSeverity.Information = 3; + /** + * Reports a hint. + */ + DiagnosticSeverity.Hint = 4; + })(DiagnosticSeverity = exports.DiagnosticSeverity || (exports.DiagnosticSeverity = {})); + /** + * The diagnostic tags. + * + * @since 3.15.0 + */ + var DiagnosticTag; + (function (DiagnosticTag) { + /** + * Unused or unnecessary code. + * + * Clients are allowed to render diagnostics with this tag faded out instead of having + * an error squiggle. + */ + DiagnosticTag.Unnecessary = 1; + /** + * Deprecated or obsolete code. + * + * Clients are allowed to rendered diagnostics with this tag strike through. + */ + DiagnosticTag.Deprecated = 2; + })(DiagnosticTag = exports.DiagnosticTag || (exports.DiagnosticTag = {})); + /** + * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes. + * + * @since 3.16.0 + */ + var CodeDescription; + (function (CodeDescription) { + function is(value) { + var candidate = value; + return candidate !== undefined && candidate !== null && Is.string(candidate.href); + } + CodeDescription.is = is; + })(CodeDescription = exports.CodeDescription || (exports.CodeDescription = {})); + /** + * The Diagnostic namespace provides helper functions to work with + * [Diagnostic](#Diagnostic) literals. + */ + var Diagnostic; + (function (Diagnostic) { + /** + * Creates a new Diagnostic literal. + */ + function create(range, message, severity, code, source, relatedInformation) { + var result = { range: range, message: message }; + if (Is.defined(severity)) { + result.severity = severity; + } + if (Is.defined(code)) { + result.code = code; + } + if (Is.defined(source)) { + result.source = source; + } + if (Is.defined(relatedInformation)) { + result.relatedInformation = relatedInformation; + } + return result; + } + Diagnostic.create = create; + /** + * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface. + */ + function is(value) { + var _a; + var candidate = value; + return Is.defined(candidate) + && Range.is(candidate.range) + && Is.string(candidate.message) + && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) + && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) + && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href))) + && (Is.string(candidate.source) || Is.undefined(candidate.source)) + && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is)); + } + Diagnostic.is = is; + })(Diagnostic = exports.Diagnostic || (exports.Diagnostic = {})); + /** + * The Command namespace provides helper functions to work with + * [Command](#Command) literals. + */ + var Command; + (function (Command) { + /** + * Creates a new Command literal. + */ + function create(title, command) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var result = { title: title, command: command }; + if (Is.defined(args) && args.length > 0) { + result.arguments = args; + } + return result; + } + Command.create = create; + /** + * Checks whether the given literal conforms to the [Command](#Command) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command); + } + Command.is = is; + })(Command = exports.Command || (exports.Command = {})); + /** + * The TextEdit namespace provides helper function to create replace, + * insert and delete edits more easily. + */ + var TextEdit; + (function (TextEdit) { + /** + * Creates a replace text edit. + * @param range The range of text to be replaced. + * @param newText The new text. + */ + function replace(range, newText) { + return { range: range, newText: newText }; + } + TextEdit.replace = replace; + /** + * Creates a insert text edit. + * @param position The position to insert the text at. + * @param newText The text to be inserted. + */ + function insert(position, newText) { + return { range: { start: position, end: position }, newText: newText }; + } + TextEdit.insert = insert; + /** + * Creates a delete text edit. + * @param range The range of text to be deleted. + */ + function del(range) { + return { range: range, newText: '' }; + } + TextEdit.del = del; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) + && Is.string(candidate.newText) + && Range.is(candidate.range); + } + TextEdit.is = is; + })(TextEdit = exports.TextEdit || (exports.TextEdit = {})); + var ChangeAnnotation; + (function (ChangeAnnotation) { + function create(label, needsConfirmation, description) { + var result = { label: label }; + if (needsConfirmation !== undefined) { + result.needsConfirmation = needsConfirmation; + } + if (description !== undefined) { + result.description = description; + } + return result; + } + ChangeAnnotation.create = create; + function is(value) { + var candidate = value; + return candidate !== undefined && Is.objectLiteral(candidate) && Is.string(candidate.label) && + (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) && + (Is.string(candidate.description) || candidate.description === undefined); + } + ChangeAnnotation.is = is; + })(ChangeAnnotation = exports.ChangeAnnotation || (exports.ChangeAnnotation = {})); + var ChangeAnnotationIdentifier; + (function (ChangeAnnotationIdentifier) { + function is(value) { + var candidate = value; + return typeof candidate === 'string'; + } + ChangeAnnotationIdentifier.is = is; + })(ChangeAnnotationIdentifier = exports.ChangeAnnotationIdentifier || (exports.ChangeAnnotationIdentifier = {})); + var AnnotatedTextEdit; + (function (AnnotatedTextEdit) { + /** + * Creates an annotated replace text edit. + * + * @param range The range of text to be replaced. + * @param newText The new text. + * @param annotation The annotation. + */ + function replace(range, newText, annotation) { + return { range: range, newText: newText, annotationId: annotation }; + } + AnnotatedTextEdit.replace = replace; + /** + * Creates an annotated insert text edit. + * + * @param position The position to insert the text at. + * @param newText The text to be inserted. + * @param annotation The annotation. + */ + function insert(position, newText, annotation) { + return { range: { start: position, end: position }, newText: newText, annotationId: annotation }; + } + AnnotatedTextEdit.insert = insert; + /** + * Creates an annotated delete text edit. + * + * @param range The range of text to be deleted. + * @param annotation The annotation. + */ + function del(range, annotation) { + return { range: range, newText: '', annotationId: annotation }; + } + AnnotatedTextEdit.del = del; + function is(value) { + var candidate = value; + return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + AnnotatedTextEdit.is = is; + })(AnnotatedTextEdit = exports.AnnotatedTextEdit || (exports.AnnotatedTextEdit = {})); + /** + * The TextDocumentEdit namespace provides helper function to create + * an edit that manipulates a text document. + */ + var TextDocumentEdit; + (function (TextDocumentEdit) { + /** + * Creates a new `TextDocumentEdit` + */ + function create(textDocument, edits) { + return { textDocument: textDocument, edits: edits }; + } + TextDocumentEdit.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) + && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument) + && Array.isArray(candidate.edits); + } + TextDocumentEdit.is = is; + })(TextDocumentEdit = exports.TextDocumentEdit || (exports.TextDocumentEdit = {})); + var CreateFile; + (function (CreateFile) { + function create(uri, options, annotation) { + var result = { + kind: 'create', + uri: uri + }; + if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + CreateFile.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined || + ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + CreateFile.is = is; + })(CreateFile = exports.CreateFile || (exports.CreateFile = {})); + var RenameFile; + (function (RenameFile) { + function create(oldUri, newUri, options, annotation) { + var result = { + kind: 'rename', + oldUri: oldUri, + newUri: newUri + }; + if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + RenameFile.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined || + ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + RenameFile.is = is; + })(RenameFile = exports.RenameFile || (exports.RenameFile = {})); + var DeleteFile; + (function (DeleteFile) { + function create(uri, options, annotation) { + var result = { + kind: 'delete', + uri: uri + }; + if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) { + result.options = options; + } + if (annotation !== undefined) { + result.annotationId = annotation; + } + return result; + } + DeleteFile.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined || + ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + DeleteFile.is = is; + })(DeleteFile = exports.DeleteFile || (exports.DeleteFile = {})); + var WorkspaceEdit; + (function (WorkspaceEdit) { + function is(value) { + var candidate = value; + return candidate && + (candidate.changes !== undefined || candidate.documentChanges !== undefined) && + (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) { + if (Is.string(change.kind)) { + return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change); + } + else { + return TextDocumentEdit.is(change); + } + })); + } + WorkspaceEdit.is = is; + })(WorkspaceEdit = exports.WorkspaceEdit || (exports.WorkspaceEdit = {})); + var TextEditChangeImpl = /** @class */ (function () { + function TextEditChangeImpl(edits, changeAnnotations) { + this.edits = edits; + this.changeAnnotations = changeAnnotations; + } + TextEditChangeImpl.prototype.insert = function (position, newText, annotation) { + var edit; + var id; + if (annotation === undefined) { + edit = TextEdit.insert(position, newText); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.insert(position, newText, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.insert(position, newText, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + }; + TextEditChangeImpl.prototype.replace = function (range, newText, annotation) { + var edit; + var id; + if (annotation === undefined) { + edit = TextEdit.replace(range, newText); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.replace(range, newText, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.replace(range, newText, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + }; + TextEditChangeImpl.prototype.delete = function (range, annotation) { + var edit; + var id; + if (annotation === undefined) { + edit = TextEdit.del(range); + } + else if (ChangeAnnotationIdentifier.is(annotation)) { + id = annotation; + edit = AnnotatedTextEdit.del(range, annotation); + } + else { + this.assertChangeAnnotations(this.changeAnnotations); + id = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.del(range, id); + } + this.edits.push(edit); + if (id !== undefined) { + return id; + } + }; + TextEditChangeImpl.prototype.add = function (edit) { + this.edits.push(edit); + }; + TextEditChangeImpl.prototype.all = function () { + return this.edits; + }; + TextEditChangeImpl.prototype.clear = function () { + this.edits.splice(0, this.edits.length); + }; + TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) { + if (value === undefined) { + throw new Error("Text edit change is not configured to manage change annotations."); + } + }; + return TextEditChangeImpl; + }()); + /** + * A helper class + */ + var ChangeAnnotations = /** @class */ (function () { + function ChangeAnnotations(annotations) { + this._annotations = annotations === undefined ? Object.create(null) : annotations; + this._counter = 0; + this._size = 0; + } + ChangeAnnotations.prototype.all = function () { + return this._annotations; + }; + Object.defineProperty(ChangeAnnotations.prototype, "size", { + get: function () { + return this._size; + }, + enumerable: false, + configurable: true + }); + ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) { + var id; + if (ChangeAnnotationIdentifier.is(idOrAnnotation)) { + id = idOrAnnotation; + } + else { + id = this.nextId(); + annotation = idOrAnnotation; + } + if (this._annotations[id] !== undefined) { + throw new Error("Id " + id + " is already in use."); + } + if (annotation === undefined) { + throw new Error("No annotation provided for id " + id); + } + this._annotations[id] = annotation; + this._size++; + return id; + }; + ChangeAnnotations.prototype.nextId = function () { + this._counter++; + return this._counter.toString(); + }; + return ChangeAnnotations; + }()); + /** + * A workspace change helps constructing changes to a workspace. + */ + var WorkspaceChange = /** @class */ (function () { + function WorkspaceChange(workspaceEdit) { + var _this = this; + this._textEditChanges = Object.create(null); + if (workspaceEdit !== undefined) { + this._workspaceEdit = workspaceEdit; + if (workspaceEdit.documentChanges) { + this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations); + workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + workspaceEdit.documentChanges.forEach(function (change) { + if (TextDocumentEdit.is(change)) { + var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations); + _this._textEditChanges[change.textDocument.uri] = textEditChange; + } + }); + } + else if (workspaceEdit.changes) { + Object.keys(workspaceEdit.changes).forEach(function (key) { + var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]); + _this._textEditChanges[key] = textEditChange; + }); + } + } + else { + this._workspaceEdit = {}; + } + } + Object.defineProperty(WorkspaceChange.prototype, "edit", { + /** + * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal + * use to be returned from a workspace edit operation like rename. + */ + get: function () { + this.initDocumentChanges(); + if (this._changeAnnotations !== undefined) { + if (this._changeAnnotations.size === 0) { + this._workspaceEdit.changeAnnotations = undefined; + } + else { + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + } + return this._workspaceEdit; + }, + enumerable: false, + configurable: true + }); + WorkspaceChange.prototype.getTextEditChange = function (key) { + if (OptionalVersionedTextDocumentIdentifier.is(key)) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var textDocument = { uri: key.uri, version: key.version }; + var result = this._textEditChanges[textDocument.uri]; + if (!result) { + var edits = []; + var textDocumentEdit = { + textDocument: textDocument, + edits: edits + }; + this._workspaceEdit.documentChanges.push(textDocumentEdit); + result = new TextEditChangeImpl(edits, this._changeAnnotations); + this._textEditChanges[textDocument.uri] = result; + } + return result; + } + else { + this.initChanges(); + if (this._workspaceEdit.changes === undefined) { + throw new Error('Workspace edit is not configured for normal text edit changes.'); + } + var result = this._textEditChanges[key]; + if (!result) { + var edits = []; + this._workspaceEdit.changes[key] = edits; + result = new TextEditChangeImpl(edits); + this._textEditChanges[key] = result; + } + return result; + } + }; + WorkspaceChange.prototype.initDocumentChanges = function () { + if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) { + this._changeAnnotations = new ChangeAnnotations(); + this._workspaceEdit.documentChanges = []; + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + }; + WorkspaceChange.prototype.initChanges = function () { + if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) { + this._workspaceEdit.changes = Object.create(null); + } + }; + WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + var operation; + var id; + if (annotation === undefined) { + operation = CreateFile.create(uri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = CreateFile.create(uri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + }; + WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + var operation; + var id; + if (annotation === undefined) { + operation = RenameFile.create(oldUri, newUri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = RenameFile.create(oldUri, newUri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + }; + WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === undefined) { + throw new Error('Workspace edit is not configured for document changes.'); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } + else { + options = optionsOrAnnotation; + } + var operation; + var id; + if (annotation === undefined) { + operation = DeleteFile.create(uri, options); + } + else { + id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = DeleteFile.create(uri, options, id); + } + this._workspaceEdit.documentChanges.push(operation); + if (id !== undefined) { + return id; + } + }; + return WorkspaceChange; + }()); + exports.WorkspaceChange = WorkspaceChange; + /** + * The TextDocumentIdentifier namespace provides helper functions to work with + * [TextDocumentIdentifier](#TextDocumentIdentifier) literals. + */ + var TextDocumentIdentifier; + (function (TextDocumentIdentifier) { + /** + * Creates a new TextDocumentIdentifier literal. + * @param uri The document's uri. + */ + function create(uri) { + return { uri: uri }; + } + TextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri); + } + TextDocumentIdentifier.is = is; + })(TextDocumentIdentifier = exports.TextDocumentIdentifier || (exports.TextDocumentIdentifier = {})); + /** + * The VersionedTextDocumentIdentifier namespace provides helper functions to work with + * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals. + */ + var VersionedTextDocumentIdentifier; + (function (VersionedTextDocumentIdentifier) { + /** + * Creates a new VersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param uri The document's text. + */ + function create(uri, version) { + return { uri: uri, version: version }; + } + VersionedTextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version); + } + VersionedTextDocumentIdentifier.is = is; + })(VersionedTextDocumentIdentifier = exports.VersionedTextDocumentIdentifier || (exports.VersionedTextDocumentIdentifier = {})); + /** + * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with + * [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) literals. + */ + var OptionalVersionedTextDocumentIdentifier; + (function (OptionalVersionedTextDocumentIdentifier) { + /** + * Creates a new OptionalVersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param uri The document's text. + */ + function create(uri, version) { + return { uri: uri, version: version }; + } + OptionalVersionedTextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version)); + } + OptionalVersionedTextDocumentIdentifier.is = is; + })(OptionalVersionedTextDocumentIdentifier = exports.OptionalVersionedTextDocumentIdentifier || (exports.OptionalVersionedTextDocumentIdentifier = {})); + /** + * The TextDocumentItem namespace provides helper functions to work with + * [TextDocumentItem](#TextDocumentItem) literals. + */ + var TextDocumentItem; + (function (TextDocumentItem) { + /** + * Creates a new TextDocumentItem literal. + * @param uri The document's uri. + * @param languageId The document's language identifier. + * @param version The document's version number. + * @param text The document's text. + */ + function create(uri, languageId, version, text) { + return { uri: uri, languageId: languageId, version: version, text: text }; + } + TextDocumentItem.create = create; + /** + * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text); + } + TextDocumentItem.is = is; + })(TextDocumentItem = exports.TextDocumentItem || (exports.TextDocumentItem = {})); + /** + * Describes the content type that a client supports in various + * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. + * + * Please note that `MarkupKinds` must not start with a `$`. This kinds + * are reserved for internal usage. + */ + var MarkupKind; + (function (MarkupKind) { + /** + * Plain text is supported as a content format + */ + MarkupKind.PlainText = 'plaintext'; + /** + * Markdown is supported as a content format + */ + MarkupKind.Markdown = 'markdown'; + })(MarkupKind = exports.MarkupKind || (exports.MarkupKind = {})); + (function (MarkupKind) { + /** + * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type. + */ + function is(value) { + var candidate = value; + return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown; + } + MarkupKind.is = is; + })(MarkupKind = exports.MarkupKind || (exports.MarkupKind = {})); + var MarkupContent; + (function (MarkupContent) { + /** + * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface. + */ + function is(value) { + var candidate = value; + return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value); + } + MarkupContent.is = is; + })(MarkupContent = exports.MarkupContent || (exports.MarkupContent = {})); + /** + * The kind of a completion entry. + */ + var CompletionItemKind; + (function (CompletionItemKind) { + CompletionItemKind.Text = 1; + CompletionItemKind.Method = 2; + CompletionItemKind.Function = 3; + CompletionItemKind.Constructor = 4; + CompletionItemKind.Field = 5; + CompletionItemKind.Variable = 6; + CompletionItemKind.Class = 7; + CompletionItemKind.Interface = 8; + CompletionItemKind.Module = 9; + CompletionItemKind.Property = 10; + CompletionItemKind.Unit = 11; + CompletionItemKind.Value = 12; + CompletionItemKind.Enum = 13; + CompletionItemKind.Keyword = 14; + CompletionItemKind.Snippet = 15; + CompletionItemKind.Color = 16; + CompletionItemKind.File = 17; + CompletionItemKind.Reference = 18; + CompletionItemKind.Folder = 19; + CompletionItemKind.EnumMember = 20; + CompletionItemKind.Constant = 21; + CompletionItemKind.Struct = 22; + CompletionItemKind.Event = 23; + CompletionItemKind.Operator = 24; + CompletionItemKind.TypeParameter = 25; + })(CompletionItemKind = exports.CompletionItemKind || (exports.CompletionItemKind = {})); + /** + * Defines whether the insert text in a completion item should be interpreted as + * plain text or a snippet. + */ + var InsertTextFormat; + (function (InsertTextFormat) { + /** + * The primary text to be inserted is treated as a plain string. + */ + InsertTextFormat.PlainText = 1; + /** + * The primary text to be inserted is treated as a snippet. + * + * A snippet can define tab stops and placeholders with `$1`, `$2` + * and `${3:foo}`. `$0` defines the final tab stop, it defaults to + * the end of the snippet. Placeholders with equal identifiers are linked, + * that is typing in one will update others too. + * + * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax + */ + InsertTextFormat.Snippet = 2; + })(InsertTextFormat = exports.InsertTextFormat || (exports.InsertTextFormat = {})); + /** + * Completion item tags are extra annotations that tweak the rendering of a completion + * item. + * + * @since 3.15.0 + */ + var CompletionItemTag; + (function (CompletionItemTag) { + /** + * Render a completion as obsolete, usually using a strike-out. + */ + CompletionItemTag.Deprecated = 1; + })(CompletionItemTag = exports.CompletionItemTag || (exports.CompletionItemTag = {})); + /** + * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits. + * + * @since 3.16.0 + */ + var InsertReplaceEdit; + (function (InsertReplaceEdit) { + /** + * Creates a new insert / replace edit + */ + function create(newText, insert, replace) { + return { newText: newText, insert: insert, replace: replace }; + } + InsertReplaceEdit.create = create; + /** + * Checks whether the given literal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface. + */ + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace); + } + InsertReplaceEdit.is = is; + })(InsertReplaceEdit = exports.InsertReplaceEdit || (exports.InsertReplaceEdit = {})); + /** + * How whitespace and indentation is handled during completion + * item insertion. + * + * @since 3.16.0 + */ + var InsertTextMode; + (function (InsertTextMode) { + /** + * The insertion or replace strings is taken as it is. If the + * value is multi line the lines below the cursor will be + * inserted using the indentation defined in the string value. + * The client will not apply any kind of adjustments to the + * string. + */ + InsertTextMode.asIs = 1; + /** + * The editor adjusts leading whitespace of new lines so that + * they match the indentation up to the cursor of the line for + * which the item is accepted. + * + * Consider a line like this: <2tabs><3tabs>foo. Accepting a + * multi line completion item is indented using 2 tabs and all + * following lines inserted will be indented using 2 tabs as well. + */ + InsertTextMode.adjustIndentation = 2; + })(InsertTextMode = exports.InsertTextMode || (exports.InsertTextMode = {})); + /** + * The CompletionItem namespace provides functions to deal with + * completion items. + */ + var CompletionItem; + (function (CompletionItem) { + /** + * Create a completion item and seed it with a label. + * @param label The completion item's label + */ + function create(label) { + return { label: label }; + } + CompletionItem.create = create; + })(CompletionItem = exports.CompletionItem || (exports.CompletionItem = {})); + /** + * The CompletionList namespace provides functions to deal with + * completion lists. + */ + var CompletionList; + (function (CompletionList) { + /** + * Creates a new completion list. + * + * @param items The completion items. + * @param isIncomplete The list is not complete. + */ + function create(items, isIncomplete) { + return { items: items ? items : [], isIncomplete: !!isIncomplete }; + } + CompletionList.create = create; + })(CompletionList = exports.CompletionList || (exports.CompletionList = {})); + var MarkedString; + (function (MarkedString) { + /** + * Creates a marked string from plain text. + * + * @param plainText The plain text. + */ + function fromPlainText(plainText) { + return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash + } + MarkedString.fromPlainText = fromPlainText; + /** + * Checks whether the given value conforms to the [MarkedString](#MarkedString) type. + */ + function is(value) { + var candidate = value; + return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value)); + } + MarkedString.is = is; + })(MarkedString = exports.MarkedString || (exports.MarkedString = {})); + var Hover; + (function (Hover) { + /** + * Checks whether the given value conforms to the [Hover](#Hover) interface. + */ + function is(value) { + var candidate = value; + return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) || + MarkedString.is(candidate.contents) || + Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range)); + } + Hover.is = is; + })(Hover = exports.Hover || (exports.Hover = {})); + /** + * The ParameterInformation namespace provides helper functions to work with + * [ParameterInformation](#ParameterInformation) literals. + */ + var ParameterInformation; + (function (ParameterInformation) { + /** + * Creates a new parameter information literal. + * + * @param label A label string. + * @param documentation A doc string. + */ + function create(label, documentation) { + return documentation ? { label: label, documentation: documentation } : { label: label }; + } + ParameterInformation.create = create; + })(ParameterInformation = exports.ParameterInformation || (exports.ParameterInformation = {})); + /** + * The SignatureInformation namespace provides helper functions to work with + * [SignatureInformation](#SignatureInformation) literals. + */ + var SignatureInformation; + (function (SignatureInformation) { + function create(label, documentation) { + var parameters = []; + for (var _i = 2; _i < arguments.length; _i++) { + parameters[_i - 2] = arguments[_i]; + } + var result = { label: label }; + if (Is.defined(documentation)) { + result.documentation = documentation; + } + if (Is.defined(parameters)) { + result.parameters = parameters; + } + else { + result.parameters = []; + } + return result; + } + SignatureInformation.create = create; + })(SignatureInformation = exports.SignatureInformation || (exports.SignatureInformation = {})); + /** + * A document highlight kind. + */ + var DocumentHighlightKind; + (function (DocumentHighlightKind) { + /** + * A textual occurrence. + */ + DocumentHighlightKind.Text = 1; + /** + * Read-access of a symbol, like reading a variable. + */ + DocumentHighlightKind.Read = 2; + /** + * Write-access of a symbol, like writing to a variable. + */ + DocumentHighlightKind.Write = 3; + })(DocumentHighlightKind = exports.DocumentHighlightKind || (exports.DocumentHighlightKind = {})); + /** + * DocumentHighlight namespace to provide helper functions to work with + * [DocumentHighlight](#DocumentHighlight) literals. + */ + var DocumentHighlight; + (function (DocumentHighlight) { + /** + * Create a DocumentHighlight object. + * @param range The range the highlight applies to. + */ + function create(range, kind) { + var result = { range: range }; + if (Is.number(kind)) { + result.kind = kind; + } + return result; + } + DocumentHighlight.create = create; + })(DocumentHighlight = exports.DocumentHighlight || (exports.DocumentHighlight = {})); + /** + * A symbol kind. + */ + var SymbolKind; + (function (SymbolKind) { + SymbolKind.File = 1; + SymbolKind.Module = 2; + SymbolKind.Namespace = 3; + SymbolKind.Package = 4; + SymbolKind.Class = 5; + SymbolKind.Method = 6; + SymbolKind.Property = 7; + SymbolKind.Field = 8; + SymbolKind.Constructor = 9; + SymbolKind.Enum = 10; + SymbolKind.Interface = 11; + SymbolKind.Function = 12; + SymbolKind.Variable = 13; + SymbolKind.Constant = 14; + SymbolKind.String = 15; + SymbolKind.Number = 16; + SymbolKind.Boolean = 17; + SymbolKind.Array = 18; + SymbolKind.Object = 19; + SymbolKind.Key = 20; + SymbolKind.Null = 21; + SymbolKind.EnumMember = 22; + SymbolKind.Struct = 23; + SymbolKind.Event = 24; + SymbolKind.Operator = 25; + SymbolKind.TypeParameter = 26; + })(SymbolKind = exports.SymbolKind || (exports.SymbolKind = {})); + /** + * Symbol tags are extra annotations that tweak the rendering of a symbol. + * @since 3.16 + */ + var SymbolTag; + (function (SymbolTag) { + /** + * Render a symbol as obsolete, usually using a strike-out. + */ + SymbolTag.Deprecated = 1; + })(SymbolTag = exports.SymbolTag || (exports.SymbolTag = {})); + var SymbolInformation; + (function (SymbolInformation) { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the location of the symbol. + * @param uri The resource of the location of symbol, defaults to the current document. + * @param containerName The name of the symbol containing the symbol. + */ + function create(name, kind, range, uri, containerName) { + var result = { + name: name, + kind: kind, + location: { uri: uri, range: range } + }; + if (containerName) { + result.containerName = containerName; + } + return result; + } + SymbolInformation.create = create; + })(SymbolInformation = exports.SymbolInformation || (exports.SymbolInformation = {})); + var DocumentSymbol; + (function (DocumentSymbol) { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param detail The detail of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the symbol. + * @param selectionRange The selectionRange of the symbol. + * @param children Children of the symbol. + */ + function create(name, detail, kind, range, selectionRange, children) { + var result = { + name: name, + detail: detail, + kind: kind, + range: range, + selectionRange: selectionRange + }; + if (children !== undefined) { + result.children = children; + } + return result; + } + DocumentSymbol.create = create; + /** + * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface. + */ + function is(value) { + var candidate = value; + return candidate && + Is.string(candidate.name) && Is.number(candidate.kind) && + Range.is(candidate.range) && Range.is(candidate.selectionRange) && + (candidate.detail === undefined || Is.string(candidate.detail)) && + (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) && + (candidate.children === undefined || Array.isArray(candidate.children)) && + (candidate.tags === undefined || Array.isArray(candidate.tags)); + } + DocumentSymbol.is = is; + })(DocumentSymbol = exports.DocumentSymbol || (exports.DocumentSymbol = {})); + /** + * A set of predefined code action kinds + */ + var CodeActionKind; + (function (CodeActionKind) { + /** + * Empty kind. + */ + CodeActionKind.Empty = ''; + /** + * Base kind for quickfix actions: 'quickfix' + */ + CodeActionKind.QuickFix = 'quickfix'; + /** + * Base kind for refactoring actions: 'refactor' + */ + CodeActionKind.Refactor = 'refactor'; + /** + * Base kind for refactoring extraction actions: 'refactor.extract' + * + * Example extract actions: + * + * - Extract method + * - Extract function + * - Extract variable + * - Extract interface from class + * - ... + */ + CodeActionKind.RefactorExtract = 'refactor.extract'; + /** + * Base kind for refactoring inline actions: 'refactor.inline' + * + * Example inline actions: + * + * - Inline function + * - Inline variable + * - Inline constant + * - ... + */ + CodeActionKind.RefactorInline = 'refactor.inline'; + /** + * Base kind for refactoring rewrite actions: 'refactor.rewrite' + * + * Example rewrite actions: + * + * - Convert JavaScript function to class + * - Add or remove parameter + * - Encapsulate field + * - Make method static + * - Move method to base class + * - ... + */ + CodeActionKind.RefactorRewrite = 'refactor.rewrite'; + /** + * Base kind for source actions: `source` + * + * Source code actions apply to the entire file. + */ + CodeActionKind.Source = 'source'; + /** + * Base kind for an organize imports source action: `source.organizeImports` + */ + CodeActionKind.SourceOrganizeImports = 'source.organizeImports'; + /** + * Base kind for auto-fix source actions: `source.fixAll`. + * + * Fix all actions automatically fix errors that have a clear fix that do not require user input. + * They should not suppress errors or perform unsafe fixes such as generating new types or classes. + * + * @since 3.15.0 + */ + CodeActionKind.SourceFixAll = 'source.fixAll'; + })(CodeActionKind = exports.CodeActionKind || (exports.CodeActionKind = {})); + /** + * The CodeActionContext namespace provides helper functions to work with + * [CodeActionContext](#CodeActionContext) literals. + */ + var CodeActionContext; + (function (CodeActionContext) { + /** + * Creates a new CodeActionContext literal. + */ + function create(diagnostics, only) { + var result = { diagnostics: diagnostics }; + if (only !== undefined && only !== null) { + result.only = only; + } + return result; + } + CodeActionContext.create = create; + /** + * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string)); + } + CodeActionContext.is = is; + })(CodeActionContext = exports.CodeActionContext || (exports.CodeActionContext = {})); + var CodeAction; + (function (CodeAction) { + function create(title, kindOrCommandOrEdit, kind) { + var result = { title: title }; + var checkKind = true; + if (typeof kindOrCommandOrEdit === 'string') { + checkKind = false; + result.kind = kindOrCommandOrEdit; + } + else if (Command.is(kindOrCommandOrEdit)) { + result.command = kindOrCommandOrEdit; + } + else { + result.edit = kindOrCommandOrEdit; + } + if (checkKind && kind !== undefined) { + result.kind = kind; + } + return result; + } + CodeAction.create = create; + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.title) && + (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) && + (candidate.kind === undefined || Is.string(candidate.kind)) && + (candidate.edit !== undefined || candidate.command !== undefined) && + (candidate.command === undefined || Command.is(candidate.command)) && + (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) && + (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit)); + } + CodeAction.is = is; + })(CodeAction = exports.CodeAction || (exports.CodeAction = {})); + /** + * The CodeLens namespace provides helper functions to work with + * [CodeLens](#CodeLens) literals. + */ + var CodeLens; + (function (CodeLens) { + /** + * Creates a new CodeLens literal. + */ + function create(range, data) { + var result = { range: range }; + if (Is.defined(data)) { + result.data = data; + } + return result; + } + CodeLens.create = create; + /** + * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command)); + } + CodeLens.is = is; + })(CodeLens = exports.CodeLens || (exports.CodeLens = {})); + /** + * The FormattingOptions namespace provides helper functions to work with + * [FormattingOptions](#FormattingOptions) literals. + */ + var FormattingOptions; + (function (FormattingOptions) { + /** + * Creates a new FormattingOptions literal. + */ + function create(tabSize, insertSpaces) { + return { tabSize: tabSize, insertSpaces: insertSpaces }; + } + FormattingOptions.create = create; + /** + * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces); + } + FormattingOptions.is = is; + })(FormattingOptions = exports.FormattingOptions || (exports.FormattingOptions = {})); + /** + * The DocumentLink namespace provides helper functions to work with + * [DocumentLink](#DocumentLink) literals. + */ + var DocumentLink; + (function (DocumentLink) { + /** + * Creates a new DocumentLink literal. + */ + function create(range, target, data) { + return { range: range, target: target, data: data }; + } + DocumentLink.create = create; + /** + * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target)); + } + DocumentLink.is = is; + })(DocumentLink = exports.DocumentLink || (exports.DocumentLink = {})); + /** + * The SelectionRange namespace provides helper function to work with + * SelectionRange literals. + */ + var SelectionRange; + (function (SelectionRange) { + /** + * Creates a new SelectionRange + * @param range the range. + * @param parent an optional parent. + */ + function create(range, parent) { + return { range: range, parent: parent }; + } + SelectionRange.create = create; + function is(value) { + var candidate = value; + return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent)); + } + SelectionRange.is = is; + })(SelectionRange = exports.SelectionRange || (exports.SelectionRange = {})); + exports.EOL = ['\n', '\r\n', '\r']; + /** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ + var TextDocument; + (function (TextDocument) { + /** + * Creates a new ITextDocument literal from the given uri and content. + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param content The document's content. + */ + function create(uri, languageId, version, content) { + return new FullTextDocument(uri, languageId, version, content); + } + TextDocument.create = create; + /** + * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount) + && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false; + } + TextDocument.is = is; + function applyEdits(document, edits) { + var text = document.getText(); + var sortedEdits = mergeSort(edits, function (a, b) { + var diff = a.range.start.line - b.range.start.line; + if (diff === 0) { + return a.range.start.character - b.range.start.character; + } + return diff; + }); + var lastModifiedOffset = text.length; + for (var i = sortedEdits.length - 1; i >= 0; i--) { + var e = sortedEdits[i]; + var startOffset = document.offsetAt(e.range.start); + var endOffset = document.offsetAt(e.range.end); + if (endOffset <= lastModifiedOffset) { + text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length); + } + else { + throw new Error('Overlapping edit'); + } + lastModifiedOffset = startOffset; + } + return text; + } + TextDocument.applyEdits = applyEdits; + function mergeSort(data, compare) { + if (data.length <= 1) { + // sorted + return data; + } + var p = (data.length / 2) | 0; + var left = data.slice(0, p); + var right = data.slice(p); + mergeSort(left, compare); + mergeSort(right, compare); + var leftIdx = 0; + var rightIdx = 0; + var i = 0; + while (leftIdx < left.length && rightIdx < right.length) { + var ret = compare(left[leftIdx], right[rightIdx]); + if (ret <= 0) { + // smaller_equal -> take left to preserve order + data[i++] = left[leftIdx++]; + } + else { + // greater -> take right + data[i++] = right[rightIdx++]; + } + } + while (leftIdx < left.length) { + data[i++] = left[leftIdx++]; + } + while (rightIdx < right.length) { + data[i++] = right[rightIdx++]; + } + return data; + } + })(TextDocument = exports.TextDocument || (exports.TextDocument = {})); + /** + * @deprecated Use the text document from the new vscode-languageserver-textdocument package. + */ + var FullTextDocument = /** @class */ (function () { + function FullTextDocument(uri, languageId, version, content) { + this._uri = uri; + this._languageId = languageId; + this._version = version; + this._content = content; + this._lineOffsets = undefined; + } + Object.defineProperty(FullTextDocument.prototype, "uri", { + get: function () { + return this._uri; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(FullTextDocument.prototype, "languageId", { + get: function () { + return this._languageId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(FullTextDocument.prototype, "version", { + get: function () { + return this._version; + }, + enumerable: false, + configurable: true + }); + FullTextDocument.prototype.getText = function (range) { + if (range) { + var start = this.offsetAt(range.start); + var end = this.offsetAt(range.end); + return this._content.substring(start, end); + } + return this._content; + }; + FullTextDocument.prototype.update = function (event, version) { + this._content = event.text; + this._version = version; + this._lineOffsets = undefined; + }; + FullTextDocument.prototype.getLineOffsets = function () { + if (this._lineOffsets === undefined) { + var lineOffsets = []; + var text = this._content; + var isLineStart = true; + for (var i = 0; i < text.length; i++) { + if (isLineStart) { + lineOffsets.push(i); + isLineStart = false; + } + var ch = text.charAt(i); + isLineStart = (ch === '\r' || ch === '\n'); + if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') { + i++; + } + } + if (isLineStart && text.length > 0) { + lineOffsets.push(text.length); + } + this._lineOffsets = lineOffsets; + } + return this._lineOffsets; + }; + FullTextDocument.prototype.positionAt = function (offset) { + offset = Math.max(Math.min(offset, this._content.length), 0); + var lineOffsets = this.getLineOffsets(); + var low = 0, high = lineOffsets.length; + if (high === 0) { + return Position.create(0, offset); + } + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (lineOffsets[mid] > offset) { + high = mid; + } + else { + low = mid + 1; + } + } + // low is the least x for which the line offset is larger than the current offset + // or array.length if no line offset is larger than the current offset + var line = low - 1; + return Position.create(line, offset - lineOffsets[line]); + }; + FullTextDocument.prototype.offsetAt = function (position) { + var lineOffsets = this.getLineOffsets(); + if (position.line >= lineOffsets.length) { + return this._content.length; + } + else if (position.line < 0) { + return 0; + } + var lineOffset = lineOffsets[position.line]; + var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length; + return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset); + }; + Object.defineProperty(FullTextDocument.prototype, "lineCount", { + get: function () { + return this.getLineOffsets().length; + }, + enumerable: false, + configurable: true + }); + return FullTextDocument; + }()); + var Is; + (function (Is) { + var toString = Object.prototype.toString; + function defined(value) { + return typeof value !== 'undefined'; + } + Is.defined = defined; + function undefined(value) { + return typeof value === 'undefined'; + } + Is.undefined = undefined; + function boolean(value) { + return value === true || value === false; + } + Is.boolean = boolean; + function string(value) { + return toString.call(value) === '[object String]'; + } + Is.string = string; + function number(value) { + return toString.call(value) === '[object Number]'; + } + Is.number = number; + function numberRange(value, min, max) { + return toString.call(value) === '[object Number]' && min <= value && value <= max; + } + Is.numberRange = numberRange; + function integer(value) { + return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647; + } + Is.integer = integer; + function uinteger(value) { + return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647; + } + Is.uinteger = uinteger; + function func(value) { + return toString.call(value) === '[object Function]'; + } + Is.func = func; + function objectLiteral(value) { + // Strictly speaking class instances pass this check as well. Since the LSP + // doesn't use classes we ignore this for now. If we do we need to add something + // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null` + return value !== null && typeof value === 'object'; + } + Is.objectLiteral = objectLiteral; + function typedArray(value, check) { + return Array.isArray(value) && value.every(check); + } + Is.typedArray = typedArray; + })(Is || (Is = {})); +}); +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/package.json" index f4782b80eb4a198f6f740e3f25ef80a67a60c8f1..8c8e20202df68b6f330baf9c94e5b5cf4cd5f22d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/node_modules/vscode-languageserver-types/package.json" @@ -1,3 +1,28 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ce282bb782c69b6ff105f1ba4a83e4204a530c30f0a001d064a19c37cf05a66c -size 1015 +{ + "name": "vscode-languageserver-types", + "description": "Types used by the Language server for node", + "version": "3.16.0", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-languageserver-node.git", + "directory": "types" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "main": "./lib/umd/main.js", + "typings": "./lib/umd/main", + "module": "./lib/esm/main.js", + "scripts": { + "prepublishOnly": "git clean -xfd . && npm install && npm run clean && npm run compile:esm && npm run compile && npm run test", + "postpublish": "node ../build/npm/post-publish.js", + "compile": "node ../build/bin/tsc -b ./tsconfig.json", + "compile:esm": "node ../build/bin/tsc -b ./tsconfig.esm.json", + "clean": "node ../node_modules/rimraf/bin.js lib", + "watch": "node ../build/bin/tsc -b ./tsconfig-watch.json -w", + "test": "node ../node_modules/mocha/bin/_mocha", + "preversion": "npm test" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/package.json" index 6151e1f8bd7f093d05cdf3a4d663d2d5aa4b0fa2..2610f8841685c05ccf554035dff3106b88589927 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/package.json" @@ -1,3 +1,35 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:786ac3ed171bb2c4efee0d1440ae9696e1c83d492237558ecf6e2672cd13a75e -size 1105 +{ + "name": "vscode-languageserver", + "description": "Language server implementation for node", + "version": "7.0.0", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-languageserver-node.git", + "directory": "server" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "main": "./lib/node/main.js", + "browser": { + "./lib/node/main.js": "./lib/browser/main.js" + }, + "typings": "./lib/common/api.d.ts", + "bin": { + "installServerIntoExtension": "./bin/installServerIntoExtension" + }, + "dependencies": { + "vscode-languageserver-protocol": "3.16.0" + }, + "scripts": { + "prepublishOnly": "git clean -xfd . && npm install && npm run clean && npm run compile && npm test", + "postpublish": "node ../build/npm/post-publish.js", + "compile": "node ../build/bin/tsc -b ./tsconfig.json", + "watch": "node ../build/bin/tsc -b ./tsconfig-watch.json -w", + "clean": "node ../node_modules/rimraf/bin.js lib", + "test": "node ../node_modules/mocha/bin/_mocha", + "preversion": "npm test" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/thirdpartynotices.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/thirdpartynotices.txt" index c24bb8af48a3ed5524924b4d3ceebf573ac4ed01..0ca4633511cb3b3ccaf390b653eb713f3ce01220 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/thirdpartynotices.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/thirdpartynotices.txt" @@ -1,3 +1,35 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4f163cd075501fe2aac58150ddcb5556182ea607d83f7468bd1b857fcc8719a2 -size 2002 +THIRD-PARTY SOFTWARE NOTICES AND INFORMATION +For Microsoft vscode-languageserver + +This project incorporates material from the project(s) listed below (collectively, “Third Party Code”). +Microsoft is not the original author of the Third Party Code. The original copyright notice and license +under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed +to you under their original license terms set forth below. Microsoft reserves all other rights not expressly +granted, whether by implication, estoppel or otherwise. + +1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped) + +%% DefinitelyTyped NOTICES AND INFORMATION BEGIN HERE +========================================= +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF DefinitelyTyped NOTICES AND INFORMATION \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/typings/thenable.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/typings/thenable.d.ts" index 71628bfa09bffea0029445a98311b0929f940987..8c4d2eeacd7b7de01db59e651d7eb4990b2ac605 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/typings/thenable.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-languageserver/typings/thenable.d.ts" @@ -1,3 +1,5 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:65b9243c80068ec9696b1fbdd23c9acf80d51df02f97b2d7a0514312b0a9fe7d -size 398 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +interface Thenable extends PromiseLike { } \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/License.txt" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/License.txt" index 0accfb9c4fb75bb2d893c779e215bec3376536d8..62c850ffccec513be09b999f46bde871b44b2da5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/License.txt" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/License.txt" @@ -1,3 +1,17 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e7a245bb6b03e115f33a07e77a5111915f492aa465113ebea33821e6a135177 -size 1112 +The MIT License (MIT) + +Copyright (c) Microsoft Corporation + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT +OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/README.md" index 0626f2e420dc8eb5f8ad477ba4ed46c950298dc0..fe77fff2d0044ea0108a0e28e4d9d3e0fc880fbd 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/README.md" @@ -1,3 +1,90 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a049fd6ce590595960590b8d30c4e1a6d3916f8901e5d3a83b069e97b69dc3f3 -size 4086 +# vscode-nls + + +CommonJS module to support externalization and localization. The module only depends on Node.js however its +primary use case is for VSCode extensions. + +[![Build Status](https://travis-ci.org/Microsoft/vscode-nls.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-nls) +[![NPM Version](https://img.shields.io/npm/v/vscode-nls.svg)](https://npmjs.org/package/vscode-nls) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-nls.svg)](https://npmjs.org/package/vscode-nls) + +## Usage + +```typescript +// This must be the first import in the main entry file +import * as nls from 'vscode-nls'; + +let localize = nls.config({ locale: 'de-DE' })(); + +console.log(localize('keyOne', "Hello World")); +console.log(localize('keyTwo', "Current Date {0}", Date.now())); +``` + +The `config` call configures the nls module and should only be called once in the applications entry point. You pass in the locale you want to use and whether the resolved locale should be cached for all further calls. The config call returns a function which is used to load a message bundle. During development time the argument should stay empty. There is another tool that helps extracting the message from your sources and it creates the message bundles automatically for you. The tool is available [here](https://github.com/Microsoft/vscode-nls-dev). + +In secondary modules loaded from the 'main' module no configuration is necessary. However you still need to load the nls module and load the message bundle. This looks like this: + +```typescript +// In secondary file this import can be at random places. +import * as nls from 'vscode-nls'; + +let localize = nls.loadMessageBundle(); + +console.log(localize('keyOne', "Hello World")); +``` + +During development time the strings in the code are presented to the user. If the locale is set to 'pseudo' the messages are modified in the following form: + +* vowels are doubled +* the string is prefixed with '\uFF3B' (Unicode zenkaku representation for [) and postfixed with '\uFF3D' (Unicode zenkaku representation for ]) + +## History + +### 5.2.0 + +* Removes injection mechanism due to breaking extensions. Please see [Issue #44](https://github.com/microsoft/vscode-nls/issues/44) for more details. + +### 5.1.0 + +* Enable a mechanism for something to inject data into vscode-nls. This will be used by VS Code to inject translations into the nls module so that vscode-nls can work in the web. [Context in this PR](https://github.com/microsoft/vscode-nls/pull/42). + +### 5.0.1 + +* Fixes null check in `nls.config({...})` on web. [Context in this PR by @a-stewart](https://github.com/microsoft/vscode-nls/pull/37) +* Misc dependency upgrades + +### 5.0.0 + +* Split code into common, node and browser to support using vscode-nls in a Web browser. This is a breaking change and need adoption since the default exports of the module are only exporting the common types. To import the node specific part use `vscode-nls\node`. To use the browser specific part import `vscode-nls\browser`. + +The browser specific part currently does only support a default language inline in code. There is no support yet to load a different language bundle during runtime. However the split allows to web pack the `vscode-nls` module. + +### 4.1.1 + +* Fixes [Bundled nls doesn't work](https://github.com/microsoft/vscode-nls/issues/23) + +### 4.1.0 + +* support language and locale when resolving options from `VSCODE_NLS_CONFIG` setting. + +### 4.0.0 + +* make vscode-nls webpack friendly (removal of require calls) +* narrow type for var args in `localize` function to `string | number | boolean | null | undefined` + +### 3.0.0: + +* added support to bundle the strings into a single `nls.bundle(.${locale})?.json` file. +* added support for VS Code language packs. + +### 2.0.2: + +* moved to TypeScript 2.1.5. Adapted to @types d.ts files instead of including typings directly into the repository. + +### 2.0.1: + +* based on TypeScript 2.0. Since TS changed the shape of the d.ts files for 2.0.x a major version number got introduce to not + break existing clients using TypeScript 1.8.x. + +## LICENSE +[MIT](License.txt) \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/browser.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/browser.d.ts" index 0898e728f1aa9ab8ecda68d04096c898e91dbe6a..e628f1b5caf549c4b58cead28e5ca6a1d682acf8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/browser.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/browser.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99170b7257d895bb2594d7db9c255a4b0029a1363fe5e89849fda830b5c997ce -size 385 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/browser/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/browser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/browser.js" index da29a4f6ec2636f4c79c022c589b7adc67c91530..f5caebf0011feb56821400f3e85f752c80778192 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/browser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/browser.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9406802db032558d3cd8bde9f68d20c067f3a7eca251ad7d0e4473da8d457ada -size 411 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/browser/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/main.d.ts" index a4f4b142b9f2ea0ece808e8327792d43fe5f1586..7c464deb34ca68721663281adec84a81a1a237ed 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/main.d.ts" @@ -1,3 +1,5 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:86b7af9e25e85fbceb9f0303ae7dbe84fb73a54348f3285bc2bedbecdbc5ac02 -size 430 +import { Options, LocalizeInfo } from '../common/common'; +export { MessageFormat, BundleFormat, Options, LocalizeInfo, LocalizeFunc, LoadFunc, KeyInfo } from '../common/common'; +export declare function loadMessageBundle(_file?: string): (key: string | number | LocalizeInfo, message: string, ...args: any[]) => string; +export declare function config(options?: Options): typeof loadMessageBundle; +//# sourceMappingURL=main.d.ts.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/main.d.ts.map" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/main.d.ts.map" index c368802a701a0b4f44b1176b55d4394aec67fd38..d8627503c85cdcedb835fc05fa7ab1d7f75ed65f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/main.d.ts.map" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/main.d.ts.map" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6fa2ccab543732053132b658c3734de1dcb5aa0d25d0e30e39ae8d03b2704e80 -size 434 +{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/browser/main.ts"],"names":[],"mappings":"AAOA,OAAO,EAAuB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEvH,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,EAAE,MAAM,SACzB,MAAM,GAAG,MAAM,GAAG,YAAY,WAAW,MAAM,WAAW,GAAG,EAAE,KAAG,MAAM,CAO9F;AAED,wBAAgB,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO,4BAGvC"} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/main.js" index 1d6698414bbfed94923db4c1c55eda4faaf7fc93..b4044c0424ff879ffed79a709b0d44f005aaf3b8 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/main.js" @@ -1,3 +1,47 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f777ce28eb4d6e1fd07887ae4e74c18593328c8633be6e5d234e1a9bd84a9932 -size 2217 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.config = exports.loadMessageBundle = exports.BundleFormat = exports.MessageFormat = void 0; +var ral_1 = require("../common/ral"); +var common_1 = require("../common/common"); +var common_2 = require("../common/common"); +Object.defineProperty(exports, "MessageFormat", { enumerable: true, get: function () { return common_2.MessageFormat; } }); +Object.defineProperty(exports, "BundleFormat", { enumerable: true, get: function () { return common_2.BundleFormat; } }); +function loadMessageBundle(_file) { + return function (key, message) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + if (typeof key === 'number') { + throw new Error("Browser implementation does currently not support externalized strings."); + } + else { + return common_1.localize.apply(void 0, __spreadArray([key, message], args, false)); + } + }; +} +exports.loadMessageBundle = loadMessageBundle; +function config(options) { + var _a; + (0, common_1.setPseudo)(((_a = options === null || options === void 0 ? void 0 : options.locale) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'pseudo'); + return loadMessageBundle; +} +exports.config = config; +ral_1.default.install(Object.freeze({ + loadMessageBundle: loadMessageBundle, + config: config +})); +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/main.js.map" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/main.js.map" index b8090598d12da43a0daaa965138b76954280758b..0efd5f9071ee391aeeb4f48c335387aa4de70796 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/main.js.map" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/main.js.map" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3611d2ca0d181d4c7b3f9e2e0e08178b0be5d9066af69447444d36300baac521 -size 804 +{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/browser/main.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;;;;;;;;;;AAEhG,qCAAgC;AAEhC,2CAA8E;AAE9E,2CAAuH;AAA9G,uGAAA,aAAa,OAAA;AAAE,sGAAA,YAAY,OAAA;AAEpC,SAAgB,iBAAiB,CAAC,KAAc;IAC/C,OAAO,UAAU,GAAmC,EAAE,OAAe;QAAE,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,6BAAc;;QACpF,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,yEAAyE,CAAC,CAAC;SAC3F;aAAM;YACN,OAAO,iBAAQ,8BAAC,GAAG,EAAE,OAAO,GAAK,IAAI,UAAE;SACvC;IACF,CAAC,CAAC;AACH,CAAC;AARD,8CAQC;AAED,SAAgB,MAAM,CAAC,OAAiB;;IACvC,IAAA,kBAAS,EAAC,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,0CAAE,WAAW,EAAE,MAAK,QAAQ,CAAC,CAAC;IACvD,OAAO,iBAAiB,CAAC;AAC1B,CAAC;AAHD,wBAGC;AAED,aAAG,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAM;IAC9B,iBAAiB,EAAE,iBAAiB;IACpC,MAAM,EAAE,MAAM;CACd,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/tsconfig.tsbuildinfo" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/tsconfig.tsbuildinfo" index 6d8f0510075fce9d242bced0bb02229dfe2205e3..b0574b03e99c39d84d859a435d6458f4ab729853 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/tsconfig.tsbuildinfo" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/browser/tsconfig.tsbuildinfo" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:37daf12bbc7c326270ee81d1e355136481e61d9eb0efa1a6f0c99afd3909d869 -size 917 +{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../common/common.d.ts","../common/ral.d.ts","../../src/browser/main.ts"],"fileInfos":[{"version":"89f78430e422a0f06d13019d60d5a45b37ec2d28e67eb647f73b1b0d19a46b72","affectsGlobalScope":true},{"version":"abba1071bfd89e55e88a054b0c851ea3e8a494c340d0f3fab19eb18f6afb0c9e","affectsGlobalScope":true},"ca318e19fce2e60cc2a7b38b1584aeb5e828f8052ca7dadffb678710e98487f6","5c7bb5997369b2266142d3df41da94dd31fe3a97b778f43971f3c951a51c0f71","dc93cac838493a491682fcea19cc810ecda949f0e910f1c9ad00dea0357ab120"],"options":{"composite":true,"declaration":true,"declarationMap":true,"module":1,"outDir":"./","sourceMap":true,"stripInternal":true,"target":1},"fileIdsList":[[3],[3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[3,4,2,1,5]},"version":"4.5.5"} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/common.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/common.d.ts" index 14a5263de7733c2de55ce32c679c1a096ba9df1b..19648541b6336c8303d27a6783a84c27e1f25a46 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/common.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/common.d.ts" @@ -1,3 +1,70 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ca318e19fce2e60cc2a7b38b1584aeb5e828f8052ca7dadffb678710e98487f6 -size 2026 +export declare enum MessageFormat { + file = "file", + bundle = "bundle", + both = "both" +} +export declare enum BundleFormat { + standalone = "standalone", + languagePack = "languagePack" +} +export interface Options { + locale?: string; + cacheLanguageResolution?: boolean; + messageFormat?: MessageFormat; + bundleFormat?: BundleFormat; +} +export interface LocalizeInfo { + key: string; + comment: string[]; +} +export interface LocalizeFunc { + (info: LocalizeInfo, message: string, ...args: (string | number | boolean | undefined | null)[]): string; + (key: string, message: string, ...args: (string | number | boolean | undefined | null)[]): string; +} +export interface LoadFunc { + (file?: string): LocalizeFunc; +} +export declare type SingleFileJsonFormat = string[] | { + messages: string[]; + keys: string[]; +}; +export interface NlsBundle { + [key: string]: string[]; +} +export declare type KeyInfo = string | LocalizeInfo; +export interface MetaDataEntry { + messages: string[]; + keys: KeyInfo[]; +} +export interface MetadataHeader { + id: string; + type: string; + hash: string; + outDir: string; +} +export interface MetaDataFile { + [key: string]: MetaDataEntry; +} +export interface TranslationConfig { + [extension: string]: string; +} +export interface I18nBundle { + version: string; + contents: { + [module: string]: { + [messageKey: string]: string; + }; + }; +} +export interface LanguageBundle { + header: MetadataHeader; + nlsBundle: NlsBundle; +} +export declare function isDefined(value: any): boolean; +export declare let isPseudo: boolean; +export declare function setPseudo(pseudo: boolean): void; +export declare function format(message: string, args: any[]): string; +export declare function localize(_key: string | LocalizeInfo, message: string, ...args: any[]): string; +export declare function loadMessageBundle(file?: string): LocalizeFunc; +export declare function config(opts?: Options): LoadFunc; +//# sourceMappingURL=common.d.ts.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/common.d.ts.map" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/common.d.ts.map" index 164e02ccc59b885283d3adb4544685e805b9fcf5..ca771558bf28e6aae3fa10499e2876e3e41954b5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/common.d.ts.map" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/common.d.ts.map" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bffad6041a13d76ff2bbe274df8de26da09c3698392b6f241689dc15f73594b4 -size 2100 +{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/common/common.ts"],"names":[],"mappings":"AAOA,oBAAY,aAAa;IACxB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,IAAI,SAAS;CACb;AAED,oBAAY,YAAY;IAEvB,UAAU,eAAe;IACzB,YAAY,iBAAiB;CAC7B;AAED,MAAM,WAAW,OAAO;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,YAAY,CAAC,EAAE,YAAY,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,EAAE,CAAC;CAClB;AASD,MAAM,WAAW,YAAY;IAC5B,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC;IACzG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC;CAClG;AAED,MAAM,WAAW,QAAQ;IACxB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;CAC9B;AAED,oBAAY,oBAAoB,GAAG,MAAM,EAAE,GAAG;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;CAAE,CAAC;AAEtF,MAAM,WAAW,SAAS;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACxB;AAED,oBAAY,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC7B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,EAAE,OAAO,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IACjC,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,UAAU;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE;QACT,CAAC,MAAM,EAAE,MAAM,GAAG;YACjB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;SAC7B,CAAC;KACF,CAAA;CACD;AAED,MAAM,WAAW,cAAc;IAC9B,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAE7C;AAED,eAAO,IAAI,QAAQ,SAAQ,CAAC;AAE5B,wBAAgB,SAAS,CAAC,MAAM,EAAE,OAAO,QAExC;AAED,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,CAwB3D;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,CAE7F;AAED,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,YAAY,CAE7D;AAED,wBAAgB,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAE/C"} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/common.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/common.js" index e8265956333e0606012729ba92466a4fdb1a4eb4..b453d995048fd04255450ff8430480f11e7fbf9c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/common.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/common.js" @@ -1,3 +1,80 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9165e33b734f1cc48710d24dc2b3a885bfad9f92e35b88d6cfc8b15656082e8b -size 2937 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.config = exports.loadMessageBundle = exports.localize = exports.format = exports.setPseudo = exports.isPseudo = exports.isDefined = exports.BundleFormat = exports.MessageFormat = void 0; +var ral_1 = require("./ral"); +var MessageFormat; +(function (MessageFormat) { + MessageFormat["file"] = "file"; + MessageFormat["bundle"] = "bundle"; + MessageFormat["both"] = "both"; +})(MessageFormat = exports.MessageFormat || (exports.MessageFormat = {})); +var BundleFormat; +(function (BundleFormat) { + // the nls.bundle format + BundleFormat["standalone"] = "standalone"; + BundleFormat["languagePack"] = "languagePack"; +})(BundleFormat = exports.BundleFormat || (exports.BundleFormat = {})); +var LocalizeInfo; +(function (LocalizeInfo) { + function is(value) { + var candidate = value; + return candidate && isDefined(candidate.key) && isDefined(candidate.comment); + } + LocalizeInfo.is = is; +})(LocalizeInfo || (LocalizeInfo = {})); +function isDefined(value) { + return typeof value !== 'undefined'; +} +exports.isDefined = isDefined; +exports.isPseudo = false; +function setPseudo(pseudo) { + exports.isPseudo = pseudo; +} +exports.setPseudo = setPseudo; +function format(message, args) { + var result; + if (exports.isPseudo) { + // FF3B and FF3D is the Unicode zenkaku representation for [ and ] + message = '\uFF3B' + message.replace(/[aouei]/g, '$&$&') + '\uFF3D'; + } + if (args.length === 0) { + result = message; + } + else { + result = message.replace(/\{(\d+)\}/g, function (match, rest) { + var index = rest[0]; + var arg = args[index]; + var replacement = match; + if (typeof arg === 'string') { + replacement = arg; + } + else if (typeof arg === 'number' || typeof arg === 'boolean' || arg === void 0 || arg === null) { + replacement = String(arg); + } + return replacement; + }); + } + return result; +} +exports.format = format; +function localize(_key, message) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + return format(message, args); +} +exports.localize = localize; +function loadMessageBundle(file) { + return (0, ral_1.default)().loadMessageBundle(file); +} +exports.loadMessageBundle = loadMessageBundle; +function config(opts) { + return (0, ral_1.default)().config(opts); +} +exports.config = config; +//# sourceMappingURL=common.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/common.js.map" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/common.js.map" index aeb3c925469685ea22213268f82bd701752d831f..317ebd9c5e7b1bed95a0b7b420188840eadf5a2a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/common.js.map" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/common.js.map" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b8ac545a59acb9294a2c480cccbb81dff01b187387d731d6d08cbe50748671c9 -size 1971 +{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/common/common.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,6BAAwB;AAExB,IAAY,aAIX;AAJD,WAAY,aAAa;IACxB,8BAAa,CAAA;IACb,kCAAiB,CAAA;IACjB,8BAAa,CAAA;AACd,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB;AAED,IAAY,YAIX;AAJD,WAAY,YAAY;IACvB,wBAAwB;IACxB,yCAAyB,CAAA;IACzB,6CAA6B,CAAA;AAC9B,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB;AAcD,IAAU,YAAY,CAKrB;AALD,WAAU,YAAY;IACrB,SAAgB,EAAE,CAAC,KAAU;QAC5B,IAAI,SAAS,GAAG,KAAqB,CAAC;QACtC,OAAO,SAAS,IAAI,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC9E,CAAC;IAHe,eAAE,KAGjB,CAAA;AACF,CAAC,EALS,YAAY,KAAZ,YAAY,QAKrB;AAqDD,SAAgB,SAAS,CAAC,KAAU;IACnC,OAAO,OAAO,KAAK,KAAK,WAAW,CAAC;AACrC,CAAC;AAFD,8BAEC;AAEU,QAAA,QAAQ,GAAG,KAAK,CAAC;AAE5B,SAAgB,SAAS,CAAC,MAAe;IACxC,gBAAQ,GAAG,MAAM,CAAC;AACnB,CAAC;AAFD,8BAEC;AAED,SAAgB,MAAM,CAAC,OAAe,EAAE,IAAW;IAClD,IAAI,MAAc,CAAC;IACnB,IAAI,gBAAQ,EAAE;QACb,kEAAkE;QAClE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC;KACpE;IACD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,MAAM,GAAG,OAAO,CAAC;KACjB;SACI;QACJ,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,UAAC,KAAK,EAAE,IAAI;YAClD,IAAI,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACpB,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;YACtB,IAAI,WAAW,GAAG,KAAK,CAAC;YACxB,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;gBAC5B,WAAW,GAAG,GAAG,CAAC;aAClB;iBACI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,KAAK,CAAC,IAAI,GAAG,KAAK,IAAI,EAAE;gBAC/F,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;aAC1B;YACD,OAAO,WAAW,CAAC;QACpB,CAAC,CAAC,CAAC;KACH;IACD,OAAO,MAAM,CAAC;AACf,CAAC;AAxBD,wBAwBC;AAED,SAAgB,QAAQ,CAAC,IAA2B,EAAE,OAAe;IAAE,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;IACpF,OAAO,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC9B,CAAC;AAFD,4BAEC;AAED,SAAgB,iBAAiB,CAAC,IAAa;IAC9C,OAAO,IAAA,aAAG,GAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC;AAFD,8CAEC;AAED,SAAgB,MAAM,CAAC,IAAc;IACpC,OAAO,IAAA,aAAG,GAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAFD,wBAEC"} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/ral.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/ral.d.ts" index 8b2480d60e2b20e6728bcb8c5daebaa6d6c7f0b7..405fb033c5a1a23fe91f1dabe1b0f2ddc6dc5417 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/ral.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/ral.d.ts" @@ -1,3 +1,11 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5c7bb5997369b2266142d3df41da94dd31fe3a97b778f43971f3c951a51c0f71 -size 314 +import { LocalizeFunc, LoadFunc, Options } from './common'; +interface RAL { + loadMessageBundle(file?: string): LocalizeFunc; + config(opts?: Options): LoadFunc; +} +declare function RAL(): RAL; +declare namespace RAL { + function install(ral: RAL): void; +} +export default RAL; +//# sourceMappingURL=ral.d.ts.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/ral.d.ts.map" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/ral.d.ts.map" index 970aa2041c39458bf2b2e591b7d4ecfc3379c12c..dbbbc39efca053fc42b94a25aeb82922026c71fd 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/ral.d.ts.map" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/ral.d.ts.map" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0ae2d667ed08a0470c5bcd5f342570b1bfecff53b3359a763f2b4b6e5711b962 -size 424 +{"version":3,"file":"ral.d.ts","sourceRoot":"","sources":["../../src/common/ral.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAE3D,UAAU,GAAG;IACZ,iBAAiB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC/C,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CACjC;AAID,iBAAS,GAAG,IAAI,GAAG,CAKlB;AAED,kBAAU,GAAG,CAAC;IACb,SAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAKtC;CACD;AAED,eAAe,GAAG,CAAC"} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/ral.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/ral.js" index dcc441ca66d885044f2d1e7d2c62b68dd84784de..fa840c6bc3443e97d7333c693a35c52da8e4dcf0 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/ral.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/ral.js" @@ -1,3 +1,20 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c4239569dd8dbbcb7c369a759a59f7b3fabeb9237d4b19387d37e4466f544950 -size 515 +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var _ral; +function RAL() { + if (_ral === undefined) { + throw new Error("No runtime abstraction layer installed"); + } + return _ral; +} +(function (RAL) { + function install(ral) { + if (ral === undefined) { + throw new Error("No runtime abstraction layer provided"); + } + _ral = ral; + } + RAL.install = install; +})(RAL || (RAL = {})); +exports.default = RAL; +//# sourceMappingURL=ral.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/ral.js.map" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/ral.js.map" index 97cc143d408380355c1d89e1fed5adf5c6553e29..02a65fcbf9d8a415bb070a9ffd218a6312749abd 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/ral.js.map" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/ral.js.map" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a520313ecc2612f3e0de85f353e8bc98bb9da08400702ef4e4e080fcafe8728f -size 488 +{"version":3,"file":"ral.js","sourceRoot":"","sources":["../../src/common/ral.ts"],"names":[],"mappings":";;AAWA,IAAI,IAAqB,CAAC;AAE1B,SAAS,GAAG;IACX,IAAI,IAAI,KAAK,SAAS,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;KAC1D;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAED,WAAU,GAAG;IACZ,SAAgB,OAAO,CAAC,GAAQ;QAC/B,IAAI,GAAG,KAAK,SAAS,EAAE;YACtB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;SACzD;QACD,IAAI,GAAG,GAAG,CAAC;IACZ,CAAC;IALe,WAAO,UAKtB,CAAA;AACF,CAAC,EAPS,GAAG,KAAH,GAAG,QAOZ;AAED,kBAAe,GAAG,CAAC"} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/tsconfig.tsbuildinfo" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/tsconfig.tsbuildinfo" index d8f6fd7e0ee126857afb9f44c4a7be07d6ecc28a..153d134efabcc279e7f264497de0b9496480a999 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/tsconfig.tsbuildinfo" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/common/tsconfig.tsbuildinfo" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:510a20967e965f0d213a61997fb95e71b777ee7b7b56b88503d539f7a203d9f7 -size 672 +{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../src/common/ral.ts","../../src/common/common.ts"],"fileInfos":[{"version":"89f78430e422a0f06d13019d60d5a45b37ec2d28e67eb647f73b1b0d19a46b72","affectsGlobalScope":true},"6cf01409ba00e33f25d7e86de81e95441262ff1df750cbc4492f716fe8145f4d","a8b1279efd328bbedb3585152830e425b0be1b41be9b0e12844f0a0104c32636"],"options":{"composite":true,"declaration":true,"declarationMap":true,"module":1,"outDir":"./","sourceMap":true,"stripInternal":true,"target":1},"fileIdsList":[[2],[3]],"referencedMap":[[3,1],[2,2]],"exportedModulesMap":[[3,1],[2,2]],"semanticDiagnosticsPerFile":[1,3,2]},"version":"4.5.5"} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/main.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/main.d.ts" index 8e5eb8f0d1d3da69419144d2d16d159f2099ffc4..9103d0786e215dc098426f28520ab5a270689ff6 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/main.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/main.d.ts" @@ -1,3 +1,5 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0d5257cab199a9ad0babadab92939139d549f00fd3cfd21e59e59b673e0274a1 -size 352 +import { Options, LocalizeFunc, LoadFunc } from '../common/common'; +export { MessageFormat, BundleFormat, Options, LocalizeInfo, LocalizeFunc, LoadFunc, KeyInfo } from '../common/common'; +export declare function loadMessageBundle(file?: string): LocalizeFunc; +export declare function config(opts?: Options): LoadFunc; +//# sourceMappingURL=main.d.ts.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/main.d.ts.map" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/main.d.ts.map" index bb4d765167d66d5bee38280093e1793f0f0cb06b..c0974c9362eea92288d2a4b6c4cb45be5b8907eb 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/main.d.ts.map" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/main.d.ts.map" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7a48f2120aab8191f1bacbb28a03520f85ad9e0cdcebe49e590f992cfa603ec8 -size 400 +{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/node/main.ts"],"names":[],"mappings":"AAUA,OAAO,EACyE,OAAO,EAAqC,YAAY,EAC5D,QAAQ,EACnF,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AA4WvH,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,YAAY,CAuE7D;AAED,wBAAgB,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAgB/C"} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/main.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/main.js" index a7af46a23d636a58c3134d5e27af7a07c316c1da..9e001d086338cf1baaa7f7d11f9929c0dde1cb82 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/main.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/main.js" @@ -1,3 +1,449 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bd5ee34a53b6364bb4500fc59ccdf6ed2fb2361081e7954989747c03cdd1ba55 -size 16449 +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.config = exports.loadMessageBundle = exports.BundleFormat = exports.MessageFormat = void 0; +var path = require("path"); +var fs = require("fs"); +var ral_1 = require("../common/ral"); +var common_1 = require("../common/common"); +var common_2 = require("../common/common"); +Object.defineProperty(exports, "MessageFormat", { enumerable: true, get: function () { return common_2.MessageFormat; } }); +Object.defineProperty(exports, "BundleFormat", { enumerable: true, get: function () { return common_2.BundleFormat; } }); +var toString = Object.prototype.toString; +function isNumber(value) { + return toString.call(value) === '[object Number]'; +} +function isString(value) { + return toString.call(value) === '[object String]'; +} +function isBoolean(value) { + return value === true || value === false; +} +function readJsonFileSync(filename) { + return JSON.parse(fs.readFileSync(filename, 'utf8')); +} +var resolvedBundles; +var options; +function initializeSettings() { + options = { locale: undefined, language: undefined, languagePackSupport: false, cacheLanguageResolution: true, messageFormat: common_1.MessageFormat.bundle }; + if (isString(process.env.VSCODE_NLS_CONFIG)) { + try { + var vscodeOptions_1 = JSON.parse(process.env.VSCODE_NLS_CONFIG); + var language = void 0; + if (vscodeOptions_1.availableLanguages) { + var value = vscodeOptions_1.availableLanguages['*']; + if (isString(value)) { + language = value; + } + } + if (isString(vscodeOptions_1.locale)) { + options.locale = vscodeOptions_1.locale.toLowerCase(); + } + if (language === undefined) { + options.language = options.locale; + } + else if (language !== 'en') { + options.language = language; + } + if (isBoolean(vscodeOptions_1._languagePackSupport)) { + options.languagePackSupport = vscodeOptions_1._languagePackSupport; + } + if (isString(vscodeOptions_1._cacheRoot)) { + options.cacheRoot = vscodeOptions_1._cacheRoot; + } + if (isString(vscodeOptions_1._languagePackId)) { + options.languagePackId = vscodeOptions_1._languagePackId; + } + if (isString(vscodeOptions_1._translationsConfigFile)) { + options.translationsConfigFile = vscodeOptions_1._translationsConfigFile; + try { + options.translationsConfig = readJsonFileSync(options.translationsConfigFile); + } + catch (error) { + // We can't read the translation config file. Mark the cache as corrupted. + if (vscodeOptions_1._corruptedFile) { + var dirname = path.dirname(vscodeOptions_1._corruptedFile); + fs.exists(dirname, function (exists) { + if (exists) { + fs.writeFile(vscodeOptions_1._corruptedFile, 'corrupted', 'utf8', function (err) { + console.error(err); + }); + } + }); + } + } + } + } + catch (_a) { + // Do nothing. + } + } + (0, common_1.setPseudo)(options.locale === 'pseudo'); + resolvedBundles = Object.create(null); +} +initializeSettings(); +function supportsLanguagePack() { + return options.languagePackSupport === true && options.cacheRoot !== undefined && options.languagePackId !== undefined && options.translationsConfigFile !== undefined + && options.translationsConfig !== undefined; +} +function createScopedLocalizeFunction(messages) { + return function (key, message) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + if (isNumber(key)) { + if (key >= messages.length) { + console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: ".concat(new Error('').stack)); + return; + } + return (0, common_1.format)(messages[key], args); + } + else { + if (isString(message)) { + console.warn("Message ".concat(message, " didn't get externalized correctly.")); + return (0, common_1.format)(message, args); + } + else { + console.error("Broken localize call found. Stacktrace is\n: ".concat(new Error('').stack)); + } + } + }; +} +function resolveLanguage(file) { + var resolvedLanguage; + if (options.cacheLanguageResolution && resolvedLanguage) { + resolvedLanguage = resolvedLanguage; + } + else { + if (common_1.isPseudo || !options.language) { + resolvedLanguage = '.nls.json'; + } + else { + var locale = options.language; + while (locale) { + var candidate = '.nls.' + locale + '.json'; + if (fs.existsSync(file + candidate)) { + resolvedLanguage = candidate; + break; + } + else { + var index = locale.lastIndexOf('-'); + if (index > 0) { + locale = locale.substring(0, index); + } + else { + resolvedLanguage = '.nls.json'; + locale = null; + } + } + } + } + if (options.cacheLanguageResolution) { + resolvedLanguage = resolvedLanguage; + } + } + return file + resolvedLanguage; +} +function findInTheBoxBundle(root) { + var language = options.language; + while (language) { + var candidate = path.join(root, "nls.bundle.".concat(language, ".json")); + if (fs.existsSync(candidate)) { + return candidate; + } + else { + var index = language.lastIndexOf('-'); + if (index > 0) { + language = language.substring(0, index); + } + else { + language = undefined; + } + } + } + // Test if we can reslove the default bundle. + if (language === undefined) { + var candidate = path.join(root, 'nls.bundle.json'); + if (fs.existsSync(candidate)) { + return candidate; + } + } + return undefined; +} +function mkdir(directory) { + try { + fs.mkdirSync(directory); + } + catch (err) { + if (err.code === 'EEXIST') { + return; + } + else if (err.code === 'ENOENT') { + var parent = path.dirname(directory); + if (parent !== directory) { + mkdir(parent); + fs.mkdirSync(directory); + } + } + else { + throw err; + } + } +} +function createDefaultNlsBundle(folder) { + var metaData = readJsonFileSync(path.join(folder, 'nls.metadata.json')); + var result = Object.create(null); + for (var module_1 in metaData) { + var entry = metaData[module_1]; + result[module_1] = entry.messages; + } + return result; +} +function createNLSBundle(header, metaDataPath) { + var languagePackLocation = options.translationsConfig[header.id]; + if (!languagePackLocation) { + return undefined; + } + var languagePack = readJsonFileSync(languagePackLocation).contents; + var metaData = readJsonFileSync(path.join(metaDataPath, 'nls.metadata.json')); + var result = Object.create(null); + for (var module_2 in metaData) { + var entry = metaData[module_2]; + var translations = languagePack["".concat(header.outDir, "/").concat(module_2)]; + if (translations) { + var resultMessages = []; + for (var i = 0; i < entry.keys.length; i++) { + var messageKey = entry.keys[i]; + var key = isString(messageKey) ? messageKey : messageKey.key; + var translatedMessage = translations[key]; + if (translatedMessage === undefined) { + translatedMessage = entry.messages[i]; + } + resultMessages.push(translatedMessage); + } + result[module_2] = resultMessages; + } + else { + result[module_2] = entry.messages; + } + } + return result; +} +function touch(file) { + var d = new Date(); + fs.utimes(file, d, d, function () { + // Do nothing. Ignore + }); +} +function cacheBundle(key, bundle) { + resolvedBundles[key] = bundle; + return bundle; +} +function loadNlsBundleOrCreateFromI18n(header, bundlePath) { + var result; + var bundle = path.join(options.cacheRoot, "".concat(header.id, "-").concat(header.hash, ".json")); + var useMemoryOnly = false; + var writeBundle = false; + try { + result = JSON.parse(fs.readFileSync(bundle, { encoding: 'utf8', flag: 'r' })); + touch(bundle); + return result; + } + catch (err) { + if (err.code === 'ENOENT') { + writeBundle = true; + } + else if (err instanceof SyntaxError) { + // We have a syntax error. So no valid JSON. Use + console.log("Syntax error parsing message bundle: ".concat(err.message, ".")); + fs.unlink(bundle, function (err) { + if (err) { + console.error("Deleting corrupted bundle ".concat(bundle, " failed.")); + } + }); + useMemoryOnly = true; + } + else { + throw err; + } + } + result = createNLSBundle(header, bundlePath); + if (!result || useMemoryOnly) { + return result; + } + if (writeBundle) { + try { + fs.writeFileSync(bundle, JSON.stringify(result), { encoding: 'utf8', flag: 'wx' }); + } + catch (err) { + if (err.code === 'EEXIST') { + return result; + } + throw err; + } + } + return result; +} +function loadDefaultNlsBundle(bundlePath) { + try { + return createDefaultNlsBundle(bundlePath); + } + catch (err) { + console.log("Generating default bundle from meta data failed.", err); + return undefined; + } +} +function loadNlsBundle(header, bundlePath) { + var result; + // Core decided to use a language pack. Do the same in the extension + if (supportsLanguagePack()) { + try { + result = loadNlsBundleOrCreateFromI18n(header, bundlePath); + } + catch (err) { + console.log("Load or create bundle failed ", err); + } + } + if (!result) { + // No language pack found, but core is running in language pack mode + // Don't try to use old in the box bundles since the might be stale + // Fall right back to the default bundle. + if (options.languagePackSupport) { + return loadDefaultNlsBundle(bundlePath); + } + var candidate = findInTheBoxBundle(bundlePath); + if (candidate) { + try { + return readJsonFileSync(candidate); + } + catch (err) { + console.log("Loading in the box message bundle failed.", err); + } + } + result = loadDefaultNlsBundle(bundlePath); + } + return result; +} +function tryFindMetaDataHeaderFile(file) { + var result; + var dirname = path.dirname(file); + while (true) { + result = path.join(dirname, 'nls.metadata.header.json'); + if (fs.existsSync(result)) { + break; + } + var parent = path.dirname(dirname); + if (parent === dirname) { + result = undefined; + break; + } + else { + dirname = parent; + } + } + return result; +} +function loadMessageBundle(file) { + if (!file) { + // No file. We are in dev mode. Return the default + // localize function. + return common_1.localize; + } + // Remove extension since we load json files. + var ext = path.extname(file); + if (ext) { + file = file.substr(0, file.length - ext.length); + } + if (options.messageFormat === common_1.MessageFormat.both || options.messageFormat === common_1.MessageFormat.bundle) { + var headerFile = tryFindMetaDataHeaderFile(file); + if (headerFile) { + var bundlePath = path.dirname(headerFile); + var bundle = resolvedBundles[bundlePath]; + if (bundle === undefined) { + try { + var header = JSON.parse(fs.readFileSync(headerFile, 'utf8')); + try { + var nlsBundle = loadNlsBundle(header, bundlePath); + bundle = cacheBundle(bundlePath, nlsBundle ? { header: header, nlsBundle: nlsBundle } : null); + } + catch (err) { + console.error('Failed to load nls bundle', err); + bundle = cacheBundle(bundlePath, null); + } + } + catch (err) { + console.error('Failed to read header file', err); + bundle = cacheBundle(bundlePath, null); + } + } + if (bundle) { + var module_3 = file.substr(bundlePath.length + 1).replace(/\\/g, '/'); + var messages = bundle.nlsBundle[module_3]; + if (messages === undefined) { + console.error("Messages for file ".concat(file, " not found. See console for details.")); + return function () { + return 'Messages not found.'; + }; + } + return createScopedLocalizeFunction(messages); + } + } + } + if (options.messageFormat === common_1.MessageFormat.both || options.messageFormat === common_1.MessageFormat.file) { + // Try to load a single file bundle + try { + var json = readJsonFileSync(resolveLanguage(file)); + if (Array.isArray(json)) { + return createScopedLocalizeFunction(json); + } + else { + if ((0, common_1.isDefined)(json.messages) && (0, common_1.isDefined)(json.keys)) { + return createScopedLocalizeFunction(json.messages); + } + else { + console.error("String bundle '".concat(file, "' uses an unsupported format.")); + return function () { + return 'File bundle has unsupported format. See console for details'; + }; + } + } + } + catch (err) { + if (err.code !== 'ENOENT') { + console.error('Failed to load single file bundle', err); + } + } + } + console.error("Failed to load message bundle for file ".concat(file)); + return function () { + return 'Failed to load message bundle. See console for details.'; + }; +} +exports.loadMessageBundle = loadMessageBundle; +function config(opts) { + if (opts) { + if (isString(opts.locale)) { + options.locale = opts.locale.toLowerCase(); + options.language = options.locale; + resolvedBundles = Object.create(null); + } + if (opts.messageFormat !== undefined) { + options.messageFormat = opts.messageFormat; + } + if (opts.bundleFormat === common_1.BundleFormat.standalone && options.languagePackSupport === true) { + options.languagePackSupport = false; + } + } + (0, common_1.setPseudo)(options.locale === 'pseudo'); + return loadMessageBundle; +} +exports.config = config; +ral_1.default.install(Object.freeze({ + loadMessageBundle: loadMessageBundle, + config: config +})); +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/main.js.map" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/main.js.map" index ad5ccfb2f26a25b4cc2e175f1546c2b1797489e3..b2a21b45ca71b646db47b9594c55e36ddd825c3c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/main.js.map" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/main.js.map" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:09e4cf94dc8c949b8cf6f05f816f251471bd72997780e9ebaa3c4d50fbc199cc -size 12647 +{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/node/main.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,2BAA6B;AAC7B,uBAAyB;AAEzB,qCAAgC;AAEhC,2CAG0B;AAE1B,2CAAuH;AAA9G,uGAAA,aAAa,OAAA;AAAE,sGAAA,YAAY,OAAA;AAEpC,IAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAE3C,SAAS,QAAQ,CAAC,KAAU;IAC3B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,iBAAiB,CAAC;AACnD,CAAC;AAED,SAAS,QAAQ,CAAC,KAAU;IAC3B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,iBAAiB,CAAC;AACnD,CAAC;AAED,SAAS,SAAS,CAAC,KAAU;IAC5B,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC;AAC1C,CAAC;AAED,SAAS,gBAAgB,CAAU,QAAgB;IAClD,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAM,CAAC;AAC3D,CAAC;AA0BD,IAAI,eAEH,CAAC;AAEF,IAAI,OAAwB,CAAC;AAE7B,SAAS,kBAAkB;IAC1B,OAAO,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,mBAAmB,EAAE,KAAK,EAAE,uBAAuB,EAAE,IAAI,EAAE,aAAa,EAAE,sBAAa,CAAC,MAAM,EAAE,CAAC;IACrJ,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;QAC5C,IAAI;YACH,IAAI,eAAa,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAoB,CAAC;YACjF,IAAI,QAAQ,SAAoB,CAAC;YACjC,IAAI,eAAa,CAAC,kBAAkB,EAAE;gBACrC,IAAI,KAAK,GAAG,eAAa,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;gBAClD,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;oBACpB,QAAQ,GAAG,KAAK,CAAC;iBACjB;aACD;YACD,IAAI,QAAQ,CAAC,eAAa,CAAC,MAAM,CAAC,EAAE;gBACnC,OAAO,CAAC,MAAM,GAAG,eAAa,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;aACpD;YACD,IAAI,QAAQ,KAAK,SAAS,EAAE;gBAC3B,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;aAClC;iBAAM,IAAI,QAAQ,KAAK,IAAI,EAAE;gBAC7B,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;aAC5B;YAED,IAAI,SAAS,CAAC,eAAa,CAAC,oBAAoB,CAAC,EAAE;gBAClD,OAAO,CAAC,mBAAmB,GAAG,eAAa,CAAC,oBAAoB,CAAC;aACjE;YACD,IAAI,QAAQ,CAAC,eAAa,CAAC,UAAU,CAAC,EAAE;gBACvC,OAAO,CAAC,SAAS,GAAG,eAAa,CAAC,UAAU,CAAC;aAC7C;YACD,IAAI,QAAQ,CAAC,eAAa,CAAC,eAAe,CAAC,EAAE;gBAC5C,OAAO,CAAC,cAAc,GAAG,eAAa,CAAC,eAAe,CAAC;aACvD;YACD,IAAI,QAAQ,CAAC,eAAa,CAAC,uBAAuB,CAAC,EAAE;gBACpD,OAAO,CAAC,sBAAsB,GAAG,eAAa,CAAC,uBAAuB,CAAC;gBACvE,IAAI;oBACH,OAAO,CAAC,kBAAkB,GAAG,gBAAgB,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;iBAC9E;gBAAC,OAAO,KAAK,EAAE;oBACf,0EAA0E;oBAC1E,IAAI,eAAa,CAAC,cAAc,EAAE;wBACjC,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAa,CAAC,cAAc,CAAC,CAAC;wBAC3D,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,UAAC,MAAM;4BACzB,IAAI,MAAM,EAAE;gCACX,EAAE,CAAC,SAAS,CAAC,eAAa,CAAC,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,UAAC,GAAG;oCACnE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gCACpB,CAAC,CAAC,CAAC;6BACH;wBACF,CAAC,CAAC,CAAC;qBACH;iBACD;aACD;SACD;QAAC,WAAM;YACP,cAAc;SACd;KACD;IACD,IAAA,kBAAS,EAAC,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC;IACvC,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC;AACD,kBAAkB,EAAE,CAAC;AAErB,SAAS,oBAAoB;IAC5B,OAAO,OAAO,CAAC,mBAAmB,KAAK,IAAI,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS,IAAI,OAAO,CAAC,sBAAsB,KAAK,SAAS;WAClK,OAAO,CAAC,kBAAkB,KAAK,SAAS,CAAC;AAC9C,CAAC;AAED,SAAS,4BAA4B,CAAC,QAAkB;IACvD,OAAO,UAAU,GAAQ,EAAE,OAAe;QAAE,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,6BAAc;;QACzD,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAE;YAClB,IAAI,GAAG,IAAI,QAAQ,CAAC,MAAM,EAAE;gBAC3B,OAAO,CAAC,KAAK,CAAC,4EAA2E,IAAI,KAAK,CAAC,EAAE,CAAE,CAAC,KAAK,CAAE,CAAC,CAAC;gBACjH,OAAO;aACP;YACD,OAAO,IAAA,eAAM,EAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;SACnC;aAAM;YACN,IAAI,QAAQ,CAAC,OAAO,CAAC,EAAE;gBACtB,OAAO,CAAC,IAAI,CAAC,kBAAW,OAAO,wCAAqC,CAAC,CAAC;gBACtE,OAAO,IAAA,eAAM,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC;aAC7B;iBAAM;gBACN,OAAO,CAAC,KAAK,CAAC,uDAAsD,IAAI,KAAK,CAAC,EAAE,CAAE,CAAC,KAAK,CAAE,CAAC,CAAC;aAC5F;SACD;IACF,CAAC,CAAC;AACH,CAAC;AAGD,SAAS,eAAe,CAAC,IAAY;IACpC,IAAI,gBAAwB,CAAC;IAC7B,IAAI,OAAO,CAAC,uBAAuB,IAAI,gBAAgB,EAAE;QACxD,gBAAgB,GAAG,gBAAgB,CAAC;KACpC;SAAM;QACN,IAAI,iBAAQ,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;YAClC,gBAAgB,GAAG,WAAW,CAAC;SAC/B;aAAM;YACN,IAAI,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;YAC9B,OAAO,MAAM,EAAE;gBACd,IAAI,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;gBAC3C,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC,EAAE;oBACpC,gBAAgB,GAAG,SAAS,CAAC;oBAC7B,MAAM;iBACN;qBAAM;oBACN,IAAI,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;oBACpC,IAAI,KAAK,GAAG,CAAC,EAAE;wBACd,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;qBACpC;yBAAM;wBACN,gBAAgB,GAAG,WAAW,CAAC;wBAC/B,MAAM,GAAG,IAAI,CAAC;qBACd;iBACD;aACD;SACD;QACD,IAAI,OAAO,CAAC,uBAAuB,EAAE;YACpC,gBAAgB,GAAG,gBAAgB,CAAC;SACpC;KACD;IACD,OAAO,IAAI,GAAG,gBAAgB,CAAC;AAChC,CAAC;AAED,SAAS,kBAAkB,CAAC,IAAY;IACvC,IAAI,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAChC,OAAO,QAAQ,EAAE;QAChB,IAAI,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,qBAAc,QAAQ,UAAO,CAAC,CAAC;QAC/D,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAC7B,OAAO,SAAS,CAAC;SACjB;aAAM;YACN,IAAI,KAAK,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YACtC,IAAI,KAAK,GAAG,CAAC,EAAE;gBACd,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;aACxC;iBAAM;gBACN,QAAQ,GAAG,SAAS,CAAC;aACrB;SACD;KACD;IACD,6CAA6C;IAC7C,IAAI,QAAQ,KAAK,SAAS,EAAE;QAC3B,IAAI,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QACnD,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAC7B,OAAO,SAAS,CAAC;SACjB;KACD;IACD,OAAO,SAAS,CAAC;AAClB,CAAC;AAED,SAAS,KAAK,CAAC,SAAiB;IAC/B,IAAI;QACH,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;KACxB;IAAC,OAAO,GAAG,EAAE;QACb,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;YAC1B,OAAO;SACP;aAAM,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;YACjC,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YACrC,IAAI,MAAM,KAAK,SAAS,EAAE;gBACzB,KAAK,CAAC,MAAM,CAAC,CAAC;gBACd,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;aACxB;SACD;aAAM;YACN,MAAM,GAAG,CAAC;SACV;KACD;AACF,CAAC;AAED,SAAS,sBAAsB,CAAC,MAAc;IAC7C,IAAI,QAAQ,GAAiB,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC;IACtF,IAAI,MAAM,GAAc,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC5C,KAAK,IAAI,QAAM,IAAI,QAAQ,EAAE;QAC5B,IAAI,KAAK,GAAG,QAAQ,CAAC,QAAM,CAAC,CAAC;QAC7B,MAAM,CAAC,QAAM,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC;KAChC;IACD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,eAAe,CAAC,MAAsB,EAAE,YAAoB;IACpE,IAAI,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACjE,IAAI,CAAC,oBAAoB,EAAE;QAC1B,OAAO,SAAS,CAAC;KACjB;IACD,IAAI,YAAY,GAAe,gBAAgB,CAAC,oBAAoB,CAAC,CAAC,QAAQ,CAAC;IAC/E,IAAI,QAAQ,GAAiB,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAC5F,IAAI,MAAM,GAAc,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC5C,KAAK,IAAI,QAAM,IAAI,QAAQ,EAAE;QAC5B,IAAI,KAAK,GAAG,QAAQ,CAAC,QAAM,CAAC,CAAC;QAC7B,IAAI,YAAY,GAAG,YAAY,CAAC,UAAG,MAAM,CAAC,MAAM,cAAI,QAAM,CAAE,CAAC,CAAC;QAC9D,IAAI,YAAY,EAAE;YACjB,IAAI,cAAc,GAAa,EAAE,CAAC;YAClC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC3C,IAAI,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC/B,IAAI,GAAG,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC;gBAC7D,IAAI,iBAAiB,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;gBAC1C,IAAI,iBAAiB,KAAK,SAAS,EAAE;oBACpC,iBAAiB,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;iBACtC;gBACD,cAAc,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;aACvC;YACD,MAAM,CAAC,QAAM,CAAC,GAAG,cAAc,CAAC;SAChC;aAAM;YACN,MAAM,CAAC,QAAM,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC;SAChC;KACD;IACD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,KAAK,CAAC,IAAY;IAC1B,IAAI,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC;IACnB,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE;QACrB,qBAAqB;IACtB,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,GAAW,EAAE,MAA6B;IAC9D,eAAe,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IAC9B,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,6BAA6B,CAAC,MAAsB,EAAE,UAAkB;IAChF,IAAI,MAAiB,CAAC;IAEtB,IAAI,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAG,MAAM,CAAC,EAAE,cAAI,MAAM,CAAC,IAAI,UAAO,CAAC,CAAC;IAC9E,IAAI,aAAa,GAAY,KAAK,CAAC;IACnC,IAAI,WAAW,GAAY,KAAK,CAAC;IACjC,IAAI;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;QAC9E,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,OAAO,MAAM,CAAC;KACd;IAAC,OAAO,GAAG,EAAE;QACb,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;YAC1B,WAAW,GAAG,IAAI,CAAC;SACnB;aAAM,IAAI,GAAG,YAAY,WAAW,EAAE;YACtC,gDAAgD;YAChD,OAAO,CAAC,GAAG,CAAC,+CAAwC,GAAG,CAAC,OAAO,MAAG,CAAC,CAAC;YACpE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,UAAC,GAAG;gBACrB,IAAI,GAAG,EAAE;oBACR,OAAO,CAAC,KAAK,CAAC,oCAA6B,MAAM,aAAU,CAAC,CAAC;iBAC7D;YACF,CAAC,CAAC,CAAC;YACH,aAAa,GAAG,IAAI,CAAC;SACrB;aAAM;YACN,MAAM,GAAG,CAAC;SACV;KACD;IAED,MAAM,GAAG,eAAe,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC7C,IAAI,CAAC,MAAM,IAAI,aAAa,EAAE;QAC7B,OAAO,MAAM,CAAC;KACd;IAED,IAAI,WAAW,EAAE;QAChB,IAAI;YACH,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;SACnF;QAAC,OAAO,GAAG,EAAE;YACb,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;gBAC1B,OAAO,MAAM,CAAC;aACd;YACD,MAAM,GAAG,CAAC;SACV;KACD;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,oBAAoB,CAAC,UAAkB;IAC/C,IAAI;QACH,OAAO,sBAAsB,CAAC,UAAU,CAAC,CAAC;KAC1C;IAAC,OAAO,GAAG,EAAE;QACb,OAAO,CAAC,GAAG,CAAC,kDAAkD,EAAE,GAAG,CAAC,CAAC;QACrE,OAAO,SAAS,CAAC;KACjB;AACF,CAAC;AAED,SAAS,aAAa,CAAC,MAAsB,EAAE,UAAkB;IAChE,IAAI,MAAiB,CAAC;IAEtB,oEAAoE;IACpE,IAAI,oBAAoB,EAAE,EAAE;QAC3B,IAAI;YACH,MAAM,GAAG,6BAA6B,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;SAC3D;QAAC,OAAO,GAAG,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAC;SAClD;KACD;IACD,IAAI,CAAC,MAAM,EAAE;QACZ,oEAAoE;QACpE,mEAAmE;QACnE,yCAAyC;QACzC,IAAI,OAAO,CAAC,mBAAmB,EAAE;YAChC,OAAO,oBAAoB,CAAC,UAAU,CAAC,CAAC;SACxC;QACD,IAAI,SAAS,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAI,SAAS,EAAE;YACd,IAAI;gBACH,OAAO,gBAAgB,CAAC,SAAS,CAAC,CAAC;aACnC;YAAC,OAAO,GAAG,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,2CAA2C,EAAE,GAAG,CAAC,CAAC;aAC9D;SACD;QACD,MAAM,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC;KAC1C;IACD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,yBAAyB,CAAC,IAAY;IAC9C,IAAI,MAAc,CAAC;IACnB,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,IAAI,EAAE;QACZ,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,0BAA0B,CAAC,CAAC;QACxD,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YAC1B,MAAM;SACN;QACD,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACnC,IAAI,MAAM,KAAK,OAAO,EAAE;YACvB,MAAM,GAAG,SAAS,CAAC;YACnB,MAAM;SACN;aAAM;YACN,OAAO,GAAG,MAAM,CAAC;SACjB;KACD;IACD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAgB,iBAAiB,CAAC,IAAa;IAC9C,IAAI,CAAC,IAAI,EAAE;QACV,kDAAkD;QAClD,qBAAqB;QACrB,OAAO,iBAAQ,CAAC;KAChB;IACD,6CAA6C;IAC7C,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,GAAG,EAAE;QACR,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;KAChD;IAED,IAAI,OAAO,CAAC,aAAa,KAAK,sBAAa,CAAC,IAAI,IAAI,OAAO,CAAC,aAAa,KAAK,sBAAa,CAAC,MAAM,EAAE;QACnG,IAAI,UAAU,GAAG,yBAAyB,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,UAAU,EAAE;YACf,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAC1C,IAAI,MAAM,GAAmB,eAAe,CAAC,UAAU,CAAC,CAAC;YACzD,IAAI,MAAM,KAAK,SAAS,EAAE;gBACzB,IAAI;oBACH,IAAI,MAAM,GAAmB,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;oBAC7E,IAAI;wBACH,IAAI,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;wBAClD,MAAM,GAAG,WAAW,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,QAAA,EAAE,SAAS,WAAA,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;qBAC3E;oBAAC,OAAO,GAAG,EAAE;wBACb,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,GAAG,CAAC,CAAC;wBAChD,MAAM,GAAG,WAAW,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;qBACvC;iBACD;gBAAC,OAAO,GAAG,EAAE;oBACb,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,GAAG,CAAC,CAAC;oBACjD,MAAM,GAAG,WAAW,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;iBACvC;aACD;YACD,IAAI,MAAM,EAAE;gBACX,IAAI,QAAM,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;gBACpE,IAAI,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAM,CAAC,CAAC;gBACxC,IAAI,QAAQ,KAAK,SAAS,EAAE;oBAC3B,OAAO,CAAC,KAAK,CAAC,4BAAqB,IAAI,yCAAsC,CAAC,CAAC;oBAC/E,OAAO;wBACN,OAAO,qBAAqB,CAAC;oBAC9B,CAAC,CAAC;iBACF;gBACD,OAAO,4BAA4B,CAAC,QAAQ,CAAC,CAAC;aAC9C;SACD;KACD;IACD,IAAI,OAAO,CAAC,aAAa,KAAK,sBAAa,CAAC,IAAI,IAAI,OAAO,CAAC,aAAa,KAAK,sBAAa,CAAC,IAAI,EAAE;QACjG,mCAAmC;QACnC,IAAI;YACH,IAAI,IAAI,GAAyB,gBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;YACzE,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBACxB,OAAO,4BAA4B,CAAC,IAAI,CAAC,CAAC;aAC1C;iBAAM;gBACN,IAAI,IAAA,kBAAS,EAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAA,kBAAS,EAAC,IAAI,CAAC,IAAI,CAAC,EAAE;oBACrD,OAAO,4BAA4B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBACnD;qBAAM;oBACN,OAAO,CAAC,KAAK,CAAC,yBAAkB,IAAI,kCAA+B,CAAC,CAAC;oBACrE,OAAO;wBACN,OAAO,6DAA6D,CAAC;oBACtE,CAAC,CAAC;iBACF;aACD;SACD;QAAC,OAAO,GAAG,EAAE;YACb,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;gBAC1B,OAAO,CAAC,KAAK,CAAC,mCAAmC,EAAE,GAAG,CAAC,CAAC;aACxD;SACD;KACD;IACD,OAAO,CAAC,KAAK,CAAC,iDAA0C,IAAI,CAAE,CAAC,CAAC;IAChE,OAAO;QACN,OAAO,yDAAyD,CAAC;IAClE,CAAC,CAAC;AACH,CAAC;AAvED,8CAuEC;AAED,SAAgB,MAAM,CAAC,IAAc;IACpC,IAAI,IAAI,EAAE;QACT,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YAC1B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;YAC3C,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;YAClC,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;SACtC;QACD,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,EAAE;YACrC,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;SAC3C;QACD,IAAI,IAAI,CAAC,YAAY,KAAK,qBAAY,CAAC,UAAU,IAAI,OAAO,CAAC,mBAAmB,KAAK,IAAI,EAAE;YAC1F,OAAO,CAAC,mBAAmB,GAAG,KAAK,CAAC;SACpC;KACD;IACD,IAAA,kBAAS,EAAC,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC;IACvC,OAAO,iBAAiB,CAAC;AAC1B,CAAC;AAhBD,wBAgBC;AAED,aAAG,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAM;IAC9B,iBAAiB,EAAE,iBAAiB;IACpC,MAAM,EAAE,MAAM;CACd,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/localize.test.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/localize.test.d.ts" index edc611fe57d270f3d54567c63c3950757fa609fe..e9170ab3c4e64f1be9cb94c8ccb6b7b9fe9eb6d5 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/localize.test.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/localize.test.d.ts" @@ -1,3 +1,2 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:445ed690fbb460d997ff8a1f7908648045056293b1d30cead9489892ba0b4e34 -size 54 +export {}; +//# sourceMappingURL=localize.test.d.ts.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/localize.test.d.ts.map" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/localize.test.d.ts.map" index e8d98c9b547bb69f6b43840824211c96923e515b..c7b98e98edb800b5018f5d9fac547f9e3a622971 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/localize.test.d.ts.map" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/localize.test.d.ts.map" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:085d163984bf4c700d42255b87d60636616107591e23aa59eb1ec73a4e525b1b -size 136 +{"version":3,"file":"localize.test.d.ts","sourceRoot":"","sources":["../../../src/node/test/localize.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/localize.test.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/localize.test.js" index 5c461c82018659d236df8dcbe41793b6c9068731..7db4e415a9a75abd09a09faa4e2c4cfcaaf04b64 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/localize.test.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/localize.test.js" @@ -1,3 +1,65 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:38cad4d5640c76080803a83e4c7d650e7c09d172abb22904dad03b576c29e912 -size 3476 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +var assert = require("assert"); +var path = require("path"); +var nls = require("../main"); +var root = path.join(__dirname, '..', '..', '..', 'src', 'node', 'test'); +describe('Localize', function () { + it('Simple call', function () { + var localize = nls.config({ locale: 'de-DE' })(); + var message = 'Hello World'; + assert.strictEqual(localize('key', message), message); + }); + it('Simple call with separate load', function () { + nls.config({ locale: 'de-DE' }); + var localize = nls.loadMessageBundle(); + var message = 'Hello World'; + assert.strictEqual(localize('key', message), message); + }); + it('With args', function () { + var localize = nls.config({ locale: 'de-DE' })(); + var message = '{0} {1}'; + assert.strictEqual(localize('key', message, 'Hello', 'World'), 'Hello World'); + }); + it('Pseudo', function () { + var localize = nls.config({ locale: 'pseudo' })(); + var message = 'Hello World'; + assert.strictEqual(localize('key', message), '\uFF3BHeelloo Woorld\uFF3D'); + }); + it('Pseudo with args', function () { + var localize = nls.config({ locale: 'pseudo' })(); + var message = 'Hello {0} World'; + assert.strictEqual(localize('key', message, 'bright'), '\uFF3BHeelloo bright Woorld\uFF3D'); + }); + it('External Data German flat', function () { + var localize = nls.config({ locale: 'de-DE', messageFormat: nls.MessageFormat.file })(path.join(root, 'data')); + assert.strictEqual(localize(0, null), 'Guten Tag Welt'); + }); + it('External Data German flat with extension', function () { + var localize = nls.config({ locale: 'de-DE', messageFormat: nls.MessageFormat.file })(path.join(root, 'data.js')); + assert.strictEqual(localize(0, null), 'Guten Tag Welt'); + }); + it('External Data German flat with extension separate load', function () { + nls.config({ locale: 'de-DE', messageFormat: nls.MessageFormat.file }); + var localize = nls.loadMessageBundle(path.join(root, 'data.js')); + assert.strictEqual(localize(0, null), 'Guten Tag Welt'); + }); + it('External Data German structured', function () { + var localize = nls.config({ locale: 'de-DE', messageFormat: nls.MessageFormat.file })(path.join(root, 'dataStructured')); + assert.strictEqual(localize(0, null), 'Guten Tag Welt'); + assert.strictEqual(localize(1, null), 'Auf Wiedersehen Welt'); + }); + it('External Bundle', function () { + var localize = nls.config({ locale: 'de-DE', messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })(path.join(root, 'localize.test.js')); + assert.strictEqual(localize(0, null), 'Guten Tag Welt'); + }); + it('Default data file', function () { + var localize = nls.config({ locale: 'zh-tw', messageFormat: nls.MessageFormat.file })(path.join(root, 'data')); + assert.strictEqual(localize(0, null), 'Hello World'); + }); +}); +//# sourceMappingURL=localize.test.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/localize.test.js.map" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/localize.test.js.map" index bdab6294d26204181836499ffaeda4ebe0fe93c6..53f75d2131c245787983f25756acf1a743150755 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/localize.test.js.map" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/localize.test.js.map" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a80eb40f184ffffbe5f259ed07ad9350f99bf755ec0673f1249af8c114fb9b34 -size 3501 +{"version":3,"file":"localize.test.js","sourceRoot":"","sources":["../../../src/node/test/localize.test.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,YAAY,CAAC;;AAEb,+BAAiC;AACjC,2BAA6B;AAE7B,6BAA+B;AAE/B,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAG,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE1E,QAAQ,CAAC,UAAU,EAAE;IACpB,EAAE,CAAC,aAAa,EAAE;QACjB,IAAI,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;QACjD,IAAI,OAAO,GAAG,aAAa,CAAC;QAC5B,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gCAAgC,EAAE;QACpC,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;QAChC,IAAI,QAAQ,GAAG,GAAG,CAAC,iBAAiB,EAAE,CAAC;QACvC,IAAI,OAAO,GAAG,aAAa,CAAC;QAC5B,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,WAAW,EAAE;QACf,IAAI,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;QACjD,IAAI,OAAO,GAAG,SAAS,CAAC;QACxB,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC;IAC/E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,QAAQ,EAAE;QACZ,IAAI,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;QAClD,IAAI,OAAO,GAAG,aAAa,CAAC;QAC5B,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,4BAA4B,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kBAAkB,EAAE;QACtB,IAAI,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;QAClD,IAAI,OAAO,GAAG,iBAAiB,CAAC;QAChC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,mCAAmC,CAAC,CAAC;IAC7F,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2BAA2B,EAAE;QAC/B,IAAI,QAAQ,GAAO,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;QACnH,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,gBAAgB,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0CAA0C,EAAE;QAC9C,IAAI,QAAQ,GAAO,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;QACtH,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,gBAAgB,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE;QAC5D,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;QACvE,IAAI,QAAQ,GAAO,GAAG,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;QACrE,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,gBAAgB,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iCAAiC,EAAE;QACrC,IAAI,QAAQ,GAAO,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC;QAC7H,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,gBAAgB,CAAC,CAAC;QACxD,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,sBAAsB,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAE,iBAAiB,EAAE;QACtB,IAAI,QAAQ,GAAO,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC;QAC5K,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,gBAAgB,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mBAAmB,EAAE;QACvB,IAAI,QAAQ,GAAO,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;QACnH,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,aAAa,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/tsconfig.tsbuildinfo" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/tsconfig.tsbuildinfo" index a95f101d08ae53fedf7cb81bb697d5e9d9907466..b3ec6ec8c570a2b21f1369fe77f208c052889d8e 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/tsconfig.tsbuildinfo" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/test/tsconfig.tsbuildinfo" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:24d924d969fbc37689e9cf4f4f4f0a51669d36f9b6ccab83063d7913058e7e44 -size 12237 +{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../common/common.d.ts","../main.d.ts","../../../src/node/test/localize.test.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/ts3.4/base.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/ts3.6/base.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/base.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/mocha/index.d.ts"],"fileInfos":[{"version":"89f78430e422a0f06d13019d60d5a45b37ec2d28e67eb647f73b1b0d19a46b72","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"ca318e19fce2e60cc2a7b38b1584aeb5e828f8052ca7dadffb678710e98487f6","0d5257cab199a9ad0babadab92939139d549f00fd3cfd21e59e59b673e0274a1","6ff460562b9ed376edc3d8fd0bf4cd57bd8e10ed075d276a86dab5071c50a890",{"version":"e9a43c3ee6fb8376bb9a4d318a660412c6abcfe5161c106e801e5431b41b7476","affectsGlobalScope":true},"7698983d080f951eaf53ff81e5c7bd61abc02e4a1a21266f1bd79ea85c0dc641","5726b5ce952dc5beaeb08d5f64236632501568a54a390363d2339ba1dc5393b1","89a3409a743c2a408d02bd68255a61d8416225b76c2c66d8e2e74dad3e00bc5d","714637d594e1a38a075091fe464ca91c6abc0b154784b4287f6883200e28ccef",{"version":"23edba5f47d3409810c563fe8034ae2c59e718e1ef8570f4152ccdde1915a096","affectsGlobalScope":true},"0e9c55f894ca2d9cf63b5b0d43a8cec1772dd560233fd16275bc7a485eb82f83","64813a6beff756b9e3f3c06d1b648d55e7c90af2b55c64d13a69d6c7f573643d","5f0a09de75bd965c21dc6d73671ba88830272f9ed62897bb0aa9754b369b1eed","2b34e7fcba9e1f24e7f54ba5c8be5a8895b0b8b444ccf6548e04acdee0899317",{"version":"06d2be99c3dd2ff52114d02ee443ba486ab482423df1941d3c97d6a92e924d70","affectsGlobalScope":true},{"version":"bfd4f140c07091b5e8a963c89e6fa3f44b6cfcbc11471b465cf63e2d020ad0eb","affectsGlobalScope":true},"a106a0bea088b70879ac88ff606dc253c0cc474ea05ad3a282b8bfb1091ae576","c98ce957db9eebd75f53edda3f6893e05ab2d2283b5667b18e31bcdb6427ed10","1f08bd8305d4a789a68f71ab622156dfff993aa51a2aa58b9ccf166cc6f9fcf7","4c260129d649d69f0608cd123e7016e61364b553a5ca2de9b66b0398594959cf","1978992206803f5761e99e893d93b25abc818c5fe619674fdf2ae02b29f641ba","05fbe81f09fc455a2c343d2458d2b3c600c90b92b22926be765ee79326be9466","8e7d6dae9e19bbe47600dcfd4418db85b30ae7351474ea0aad5e628f9845d340","f20ea392f7f27feb7a90e5a24319a4e365b07bf83c39a547711fe7ff9df68657","32542c4660ecda892a333a533feedba31738ee538ef6a78eb73af647137bc3fc","0ecacea5047d1a7d350e7049dbd22f26435be5e8736a81a56afec5b3264db1ca","ffcb4ebde21f83370ed402583888b28651d2eb7f05bfec9482eb46d82adedd7f",{"version":"06c004006016a51c4d1855527a523562c329dc44c473931c65f10373281f730e","affectsGlobalScope":true},"a7b43c69f9602d198825e403ee34e5d64f83c48b391b2897e8c0e6f72bca35f8","f4a3fc4efc6944e7b7bd4ccfa45e0df68b6359808e6cf9d061f04fd964a7b2d3","73cad675aead7a2c05cf934e7e700c61d84b2037ac1d576c3f751199b25331da","8c3137ba3583ec18484429ec1c8eff89efdc42730542f157b38b102fdccc0c71","d84300d886b45a198c346158e4ff7ae361cc7bc1c3deab44afb3db7de56b5d25","94ca7beec4e274d32362b54e0133152f7b4be9487db7b005070c03880b6363aa","2d713cbcbd5bcc38d91546eaeea7bb1c8686dc4a2995a28556d957b1b9de11d9","bbf21f210782db4193359010a4710786add43e3b50aa42fc0d371f45b4e4d8d3","0b7733d83619ac4e3963e2a9f7c75dc1e9af6850cb2354c9554977813092c10a","3ce933f0c3955f67f67eb7d6b5c83c2c54a18472c1d6f2bb651e51dd40c84837","631e96db896d645f7132c488ad34a16d71fd2be9f44696f8c98289ee1c8cbfa9","2c77230d381cba81eb6f87cda2fbfff6c0427c6546c2e2590110effff37c58f7","da86ee9a2f09a4583db1d5e37815894967e1f694ad9f3c25e84e0e4d40411e14","66679e8ffbf1fddef1796c60757e54e6e6551dd9823f75ef2f80176473bdaaff","ddc086b1adac44e2fccf55422da1e90fa970e659d77f99712422a421564b4877","515ef1d99036ff0dafa5bf738e02222edea94e0d97a0aa0ff277ac5e96b57977","d44028ae0127eb3e9fcfa5f55a8b81d64775ce15aca1020fe25c511bbb055834",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"780058f4a804c8bdcdd2f60e7af64b2bc57d149c1586ee3db732a84d659a50bf","ad1ae5ae98eceb9af99061e83e867b9897d267aebc8f3b938c9424deabadf4bb","19d580a3b42ad5caeaee266ae958260e23f2df0549ee201c886c8bd7a4f01d4e","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","9c4c395e927045b324877acdc4bfb95f128f36bc9f073266a2f0342495075a4f",{"version":"30bf01dd2e284098445264c8d71c608890cc11c142f36d0193aa655bdc0a40cb","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"module":1,"outDir":"./","sourceMap":true,"stripInternal":true,"target":1},"fileIdsList":[[28],[75],[32],[74,75],[33],[34,42,43,50,59],[34,35,42,50],[66],[37,38,43,51],[38,59],[39,40,42,50],[40],[41,42],[42],[42,43,44,59,65],[43,44],[45,50,59,65],[42,43,45,46,50,59,62,65],[45,47,62,65],[76],[42,48],[49,65],[40,42,50,59],[51],[52],[32,53],[64],[55],[56],[42,57],[57,58,66,68],[42,59],[60],[61],[50,62],[63],[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70],[71,72,73],[50,64],[56,65],[59,67],[68],[73],[42,44,59,65,68,69],[59,70],[29,52,75]],"referencedMap":[[29,1],[75,2],[32,3],[76,4],[33,5],[34,6],[35,7],[36,8],[37,9],[38,10],[39,11],[40,12],[41,13],[42,14],[43,15],[44,16],[45,17],[46,18],[47,19],[77,20],[48,21],[49,22],[50,23],[51,24],[52,25],[53,26],[54,27],[55,28],[56,29],[57,30],[58,31],[59,32],[60,33],[61,34],[62,35],[63,36],[71,37],[74,38],[64,39],[65,40],[66,8],[67,41],[68,42],[73,43],[69,44],[70,45],[30,46]],"exportedModulesMap":[[29,1],[75,2],[32,3],[76,4],[33,5],[34,6],[35,7],[36,8],[37,9],[38,10],[39,11],[40,12],[41,13],[42,14],[43,15],[44,16],[45,17],[46,18],[47,19],[77,20],[48,21],[49,22],[50,23],[51,24],[52,25],[53,26],[54,27],[55,28],[56,29],[57,30],[58,31],[59,32],[60,33],[61,34],[62,35],[63,36],[71,37],[74,38],[64,39],[65,40],[66,8],[67,41],[68,42],[73,43],[69,44],[70,45],[30,46]],"semanticDiagnosticsPerFile":[28,29,78,75,32,76,33,34,35,36,37,38,39,40,41,42,43,44,31,72,45,46,47,77,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,71,74,64,65,66,67,68,73,69,70,7,6,2,8,9,10,11,12,13,14,15,3,4,19,16,17,18,20,21,22,5,23,24,25,26,1,27,30]},"version":"4.5.5"} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/tsconfig.tsbuildinfo" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/tsconfig.tsbuildinfo" index 453a5871605b897c45801e392624b7fe9c3fcd54..4f3dd9ae38de010ce7eaf2fd2198d7d014c31159 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/tsconfig.tsbuildinfo" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/lib/node/tsconfig.tsbuildinfo" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:498f1adf42c12c57b032d9118f53bd7f8e1504d35fa372265165f1a1183753de -size 11848 +{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../common/common.d.ts","../common/ral.d.ts","../../src/node/main.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/ts3.4/base.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/ts3.6/base.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/base.d.ts","../../node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"89f78430e422a0f06d13019d60d5a45b37ec2d28e67eb647f73b1b0d19a46b72","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"ca318e19fce2e60cc2a7b38b1584aeb5e828f8052ca7dadffb678710e98487f6","5c7bb5997369b2266142d3df41da94dd31fe3a97b778f43971f3c951a51c0f71","d65cef87290e2c9b70bd301e0cc9f78e2340cae5a52f96d38349262b82ed2083",{"version":"e9a43c3ee6fb8376bb9a4d318a660412c6abcfe5161c106e801e5431b41b7476","affectsGlobalScope":true},"7698983d080f951eaf53ff81e5c7bd61abc02e4a1a21266f1bd79ea85c0dc641","5726b5ce952dc5beaeb08d5f64236632501568a54a390363d2339ba1dc5393b1","89a3409a743c2a408d02bd68255a61d8416225b76c2c66d8e2e74dad3e00bc5d","714637d594e1a38a075091fe464ca91c6abc0b154784b4287f6883200e28ccef",{"version":"23edba5f47d3409810c563fe8034ae2c59e718e1ef8570f4152ccdde1915a096","affectsGlobalScope":true},"0e9c55f894ca2d9cf63b5b0d43a8cec1772dd560233fd16275bc7a485eb82f83","64813a6beff756b9e3f3c06d1b648d55e7c90af2b55c64d13a69d6c7f573643d","5f0a09de75bd965c21dc6d73671ba88830272f9ed62897bb0aa9754b369b1eed","2b34e7fcba9e1f24e7f54ba5c8be5a8895b0b8b444ccf6548e04acdee0899317",{"version":"06d2be99c3dd2ff52114d02ee443ba486ab482423df1941d3c97d6a92e924d70","affectsGlobalScope":true},{"version":"bfd4f140c07091b5e8a963c89e6fa3f44b6cfcbc11471b465cf63e2d020ad0eb","affectsGlobalScope":true},"a106a0bea088b70879ac88ff606dc253c0cc474ea05ad3a282b8bfb1091ae576","c98ce957db9eebd75f53edda3f6893e05ab2d2283b5667b18e31bcdb6427ed10","1f08bd8305d4a789a68f71ab622156dfff993aa51a2aa58b9ccf166cc6f9fcf7","4c260129d649d69f0608cd123e7016e61364b553a5ca2de9b66b0398594959cf","1978992206803f5761e99e893d93b25abc818c5fe619674fdf2ae02b29f641ba","05fbe81f09fc455a2c343d2458d2b3c600c90b92b22926be765ee79326be9466","8e7d6dae9e19bbe47600dcfd4418db85b30ae7351474ea0aad5e628f9845d340","f20ea392f7f27feb7a90e5a24319a4e365b07bf83c39a547711fe7ff9df68657","32542c4660ecda892a333a533feedba31738ee538ef6a78eb73af647137bc3fc","0ecacea5047d1a7d350e7049dbd22f26435be5e8736a81a56afec5b3264db1ca","ffcb4ebde21f83370ed402583888b28651d2eb7f05bfec9482eb46d82adedd7f",{"version":"06c004006016a51c4d1855527a523562c329dc44c473931c65f10373281f730e","affectsGlobalScope":true},"a7b43c69f9602d198825e403ee34e5d64f83c48b391b2897e8c0e6f72bca35f8","f4a3fc4efc6944e7b7bd4ccfa45e0df68b6359808e6cf9d061f04fd964a7b2d3","73cad675aead7a2c05cf934e7e700c61d84b2037ac1d576c3f751199b25331da","8c3137ba3583ec18484429ec1c8eff89efdc42730542f157b38b102fdccc0c71","d84300d886b45a198c346158e4ff7ae361cc7bc1c3deab44afb3db7de56b5d25","94ca7beec4e274d32362b54e0133152f7b4be9487db7b005070c03880b6363aa","2d713cbcbd5bcc38d91546eaeea7bb1c8686dc4a2995a28556d957b1b9de11d9","bbf21f210782db4193359010a4710786add43e3b50aa42fc0d371f45b4e4d8d3","0b7733d83619ac4e3963e2a9f7c75dc1e9af6850cb2354c9554977813092c10a","3ce933f0c3955f67f67eb7d6b5c83c2c54a18472c1d6f2bb651e51dd40c84837","631e96db896d645f7132c488ad34a16d71fd2be9f44696f8c98289ee1c8cbfa9","2c77230d381cba81eb6f87cda2fbfff6c0427c6546c2e2590110effff37c58f7","da86ee9a2f09a4583db1d5e37815894967e1f694ad9f3c25e84e0e4d40411e14","66679e8ffbf1fddef1796c60757e54e6e6551dd9823f75ef2f80176473bdaaff","ddc086b1adac44e2fccf55422da1e90fa970e659d77f99712422a421564b4877","515ef1d99036ff0dafa5bf738e02222edea94e0d97a0aa0ff277ac5e96b57977","d44028ae0127eb3e9fcfa5f55a8b81d64775ce15aca1020fe25c511bbb055834",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"780058f4a804c8bdcdd2f60e7af64b2bc57d149c1586ee3db732a84d659a50bf","ad1ae5ae98eceb9af99061e83e867b9897d267aebc8f3b938c9424deabadf4bb","19d580a3b42ad5caeaee266ae958260e23f2df0549ee201c886c8bd7a4f01d4e","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","9c4c395e927045b324877acdc4bfb95f128f36bc9f073266a2f0342495075a4f"],"options":{"composite":true,"declaration":true,"declarationMap":true,"module":1,"outDir":"./","sourceMap":true,"stripInternal":true,"target":1},"fileIdsList":[[28],[75],[32],[74,75],[33],[34,42,43,50,59],[34,35,42,50],[66],[37,38,43,51],[38,59],[39,40,42,50],[40],[41,42],[42],[42,43,44,59,65],[43,44],[45,50,59,65],[42,43,45,46,50,59,62,65],[45,47,62,65],[76],[42,48],[49,65],[40,42,50,59],[51],[52],[32,53],[64],[55],[56],[42,57],[57,58,66,68],[42,59],[60],[61],[50,62],[63],[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70],[71,72,73],[50,64],[56,65],[59,67],[68],[73],[42,44,59,65,68,69],[59,70],[28,29,43,52]],"referencedMap":[[29,1],[75,2],[32,3],[76,4],[33,5],[34,6],[35,7],[36,8],[37,9],[38,10],[39,11],[40,12],[41,13],[42,14],[43,15],[44,16],[45,17],[46,18],[47,19],[77,20],[48,21],[49,22],[50,23],[51,24],[52,25],[53,26],[54,27],[55,28],[56,29],[57,30],[58,31],[59,32],[60,33],[61,34],[62,35],[63,36],[71,37],[74,38],[64,39],[65,40],[66,8],[67,41],[68,42],[73,43],[69,44],[70,45],[30,46]],"exportedModulesMap":[[29,1],[75,2],[32,3],[76,4],[33,5],[34,6],[35,7],[36,8],[37,9],[38,10],[39,11],[40,12],[41,13],[42,14],[43,15],[44,16],[45,17],[46,18],[47,19],[77,20],[48,21],[49,22],[50,23],[51,24],[52,25],[53,26],[54,27],[55,28],[56,29],[57,30],[58,31],[59,32],[60,33],[61,34],[62,35],[63,36],[71,37],[74,38],[64,39],[65,40],[66,8],[67,41],[68,42],[73,43],[69,44],[70,45],[30,46]],"semanticDiagnosticsPerFile":[28,29,75,32,76,33,34,35,36,37,38,39,40,41,42,43,44,31,72,45,46,47,77,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,71,74,64,65,66,67,68,73,69,70,7,6,2,8,9,10,11,12,13,14,15,3,4,19,16,17,18,20,21,22,5,23,24,25,26,1,27,30]},"version":"4.5.5"} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/node.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/node.d.ts" index d4501421d4bd489c9190700a07b50dd52678f01e..b4c4fcd723edbd7b4ea066a4059cf8393e46aa88 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/node.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/node.d.ts" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c98df0145d99011af92c397fa787fc39d42cc04019614ab5581febe71fb32e1 -size 382 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ + +export * from './lib/node/main'; \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/node.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/node.js" index 6ca9fea0ab31ba44f19549c8fa3b28a055f235c0..388e3197ebb862634cda424e9d707896b40627da 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/node.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/node.js" @@ -1,3 +1,7 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20ed9d05087fa65ed99369c32ebaad6d2714c56d38b6b58e660ec428d1280054 -size 408 +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +'use strict'; + +module.exports = require('./lib/node/main'); \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/package.json" index f2841e1f8627c00fd7481f31ec4ab6da6d46a50c..f3bdaffd80a32282abe3309db5da2df953f96c0c 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-nls/package.json" @@ -1,3 +1,47 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:75d18a572acf40cb234218fb348269dcc19b52513b4fa4f62dd1c0f74d290db3 -size 1147 +{ + "name": "vscode-nls", + "version": "5.2.0", + "description": "NPM module to externalize and localize VSCode extensions", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-nls.git" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-nls/issues" + }, + "main": "./lib/node/main.js", + "browser": { + "./lib/node/main.js": "./lib/browser/main.js" + }, + "typings": "./lib/common/common.d.ts", + "devDependencies": { + "@types/mocha": "^9.1.0", + "@types/node": "14.14.31", + "@typescript-eslint/parser": "^4.28.0", + "eslint": "^7.29.0", + "mocha": "^9.2.0", + "rimraf": "^3.0.2", + "typescript": "^4.5.5" + }, + "scripts": { + "prepublishOnly": "npm run clean && npm run compile && npm run lint && npm run test", + "compile": "tsc -b ./tsconfig.json", + "watch": "tsc -b ./tsconfig.json -w", + "clean": "rimraf lib", + "test": "mocha", + "lint": "eslint --config .eslintrc.json ./**/*.ts" + }, + "files": [ + "lib/common", + "lib/browser", + "lib/node", + "!lib/*/test", + "!lib/**/*.tsbuildinfo", + "node.js", + "node.d.ts", + "browser.js", + "browser.d.ts" + ] +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/.github/workflows/rich-navigation.yml" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/.github/workflows/rich-navigation.yml" index c7beef0b159cf415ab49b19be94ee18883edce5c..d187f6fcd88b7d6ba9593783753760608a18849d 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/.github/workflows/rich-navigation.yml" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/.github/workflows/rich-navigation.yml" @@ -1,3 +1,31 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:79d21e258a549039d1802195f0b8e28c4d7043c8dbb4eb5ded502f46409a26b7 -size 638 +name: "Rich Navigation Indexing" +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +jobs: + richnav: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v2 + with: + node-version: 14 + + - name: Install dependencies + run: npm install + + - uses: microsoft/RichCodeNavIndexer@v0.1 + with: + languages: typescript + repo-token: ${{ secrets.GITHUB_TOKEN }} + typescriptVersion: 0.6.0-next.21 + configFiles: .lsifrc.json + continue-on-error: true + diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/.lsifrc.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/.lsifrc.json" index 578bffbdd4f55215447cd908271ced267e7b0c14..87b7cdfcf4c2307974039f718b0ca8ee572528d3 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/.lsifrc.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/.lsifrc.json" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4591317b34e5955c69a60eb4e3a260d315fb6d2976a1f063159949d35ce87309 -size 123 +{ + "project": "./src/tsconfig.json", + "out": "vscode-uri.lsif", + "source": "./package.json", + "package": "./package.json" +} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/LICENSE.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/LICENSE.md" index 19f0a8b9ff8b9e53af92488d51e4c778a1468641..29db530db43fe178f97f0bb244e79fa3f7e27745 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/LICENSE.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/LICENSE.md" @@ -1,3 +1,9 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c669138cb1eb01fbb745e8e460b291e4f2869c14a40061390b6095d845ed4c82 -size 1070 +The MIT License (MIT) + +Copyright (c) Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/README.md" index 8f452e84a77f84082a071296355c2fdb6a3fff4d..ee7b725b5998290c3adcbed96edfc679c18827ff 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/README.md" @@ -1,3 +1,67 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:39ad66715504e292bd71b6b258d0bdba95be22e3a539a280ef2534be0525218e -size 2475 +## vscode-uri + +[![Build Status](https://travis-ci.org/Microsoft/vscode-uri.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-uri) + +This module contains the URI implementation that is used by VS Code and its extensions. +It has support for parsing a string into `scheme`, `authority`, `path`, `query`, and +`fragment` URI components as defined in: http://tools.ietf.org/html/rfc3986 + +``` + foo://example.com:8042/over/there?name=ferret#nose + \_/ \______________/\_________/ \_________/ \__/ + | | | | | +scheme authority path query fragment + | _____________________|__ + / \ / \ + urn:example:animal:ferret:nose +``` + +## Usage + +```js +import { URI } from 'vscode-uri' + +// parse an URI from string + +let uri = URI.parse('https://code.visualstudio.com/docs/extensions/overview#frag') + +assert.ok(uri.scheme === 'https'); +assert.ok(uri.authority === 'code.visualstudio.com'); +assert.ok(uri.path === '/docs/extensions/overview'); +assert.ok(uri.query === ''); +assert.ok(uri.fragment === 'frag'); +assert.ok(uri.toString() === 'https://code.visualstudio.com/docs/extensions/overview#frag') + + +// create an URI from a fs path + +let uri = URI.file('/users/me/c#-projects/'); + +assert.ok(uri.scheme === 'file'); +assert.ok(uri.authority === ''); +assert.ok(uri.path === '/users/me/c#-projects/'); +assert.ok(uri.query === ''); +assert.ok(uri.fragment === ''); +assert.ok(uri.toString() === 'file:///users/me/c%23-projects/') +``` + +## Usage: Util + +This module also exports a `Utils` package which is an extension, not part of `vscode.Uri`, and useful for path-math. There is: + +* `Utils.joinPath(URI, paths): URI` +* `Utils.resolvePath(URI, paths): URI` +* `Utils.dirname(URI): string` +* `Utils.basename(URI): string` +* `Utils.extname(URI): string` + +All util use posix path-math as defined by the node.js path module. + + +## Contributing + +The source of this module is taken straight from the [vscode](https://github.com/microsoft/vscode)-sources and because of that issues and pull request should be created in that repository. Thanks and Happy Coding! + +## Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/esm/index.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/esm/index.js" index 1027910f3c430c71b2363db67b411d5bbcbccf02..401b76bfa1e53a419d4489e9e16576047e97e357 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/esm/index.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/esm/index.js" @@ -1,3 +1,2 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3fa0aaa6b5f54b6095b871ba9748eaaebfad7179916a1facdec8c51737b0fd22 -size 12068 +var LIB;(()=>{"use strict";var t={470:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",o=0,i=-1,a=0,h=0;h<=t.length;++h){if(h2){var s=n.lastIndexOf("/");if(s!==n.length-1){-1===s?(n="",o=0):o=(n=n.slice(0,s)).length-1-n.lastIndexOf("/"),i=h,a=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=h,a=0;continue}e&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+t.slice(i+1,h):n=t.slice(i+1,h),o=h-i-1;i=h,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var n={resolve:function(){for(var t,n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a;i>=0?a=arguments[i]:(void 0===t&&(t=process.cwd()),a=t),e(a),0!==a.length&&(n=a+"/"+n,o=47===a.charCodeAt(0))}return n=r(n,!o),o?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return".";var n=47===t.charCodeAt(0),o=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&o&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,r=0;r0&&(void 0===t?t=o:t+="/"+o)}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return"";if((t=n.resolve(t))===(r=n.resolve(r)))return"";for(var o=1;oc){if(47===r.charCodeAt(h+u))return r.slice(h+u+1);if(0===u)return r.slice(h+u)}else a>c&&(47===t.charCodeAt(o+u)?f=u:0===u&&(f=0));break}var l=t.charCodeAt(o+u);if(l!==r.charCodeAt(h+u))break;47===l&&(f=u)}var p="";for(u=o+f+1;u<=i;++u)u!==i&&47!==t.charCodeAt(u)||(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(h+f):(h+=f,47===r.charCodeAt(h)&&++h,r.slice(h))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,o=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(r=t.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,o=0,i=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var h=r.length-1,s=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!a){o=n+1;break}}else-1===s&&(a=!1,s=n+1),h>=0&&(c===r.charCodeAt(h)?-1==--h&&(i=n):(h=-1,i=s))}return o===i?i=s:-1===i&&(i=t.length),t.slice(o,i)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){o=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":t.slice(o,i)},extname:function(t){e(t);for(var r=-1,n=0,o=-1,i=!0,a=0,h=t.length-1;h>=0;--h){var s=t.charCodeAt(h);if(47!==s)-1===o&&(i=!1,o=h+1),46===s?-1===r?r=h:1!==a&&(a=1):-1!==r&&(a=-1);else if(!i){n=h+1;break}}return-1===r||-1===o||0===a||1===a&&r===o-1&&r===n+1?"":t.slice(r,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,o=t.charCodeAt(0),i=47===o;i?(r.root="/",n=1):n=0;for(var a=-1,h=0,s=-1,c=!0,f=t.length-1,u=0;f>=n;--f)if(47!==(o=t.charCodeAt(f)))-1===s&&(c=!1,s=f+1),46===o?-1===a?a=f:1!==u&&(u=1):-1!==a&&(u=-1);else if(!c){h=f+1;break}return-1===a||-1===s||0===u||1===u&&a===s-1&&a===h+1?-1!==s&&(r.base=r.name=0===h&&i?t.slice(1,s):t.slice(h,s)):(0===h&&i?(r.name=t.slice(1,a),r.base=t.slice(1,s)):(r.name=t.slice(h,a),r.base=t.slice(h,s)),r.ext=t.slice(a,s)),h>0?r.dir=t.slice(0,h-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{var t;if(r.r(n),r.d(n,{URI:()=>g,Utils:()=>O}),"object"==typeof process)t="win32"===process.platform;else if("object"==typeof navigator){var e=navigator.userAgent;t=e.indexOf("Windows")>=0}var o,i,a=(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),h=/^\w[\w\d+.-]*$/,s=/^\//,c=/^\/\//;function f(t,e){if(!t.scheme&&e)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(t.authority,'", path: "').concat(t.path,'", query: "').concat(t.query,'", fragment: "').concat(t.fragment,'"}'));if(t.scheme&&!h.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!s.test(t.path))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')}else if(c.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}var u="",l="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,g=function(){function e(t,e,r,n,o,i){void 0===i&&(i=!1),"object"==typeof t?(this.scheme=t.scheme||u,this.authority=t.authority||u,this.path=t.path||u,this.query=t.query||u,this.fragment=t.fragment||u):(this.scheme=function(t,e){return t||e?t:"file"}(t,i),this.authority=e||u,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==l&&(e=l+e):e=l}return e}(this.scheme,r||u),this.query=n||u,this.fragment=o||u,f(this,i))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString},Object.defineProperty(e.prototype,"fsPath",{get:function(){return C(this,!1)},enumerable:!1,configurable:!0}),e.prototype.with=function(t){if(!t)return this;var e=t.scheme,r=t.authority,n=t.path,o=t.query,i=t.fragment;return void 0===e?e=this.scheme:null===e&&(e=u),void 0===r?r=this.authority:null===r&&(r=u),void 0===n?n=this.path:null===n&&(n=u),void 0===o?o=this.query:null===o&&(o=u),void 0===i?i=this.fragment:null===i&&(i=u),e===this.scheme&&r===this.authority&&n===this.path&&o===this.query&&i===this.fragment?this:new v(e,r,n,o,i)},e.parse=function(t,e){void 0===e&&(e=!1);var r=p.exec(t);return r?new v(r[2]||u,_(r[4]||u),_(r[5]||u),_(r[7]||u),_(r[9]||u),e):new v(u,u,u,u,u)},e.file=function(e){var r=u;if(t&&(e=e.replace(/\\/g,l)),e[0]===l&&e[1]===l){var n=e.indexOf(l,2);-1===n?(r=e.substring(2),e=l):(r=e.substring(2,n),e=e.substring(n)||l)}return new v("file",r,e,u,u)},e.from=function(t){var e=new v(t.scheme,t.authority,t.path,t.query,t.fragment);return f(e,!0),e},e.prototype.toString=function(t){return void 0===t&&(t=!1),A(this,t)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var r=new v(t);return r._formatted=t.external,r._fsPath=t._sep===d?t.fsPath:null,r}return t},e}(),d=t?1:void 0,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._formatted=null,e._fsPath=null,e}return a(e,t),Object.defineProperty(e.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=C(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),e.prototype.toString=function(t){return void 0===t&&(t=!1),t?A(this,!0):(this._formatted||(this._formatted=A(this,!1)),this._formatted)},e.prototype.toJSON=function(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=d),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t},e}(g),y=((i={})[58]="%3A",i[47]="%2F",i[63]="%3F",i[35]="%23",i[91]="%5B",i[93]="%5D",i[64]="%40",i[33]="%21",i[36]="%24",i[38]="%26",i[39]="%27",i[40]="%28",i[41]="%29",i[42]="%2A",i[43]="%2B",i[44]="%2C",i[59]="%3B",i[61]="%3D",i[32]="%20",i);function m(t,e,r){for(var n=void 0,o=-1,i=0;i=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||45===a||46===a||95===a||126===a||e&&47===a||r&&91===a||r&&93===a||r&&58===a)-1!==o&&(n+=encodeURIComponent(t.substring(o,i)),o=-1),void 0!==n&&(n+=t.charAt(i));else{void 0===n&&(n=t.substr(0,i));var h=y[a];void 0!==h?(-1!==o&&(n+=encodeURIComponent(t.substring(o,i)),o=-1),n+=h):-1===o&&(o=i)}}return-1!==o&&(n+=encodeURIComponent(t.substring(o))),void 0!==n?n:t}function b(t){for(var e=void 0,r=0;r1&&"file"===e.scheme?"//".concat(e.authority).concat(e.path):47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?r?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,t&&(n=n.replace(/\//g,"\\")),n}function A(t,e){var r=e?b:m,n="",o=t.scheme,i=t.authority,a=t.path,h=t.query,s=t.fragment;if(o&&(n+=o,n+=":"),(i||"file"===o)&&(n+=l,n+=l),i){var c=i.indexOf("@");if(-1!==c){var f=i.substr(0,c);i=i.substr(c+1),-1===(c=f.lastIndexOf(":"))?n+=r(f,!1,!1):(n+=r(f.substr(0,c),!1,!1),n+=":",n+=r(f.substr(c+1),!1,!0)),n+="@"}-1===(c=(i=i.toLowerCase()).lastIndexOf(":"))?n+=r(i,!1,!0):(n+=r(i.substr(0,c),!1,!0),n+=i.substr(c))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2))(u=a.charCodeAt(1))>=65&&u<=90&&(a="/".concat(String.fromCharCode(u+32),":").concat(a.substr(3)));else if(a.length>=2&&58===a.charCodeAt(1)){var u;(u=a.charCodeAt(0))>=65&&u<=90&&(a="".concat(String.fromCharCode(u+32),":").concat(a.substr(2)))}n+=r(a,!0,!1)}return h&&(n+="?",n+=r(h,!1,!1)),s&&(n+="#",n+=e?s:m(s,!1,!1)),n}function w(t){try{return decodeURIComponent(t)}catch(e){return t.length>3?t.substr(0,3)+w(t.substr(3)):t}}var x=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function _(t){return t.match(x)?t.replace(x,(function(t){return w(t)})):t}var O,P=r(470),j=function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o 2) {\n var lastSlashIndex = res.lastIndexOf('/');\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n } else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0)\n res += '/..';\n else\n res = '..';\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0)\n res += '/' + path.slice(lastSlash + 1, i);\n else\n res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\nfunction _format(sep, pathObject) {\n var dir = pathObject.dir || pathObject.root;\n var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');\n if (!dir) {\n return base;\n }\n if (dir === pathObject.root) {\n return dir + base;\n }\n return dir + sep + base;\n}\n\nvar posix = {\n // path.resolve([from ...], to)\n resolve: function resolve() {\n var resolvedPath = '';\n var resolvedAbsolute = false;\n var cwd;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path;\n if (i >= 0)\n path = arguments[i];\n else {\n if (cwd === undefined)\n cwd = process.cwd();\n path = cwd;\n }\n\n assertPath(path);\n\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0)\n return '/' + resolvedPath;\n else\n return '/';\n } else if (resolvedPath.length > 0) {\n return resolvedPath;\n } else {\n return '.';\n }\n },\n\n normalize: function normalize(path) {\n assertPath(path);\n\n if (path.length === 0) return '.';\n\n var isAbsolute = path.charCodeAt(0) === 47 /*/*/;\n var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;\n\n // Normalize the path\n path = normalizeStringPosix(path, !isAbsolute);\n\n if (path.length === 0 && !isAbsolute) path = '.';\n if (path.length > 0 && trailingSeparator) path += '/';\n\n if (isAbsolute) return '/' + path;\n return path;\n },\n\n isAbsolute: function isAbsolute(path) {\n assertPath(path);\n return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;\n },\n\n join: function join() {\n if (arguments.length === 0)\n return '.';\n var joined;\n for (var i = 0; i < arguments.length; ++i) {\n var arg = arguments[i];\n assertPath(arg);\n if (arg.length > 0) {\n if (joined === undefined)\n joined = arg;\n else\n joined += '/' + arg;\n }\n }\n if (joined === undefined)\n return '.';\n return posix.normalize(joined);\n },\n\n relative: function relative(from, to) {\n assertPath(from);\n assertPath(to);\n\n if (from === to) return '';\n\n from = posix.resolve(from);\n to = posix.resolve(to);\n\n if (from === to) return '';\n\n // Trim any leading backslashes\n var fromStart = 1;\n for (; fromStart < from.length; ++fromStart) {\n if (from.charCodeAt(fromStart) !== 47 /*/*/)\n break;\n }\n var fromEnd = from.length;\n var fromLen = fromEnd - fromStart;\n\n // Trim any leading backslashes\n var toStart = 1;\n for (; toStart < to.length; ++toStart) {\n if (to.charCodeAt(toStart) !== 47 /*/*/)\n break;\n }\n var toEnd = to.length;\n var toLen = toEnd - toStart;\n\n // Compare paths to find the longest common path from root\n var length = fromLen < toLen ? fromLen : toLen;\n var lastCommonSep = -1;\n var i = 0;\n for (; i <= length; ++i) {\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === 47 /*/*/) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n } else if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n } else if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === 47 /*/*/) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n } else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo'; to='/'\n lastCommonSep = 0;\n }\n }\n break;\n }\n var fromCode = from.charCodeAt(fromStart + i);\n var toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode)\n break;\n else if (fromCode === 47 /*/*/)\n lastCommonSep = i;\n }\n\n var out = '';\n // Generate the relative path based on the path difference between `to`\n // and `from`\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {\n if (out.length === 0)\n out += '..';\n else\n out += '/..';\n }\n }\n\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0)\n return out + to.slice(toStart + lastCommonSep);\n else {\n toStart += lastCommonSep;\n if (to.charCodeAt(toStart) === 47 /*/*/)\n ++toStart;\n return to.slice(toStart);\n }\n },\n\n _makeLong: function _makeLong(path) {\n return path;\n },\n\n dirname: function dirname(path) {\n assertPath(path);\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) return '//';\n return path.slice(0, end);\n },\n\n basename: function basename(path, ext) {\n if (ext !== undefined && typeof ext !== 'string') throw new TypeError('\"ext\" argument must be a string');\n assertPath(path);\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext.length === path.length && ext === path) return '';\n var extIdx = ext.length - 1;\n var firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n\n if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;\n return path.slice(start, end);\n } else {\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n }\n },\n\n extname: function extname(path) {\n assertPath(path);\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n },\n\n format: function format(pathObject) {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new TypeError('The \"pathObject\" argument must be of type Object. Received type ' + typeof pathObject);\n }\n return _format('/', pathObject);\n },\n\n parse: function parse(path) {\n assertPath(path);\n\n var ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) return ret;\n var code = path.charCodeAt(0);\n var isAbsolute = code === 47 /*/*/;\n var start;\n if (isAbsolute) {\n ret.root = '/';\n start = 1;\n } else {\n start = 0;\n }\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n var i = path.length - 1;\n\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n\n // Get non-dir info\n for (; i >= start; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);\n }\n } else {\n if (startPart === 0 && isAbsolute) {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n\n if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';\n\n return ret;\n },\n\n sep: '/',\n delimiter: ':',\n win32: null,\n posix: null\n};\n\nposix.posix = posix;\n\nmodule.exports = posix;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\n// !!!!!\n// SEE https://github.com/microsoft/vscode/blob/master/src/vs/base/common/platform.ts\n// !!!!!\n\ndeclare const process: { platform: 'win32' };\ndeclare const navigator: { userAgent: string };\n\nexport let isWindows: boolean;\n\nif (typeof process === 'object') {\n\tisWindows = process.platform === 'win32';\n} else if (typeof navigator === 'object') {\n\tlet userAgent = navigator.userAgent;\n\tisWindows = userAgent.indexOf('Windows') >= 0;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nimport { CharCode } from './charCode'\nimport { isWindows } from './platform';\n\nconst _schemePattern = /^\\w[\\w\\d+.-]*$/;\nconst _singleSlashStart = /^\\//;\nconst _doubleSlashStart = /^\\/\\//;\n\nfunction _validateUri(ret: URI, _strict?: boolean): void {\n\n\t// scheme, must be set\n\tif (!ret.scheme && _strict) {\n\t\tthrow new Error(`[UriError]: Scheme is missing: {scheme: \"\", authority: \"${ret.authority}\", path: \"${ret.path}\", query: \"${ret.query}\", fragment: \"${ret.fragment}\"}`);\n\t}\n\n\t// scheme, https://tools.ietf.org/html/rfc3986#section-3.1\n\t// ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\n\tif (ret.scheme && !_schemePattern.test(ret.scheme)) {\n\t\tthrow new Error('[UriError]: Scheme contains illegal characters.');\n\t}\n\n\t// path, http://tools.ietf.org/html/rfc3986#section-3.3\n\t// If a URI contains an authority component, then the path component\n\t// must either be empty or begin with a slash (\"/\") character. If a URI\n\t// does not contain an authority component, then the path cannot begin\n\t// with two slash characters (\"//\").\n\tif (ret.path) {\n\t\tif (ret.authority) {\n\t\t\tif (!_singleSlashStart.test(ret.path)) {\n\t\t\t\tthrow new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character');\n\t\t\t}\n\t\t} else {\n\t\t\tif (_doubleSlashStart.test(ret.path)) {\n\t\t\t\tthrow new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")');\n\t\t\t}\n\t\t}\n\t}\n}\n\n// for a while we allowed uris *without* schemes and this is the migration\n// for them, e.g. an uri without scheme and without strict-mode warns and falls\n// back to the file-scheme. that should cause the least carnage and still be a\n// clear warning\nfunction _schemeFix(scheme: string, _strict: boolean): string {\n\tif (!scheme && !_strict) {\n\t\treturn 'file';\n\t}\n\treturn scheme;\n}\n\n// implements a bit of https://tools.ietf.org/html/rfc3986#section-5\nfunction _referenceResolution(scheme: string, path: string): string {\n\n\t// the slash-character is our 'default base' as we don't\n\t// support constructing URIs relative to other URIs. This\n\t// also means that we alter and potentially break paths.\n\t// see https://tools.ietf.org/html/rfc3986#section-5.1.4\n\tswitch (scheme) {\n\t\tcase 'https':\n\t\tcase 'http':\n\t\tcase 'file':\n\t\t\tif (!path) {\n\t\t\t\tpath = _slash;\n\t\t\t} else if (path[0] !== _slash) {\n\t\t\t\tpath = _slash + path;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn path;\n}\n\nconst _empty = '';\nconst _slash = '/';\nconst _regexp = /^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\n\n/**\n * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.\n * This class is a simple parser which creates the basic component parts\n * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation\n * and encoding.\n *\n * ```txt\n * foo://example.com:8042/over/there?name=ferret#nose\n * \\_/ \\______________/\\_________/ \\_________/ \\__/\n * | | | | |\n * scheme authority path query fragment\n * | _____________________|__\n * / \\ / \\\n * urn:example:animal:ferret:nose\n * ```\n */\nexport class URI implements UriComponents {\n\n\tstatic isUri(thing: any): thing is URI {\n\t\tif (thing instanceof URI) {\n\t\t\treturn true;\n\t\t}\n\t\tif (!thing) {\n\t\t\treturn false;\n\t\t}\n\t\treturn typeof (thing).authority === 'string'\n\t\t\t&& typeof (thing).fragment === 'string'\n\t\t\t&& typeof (thing).path === 'string'\n\t\t\t&& typeof (thing).query === 'string'\n\t\t\t&& typeof (thing).scheme === 'string'\n\t\t\t&& typeof (thing).fsPath === 'string'\n\t\t\t&& typeof (thing).with === 'function'\n\t\t\t&& typeof (thing).toString === 'function';\n\t}\n\n\t/**\n\t * scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.\n\t * The part before the first colon.\n\t */\n\treadonly scheme: string;\n\n\t/**\n\t * authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'.\n\t * The part between the first double slashes and the next slash.\n\t */\n\treadonly authority: string;\n\n\t/**\n\t * path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly path: string;\n\n\t/**\n\t * query is the 'query' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly query: string;\n\n\t/**\n\t * fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly fragment: string;\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean);\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(components: UriComponents);\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(schemeOrData: string | UriComponents, authority?: string, path?: string, query?: string, fragment?: string, _strict: boolean = false) {\n\n\t\tif (typeof schemeOrData === 'object') {\n\t\t\tthis.scheme = schemeOrData.scheme || _empty;\n\t\t\tthis.authority = schemeOrData.authority || _empty;\n\t\t\tthis.path = schemeOrData.path || _empty;\n\t\t\tthis.query = schemeOrData.query || _empty;\n\t\t\tthis.fragment = schemeOrData.fragment || _empty;\n\t\t\t// no validation because it's this URI\n\t\t\t// that creates uri components.\n\t\t\t// _validateUri(this);\n\t\t} else {\n\t\t\tthis.scheme = _schemeFix(schemeOrData, _strict);\n\t\t\tthis.authority = authority || _empty;\n\t\t\tthis.path = _referenceResolution(this.scheme, path || _empty);\n\t\t\tthis.query = query || _empty;\n\t\t\tthis.fragment = fragment || _empty;\n\n\t\t\t_validateUri(this, _strict);\n\t\t}\n\t}\n\n\t// ---- filesystem path -----------------------\n\n\t/**\n\t * Returns a string representing the corresponding file system path of this URI.\n\t * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the\n\t * platform specific path separator.\n\t *\n\t * * Will *not* validate the path for invalid characters and semantics.\n\t * * Will *not* look at the scheme of this URI.\n\t * * The result shall *not* be used for display purposes but for accessing a file on disk.\n\t *\n\t *\n\t * The *difference* to `URI#path` is the use of the platform specific separator and the handling\n\t * of UNC paths. See the below sample of a file-uri with an authority (UNC path).\n\t *\n\t * ```ts\n\t\tconst u = URI.parse('file://server/c$/folder/file.txt')\n\t\tu.authority === 'server'\n\t\tu.path === '/shares/c$/file.txt'\n\t\tu.fsPath === '\\\\server\\c$\\folder\\file.txt'\n\t```\n\t *\n\t * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,\n\t * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working\n\t * with URIs that represent files on disk (`file` scheme).\n\t */\n\tget fsPath(): string {\n\t\t// if (this.scheme !== 'file') {\n\t\t// \tconsole.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);\n\t\t// }\n\t\treturn uriToFsPath(this, false);\n\t}\n\n\t// ---- modify to new -------------------------\n\n\twith(change: { scheme?: string; authority?: string | null; path?: string | null; query?: string | null; fragment?: string | null }): URI {\n\n\t\tif (!change) {\n\t\t\treturn this;\n\t\t}\n\n\t\tlet { scheme, authority, path, query, fragment } = change;\n\t\tif (scheme === undefined) {\n\t\t\tscheme = this.scheme;\n\t\t} else if (scheme === null) {\n\t\t\tscheme = _empty;\n\t\t}\n\t\tif (authority === undefined) {\n\t\t\tauthority = this.authority;\n\t\t} else if (authority === null) {\n\t\t\tauthority = _empty;\n\t\t}\n\t\tif (path === undefined) {\n\t\t\tpath = this.path;\n\t\t} else if (path === null) {\n\t\t\tpath = _empty;\n\t\t}\n\t\tif (query === undefined) {\n\t\t\tquery = this.query;\n\t\t} else if (query === null) {\n\t\t\tquery = _empty;\n\t\t}\n\t\tif (fragment === undefined) {\n\t\t\tfragment = this.fragment;\n\t\t} else if (fragment === null) {\n\t\t\tfragment = _empty;\n\t\t}\n\n\t\tif (scheme === this.scheme\n\t\t\t&& authority === this.authority\n\t\t\t&& path === this.path\n\t\t\t&& query === this.query\n\t\t\t&& fragment === this.fragment) {\n\n\t\t\treturn this;\n\t\t}\n\n\t\treturn new Uri(scheme, authority, path, query, fragment);\n\t}\n\n\t// ---- parse & validate ------------------------\n\n\t/**\n\t * Creates a new URI from a string, e.g. `http://www.example.com/some/path`,\n\t * `file:///usr/home`, or `scheme:with/path`.\n\t *\n\t * @param value A string which represents an URI (see `URI#toString`).\n\t */\n\tstatic parse(value: string, _strict: boolean = false): URI {\n\t\tconst match = _regexp.exec(value);\n\t\tif (!match) {\n\t\t\treturn new Uri(_empty, _empty, _empty, _empty, _empty);\n\t\t}\n\t\treturn new Uri(\n\t\t\tmatch[2] || _empty,\n\t\t\tpercentDecode(match[4] || _empty),\n\t\t\tpercentDecode(match[5] || _empty),\n\t\t\tpercentDecode(match[7] || _empty),\n\t\t\tpercentDecode(match[9] || _empty),\n\t\t\t_strict\n\t\t);\n\t}\n\n\t/**\n\t * Creates a new URI from a file system path, e.g. `c:\\my\\files`,\n\t * `/usr/home`, or `\\\\server\\share\\some\\path`.\n\t *\n\t * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument\n\t * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**\n\t * `URI.parse('file://' + path)` because the path might contain characters that are\n\t * interpreted (# and ?). See the following sample:\n\t * ```ts\n\tconst good = URI.file('/coding/c#/project1');\n\tgood.scheme === 'file';\n\tgood.path === '/coding/c#/project1';\n\tgood.fragment === '';\n\tconst bad = URI.parse('file://' + '/coding/c#/project1');\n\tbad.scheme === 'file';\n\tbad.path === '/coding/c'; // path is now broken\n\tbad.fragment === '/project1';\n\t```\n\t *\n\t * @param path A file system path (see `URI#fsPath`)\n\t */\n\tstatic file(path: string): URI {\n\n\t\tlet authority = _empty;\n\n\t\t// normalize to fwd-slashes on windows,\n\t\t// on other systems bwd-slashes are valid\n\t\t// filename character, eg /f\\oo/ba\\r.txt\n\t\tif (isWindows) {\n\t\t\tpath = path.replace(/\\\\/g, _slash);\n\t\t}\n\n\t\t// check for authority as used in UNC shares\n\t\t// or use the path as given\n\t\tif (path[0] === _slash && path[1] === _slash) {\n\t\t\tconst idx = path.indexOf(_slash, 2);\n\t\t\tif (idx === -1) {\n\t\t\t\tauthority = path.substring(2);\n\t\t\t\tpath = _slash;\n\t\t\t} else {\n\t\t\t\tauthority = path.substring(2, idx);\n\t\t\t\tpath = path.substring(idx) || _slash;\n\t\t\t}\n\t\t}\n\n\t\treturn new Uri('file', authority, path, _empty, _empty);\n\t}\n\n\tstatic from(components: { scheme: string; authority?: string; path?: string; query?: string; fragment?: string }): URI {\n\t\tconst result = new Uri(\n\t\t\tcomponents.scheme,\n\t\t\tcomponents.authority,\n\t\t\tcomponents.path,\n\t\t\tcomponents.query,\n\t\t\tcomponents.fragment,\n\t\t);\n\t\t_validateUri(result, true);\n\t\treturn result;\n\t}\n\n\t// ---- printing/externalize ---------------------------\n\n\t/**\n\t * Creates a string representation for this URI. It's guaranteed that calling\n\t * `URI.parse` with the result of this function creates an URI which is equal\n\t * to this URI.\n\t *\n\t * * The result shall *not* be used for display purposes but for externalization or transport.\n\t * * The result will be encoded using the percentage encoding and encoding happens mostly\n\t * ignore the scheme-specific encoding rules.\n\t *\n\t * @param skipEncoding Do not encode the result, default is `false`\n\t */\n\ttoString(skipEncoding: boolean = false): string {\n\t\treturn _asFormatted(this, skipEncoding);\n\t}\n\n\ttoJSON(): UriComponents {\n\t\treturn this;\n\t}\n\n\tstatic revive(data: UriComponents | URI): URI;\n\tstatic revive(data: UriComponents | URI | undefined): URI | undefined;\n\tstatic revive(data: UriComponents | URI | null): URI | null;\n\tstatic revive(data: UriComponents | URI | undefined | null): URI | undefined | null;\n\tstatic revive(data: UriComponents | URI | undefined | null): URI | undefined | null {\n\t\tif (!data) {\n\t\t\treturn data;\n\t\t} else if (data instanceof URI) {\n\t\t\treturn data;\n\t\t} else {\n\t\t\tconst result = new Uri(data);\n\t\t\tresult._formatted = (data).external;\n\t\t\tresult._fsPath = (data)._sep === _pathSepMarker ? (data).fsPath : null;\n\t\t\treturn result;\n\t\t}\n\t}\n}\n\nexport interface UriComponents {\n\tscheme: string;\n\tauthority: string;\n\tpath: string;\n\tquery: string;\n\tfragment: string;\n}\n\ninterface UriState extends UriComponents {\n\t$mid: number;\n\texternal: string;\n\tfsPath: string;\n\t_sep: 1 | undefined;\n}\n\nconst _pathSepMarker = isWindows ? 1 : undefined;\n\n// This class exists so that URI is compatible with vscode.Uri (API).\nclass Uri extends URI {\n\n\t_formatted: string | null = null;\n\t_fsPath: string | null = null;\n\n\toverride get fsPath(): string {\n\t\tif (!this._fsPath) {\n\t\t\tthis._fsPath = uriToFsPath(this, false);\n\t\t}\n\t\treturn this._fsPath;\n\t}\n\n\toverride toString(skipEncoding: boolean = false): string {\n\t\tif (!skipEncoding) {\n\t\t\tif (!this._formatted) {\n\t\t\t\tthis._formatted = _asFormatted(this, false);\n\t\t\t}\n\t\t\treturn this._formatted;\n\t\t} else {\n\t\t\t// we don't cache that\n\t\t\treturn _asFormatted(this, true);\n\t\t}\n\t}\n\n\toverride toJSON(): UriComponents {\n\t\tconst res = {\n\t\t\t$mid: 1\n\t\t};\n\t\t// cached state\n\t\tif (this._fsPath) {\n\t\t\tres.fsPath = this._fsPath;\n\t\t\tres._sep = _pathSepMarker;\n\t\t}\n\t\tif (this._formatted) {\n\t\t\tres.external = this._formatted;\n\t\t}\n\t\t// uri components\n\t\tif (this.path) {\n\t\t\tres.path = this.path;\n\t\t}\n\t\tif (this.scheme) {\n\t\t\tres.scheme = this.scheme;\n\t\t}\n\t\tif (this.authority) {\n\t\t\tres.authority = this.authority;\n\t\t}\n\t\tif (this.query) {\n\t\t\tres.query = this.query;\n\t\t}\n\t\tif (this.fragment) {\n\t\t\tres.fragment = this.fragment;\n\t\t}\n\t\treturn res;\n\t}\n}\n\n// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2\nconst encodeTable: { [ch: number]: string } = {\n\t[CharCode.Colon]: '%3A', // gen-delims\n\t[CharCode.Slash]: '%2F',\n\t[CharCode.QuestionMark]: '%3F',\n\t[CharCode.Hash]: '%23',\n\t[CharCode.OpenSquareBracket]: '%5B',\n\t[CharCode.CloseSquareBracket]: '%5D',\n\t[CharCode.AtSign]: '%40',\n\n\t[CharCode.ExclamationMark]: '%21', // sub-delims\n\t[CharCode.DollarSign]: '%24',\n\t[CharCode.Ampersand]: '%26',\n\t[CharCode.SingleQuote]: '%27',\n\t[CharCode.OpenParen]: '%28',\n\t[CharCode.CloseParen]: '%29',\n\t[CharCode.Asterisk]: '%2A',\n\t[CharCode.Plus]: '%2B',\n\t[CharCode.Comma]: '%2C',\n\t[CharCode.Semicolon]: '%3B',\n\t[CharCode.Equals]: '%3D',\n\n\t[CharCode.Space]: '%20',\n};\n\nfunction encodeURIComponentFast(uriComponent: string, isPath: boolean, isAuthority: boolean): string {\n\tlet res: string | undefined = undefined;\n\tlet nativeEncodePos = -1;\n\n\tfor (let pos = 0; pos < uriComponent.length; pos++) {\n\t\tconst code = uriComponent.charCodeAt(pos);\n\n\t\t// unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3\n\t\tif (\n\t\t\t(code >= CharCode.a && code <= CharCode.z)\n\t\t\t|| (code >= CharCode.A && code <= CharCode.Z)\n\t\t\t|| (code >= CharCode.Digit0 && code <= CharCode.Digit9)\n\t\t\t|| code === CharCode.Dash\n\t\t\t|| code === CharCode.Period\n\t\t\t|| code === CharCode.Underline\n\t\t\t|| code === CharCode.Tilde\n\t\t\t|| (isPath && code === CharCode.Slash)\n\t\t\t|| (isAuthority && code === CharCode.OpenSquareBracket)\n\t\t\t|| (isAuthority && code === CharCode.CloseSquareBracket)\n\t\t\t|| (isAuthority && code === CharCode.Colon)\n\t\t) {\n\t\t\t// check if we are delaying native encode\n\t\t\tif (nativeEncodePos !== -1) {\n\t\t\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n\t\t\t\tnativeEncodePos = -1;\n\t\t\t}\n\t\t\t// check if we write into a new string (by default we try to return the param)\n\t\t\tif (res !== undefined) {\n\t\t\t\tres += uriComponent.charAt(pos);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// encoding needed, we need to allocate a new string\n\t\t\tif (res === undefined) {\n\t\t\t\tres = uriComponent.substr(0, pos);\n\t\t\t}\n\n\t\t\t// check with default table first\n\t\t\tconst escaped = encodeTable[code];\n\t\t\tif (escaped !== undefined) {\n\n\t\t\t\t// check if we are delaying native encode\n\t\t\t\tif (nativeEncodePos !== -1) {\n\t\t\t\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n\t\t\t\t\tnativeEncodePos = -1;\n\t\t\t\t}\n\n\t\t\t\t// append escaped variant to result\n\t\t\t\tres += escaped;\n\n\t\t\t} else if (nativeEncodePos === -1) {\n\t\t\t\t// use native encode only when needed\n\t\t\t\tnativeEncodePos = pos;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (nativeEncodePos !== -1) {\n\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos));\n\t}\n\n\treturn res !== undefined ? res : uriComponent;\n}\n\nfunction encodeURIComponentMinimal(path: string): string {\n\tlet res: string | undefined = undefined;\n\tfor (let pos = 0; pos < path.length; pos++) {\n\t\tconst code = path.charCodeAt(pos);\n\t\tif (code === CharCode.Hash || code === CharCode.QuestionMark) {\n\t\t\tif (res === undefined) {\n\t\t\t\tres = path.substr(0, pos);\n\t\t\t}\n\t\t\tres += encodeTable[code];\n\t\t} else {\n\t\t\tif (res !== undefined) {\n\t\t\t\tres += path[pos];\n\t\t\t}\n\t\t}\n\t}\n\treturn res !== undefined ? res : path;\n}\n\n/**\n * Compute `fsPath` for the given uri\n */\nexport function uriToFsPath(uri: URI, keepDriveLetterCasing: boolean): string {\n\n\tlet value: string;\n\tif (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {\n\t\t// unc path: file://shares/c$/far/boo\n\t\tvalue = `//${uri.authority}${uri.path}`;\n\t} else if (\n\t\turi.path.charCodeAt(0) === CharCode.Slash\n\t\t&& (uri.path.charCodeAt(1) >= CharCode.A && uri.path.charCodeAt(1) <= CharCode.Z || uri.path.charCodeAt(1) >= CharCode.a && uri.path.charCodeAt(1) <= CharCode.z)\n\t\t&& uri.path.charCodeAt(2) === CharCode.Colon\n\t) {\n\t\tif (!keepDriveLetterCasing) {\n\t\t\t// windows drive letter: file:///c:/far/boo\n\t\t\tvalue = uri.path[1].toLowerCase() + uri.path.substr(2);\n\t\t} else {\n\t\t\tvalue = uri.path.substr(1);\n\t\t}\n\t} else {\n\t\t// other path\n\t\tvalue = uri.path;\n\t}\n\tif (isWindows) {\n\t\tvalue = value.replace(/\\//g, '\\\\');\n\t}\n\treturn value;\n}\n\n/**\n * Create the external version of a uri\n */\nfunction _asFormatted(uri: URI, skipEncoding: boolean): string {\n\n\tconst encoder = !skipEncoding\n\t\t? encodeURIComponentFast\n\t\t: encodeURIComponentMinimal;\n\n\tlet res = '';\n\tlet { scheme, authority, path, query, fragment } = uri;\n\tif (scheme) {\n\t\tres += scheme;\n\t\tres += ':';\n\t}\n\tif (authority || scheme === 'file') {\n\t\tres += _slash;\n\t\tres += _slash;\n\t}\n\tif (authority) {\n\t\tlet idx = authority.indexOf('@');\n\t\tif (idx !== -1) {\n\t\t\t// @\n\t\t\tconst userinfo = authority.substr(0, idx);\n\t\t\tauthority = authority.substr(idx + 1);\n\t\t\tidx = userinfo.lastIndexOf(':');\n\t\t\tif (idx === -1) {\n\t\t\t\tres += encoder(userinfo, false, false);\n\t\t\t} else {\n\t\t\t\t// :@\n\t\t\t\tres += encoder(userinfo.substr(0, idx), false, false);\n\t\t\t\tres += ':';\n\t\t\t\tres += encoder(userinfo.substr(idx + 1), false, true);\n\t\t\t}\n\t\t\tres += '@';\n\t\t}\n\t\tauthority = authority.toLowerCase();\n\t\tidx = authority.lastIndexOf(':');\n\t\tif (idx === -1) {\n\t\t\tres += encoder(authority, false, true);\n\t\t} else {\n\t\t\t// :\n\t\t\tres += encoder(authority.substr(0, idx), false, true);\n\t\t\tres += authority.substr(idx);\n\t\t}\n\t}\n\tif (path) {\n\t\t// lower-case windows drive letters in /C:/fff or C:/fff\n\t\tif (path.length >= 3 && path.charCodeAt(0) === CharCode.Slash && path.charCodeAt(2) === CharCode.Colon) {\n\t\t\tconst code = path.charCodeAt(1);\n\t\t\tif (code >= CharCode.A && code <= CharCode.Z) {\n\t\t\t\tpath = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`; // \"/c:\".length === 3\n\t\t\t}\n\t\t} else if (path.length >= 2 && path.charCodeAt(1) === CharCode.Colon) {\n\t\t\tconst code = path.charCodeAt(0);\n\t\t\tif (code >= CharCode.A && code <= CharCode.Z) {\n\t\t\t\tpath = `${String.fromCharCode(code + 32)}:${path.substr(2)}`; // \"/c:\".length === 3\n\t\t\t}\n\t\t}\n\t\t// encode the rest of the path\n\t\tres += encoder(path, true, false);\n\t}\n\tif (query) {\n\t\tres += '?';\n\t\tres += encoder(query, false, false);\n\t}\n\tif (fragment) {\n\t\tres += '#';\n\t\tres += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment;\n\t}\n\treturn res;\n}\n\n// --- decode\n\nfunction decodeURIComponentGraceful(str: string): string {\n\ttry {\n\t\treturn decodeURIComponent(str);\n\t} catch {\n\t\tif (str.length > 3) {\n\t\t\treturn str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));\n\t\t} else {\n\t\t\treturn str;\n\t\t}\n\t}\n}\n\nconst _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;\n\nfunction percentDecode(str: string): string {\n\tif (!str.match(_rEncodedAsHex)) {\n\t\treturn str;\n\t}\n\treturn str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match));\n}\n\n/**\n * Mapped-type that replaces all occurrences of URI with UriComponents\n */\nexport type UriDto = { [K in keyof T]: T[K] extends URI\n\t? UriComponents\n\t: UriDto };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n'use strict';\n\nimport { CharCode } from './charCode';\nimport { URI } from './uri';\nimport * as nodePath from 'path';\n\nconst posixPath = nodePath.posix || nodePath;\nconst slash = '/';\n\nexport namespace Utils {\n\n /**\n * Joins one or more input paths to the path of URI. \n * '/' is used as the directory separation character. \n * \n * The resolved path will be normalized. That means:\n * - all '..' and '.' segments are resolved.\n * - multiple, sequential occurences of '/' are replaced by a single instance of '/'.\n * - trailing separators are preserved.\n * \n * @param uri The input URI.\n * @param paths The paths to be joined with the path of URI.\n * @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.\n */\n export function joinPath(uri: URI, ...paths: string[]): URI {\n return uri.with({ path: posixPath.join(uri.path, ...paths) });\n }\n\n\n /**\n * Resolves one or more paths against the path of a URI. \n * '/' is used as the directory separation character. \n * \n * The resolved path will be normalized. That means:\n * - all '..' and '.' segments are resolved. \n * - multiple, sequential occurences of '/' are replaced by a single instance of '/'.\n * - trailing separators are removed.\n * \n * @param uri The input URI.\n * @param paths The paths to resolve against the path of URI.\n * @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.\n */\n export function resolvePath(uri: URI, ...paths: string[]): URI {\n let path = uri.path; \n let slashAdded = false;\n if (path[0] !== slash) {\n path = slash + path; // make the path abstract: for posixPath.resolve the first segments has to be absolute or cwd is used.\n slashAdded = true;\n }\n let resolvedPath = posixPath.resolve(path, ...paths);\n if (slashAdded && resolvedPath[0] === slash && !uri.authority) {\n resolvedPath = resolvedPath.substring(1);\n }\n return uri.with({ path: resolvedPath });\n }\n\n /**\n * Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The orignal URI is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The last segment of the URIs path.\n */\n export function dirname(uri: URI): URI {\n if (uri.path.length === 0 || uri.path === slash) {\n return uri;\n }\n let path = posixPath.dirname(uri.path);\n if (path.length === 1 && path.charCodeAt(0) === CharCode.Period) {\n path = '';\n }\n return uri.with({ path });\n }\n\n /**\n * Returns the last segment of the path of a URI, similar to the Unix basename command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The empty string is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The base name of the URIs path.\n */\n export function basename(uri: URI): string {\n return posixPath.basename(uri.path);\n }\n\n /**\n * Returns the extension name of the path of a URI, similar to the Unix extname command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The empty string is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The extension name of the URIs path.\n */\n export function extname(uri: URI): string {\n return posixPath.extname(uri.path);\n }\n}"],"names":["assertPath","path","TypeError","JSON","stringify","normalizeStringPosix","allowAboveRoot","code","res","lastSegmentLength","lastSlash","dots","i","length","charCodeAt","lastSlashIndex","lastIndexOf","slice","posix","resolve","cwd","resolvedPath","resolvedAbsolute","arguments","undefined","process","normalize","isAbsolute","trailingSeparator","join","joined","arg","relative","from","to","fromStart","fromEnd","fromLen","toStart","toLen","lastCommonSep","fromCode","out","_makeLong","dirname","hasRoot","end","matchedSlash","basename","ext","start","extIdx","firstNonSlashEnd","extname","startDot","startPart","preDotState","format","pathObject","sep","dir","root","base","name","_format","parse","ret","delimiter","win32","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","isWindows","platform","navigator","userAgent","indexOf","_schemePattern","_singleSlashStart","_doubleSlashStart","_validateUri","_strict","scheme","Error","authority","query","fragment","test","_empty","_slash","_regexp","schemeOrData","this","_schemeFix","_referenceResolution","isUri","thing","URI","fsPath","with","toString","uriToFsPath","change","Uri","match","exec","percentDecode","file","replace","idx","substring","components","result","skipEncoding","_asFormatted","toJSON","revive","data","_formatted","external","_fsPath","_sep","_pathSepMarker","$mid","encodeTable","encodeURIComponentFast","uriComponent","isPath","isAuthority","nativeEncodePos","pos","encodeURIComponent","charAt","substr","escaped","encodeURIComponentMinimal","uri","keepDriveLetterCasing","toLowerCase","encoder","userinfo","String","fromCharCode","decodeURIComponentGraceful","str","decodeURIComponent","_rEncodedAsHex","Utils","posixPath","slash","joinPath","paths","resolvePath","slashAdded"],"sourceRoot":""} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/charCode.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/charCode.d.ts" index 086d0697e6121fb643b7d90a799dbbb0fae4066b..61c9a2fa955407a2a032f17e689298f9194f2fab 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/charCode.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/charCode.d.ts" @@ -1,3 +1,415 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:12589e6b27710c071911512033dcc0031cba705fe4dd911cb1b65139c7ef0fb9 -size 11020 +/** + * An inlined enum containing useful character codes (to be used with String.charCodeAt). + * Please leave the const keyword such that it gets inlined when compiled to JavaScript! + */ +export declare const enum CharCode { + Null = 0, + /** + * The `\b` character. + */ + Backspace = 8, + /** + * The `\t` character. + */ + Tab = 9, + /** + * The `\n` character. + */ + LineFeed = 10, + /** + * The `\r` character. + */ + CarriageReturn = 13, + Space = 32, + /** + * The `!` character. + */ + ExclamationMark = 33, + /** + * The `"` character. + */ + DoubleQuote = 34, + /** + * The `#` character. + */ + Hash = 35, + /** + * The `$` character. + */ + DollarSign = 36, + /** + * The `%` character. + */ + PercentSign = 37, + /** + * The `&` character. + */ + Ampersand = 38, + /** + * The `'` character. + */ + SingleQuote = 39, + /** + * The `(` character. + */ + OpenParen = 40, + /** + * The `)` character. + */ + CloseParen = 41, + /** + * The `*` character. + */ + Asterisk = 42, + /** + * The `+` character. + */ + Plus = 43, + /** + * The `,` character. + */ + Comma = 44, + /** + * The `-` character. + */ + Dash = 45, + /** + * The `.` character. + */ + Period = 46, + /** + * The `/` character. + */ + Slash = 47, + Digit0 = 48, + Digit1 = 49, + Digit2 = 50, + Digit3 = 51, + Digit4 = 52, + Digit5 = 53, + Digit6 = 54, + Digit7 = 55, + Digit8 = 56, + Digit9 = 57, + /** + * The `:` character. + */ + Colon = 58, + /** + * The `;` character. + */ + Semicolon = 59, + /** + * The `<` character. + */ + LessThan = 60, + /** + * The `=` character. + */ + Equals = 61, + /** + * The `>` character. + */ + GreaterThan = 62, + /** + * The `?` character. + */ + QuestionMark = 63, + /** + * The `@` character. + */ + AtSign = 64, + A = 65, + B = 66, + C = 67, + D = 68, + E = 69, + F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + /** + * The `[` character. + */ + OpenSquareBracket = 91, + /** + * The `\` character. + */ + Backslash = 92, + /** + * The `]` character. + */ + CloseSquareBracket = 93, + /** + * The `^` character. + */ + Caret = 94, + /** + * The `_` character. + */ + Underline = 95, + /** + * The ``(`)`` character. + */ + BackTick = 96, + a = 97, + b = 98, + c = 99, + d = 100, + e = 101, + f = 102, + g = 103, + h = 104, + i = 105, + j = 106, + k = 107, + l = 108, + m = 109, + n = 110, + o = 111, + p = 112, + q = 113, + r = 114, + s = 115, + t = 116, + u = 117, + v = 118, + w = 119, + x = 120, + y = 121, + z = 122, + /** + * The `{` character. + */ + OpenCurlyBrace = 123, + /** + * The `|` character. + */ + Pipe = 124, + /** + * The `}` character. + */ + CloseCurlyBrace = 125, + /** + * The `~` character. + */ + Tilde = 126, + U_Combining_Grave_Accent = 768, + U_Combining_Acute_Accent = 769, + U_Combining_Circumflex_Accent = 770, + U_Combining_Tilde = 771, + U_Combining_Macron = 772, + U_Combining_Overline = 773, + U_Combining_Breve = 774, + U_Combining_Dot_Above = 775, + U_Combining_Diaeresis = 776, + U_Combining_Hook_Above = 777, + U_Combining_Ring_Above = 778, + U_Combining_Double_Acute_Accent = 779, + U_Combining_Caron = 780, + U_Combining_Vertical_Line_Above = 781, + U_Combining_Double_Vertical_Line_Above = 782, + U_Combining_Double_Grave_Accent = 783, + U_Combining_Candrabindu = 784, + U_Combining_Inverted_Breve = 785, + U_Combining_Turned_Comma_Above = 786, + U_Combining_Comma_Above = 787, + U_Combining_Reversed_Comma_Above = 788, + U_Combining_Comma_Above_Right = 789, + U_Combining_Grave_Accent_Below = 790, + U_Combining_Acute_Accent_Below = 791, + U_Combining_Left_Tack_Below = 792, + U_Combining_Right_Tack_Below = 793, + U_Combining_Left_Angle_Above = 794, + U_Combining_Horn = 795, + U_Combining_Left_Half_Ring_Below = 796, + U_Combining_Up_Tack_Below = 797, + U_Combining_Down_Tack_Below = 798, + U_Combining_Plus_Sign_Below = 799, + U_Combining_Minus_Sign_Below = 800, + U_Combining_Palatalized_Hook_Below = 801, + U_Combining_Retroflex_Hook_Below = 802, + U_Combining_Dot_Below = 803, + U_Combining_Diaeresis_Below = 804, + U_Combining_Ring_Below = 805, + U_Combining_Comma_Below = 806, + U_Combining_Cedilla = 807, + U_Combining_Ogonek = 808, + U_Combining_Vertical_Line_Below = 809, + U_Combining_Bridge_Below = 810, + U_Combining_Inverted_Double_Arch_Below = 811, + U_Combining_Caron_Below = 812, + U_Combining_Circumflex_Accent_Below = 813, + U_Combining_Breve_Below = 814, + U_Combining_Inverted_Breve_Below = 815, + U_Combining_Tilde_Below = 816, + U_Combining_Macron_Below = 817, + U_Combining_Low_Line = 818, + U_Combining_Double_Low_Line = 819, + U_Combining_Tilde_Overlay = 820, + U_Combining_Short_Stroke_Overlay = 821, + U_Combining_Long_Stroke_Overlay = 822, + U_Combining_Short_Solidus_Overlay = 823, + U_Combining_Long_Solidus_Overlay = 824, + U_Combining_Right_Half_Ring_Below = 825, + U_Combining_Inverted_Bridge_Below = 826, + U_Combining_Square_Below = 827, + U_Combining_Seagull_Below = 828, + U_Combining_X_Above = 829, + U_Combining_Vertical_Tilde = 830, + U_Combining_Double_Overline = 831, + U_Combining_Grave_Tone_Mark = 832, + U_Combining_Acute_Tone_Mark = 833, + U_Combining_Greek_Perispomeni = 834, + U_Combining_Greek_Koronis = 835, + U_Combining_Greek_Dialytika_Tonos = 836, + U_Combining_Greek_Ypogegrammeni = 837, + U_Combining_Bridge_Above = 838, + U_Combining_Equals_Sign_Below = 839, + U_Combining_Double_Vertical_Line_Below = 840, + U_Combining_Left_Angle_Below = 841, + U_Combining_Not_Tilde_Above = 842, + U_Combining_Homothetic_Above = 843, + U_Combining_Almost_Equal_To_Above = 844, + U_Combining_Left_Right_Arrow_Below = 845, + U_Combining_Upwards_Arrow_Below = 846, + U_Combining_Grapheme_Joiner = 847, + U_Combining_Right_Arrowhead_Above = 848, + U_Combining_Left_Half_Ring_Above = 849, + U_Combining_Fermata = 850, + U_Combining_X_Below = 851, + U_Combining_Left_Arrowhead_Below = 852, + U_Combining_Right_Arrowhead_Below = 853, + U_Combining_Right_Arrowhead_And_Up_Arrowhead_Below = 854, + U_Combining_Right_Half_Ring_Above = 855, + U_Combining_Dot_Above_Right = 856, + U_Combining_Asterisk_Below = 857, + U_Combining_Double_Ring_Below = 858, + U_Combining_Zigzag_Above = 859, + U_Combining_Double_Breve_Below = 860, + U_Combining_Double_Breve = 861, + U_Combining_Double_Macron = 862, + U_Combining_Double_Macron_Below = 863, + U_Combining_Double_Tilde = 864, + U_Combining_Double_Inverted_Breve = 865, + U_Combining_Double_Rightwards_Arrow_Below = 866, + U_Combining_Latin_Small_Letter_A = 867, + U_Combining_Latin_Small_Letter_E = 868, + U_Combining_Latin_Small_Letter_I = 869, + U_Combining_Latin_Small_Letter_O = 870, + U_Combining_Latin_Small_Letter_U = 871, + U_Combining_Latin_Small_Letter_C = 872, + U_Combining_Latin_Small_Letter_D = 873, + U_Combining_Latin_Small_Letter_H = 874, + U_Combining_Latin_Small_Letter_M = 875, + U_Combining_Latin_Small_Letter_R = 876, + U_Combining_Latin_Small_Letter_T = 877, + U_Combining_Latin_Small_Letter_V = 878, + U_Combining_Latin_Small_Letter_X = 879, + /** + * Unicode Character 'LINE SEPARATOR' (U+2028) + * http://www.fileformat.info/info/unicode/char/2028/index.htm + */ + LINE_SEPARATOR = 8232, + /** + * Unicode Character 'PARAGRAPH SEPARATOR' (U+2029) + * http://www.fileformat.info/info/unicode/char/2029/index.htm + */ + PARAGRAPH_SEPARATOR = 8233, + /** + * Unicode Character 'NEXT LINE' (U+0085) + * http://www.fileformat.info/info/unicode/char/0085/index.htm + */ + NEXT_LINE = 133, + U_CIRCUMFLEX = 94, + U_GRAVE_ACCENT = 96, + U_DIAERESIS = 168, + U_MACRON = 175, + U_ACUTE_ACCENT = 180, + U_CEDILLA = 184, + U_MODIFIER_LETTER_LEFT_ARROWHEAD = 706, + U_MODIFIER_LETTER_RIGHT_ARROWHEAD = 707, + U_MODIFIER_LETTER_UP_ARROWHEAD = 708, + U_MODIFIER_LETTER_DOWN_ARROWHEAD = 709, + U_MODIFIER_LETTER_CENTRED_RIGHT_HALF_RING = 722, + U_MODIFIER_LETTER_CENTRED_LEFT_HALF_RING = 723, + U_MODIFIER_LETTER_UP_TACK = 724, + U_MODIFIER_LETTER_DOWN_TACK = 725, + U_MODIFIER_LETTER_PLUS_SIGN = 726, + U_MODIFIER_LETTER_MINUS_SIGN = 727, + U_BREVE = 728, + U_DOT_ABOVE = 729, + U_RING_ABOVE = 730, + U_OGONEK = 731, + U_SMALL_TILDE = 732, + U_DOUBLE_ACUTE_ACCENT = 733, + U_MODIFIER_LETTER_RHOTIC_HOOK = 734, + U_MODIFIER_LETTER_CROSS_ACCENT = 735, + U_MODIFIER_LETTER_EXTRA_HIGH_TONE_BAR = 741, + U_MODIFIER_LETTER_HIGH_TONE_BAR = 742, + U_MODIFIER_LETTER_MID_TONE_BAR = 743, + U_MODIFIER_LETTER_LOW_TONE_BAR = 744, + U_MODIFIER_LETTER_EXTRA_LOW_TONE_BAR = 745, + U_MODIFIER_LETTER_YIN_DEPARTING_TONE_MARK = 746, + U_MODIFIER_LETTER_YANG_DEPARTING_TONE_MARK = 747, + U_MODIFIER_LETTER_UNASPIRATED = 749, + U_MODIFIER_LETTER_LOW_DOWN_ARROWHEAD = 751, + U_MODIFIER_LETTER_LOW_UP_ARROWHEAD = 752, + U_MODIFIER_LETTER_LOW_LEFT_ARROWHEAD = 753, + U_MODIFIER_LETTER_LOW_RIGHT_ARROWHEAD = 754, + U_MODIFIER_LETTER_LOW_RING = 755, + U_MODIFIER_LETTER_MIDDLE_GRAVE_ACCENT = 756, + U_MODIFIER_LETTER_MIDDLE_DOUBLE_GRAVE_ACCENT = 757, + U_MODIFIER_LETTER_MIDDLE_DOUBLE_ACUTE_ACCENT = 758, + U_MODIFIER_LETTER_LOW_TILDE = 759, + U_MODIFIER_LETTER_RAISED_COLON = 760, + U_MODIFIER_LETTER_BEGIN_HIGH_TONE = 761, + U_MODIFIER_LETTER_END_HIGH_TONE = 762, + U_MODIFIER_LETTER_BEGIN_LOW_TONE = 763, + U_MODIFIER_LETTER_END_LOW_TONE = 764, + U_MODIFIER_LETTER_SHELF = 765, + U_MODIFIER_LETTER_OPEN_SHELF = 766, + U_MODIFIER_LETTER_LOW_LEFT_ARROW = 767, + U_GREEK_LOWER_NUMERAL_SIGN = 885, + U_GREEK_TONOS = 900, + U_GREEK_DIALYTIKA_TONOS = 901, + U_GREEK_KORONIS = 8125, + U_GREEK_PSILI = 8127, + U_GREEK_PERISPOMENI = 8128, + U_GREEK_DIALYTIKA_AND_PERISPOMENI = 8129, + U_GREEK_PSILI_AND_VARIA = 8141, + U_GREEK_PSILI_AND_OXIA = 8142, + U_GREEK_PSILI_AND_PERISPOMENI = 8143, + U_GREEK_DASIA_AND_VARIA = 8157, + U_GREEK_DASIA_AND_OXIA = 8158, + U_GREEK_DASIA_AND_PERISPOMENI = 8159, + U_GREEK_DIALYTIKA_AND_VARIA = 8173, + U_GREEK_DIALYTIKA_AND_OXIA = 8174, + U_GREEK_VARIA = 8175, + U_GREEK_OXIA = 8189, + U_GREEK_DASIA = 8190, + U_OVERLINE = 8254, + /** + * UTF-8 BOM + * Unicode Character 'ZERO WIDTH NO-BREAK SPACE' (U+FEFF) + * http://www.fileformat.info/info/unicode/char/feff/index.htm + */ + UTF8_BOM = 65279 +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/charCode.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/charCode.js" index e517ccbb668f7e36ac3c48e97d2fd42781ffb5c7..6bafcec8582c769c7ce9ec1c5f98d31fcee82d3f 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/charCode.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/charCode.js" @@ -1,3 +1,6 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8aff082422674415b257672bdb20d7ac94380c214180c36b4b9c3fed1e854a37 -size 429 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/index.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/index.d.ts" index df114ea5af6f21c61887982c0efece894f8a5b60..e1c71f78b237f5e759e635364534218a5425eb63 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/index.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/index.d.ts" @@ -1,3 +1,3 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a2ca9f3aee02a7fa0ec6f80afc09c5465191e5ca513be720bf858f5da275e66b -size 85 +import { URI } from './uri'; +import { Utils } from './utils'; +export { URI, Utils }; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/index.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/index.js" index 7a6790b5609b3df4d96af71b37520b7b86cf7d86..59906ce0c35efcc025ac4200168fd32658c9e347 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/index.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/index.js" @@ -1,3 +1,2 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3fe95562b52dd72549ba636159e65c8f96c49efbe763aca56eba9290bfd965df -size 12586 +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(this,(()=>(()=>{"use strict";var t={470:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",o=0,i=-1,a=0,s=0;s<=t.length;++s){if(s2){var h=n.lastIndexOf("/");if(h!==n.length-1){-1===h?(n="",o=0):o=(n=n.slice(0,h)).length-1-n.lastIndexOf("/"),i=s,a=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=s,a=0;continue}e&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+t.slice(i+1,s):n=t.slice(i+1,s),o=s-i-1;i=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var n={resolve:function(){for(var t,n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a;i>=0?a=arguments[i]:(void 0===t&&(t=process.cwd()),a=t),e(a),0!==a.length&&(n=a+"/"+n,o=47===a.charCodeAt(0))}return n=r(n,!o),o?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return".";var n=47===t.charCodeAt(0),o=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&o&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,r=0;r0&&(void 0===t?t=o:t+="/"+o)}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return"";if((t=n.resolve(t))===(r=n.resolve(r)))return"";for(var o=1;oc){if(47===r.charCodeAt(s+u))return r.slice(s+u+1);if(0===u)return r.slice(s+u)}else a>c&&(47===t.charCodeAt(o+u)?f=u:0===u&&(f=0));break}var l=t.charCodeAt(o+u);if(l!==r.charCodeAt(s+u))break;47===l&&(f=u)}var p="";for(u=o+f+1;u<=i;++u)u!==i&&47!==t.charCodeAt(u)||(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(s+f):(s+=f,47===r.charCodeAt(s)&&++s,r.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,o=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(r=t.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,o=0,i=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var s=r.length-1,h=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!a){o=n+1;break}}else-1===h&&(a=!1,h=n+1),s>=0&&(c===r.charCodeAt(s)?-1==--s&&(i=n):(s=-1,i=h))}return o===i?i=h:-1===i&&(i=t.length),t.slice(o,i)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){o=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":t.slice(o,i)},extname:function(t){e(t);for(var r=-1,n=0,o=-1,i=!0,a=0,s=t.length-1;s>=0;--s){var h=t.charCodeAt(s);if(47!==h)-1===o&&(i=!1,o=s+1),46===h?-1===r?r=s:1!==a&&(a=1):-1!==r&&(a=-1);else if(!i){n=s+1;break}}return-1===r||-1===o||0===a||1===a&&r===o-1&&r===n+1?"":t.slice(r,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,o=t.charCodeAt(0),i=47===o;i?(r.root="/",n=1):n=0;for(var a=-1,s=0,h=-1,c=!0,f=t.length-1,u=0;f>=n;--f)if(47!==(o=t.charCodeAt(f)))-1===h&&(c=!1,h=f+1),46===o?-1===a?a=f:1!==u&&(u=1):-1!==a&&(u=-1);else if(!c){s=f+1;break}return-1===a||-1===h||0===u||1===u&&a===h-1&&a===s+1?-1!==h&&(r.base=r.name=0===s&&i?t.slice(1,h):t.slice(s,h)):(0===s&&i?(r.name=t.slice(1,a),r.base=t.slice(1,h)):(r.name=t.slice(s,a),r.base=t.slice(s,h)),r.ext=t.slice(a,h)),s>0?r.dir=t.slice(0,s-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n},674:(t,e)=>{if(Object.defineProperty(e,"__esModule",{value:!0}),e.isWindows=void 0,"object"==typeof process)e.isWindows="win32"===process.platform;else if("object"==typeof navigator){var r=navigator.userAgent;e.isWindows=r.indexOf("Windows")>=0}},796:function(t,e,r){var n,o,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;var a=r(674),s=/^\w[\w\d+.-]*$/,h=/^\//,c=/^\/\//;function f(t,e){if(!t.scheme&&e)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(t.authority,'", path: "').concat(t.path,'", query: "').concat(t.query,'", fragment: "').concat(t.fragment,'"}'));if(t.scheme&&!s.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!h.test(t.path))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')}else if(c.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}var u="",l="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,d=function(){function t(t,e,r,n,o,i){void 0===i&&(i=!1),"object"==typeof t?(this.scheme=t.scheme||u,this.authority=t.authority||u,this.path=t.path||u,this.query=t.query||u,this.fragment=t.fragment||u):(this.scheme=function(t,e){return t||e?t:"file"}(t,i),this.authority=e||u,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==l&&(e=l+e):e=l}return e}(this.scheme,r||u),this.query=n||u,this.fragment=o||u,f(this,i))}return t.isUri=function(e){return e instanceof t||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString},Object.defineProperty(t.prototype,"fsPath",{get:function(){return C(this,!1)},enumerable:!1,configurable:!0}),t.prototype.with=function(t){if(!t)return this;var e=t.scheme,r=t.authority,n=t.path,o=t.query,i=t.fragment;return void 0===e?e=this.scheme:null===e&&(e=u),void 0===r?r=this.authority:null===r&&(r=u),void 0===n?n=this.path:null===n&&(n=u),void 0===o?o=this.query:null===o&&(o=u),void 0===i?i=this.fragment:null===i&&(i=u),e===this.scheme&&r===this.authority&&n===this.path&&o===this.query&&i===this.fragment?this:new v(e,r,n,o,i)},t.parse=function(t,e){void 0===e&&(e=!1);var r=p.exec(t);return r?new v(r[2]||u,x(r[4]||u),x(r[5]||u),x(r[7]||u),x(r[9]||u),e):new v(u,u,u,u,u)},t.file=function(t){var e=u;if(a.isWindows&&(t=t.replace(/\\/g,l)),t[0]===l&&t[1]===l){var r=t.indexOf(l,2);-1===r?(e=t.substring(2),t=l):(e=t.substring(2,r),t=t.substring(r)||l)}return new v("file",e,t,u,u)},t.from=function(t){var e=new v(t.scheme,t.authority,t.path,t.query,t.fragment);return f(e,!0),e},t.prototype.toString=function(t){return void 0===t&&(t=!1),A(this,t)},t.prototype.toJSON=function(){return this},t.revive=function(e){if(e){if(e instanceof t)return e;var r=new v(e);return r._formatted=e.external,r._fsPath=e._sep===g?e.fsPath:null,r}return e},t}();e.URI=d;var g=a.isWindows?1:void 0,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._formatted=null,e._fsPath=null,e}return i(e,t),Object.defineProperty(e.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=C(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),e.prototype.toString=function(t){return void 0===t&&(t=!1),t?A(this,!0):(this._formatted||(this._formatted=A(this,!1)),this._formatted)},e.prototype.toJSON=function(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=g),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t},e}(d),y=((o={})[58]="%3A",o[47]="%2F",o[63]="%3F",o[35]="%23",o[91]="%5B",o[93]="%5D",o[64]="%40",o[33]="%21",o[36]="%24",o[38]="%26",o[39]="%27",o[40]="%28",o[41]="%29",o[42]="%2A",o[43]="%2B",o[44]="%2C",o[59]="%3B",o[61]="%3D",o[32]="%20",o);function m(t,e,r){for(var n=void 0,o=-1,i=0;i=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||45===a||46===a||95===a||126===a||e&&47===a||r&&91===a||r&&93===a||r&&58===a)-1!==o&&(n+=encodeURIComponent(t.substring(o,i)),o=-1),void 0!==n&&(n+=t.charAt(i));else{void 0===n&&(n=t.substr(0,i));var s=y[a];void 0!==s?(-1!==o&&(n+=encodeURIComponent(t.substring(o,i)),o=-1),n+=s):-1===o&&(o=i)}}return-1!==o&&(n+=encodeURIComponent(t.substring(o))),void 0!==n?n:t}function b(t){for(var e=void 0,r=0;r1&&"file"===t.scheme?"//".concat(t.authority).concat(t.path):47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,a.isWindows&&(r=r.replace(/\//g,"\\")),r}function A(t,e){var r=e?b:m,n="",o=t.scheme,i=t.authority,a=t.path,s=t.query,h=t.fragment;if(o&&(n+=o,n+=":"),(i||"file"===o)&&(n+=l,n+=l),i){var c=i.indexOf("@");if(-1!==c){var f=i.substr(0,c);i=i.substr(c+1),-1===(c=f.lastIndexOf(":"))?n+=r(f,!1,!1):(n+=r(f.substr(0,c),!1,!1),n+=":",n+=r(f.substr(c+1),!1,!0)),n+="@"}-1===(c=(i=i.toLowerCase()).lastIndexOf(":"))?n+=r(i,!1,!0):(n+=r(i.substr(0,c),!1,!0),n+=i.substr(c))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2))(u=a.charCodeAt(1))>=65&&u<=90&&(a="/".concat(String.fromCharCode(u+32),":").concat(a.substr(3)));else if(a.length>=2&&58===a.charCodeAt(1)){var u;(u=a.charCodeAt(0))>=65&&u<=90&&(a="".concat(String.fromCharCode(u+32),":").concat(a.substr(2)))}n+=r(a,!0,!1)}return s&&(n+="?",n+=r(s,!1,!1)),h&&(n+="#",n+=e?h:m(h,!1,!1)),n}function w(t){try{return decodeURIComponent(t)}catch(e){return t.length>3?t.substr(0,3)+w(t.substr(3)):t}}e.uriToFsPath=C;var _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function x(t){return t.match(_)?t.replace(_,(function(t){return w(t)})):t}},679:function(t,e,r){var n=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o{var t=n;Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=t.URI=void 0;var e=r(796);Object.defineProperty(t,"URI",{enumerable:!0,get:function(){return e.URI}});var o=r(679);Object.defineProperty(t,"Utils",{enumerable:!0,get:function(){return o.Utils}})})(),n})())); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/index.js.map" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/index.js.map" index 030b60670a59c1a93db9205f06156d63ac492413..5244edc4f41c9f382c0156cd39f4ed12b4494218 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/index.js.map" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/index.js.map" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cdad9e583ae0cb9818f9a1db17c6c6b2feeb1c157db46b732202707e5e2bdf2d -size 63250 +{"version":3,"file":"index.js","mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,EACvE,CACA,CATD,CASGC,MAAM,I,kCCiBT,SAASC,EAAWC,GAClB,GAAoB,iBAATA,EACT,MAAM,IAAIC,UAAU,mCAAqCC,KAAKC,UAAUH,GAE5E,CAGA,SAASI,EAAqBJ,EAAMK,GAMlC,IALA,IAIIC,EAJAC,EAAM,GACNC,EAAoB,EACpBC,GAAa,EACbC,EAAO,EAEFb,EAAI,EAAGA,GAAKG,EAAKW,SAAUd,EAAG,CACrC,GAAIA,EAAIG,EAAKW,OACXL,EAAON,EAAKY,WAAWf,OACpB,IAAa,KAATS,EACP,MAEAA,EAAO,EAAQ,CACjB,GAAa,KAATA,EAAmB,CACrB,GAAIG,IAAcZ,EAAI,GAAc,IAATa,QAEpB,GAAID,IAAcZ,EAAI,GAAc,IAATa,EAAY,CAC5C,GAAIH,EAAII,OAAS,GAA2B,IAAtBH,GAA8D,KAAnCD,EAAIK,WAAWL,EAAII,OAAS,IAAsD,KAAnCJ,EAAIK,WAAWL,EAAII,OAAS,GAC1H,GAAIJ,EAAII,OAAS,EAAG,CAClB,IAAIE,EAAiBN,EAAIO,YAAY,KACrC,GAAID,IAAmBN,EAAII,OAAS,EAAG,EACb,IAApBE,GACFN,EAAM,GACNC,EAAoB,GAGpBA,GADAD,EAAMA,EAAIQ,MAAM,EAAGF,IACKF,OAAS,EAAIJ,EAAIO,YAAY,KAEvDL,EAAYZ,EACZa,EAAO,EACP,QACF,CACF,MAAO,GAAmB,IAAfH,EAAII,QAA+B,IAAfJ,EAAII,OAAc,CAC/CJ,EAAM,GACNC,EAAoB,EACpBC,EAAYZ,EACZa,EAAO,EACP,QACF,CAEEL,IACEE,EAAII,OAAS,EACfJ,GAAO,MAEPA,EAAM,KACRC,EAAoB,EAExB,MACMD,EAAII,OAAS,EACfJ,GAAO,IAAMP,EAAKe,MAAMN,EAAY,EAAGZ,GAEvCU,EAAMP,EAAKe,MAAMN,EAAY,EAAGZ,GAClCW,EAAoBX,EAAIY,EAAY,EAEtCA,EAAYZ,EACZa,EAAO,CACT,MAAoB,KAATJ,IAA+B,IAAVI,IAC5BA,EAEFA,GAAQ,CAEZ,CACA,OAAOH,CACT,CAcA,IAAIS,EAAQ,CAEVC,QAAS,WAKP,IAJA,IAEIC,EAFAC,EAAe,GACfC,GAAmB,EAGdvB,EAAIwB,UAAUV,OAAS,EAAGd,IAAM,IAAMuB,EAAkBvB,IAAK,CACpE,IAAIG,EACAH,GAAK,EACPG,EAAOqB,UAAUxB,SAELyB,IAARJ,IACFA,EAAMK,QAAQL,OAChBlB,EAAOkB,GAGTnB,EAAWC,GAGS,IAAhBA,EAAKW,SAITQ,EAAenB,EAAO,IAAMmB,EAC5BC,EAA0C,KAAvBpB,EAAKY,WAAW,GACrC,CAQA,OAFAO,EAAef,EAAqBe,GAAeC,GAE/CA,EACED,EAAaR,OAAS,EACjB,IAAMQ,EAEN,IACAA,EAAaR,OAAS,EACxBQ,EAEA,GAEX,EAEAK,UAAW,SAAmBxB,GAG5B,GAFAD,EAAWC,GAES,IAAhBA,EAAKW,OAAc,MAAO,IAE9B,IAAIc,EAAoC,KAAvBzB,EAAKY,WAAW,GAC7Bc,EAAyD,KAArC1B,EAAKY,WAAWZ,EAAKW,OAAS,GAQtD,OAHoB,KAFpBX,EAAOI,EAAqBJ,GAAOyB,IAE1Bd,QAAiBc,IAAYzB,EAAO,KACzCA,EAAKW,OAAS,GAAKe,IAAmB1B,GAAQ,KAE9CyB,EAAmB,IAAMzB,EACtBA,CACT,EAEAyB,WAAY,SAAoBzB,GAE9B,OADAD,EAAWC,GACJA,EAAKW,OAAS,GAA4B,KAAvBX,EAAKY,WAAW,EAC5C,EAEAe,KAAM,WACJ,GAAyB,IAArBN,UAAUV,OACZ,MAAO,IAET,IADA,IAAIiB,EACK/B,EAAI,EAAGA,EAAIwB,UAAUV,SAAUd,EAAG,CACzC,IAAIgC,EAAMR,UAAUxB,GACpBE,EAAW8B,GACPA,EAAIlB,OAAS,SACAW,IAAXM,EACFA,EAASC,EAETD,GAAU,IAAMC,EAEtB,CACA,YAAeP,IAAXM,EACK,IACFZ,EAAMQ,UAAUI,EACzB,EAEAE,SAAU,SAAkBC,EAAMC,GAIhC,GAHAjC,EAAWgC,GACXhC,EAAWiC,GAEPD,IAASC,EAAI,MAAO,GAKxB,IAHAD,EAAOf,EAAMC,QAAQc,OACrBC,EAAKhB,EAAMC,QAAQe,IAEF,MAAO,GAIxB,IADA,IAAIC,EAAY,EACTA,EAAYF,EAAKpB,QACa,KAA/BoB,EAAKnB,WAAWqB,KADYA,GASlC,IALA,IAAIC,EAAUH,EAAKpB,OACfwB,EAAUD,EAAUD,EAGpBG,EAAU,EACPA,EAAUJ,EAAGrB,QACa,KAA3BqB,EAAGpB,WAAWwB,KADUA,GAW9B,IAPA,IACIC,EADQL,EAAGrB,OACKyB,EAGhBzB,EAASwB,EAAUE,EAAQF,EAAUE,EACrCC,GAAiB,EACjBzC,EAAI,EACDA,GAAKc,IAAUd,EAAG,CACvB,GAAIA,IAAMc,EAAQ,CAChB,GAAI0B,EAAQ1B,EAAQ,CAClB,GAAmC,KAA/BqB,EAAGpB,WAAWwB,EAAUvC,GAG1B,OAAOmC,EAAGjB,MAAMqB,EAAUvC,EAAI,GACzB,GAAU,IAANA,EAGT,OAAOmC,EAAGjB,MAAMqB,EAAUvC,EAE9B,MAAWsC,EAAUxB,IACoB,KAAnCoB,EAAKnB,WAAWqB,EAAYpC,GAG9ByC,EAAgBzC,EACD,IAANA,IAGTyC,EAAgB,IAGpB,KACF,CACA,IAAIC,EAAWR,EAAKnB,WAAWqB,EAAYpC,GAE3C,GAAI0C,IADSP,EAAGpB,WAAWwB,EAAUvC,GAEnC,MACoB,KAAb0C,IACPD,EAAgBzC,EACpB,CAEA,IAAI2C,EAAM,GAGV,IAAK3C,EAAIoC,EAAYK,EAAgB,EAAGzC,GAAKqC,IAAWrC,EAClDA,IAAMqC,GAAkC,KAAvBH,EAAKnB,WAAWf,KAChB,IAAf2C,EAAI7B,OACN6B,GAAO,KAEPA,GAAO,OAMb,OAAIA,EAAI7B,OAAS,EACR6B,EAAMR,EAAGjB,MAAMqB,EAAUE,IAEhCF,GAAWE,EACoB,KAA3BN,EAAGpB,WAAWwB,MACdA,EACGJ,EAAGjB,MAAMqB,GAEpB,EAEAK,UAAW,SAAmBzC,GAC5B,OAAOA,CACT,EAEA0C,QAAS,SAAiB1C,GAExB,GADAD,EAAWC,GACS,IAAhBA,EAAKW,OAAc,MAAO,IAK9B,IAJA,IAAIL,EAAON,EAAKY,WAAW,GACvB+B,EAAmB,KAATrC,EACVsC,GAAO,EACPC,GAAe,EACVhD,EAAIG,EAAKW,OAAS,EAAGd,GAAK,IAAKA,EAEtC,GAAa,MADbS,EAAON,EAAKY,WAAWf,KAEnB,IAAKgD,EAAc,CACjBD,EAAM/C,EACN,KACF,OAGFgD,GAAe,EAInB,OAAa,IAATD,EAAmBD,EAAU,IAAM,IACnCA,GAAmB,IAARC,EAAkB,KAC1B5C,EAAKe,MAAM,EAAG6B,EACvB,EAEAE,SAAU,SAAkB9C,EAAM+C,GAChC,QAAYzB,IAARyB,GAAoC,iBAARA,EAAkB,MAAM,IAAI9C,UAAU,mCACtEF,EAAWC,GAEX,IAGIH,EAHAmD,EAAQ,EACRJ,GAAO,EACPC,GAAe,EAGnB,QAAYvB,IAARyB,GAAqBA,EAAIpC,OAAS,GAAKoC,EAAIpC,QAAUX,EAAKW,OAAQ,CACpE,GAAIoC,EAAIpC,SAAWX,EAAKW,QAAUoC,IAAQ/C,EAAM,MAAO,GACvD,IAAIiD,EAASF,EAAIpC,OAAS,EACtBuC,GAAoB,EACxB,IAAKrD,EAAIG,EAAKW,OAAS,EAAGd,GAAK,IAAKA,EAAG,CACrC,IAAIS,EAAON,EAAKY,WAAWf,GAC3B,GAAa,KAATS,GAGA,IAAKuC,EAAc,CACjBG,EAAQnD,EAAI,EACZ,KACF,OAEwB,IAAtBqD,IAGFL,GAAe,EACfK,EAAmBrD,EAAI,GAErBoD,GAAU,IAER3C,IAASyC,EAAInC,WAAWqC,IACR,KAAZA,IAGJL,EAAM/C,IAKRoD,GAAU,EACVL,EAAMM,GAId,CAGA,OADIF,IAAUJ,EAAKA,EAAMM,GAAmC,IAATN,IAAYA,EAAM5C,EAAKW,QACnEX,EAAKe,MAAMiC,EAAOJ,EAC3B,CACE,IAAK/C,EAAIG,EAAKW,OAAS,EAAGd,GAAK,IAAKA,EAClC,GAA2B,KAAvBG,EAAKY,WAAWf,IAGhB,IAAKgD,EAAc,CACjBG,EAAQnD,EAAI,EACZ,KACF,OACkB,IAAT+C,IAGXC,GAAe,EACfD,EAAM/C,EAAI,GAId,OAAa,IAAT+C,EAAmB,GAChB5C,EAAKe,MAAMiC,EAAOJ,EAE7B,EAEAO,QAAS,SAAiBnD,GACxBD,EAAWC,GAQX,IAPA,IAAIoD,GAAY,EACZC,EAAY,EACZT,GAAO,EACPC,GAAe,EAGfS,EAAc,EACTzD,EAAIG,EAAKW,OAAS,EAAGd,GAAK,IAAKA,EAAG,CACzC,IAAIS,EAAON,EAAKY,WAAWf,GAC3B,GAAa,KAATS,GASS,IAATsC,IAGFC,GAAe,EACfD,EAAM/C,EAAI,GAEC,KAATS,GAEkB,IAAd8C,EACFA,EAAWvD,EACY,IAAhByD,IACPA,EAAc,IACK,IAAdF,IAGTE,GAAe,QArBb,IAAKT,EAAc,CACjBQ,EAAYxD,EAAI,EAChB,KACF,CAoBN,CAEA,OAAkB,IAAduD,IAA4B,IAATR,GAEH,IAAhBU,GAEgB,IAAhBA,GAAqBF,IAAaR,EAAM,GAAKQ,IAAaC,EAAY,EACjE,GAEFrD,EAAKe,MAAMqC,EAAUR,EAC9B,EAEAW,OAAQ,SAAgBC,GACtB,GAAmB,OAAfA,GAA6C,iBAAfA,EAChC,MAAM,IAAIvD,UAAU,0EAA4EuD,GAElG,OAvVJ,SAAiBC,EAAKD,GACpB,IAAIE,EAAMF,EAAWE,KAAOF,EAAWlE,KACnCqE,EAAOH,EAAWG,OAASH,EAAWI,MAAQ,KAAOJ,EAAWT,KAAO,IAC3E,OAAKW,EAGDA,IAAQF,EAAWlE,KACdoE,EAAMC,EAERD,EA8UU,IA9UEC,EALVA,CAMX,CA6UWE,CAAQ,EAAKL,EACtB,EAEAM,MAAO,SAAe9D,GACpBD,EAAWC,GAEX,IAAI+D,EAAM,CAAEzE,KAAM,GAAIoE,IAAK,GAAIC,KAAM,GAAIZ,IAAK,GAAIa,KAAM,IACxD,GAAoB,IAAhB5D,EAAKW,OAAc,OAAOoD,EAC9B,IAEIf,EAFA1C,EAAON,EAAKY,WAAW,GACvBa,EAAsB,KAATnB,EAEbmB,GACFsC,EAAIzE,KAAO,IACX0D,EAAQ,GAERA,EAAQ,EAaV,IAXA,IAAII,GAAY,EACZC,EAAY,EACZT,GAAO,EACPC,GAAe,EACfhD,EAAIG,EAAKW,OAAS,EAIlB2C,EAAc,EAGXzD,GAAKmD,IAASnD,EAEnB,GAAa,MADbS,EAAON,EAAKY,WAAWf,KAUV,IAAT+C,IAGFC,GAAe,EACfD,EAAM/C,EAAI,GAEC,KAATS,GAEkB,IAAd8C,EAAiBA,EAAWvD,EAA2B,IAAhByD,IAAmBA,EAAc,IACrD,IAAdF,IAGXE,GAAe,QAlBb,IAAKT,EAAc,CACjBQ,EAAYxD,EAAI,EAChB,KACF,CAwCN,OArBkB,IAAduD,IAA4B,IAATR,GAEP,IAAhBU,GAEgB,IAAhBA,GAAqBF,IAAaR,EAAM,GAAKQ,IAAaC,EAAY,GACvD,IAATT,IACiCmB,EAAIJ,KAAOI,EAAIH,KAAhC,IAAdP,GAAmB5B,EAAkCzB,EAAKe,MAAM,EAAG6B,GAAgC5C,EAAKe,MAAMsC,EAAWT,KAG7G,IAAdS,GAAmB5B,GACrBsC,EAAIH,KAAO5D,EAAKe,MAAM,EAAGqC,GACzBW,EAAIJ,KAAO3D,EAAKe,MAAM,EAAG6B,KAEzBmB,EAAIH,KAAO5D,EAAKe,MAAMsC,EAAWD,GACjCW,EAAIJ,KAAO3D,EAAKe,MAAMsC,EAAWT,IAEnCmB,EAAIhB,IAAM/C,EAAKe,MAAMqC,EAAUR,IAG7BS,EAAY,EAAGU,EAAIL,IAAM1D,EAAKe,MAAM,EAAGsC,EAAY,GAAY5B,IAAYsC,EAAIL,IAAM,KAElFK,CACT,EAEAN,IAAK,IACLO,UAAW,IACXC,MAAO,KACPjD,MAAO,MAGTA,EAAMA,MAAQA,EAEdvB,EAAOD,QAAUwB,C,cCjgBjB,G,oEAAuB,iBAAZO,QACV,EAAA2C,UAAiC,UAArB3C,QAAQ4C,cACd,GAAyB,iBAAdC,UAAwB,CACzC,IAAIC,EAAYD,UAAUC,UAC1B,EAAAH,UAAYG,EAAUC,QAAQ,YAAc,C,okBCZ7C,aAEMC,EAAiB,iBACjBC,EAAoB,MACpBC,EAAoB,QAE1B,SAASC,EAAaX,EAAUY,GAG/B,IAAKZ,EAAIa,QAAUD,EAClB,MAAM,IAAIE,MAAM,kEAA2Dd,EAAIe,UAAS,qBAAaf,EAAI/D,KAAI,sBAAc+D,EAAIgB,MAAK,yBAAiBhB,EAAIiB,SAAQ,OAKlK,GAAIjB,EAAIa,SAAWL,EAAeU,KAAKlB,EAAIa,QAC1C,MAAM,IAAIC,MAAM,mDAQjB,GAAId,EAAI/D,KACP,GAAI+D,EAAIe,WACP,IAAKN,EAAkBS,KAAKlB,EAAI/D,MAC/B,MAAM,IAAI6E,MAAM,iJAGjB,GAAIJ,EAAkBQ,KAAKlB,EAAI/D,MAC9B,MAAM,IAAI6E,MAAM,4HAIpB,CAkCA,IAAMK,EAAS,GACTC,EAAS,IACTC,EAAU,+DAkBhB,aA2DC,WAAsBC,EAAsCP,EAAoB9E,EAAe+E,EAAgBC,EAAmBL,QAAA,IAAAA,IAAAA,GAAA,GAErG,iBAAjBU,GACVvF,KAAK8E,OAASS,EAAaT,QAAUM,EACrCpF,KAAKgF,UAAYO,EAAaP,WAAaI,EAC3CpF,KAAKE,KAAOqF,EAAarF,MAAQkF,EACjCpF,KAAKiF,MAAQM,EAAaN,OAASG,EACnCpF,KAAKkF,SAAWK,EAAaL,UAAYE,IAKzCpF,KAAK8E,OAvHR,SAAoBA,EAAgBD,GACnC,OAAKC,GAAWD,EAGTC,EAFC,MAGT,CAkHiBU,CAAWD,EAAcV,GACvC7E,KAAKgF,UAAYA,GAAaI,EAC9BpF,KAAKE,KAjHR,SAA8B4E,EAAgB5E,GAM7C,OAAQ4E,GACP,IAAK,QACL,IAAK,OACL,IAAK,OACC5E,EAEMA,EAAK,KAAOmF,IACtBnF,EAAOmF,EAASnF,GAFhBA,EAAOmF,EAMV,OAAOnF,CACR,CA+FeuF,CAAqBzF,KAAK8E,OAAQ5E,GAAQkF,GACtDpF,KAAKiF,MAAQA,GAASG,EACtBpF,KAAKkF,SAAWA,GAAYE,EAE5BR,EAAa5E,KAAM6E,GAErB,CA0MD,OAvRQ,EAAAa,MAAP,SAAaC,GACZ,OAAIA,aAAiBC,KAGhBD,GAGoC,iBAArBA,EAAOX,WACU,iBAApBW,EAAOT,UACS,iBAAhBS,EAAOzF,MACU,iBAAjByF,EAAOV,OACW,iBAAlBU,EAAOb,QACW,iBAAlBa,EAAOE,QACS,mBAAhBF,EAAOG,MACa,mBAApBH,EAAOI,QACzB,EA0FA,sBAAI,qBAAM,C,IAAV,WAIC,OAAOC,EAAYhG,MAAM,EAC1B,E,gCAIA,YAAA8F,KAAA,SAAKG,GAEJ,IAAKA,EACJ,OAAOjG,KAGF,IAAA8E,EAA6CmB,EAAM,OAA3CjB,EAAqCiB,EAAM,UAAhC/F,EAA0B+F,EAAM,KAA1BhB,EAAoBgB,EAAM,MAAnBf,EAAae,EAAM,SA2BzD,YA1BezE,IAAXsD,EACHA,EAAS9E,KAAK8E,OACO,OAAXA,IACVA,EAASM,QAEQ5D,IAAdwD,EACHA,EAAYhF,KAAKgF,UACO,OAAdA,IACVA,EAAYI,QAEA5D,IAATtB,EACHA,EAAOF,KAAKE,KACO,OAATA,IACVA,EAAOkF,QAEM5D,IAAVyD,EACHA,EAAQjF,KAAKiF,MACO,OAAVA,IACVA,EAAQG,QAEQ5D,IAAb0D,EACHA,EAAWlF,KAAKkF,SACO,OAAbA,IACVA,EAAWE,GAGRN,IAAW9E,KAAK8E,QAChBE,IAAchF,KAAKgF,WACnB9E,IAASF,KAAKE,MACd+E,IAAUjF,KAAKiF,OACfC,IAAalF,KAAKkF,SAEdlF,KAGD,IAAIkG,EAAIpB,EAAQE,EAAW9E,EAAM+E,EAAOC,EAChD,EAUO,EAAAlB,MAAP,SAAamC,EAAetB,QAAA,IAAAA,IAAAA,GAAA,GAC3B,IAAMuB,EAAQd,EAAQe,KAAKF,GAC3B,OAAKC,EAGE,IAAIF,EACVE,EAAM,IAAMhB,EACZkB,EAAcF,EAAM,IAAMhB,GAC1BkB,EAAcF,EAAM,IAAMhB,GAC1BkB,EAAcF,EAAM,IAAMhB,GAC1BkB,EAAcF,EAAM,IAAMhB,GAC1BP,GARO,IAAIqB,EAAId,EAAQA,EAAQA,EAAQA,EAAQA,EAUjD,EAuBO,EAAAmB,KAAP,SAAYrG,GAEX,IAAI8E,EAAYI,EAWhB,GANI,EAAAhB,YACHlE,EAAOA,EAAKsG,QAAQ,MAAOnB,IAKxBnF,EAAK,KAAOmF,GAAUnF,EAAK,KAAOmF,EAAQ,CAC7C,IAAMoB,EAAMvG,EAAKsE,QAAQa,EAAQ,IACpB,IAAToB,GACHzB,EAAY9E,EAAKwG,UAAU,GAC3BxG,EAAOmF,IAEPL,EAAY9E,EAAKwG,UAAU,EAAGD,GAC9BvG,EAAOA,EAAKwG,UAAUD,IAAQpB,E,CAIhC,OAAO,IAAIa,EAAI,OAAQlB,EAAW9E,EAAMkF,EAAQA,EACjD,EAEO,EAAAnD,KAAP,SAAY0E,GACX,IAAMC,EAAS,IAAIV,EAClBS,EAAW7B,OACX6B,EAAW3B,UACX2B,EAAWzG,KACXyG,EAAW1B,MACX0B,EAAWzB,UAGZ,OADAN,EAAagC,GAAQ,GACdA,CACR,EAeA,YAAAb,SAAA,SAASc,GACR,YADQ,IAAAA,IAAAA,GAAA,GACDC,EAAa9G,KAAM6G,EAC3B,EAEA,YAAAE,OAAA,WACC,OAAO/G,IACR,EAMO,EAAAgH,OAAP,SAAcC,GACb,GAAKA,EAEE,IAAIA,aAAgBrB,EAC1B,OAAOqB,EAEP,IAAML,EAAS,IAAIV,EAAIe,GAGvB,OAFAL,EAAOM,WAAwBD,EAAME,SACrCP,EAAOQ,QAAqBH,EAAMI,OAASC,EAA4BL,EAAMpB,OAAS,KAC/Ee,C,CAPP,OAAYK,CASd,EACD,EAzRA,GAAa,EAAArB,IAAAA,EA0Sb,IAAM0B,EAAiB,EAAAlD,UAAY,OAAI5C,EAGvC,yE,OAEC,EAAA0F,WAA4B,KAC5B,EAAAE,QAAyB,K,CAmD1B,QAtDkB,OAKjB,sBAAa,qBAAM,C,IAAnB,WAIC,OAHKpH,KAAKoH,UACTpH,KAAKoH,QAAUpB,EAAYhG,MAAM,IAE3BA,KAAKoH,OACb,E,gCAES,YAAArB,SAAT,SAAkBc,GACjB,YADiB,IAAAA,IAAAA,GAAA,GACZA,EAOGC,EAAa9G,MAAM,IANrBA,KAAKkH,aACTlH,KAAKkH,WAAaJ,EAAa9G,MAAM,IAE/BA,KAAKkH,WAKd,EAES,YAAAH,OAAT,WACC,IAAMtG,EAAgB,CACrB8G,KAAM,GA0BP,OAvBIvH,KAAKoH,UACR3G,EAAIoF,OAAS7F,KAAKoH,QAClB3G,EAAI4G,KAAOC,GAERtH,KAAKkH,aACRzG,EAAI0G,SAAWnH,KAAKkH,YAGjBlH,KAAKE,OACRO,EAAIP,KAAOF,KAAKE,MAEbF,KAAK8E,SACRrE,EAAIqE,OAAS9E,KAAK8E,QAEf9E,KAAKgF,YACRvE,EAAIuE,UAAYhF,KAAKgF,WAElBhF,KAAKiF,QACRxE,EAAIwE,MAAQjF,KAAKiF,OAEdjF,KAAKkF,WACRzE,EAAIyE,SAAWlF,KAAKkF,UAEdzE,CACR,EACD,EAtDA,CAAkBmF,GAyDZ4B,IAAW,MAChB,IAAkB,MAClB,MAAkB,MAClB,MAAyB,MACzB,MAAiB,MACjB,MAA8B,MAC9B,MAA+B,MAC/B,MAAmB,MAEnB,MAA4B,MAC5B,MAAuB,MACvB,MAAsB,MACtB,MAAwB,MACxB,MAAsB,MACtB,MAAuB,MACvB,MAAqB,MACrB,MAAiB,MACjB,MAAkB,MAClB,MAAsB,MACtB,MAAmB,MAEnB,MAAkB,M,GAGnB,SAASC,EAAuBC,EAAsBC,EAAiBC,GAItE,IAHA,IAAInH,OAA0Be,EAC1BqG,GAAmB,EAEdC,EAAM,EAAGA,EAAMJ,EAAa7G,OAAQiH,IAAO,CACnD,IAAMtH,EAAOkH,EAAa5G,WAAWgH,GAGrC,GACEtH,GAAQ,IAAcA,GAAQ,KAC3BA,GAAQ,IAAcA,GAAQ,IAC9BA,GAAQ,IAAmBA,GAAQ,IAC3B,KAATA,GACS,KAATA,GACS,KAATA,GACS,MAATA,GACCmH,GAAmB,KAATnH,GACVoH,GAAwB,KAATpH,GACfoH,GAAwB,KAATpH,GACfoH,GAAwB,KAATpH,GAGM,IAArBqH,IACHpH,GAAOsH,mBAAmBL,EAAahB,UAAUmB,EAAiBC,IAClED,GAAmB,QAGRrG,IAARf,IACHA,GAAOiH,EAAaM,OAAOF,QAGtB,MAEMtG,IAARf,IACHA,EAAMiH,EAAaO,OAAO,EAAGH,IAI9B,IAAMI,EAAUV,EAAYhH,QACZgB,IAAZ0G,IAGsB,IAArBL,IACHpH,GAAOsH,mBAAmBL,EAAahB,UAAUmB,EAAiBC,IAClED,GAAmB,GAIpBpH,GAAOyH,IAEwB,IAArBL,IAEVA,EAAkBC,E,EASrB,OAJyB,IAArBD,IACHpH,GAAOsH,mBAAmBL,EAAahB,UAAUmB,UAGnCrG,IAARf,EAAoBA,EAAMiH,CAClC,CAEA,SAASS,EAA0BjI,GAElC,IADA,IAAIO,OAA0Be,EACrBsG,EAAM,EAAGA,EAAM5H,EAAKW,OAAQiH,IAAO,CAC3C,IAAMtH,EAAON,EAAKY,WAAWgH,GAChB,KAATtH,GAAmC,KAATA,QACjBgB,IAARf,IACHA,EAAMP,EAAK+H,OAAO,EAAGH,IAEtBrH,GAAO+G,EAAYhH,SAEPgB,IAARf,IACHA,GAAOP,EAAK4H,G,CAIf,YAAetG,IAARf,EAAoBA,EAAMP,CAClC,CAKA,SAAgB8F,EAAYoC,EAAUC,GAErC,IAAIlC,EAsBJ,OAnBCA,EAFGiC,EAAIpD,WAAaoD,EAAIlI,KAAKW,OAAS,GAAoB,SAAfuH,EAAItD,OAEvC,YAAKsD,EAAIpD,WAAS,OAAGoD,EAAIlI,MAEN,KAA3BkI,EAAIlI,KAAKY,WAAW,KAChBsH,EAAIlI,KAAKY,WAAW,IAAM,IAAcsH,EAAIlI,KAAKY,WAAW,IAAM,IAAcsH,EAAIlI,KAAKY,WAAW,IAAM,IAAcsH,EAAIlI,KAAKY,WAAW,IAAM,MACxH,KAA3BsH,EAAIlI,KAAKY,WAAW,GAElBuH,EAIID,EAAIlI,KAAK+H,OAAO,GAFhBG,EAAIlI,KAAK,GAAGoI,cAAgBF,EAAIlI,KAAK+H,OAAO,GAM7CG,EAAIlI,KAET,EAAAkE,YACH+B,EAAQA,EAAMK,QAAQ,MAAO,OAEvBL,CACR,CAKA,SAASW,EAAasB,EAAUvB,GAE/B,IAAM0B,EAAW1B,EAEdsB,EADAV,EAGChH,EAAM,GACJqE,EAA6CsD,EAAG,OAAxCpD,EAAqCoD,EAAG,UAA7BlI,EAA0BkI,EAAG,KAAvBnD,EAAoBmD,EAAG,MAAhBlD,EAAakD,EAAG,SAStD,GARItD,IACHrE,GAAOqE,EACPrE,GAAO,MAEJuE,GAAwB,SAAXF,KAChBrE,GAAO4E,EACP5E,GAAO4E,GAEJL,EAAW,CACd,IAAIyB,EAAMzB,EAAUR,QAAQ,KAC5B,IAAa,IAATiC,EAAY,CAEf,IAAM+B,EAAWxD,EAAUiD,OAAO,EAAGxB,GACrCzB,EAAYA,EAAUiD,OAAOxB,EAAM,IAEtB,KADbA,EAAM+B,EAASxH,YAAY,MAE1BP,GAAO8H,EAAQC,GAAU,GAAO,IAGhC/H,GAAO8H,EAAQC,EAASP,OAAO,EAAGxB,IAAM,GAAO,GAC/ChG,GAAO,IACPA,GAAO8H,EAAQC,EAASP,OAAOxB,EAAM,IAAI,GAAO,IAEjDhG,GAAO,G,EAIK,KADbgG,GADAzB,EAAYA,EAAUsD,eACNtH,YAAY,MAE3BP,GAAO8H,EAAQvD,GAAW,GAAO,IAGjCvE,GAAO8H,EAAQvD,EAAUiD,OAAO,EAAGxB,IAAM,GAAO,GAChDhG,GAAOuE,EAAUiD,OAAOxB,G,CAG1B,GAAIvG,EAAM,CAET,GAAIA,EAAKW,QAAU,GAA4B,KAAvBX,EAAKY,WAAW,IAAgD,KAAvBZ,EAAKY,WAAW,IAC1EN,EAAON,EAAKY,WAAW,KACjB,IAAcN,GAAQ,KACjCN,EAAO,WAAIuI,OAAOC,aAAalI,EAAO,IAAG,YAAIN,EAAK+H,OAAO,UAEpD,GAAI/H,EAAKW,QAAU,GAA4B,KAAvBX,EAAKY,WAAW,GAAuB,CACrE,IAAMN,KAAON,EAAKY,WAAW,KACjB,IAAcN,GAAQ,KACjCN,EAAO,UAAGuI,OAAOC,aAAalI,EAAO,IAAG,YAAIN,EAAK+H,OAAO,I,CAI1DxH,GAAO8H,EAAQrI,GAAM,GAAM,E,CAU5B,OARI+E,IACHxE,GAAO,IACPA,GAAO8H,EAAQtD,GAAO,GAAO,IAE1BC,IACHzE,GAAO,IACPA,GAAQoG,EAAgE3B,EAAjDuC,EAAuBvC,GAAU,GAAO,IAEzDzE,CACR,CAIA,SAASkI,EAA2BC,GACnC,IACC,OAAOC,mBAAmBD,E,CACzB,SACD,OAAIA,EAAI/H,OAAS,EACT+H,EAAIX,OAAO,EAAG,GAAKU,EAA2BC,EAAIX,OAAO,IAEzDW,C,CAGV,CAhHA,gBAkHA,IAAME,EAAiB,8BAEvB,SAASxC,EAAcsC,GACtB,OAAKA,EAAIxC,MAAM0C,GAGRF,EAAIpC,QAAQsC,GAAgB,SAAC1C,GAAU,OAAAuC,EAA2BvC,EAA3B,IAFtCwC,CAGT,C,sTCnqBA,IAKiBG,EALjB,SAEMC,EAAYC,EAAS/H,OAAS+H,EAC9BC,EAAQ,KAEGH,EAAA,EAAAA,QAAA,EAAAA,MAAK,KAeFI,SAAhB,SAAyBf,G,IAAU,wDAC/B,OAAOA,EAAItC,KAAK,CAAE5F,KAAM8I,EAAUnH,KAAI,MAAdmH,EAAS,GAAMZ,EAAIlI,MAASkJ,GAAK,KAC7D,EAgBgB,EAAAC,YAAhB,SAA4BjB,G,IAAU,wDAClC,IAAIlI,EAAOkI,EAAIlI,KACXoJ,GAAa,EACbpJ,EAAK,KAAOgJ,IACZhJ,EAAOgJ,EAAQhJ,EACfoJ,GAAa,GAEjB,IAAIjI,EAAe2H,EAAU7H,QAAO,MAAjB6H,EAAS,GAAS9I,GAASkJ,GAAK,IAInD,OAHIE,GAAcjI,EAAa,KAAO6H,IAAUd,EAAIpD,YAChD3D,EAAeA,EAAaqF,UAAU,IAEnC0B,EAAItC,KAAK,CAAE5F,KAAMmB,GAC5B,EAUgB,EAAAuB,QAAhB,SAAwBwF,GACpB,GAAwB,IAApBA,EAAIlI,KAAKW,QAAgBuH,EAAIlI,OAASgJ,EACtC,OAAOd,EAEX,IAAIlI,EAAO8I,EAAUpG,QAAQwF,EAAIlI,MAIjC,OAHoB,IAAhBA,EAAKW,QAAuC,KAAvBX,EAAKY,WAAW,KACrCZ,EAAO,IAEJkI,EAAItC,KAAK,CAAE5F,KAAI,GAC1B,EAUgB,EAAA8C,SAAhB,SAAyBoF,GACrB,OAAOY,EAAUhG,SAASoF,EAAIlI,KAClC,EAUgB,EAAAmD,QAAhB,SAAwB+E,GACpB,OAAOY,EAAU3F,QAAQ+E,EAAIlI,KACjC,C,GCrGAqJ,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBjI,IAAjBkI,EACH,OAAOA,EAAahK,QAGrB,IAAIC,EAAS4J,EAAyBE,GAAY,CAGjD/J,QAAS,CAAC,GAOX,OAHAiK,EAAoBF,GAAUG,KAAKjK,EAAOD,QAASC,EAAQA,EAAOD,QAAS8J,GAGpE7J,EAAOD,OACf,C,mGChBA,aAGS,mEAHA,EAAAkG,GAAG,IACZ,aAEc,qEAFL,EAAAmD,KAAK,G","sources":["webpack://vscode-uri/webpack/universalModuleDefinition","webpack://vscode-uri/./node_modules/path-browserify/index.js","webpack://vscode-uri/./src/platform.ts","webpack://vscode-uri/./src/uri.ts","webpack://vscode-uri/./src/utils.ts","webpack://vscode-uri/webpack/bootstrap","webpack://vscode-uri/./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, () => {\nreturn ","// 'path' module extracted from Node.js v8.11.1 (only the posix part)\n// transplited with Babel\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));\n }\n}\n\n// Resolves . and .. elements in a path with directory names\nfunction normalizeStringPosix(path, allowAboveRoot) {\n var res = '';\n var lastSegmentLength = 0;\n var lastSlash = -1;\n var dots = 0;\n var code;\n for (var i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = path.charCodeAt(i);\n else if (code === 47 /*/*/)\n break;\n else\n code = 47 /*/*/;\n if (code === 47 /*/*/) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n if (res.length > 2) {\n var lastSlashIndex = res.lastIndexOf('/');\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n } else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0)\n res += '/..';\n else\n res = '..';\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0)\n res += '/' + path.slice(lastSlash + 1, i);\n else\n res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\nfunction _format(sep, pathObject) {\n var dir = pathObject.dir || pathObject.root;\n var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');\n if (!dir) {\n return base;\n }\n if (dir === pathObject.root) {\n return dir + base;\n }\n return dir + sep + base;\n}\n\nvar posix = {\n // path.resolve([from ...], to)\n resolve: function resolve() {\n var resolvedPath = '';\n var resolvedAbsolute = false;\n var cwd;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path;\n if (i >= 0)\n path = arguments[i];\n else {\n if (cwd === undefined)\n cwd = process.cwd();\n path = cwd;\n }\n\n assertPath(path);\n\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0)\n return '/' + resolvedPath;\n else\n return '/';\n } else if (resolvedPath.length > 0) {\n return resolvedPath;\n } else {\n return '.';\n }\n },\n\n normalize: function normalize(path) {\n assertPath(path);\n\n if (path.length === 0) return '.';\n\n var isAbsolute = path.charCodeAt(0) === 47 /*/*/;\n var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;\n\n // Normalize the path\n path = normalizeStringPosix(path, !isAbsolute);\n\n if (path.length === 0 && !isAbsolute) path = '.';\n if (path.length > 0 && trailingSeparator) path += '/';\n\n if (isAbsolute) return '/' + path;\n return path;\n },\n\n isAbsolute: function isAbsolute(path) {\n assertPath(path);\n return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;\n },\n\n join: function join() {\n if (arguments.length === 0)\n return '.';\n var joined;\n for (var i = 0; i < arguments.length; ++i) {\n var arg = arguments[i];\n assertPath(arg);\n if (arg.length > 0) {\n if (joined === undefined)\n joined = arg;\n else\n joined += '/' + arg;\n }\n }\n if (joined === undefined)\n return '.';\n return posix.normalize(joined);\n },\n\n relative: function relative(from, to) {\n assertPath(from);\n assertPath(to);\n\n if (from === to) return '';\n\n from = posix.resolve(from);\n to = posix.resolve(to);\n\n if (from === to) return '';\n\n // Trim any leading backslashes\n var fromStart = 1;\n for (; fromStart < from.length; ++fromStart) {\n if (from.charCodeAt(fromStart) !== 47 /*/*/)\n break;\n }\n var fromEnd = from.length;\n var fromLen = fromEnd - fromStart;\n\n // Trim any leading backslashes\n var toStart = 1;\n for (; toStart < to.length; ++toStart) {\n if (to.charCodeAt(toStart) !== 47 /*/*/)\n break;\n }\n var toEnd = to.length;\n var toLen = toEnd - toStart;\n\n // Compare paths to find the longest common path from root\n var length = fromLen < toLen ? fromLen : toLen;\n var lastCommonSep = -1;\n var i = 0;\n for (; i <= length; ++i) {\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === 47 /*/*/) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n } else if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n } else if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === 47 /*/*/) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n } else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo'; to='/'\n lastCommonSep = 0;\n }\n }\n break;\n }\n var fromCode = from.charCodeAt(fromStart + i);\n var toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode)\n break;\n else if (fromCode === 47 /*/*/)\n lastCommonSep = i;\n }\n\n var out = '';\n // Generate the relative path based on the path difference between `to`\n // and `from`\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {\n if (out.length === 0)\n out += '..';\n else\n out += '/..';\n }\n }\n\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0)\n return out + to.slice(toStart + lastCommonSep);\n else {\n toStart += lastCommonSep;\n if (to.charCodeAt(toStart) === 47 /*/*/)\n ++toStart;\n return to.slice(toStart);\n }\n },\n\n _makeLong: function _makeLong(path) {\n return path;\n },\n\n dirname: function dirname(path) {\n assertPath(path);\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) return '//';\n return path.slice(0, end);\n },\n\n basename: function basename(path, ext) {\n if (ext !== undefined && typeof ext !== 'string') throw new TypeError('\"ext\" argument must be a string');\n assertPath(path);\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext.length === path.length && ext === path) return '';\n var extIdx = ext.length - 1;\n var firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n\n if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;\n return path.slice(start, end);\n } else {\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n }\n },\n\n extname: function extname(path) {\n assertPath(path);\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n },\n\n format: function format(pathObject) {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new TypeError('The \"pathObject\" argument must be of type Object. Received type ' + typeof pathObject);\n }\n return _format('/', pathObject);\n },\n\n parse: function parse(path) {\n assertPath(path);\n\n var ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) return ret;\n var code = path.charCodeAt(0);\n var isAbsolute = code === 47 /*/*/;\n var start;\n if (isAbsolute) {\n ret.root = '/';\n start = 1;\n } else {\n start = 0;\n }\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n var i = path.length - 1;\n\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n\n // Get non-dir info\n for (; i >= start; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);\n }\n } else {\n if (startPart === 0 && isAbsolute) {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n\n if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';\n\n return ret;\n },\n\n sep: '/',\n delimiter: ':',\n win32: null,\n posix: null\n};\n\nposix.posix = posix;\n\nmodule.exports = posix;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\n// !!!!!\n// SEE https://github.com/microsoft/vscode/blob/master/src/vs/base/common/platform.ts\n// !!!!!\n\ndeclare const process: { platform: 'win32' };\ndeclare const navigator: { userAgent: string };\n\nexport let isWindows: boolean;\n\nif (typeof process === 'object') {\n\tisWindows = process.platform === 'win32';\n} else if (typeof navigator === 'object') {\n\tlet userAgent = navigator.userAgent;\n\tisWindows = userAgent.indexOf('Windows') >= 0;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nimport { CharCode } from './charCode'\nimport { isWindows } from './platform';\n\nconst _schemePattern = /^\\w[\\w\\d+.-]*$/;\nconst _singleSlashStart = /^\\//;\nconst _doubleSlashStart = /^\\/\\//;\n\nfunction _validateUri(ret: URI, _strict?: boolean): void {\n\n\t// scheme, must be set\n\tif (!ret.scheme && _strict) {\n\t\tthrow new Error(`[UriError]: Scheme is missing: {scheme: \"\", authority: \"${ret.authority}\", path: \"${ret.path}\", query: \"${ret.query}\", fragment: \"${ret.fragment}\"}`);\n\t}\n\n\t// scheme, https://tools.ietf.org/html/rfc3986#section-3.1\n\t// ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\n\tif (ret.scheme && !_schemePattern.test(ret.scheme)) {\n\t\tthrow new Error('[UriError]: Scheme contains illegal characters.');\n\t}\n\n\t// path, http://tools.ietf.org/html/rfc3986#section-3.3\n\t// If a URI contains an authority component, then the path component\n\t// must either be empty or begin with a slash (\"/\") character. If a URI\n\t// does not contain an authority component, then the path cannot begin\n\t// with two slash characters (\"//\").\n\tif (ret.path) {\n\t\tif (ret.authority) {\n\t\t\tif (!_singleSlashStart.test(ret.path)) {\n\t\t\t\tthrow new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character');\n\t\t\t}\n\t\t} else {\n\t\t\tif (_doubleSlashStart.test(ret.path)) {\n\t\t\t\tthrow new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")');\n\t\t\t}\n\t\t}\n\t}\n}\n\n// for a while we allowed uris *without* schemes and this is the migration\n// for them, e.g. an uri without scheme and without strict-mode warns and falls\n// back to the file-scheme. that should cause the least carnage and still be a\n// clear warning\nfunction _schemeFix(scheme: string, _strict: boolean): string {\n\tif (!scheme && !_strict) {\n\t\treturn 'file';\n\t}\n\treturn scheme;\n}\n\n// implements a bit of https://tools.ietf.org/html/rfc3986#section-5\nfunction _referenceResolution(scheme: string, path: string): string {\n\n\t// the slash-character is our 'default base' as we don't\n\t// support constructing URIs relative to other URIs. This\n\t// also means that we alter and potentially break paths.\n\t// see https://tools.ietf.org/html/rfc3986#section-5.1.4\n\tswitch (scheme) {\n\t\tcase 'https':\n\t\tcase 'http':\n\t\tcase 'file':\n\t\t\tif (!path) {\n\t\t\t\tpath = _slash;\n\t\t\t} else if (path[0] !== _slash) {\n\t\t\t\tpath = _slash + path;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn path;\n}\n\nconst _empty = '';\nconst _slash = '/';\nconst _regexp = /^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\n\n/**\n * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.\n * This class is a simple parser which creates the basic component parts\n * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation\n * and encoding.\n *\n * ```txt\n * foo://example.com:8042/over/there?name=ferret#nose\n * \\_/ \\______________/\\_________/ \\_________/ \\__/\n * | | | | |\n * scheme authority path query fragment\n * | _____________________|__\n * / \\ / \\\n * urn:example:animal:ferret:nose\n * ```\n */\nexport class URI implements UriComponents {\n\n\tstatic isUri(thing: any): thing is URI {\n\t\tif (thing instanceof URI) {\n\t\t\treturn true;\n\t\t}\n\t\tif (!thing) {\n\t\t\treturn false;\n\t\t}\n\t\treturn typeof (thing).authority === 'string'\n\t\t\t&& typeof (thing).fragment === 'string'\n\t\t\t&& typeof (thing).path === 'string'\n\t\t\t&& typeof (thing).query === 'string'\n\t\t\t&& typeof (thing).scheme === 'string'\n\t\t\t&& typeof (thing).fsPath === 'string'\n\t\t\t&& typeof (thing).with === 'function'\n\t\t\t&& typeof (thing).toString === 'function';\n\t}\n\n\t/**\n\t * scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.\n\t * The part before the first colon.\n\t */\n\treadonly scheme: string;\n\n\t/**\n\t * authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'.\n\t * The part between the first double slashes and the next slash.\n\t */\n\treadonly authority: string;\n\n\t/**\n\t * path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly path: string;\n\n\t/**\n\t * query is the 'query' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly query: string;\n\n\t/**\n\t * fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly fragment: string;\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean);\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(components: UriComponents);\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(schemeOrData: string | UriComponents, authority?: string, path?: string, query?: string, fragment?: string, _strict: boolean = false) {\n\n\t\tif (typeof schemeOrData === 'object') {\n\t\t\tthis.scheme = schemeOrData.scheme || _empty;\n\t\t\tthis.authority = schemeOrData.authority || _empty;\n\t\t\tthis.path = schemeOrData.path || _empty;\n\t\t\tthis.query = schemeOrData.query || _empty;\n\t\t\tthis.fragment = schemeOrData.fragment || _empty;\n\t\t\t// no validation because it's this URI\n\t\t\t// that creates uri components.\n\t\t\t// _validateUri(this);\n\t\t} else {\n\t\t\tthis.scheme = _schemeFix(schemeOrData, _strict);\n\t\t\tthis.authority = authority || _empty;\n\t\t\tthis.path = _referenceResolution(this.scheme, path || _empty);\n\t\t\tthis.query = query || _empty;\n\t\t\tthis.fragment = fragment || _empty;\n\n\t\t\t_validateUri(this, _strict);\n\t\t}\n\t}\n\n\t// ---- filesystem path -----------------------\n\n\t/**\n\t * Returns a string representing the corresponding file system path of this URI.\n\t * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the\n\t * platform specific path separator.\n\t *\n\t * * Will *not* validate the path for invalid characters and semantics.\n\t * * Will *not* look at the scheme of this URI.\n\t * * The result shall *not* be used for display purposes but for accessing a file on disk.\n\t *\n\t *\n\t * The *difference* to `URI#path` is the use of the platform specific separator and the handling\n\t * of UNC paths. See the below sample of a file-uri with an authority (UNC path).\n\t *\n\t * ```ts\n\t\tconst u = URI.parse('file://server/c$/folder/file.txt')\n\t\tu.authority === 'server'\n\t\tu.path === '/shares/c$/file.txt'\n\t\tu.fsPath === '\\\\server\\c$\\folder\\file.txt'\n\t```\n\t *\n\t * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,\n\t * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working\n\t * with URIs that represent files on disk (`file` scheme).\n\t */\n\tget fsPath(): string {\n\t\t// if (this.scheme !== 'file') {\n\t\t// \tconsole.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);\n\t\t// }\n\t\treturn uriToFsPath(this, false);\n\t}\n\n\t// ---- modify to new -------------------------\n\n\twith(change: { scheme?: string; authority?: string | null; path?: string | null; query?: string | null; fragment?: string | null }): URI {\n\n\t\tif (!change) {\n\t\t\treturn this;\n\t\t}\n\n\t\tlet { scheme, authority, path, query, fragment } = change;\n\t\tif (scheme === undefined) {\n\t\t\tscheme = this.scheme;\n\t\t} else if (scheme === null) {\n\t\t\tscheme = _empty;\n\t\t}\n\t\tif (authority === undefined) {\n\t\t\tauthority = this.authority;\n\t\t} else if (authority === null) {\n\t\t\tauthority = _empty;\n\t\t}\n\t\tif (path === undefined) {\n\t\t\tpath = this.path;\n\t\t} else if (path === null) {\n\t\t\tpath = _empty;\n\t\t}\n\t\tif (query === undefined) {\n\t\t\tquery = this.query;\n\t\t} else if (query === null) {\n\t\t\tquery = _empty;\n\t\t}\n\t\tif (fragment === undefined) {\n\t\t\tfragment = this.fragment;\n\t\t} else if (fragment === null) {\n\t\t\tfragment = _empty;\n\t\t}\n\n\t\tif (scheme === this.scheme\n\t\t\t&& authority === this.authority\n\t\t\t&& path === this.path\n\t\t\t&& query === this.query\n\t\t\t&& fragment === this.fragment) {\n\n\t\t\treturn this;\n\t\t}\n\n\t\treturn new Uri(scheme, authority, path, query, fragment);\n\t}\n\n\t// ---- parse & validate ------------------------\n\n\t/**\n\t * Creates a new URI from a string, e.g. `http://www.example.com/some/path`,\n\t * `file:///usr/home`, or `scheme:with/path`.\n\t *\n\t * @param value A string which represents an URI (see `URI#toString`).\n\t */\n\tstatic parse(value: string, _strict: boolean = false): URI {\n\t\tconst match = _regexp.exec(value);\n\t\tif (!match) {\n\t\t\treturn new Uri(_empty, _empty, _empty, _empty, _empty);\n\t\t}\n\t\treturn new Uri(\n\t\t\tmatch[2] || _empty,\n\t\t\tpercentDecode(match[4] || _empty),\n\t\t\tpercentDecode(match[5] || _empty),\n\t\t\tpercentDecode(match[7] || _empty),\n\t\t\tpercentDecode(match[9] || _empty),\n\t\t\t_strict\n\t\t);\n\t}\n\n\t/**\n\t * Creates a new URI from a file system path, e.g. `c:\\my\\files`,\n\t * `/usr/home`, or `\\\\server\\share\\some\\path`.\n\t *\n\t * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument\n\t * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**\n\t * `URI.parse('file://' + path)` because the path might contain characters that are\n\t * interpreted (# and ?). See the following sample:\n\t * ```ts\n\tconst good = URI.file('/coding/c#/project1');\n\tgood.scheme === 'file';\n\tgood.path === '/coding/c#/project1';\n\tgood.fragment === '';\n\tconst bad = URI.parse('file://' + '/coding/c#/project1');\n\tbad.scheme === 'file';\n\tbad.path === '/coding/c'; // path is now broken\n\tbad.fragment === '/project1';\n\t```\n\t *\n\t * @param path A file system path (see `URI#fsPath`)\n\t */\n\tstatic file(path: string): URI {\n\n\t\tlet authority = _empty;\n\n\t\t// normalize to fwd-slashes on windows,\n\t\t// on other systems bwd-slashes are valid\n\t\t// filename character, eg /f\\oo/ba\\r.txt\n\t\tif (isWindows) {\n\t\t\tpath = path.replace(/\\\\/g, _slash);\n\t\t}\n\n\t\t// check for authority as used in UNC shares\n\t\t// or use the path as given\n\t\tif (path[0] === _slash && path[1] === _slash) {\n\t\t\tconst idx = path.indexOf(_slash, 2);\n\t\t\tif (idx === -1) {\n\t\t\t\tauthority = path.substring(2);\n\t\t\t\tpath = _slash;\n\t\t\t} else {\n\t\t\t\tauthority = path.substring(2, idx);\n\t\t\t\tpath = path.substring(idx) || _slash;\n\t\t\t}\n\t\t}\n\n\t\treturn new Uri('file', authority, path, _empty, _empty);\n\t}\n\n\tstatic from(components: { scheme: string; authority?: string; path?: string; query?: string; fragment?: string }): URI {\n\t\tconst result = new Uri(\n\t\t\tcomponents.scheme,\n\t\t\tcomponents.authority,\n\t\t\tcomponents.path,\n\t\t\tcomponents.query,\n\t\t\tcomponents.fragment,\n\t\t);\n\t\t_validateUri(result, true);\n\t\treturn result;\n\t}\n\n\t// ---- printing/externalize ---------------------------\n\n\t/**\n\t * Creates a string representation for this URI. It's guaranteed that calling\n\t * `URI.parse` with the result of this function creates an URI which is equal\n\t * to this URI.\n\t *\n\t * * The result shall *not* be used for display purposes but for externalization or transport.\n\t * * The result will be encoded using the percentage encoding and encoding happens mostly\n\t * ignore the scheme-specific encoding rules.\n\t *\n\t * @param skipEncoding Do not encode the result, default is `false`\n\t */\n\ttoString(skipEncoding: boolean = false): string {\n\t\treturn _asFormatted(this, skipEncoding);\n\t}\n\n\ttoJSON(): UriComponents {\n\t\treturn this;\n\t}\n\n\tstatic revive(data: UriComponents | URI): URI;\n\tstatic revive(data: UriComponents | URI | undefined): URI | undefined;\n\tstatic revive(data: UriComponents | URI | null): URI | null;\n\tstatic revive(data: UriComponents | URI | undefined | null): URI | undefined | null;\n\tstatic revive(data: UriComponents | URI | undefined | null): URI | undefined | null {\n\t\tif (!data) {\n\t\t\treturn data;\n\t\t} else if (data instanceof URI) {\n\t\t\treturn data;\n\t\t} else {\n\t\t\tconst result = new Uri(data);\n\t\t\tresult._formatted = (data).external;\n\t\t\tresult._fsPath = (data)._sep === _pathSepMarker ? (data).fsPath : null;\n\t\t\treturn result;\n\t\t}\n\t}\n}\n\nexport interface UriComponents {\n\tscheme: string;\n\tauthority: string;\n\tpath: string;\n\tquery: string;\n\tfragment: string;\n}\n\ninterface UriState extends UriComponents {\n\t$mid: number;\n\texternal: string;\n\tfsPath: string;\n\t_sep: 1 | undefined;\n}\n\nconst _pathSepMarker = isWindows ? 1 : undefined;\n\n// This class exists so that URI is compatible with vscode.Uri (API).\nclass Uri extends URI {\n\n\t_formatted: string | null = null;\n\t_fsPath: string | null = null;\n\n\toverride get fsPath(): string {\n\t\tif (!this._fsPath) {\n\t\t\tthis._fsPath = uriToFsPath(this, false);\n\t\t}\n\t\treturn this._fsPath;\n\t}\n\n\toverride toString(skipEncoding: boolean = false): string {\n\t\tif (!skipEncoding) {\n\t\t\tif (!this._formatted) {\n\t\t\t\tthis._formatted = _asFormatted(this, false);\n\t\t\t}\n\t\t\treturn this._formatted;\n\t\t} else {\n\t\t\t// we don't cache that\n\t\t\treturn _asFormatted(this, true);\n\t\t}\n\t}\n\n\toverride toJSON(): UriComponents {\n\t\tconst res = {\n\t\t\t$mid: 1\n\t\t};\n\t\t// cached state\n\t\tif (this._fsPath) {\n\t\t\tres.fsPath = this._fsPath;\n\t\t\tres._sep = _pathSepMarker;\n\t\t}\n\t\tif (this._formatted) {\n\t\t\tres.external = this._formatted;\n\t\t}\n\t\t// uri components\n\t\tif (this.path) {\n\t\t\tres.path = this.path;\n\t\t}\n\t\tif (this.scheme) {\n\t\t\tres.scheme = this.scheme;\n\t\t}\n\t\tif (this.authority) {\n\t\t\tres.authority = this.authority;\n\t\t}\n\t\tif (this.query) {\n\t\t\tres.query = this.query;\n\t\t}\n\t\tif (this.fragment) {\n\t\t\tres.fragment = this.fragment;\n\t\t}\n\t\treturn res;\n\t}\n}\n\n// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2\nconst encodeTable: { [ch: number]: string } = {\n\t[CharCode.Colon]: '%3A', // gen-delims\n\t[CharCode.Slash]: '%2F',\n\t[CharCode.QuestionMark]: '%3F',\n\t[CharCode.Hash]: '%23',\n\t[CharCode.OpenSquareBracket]: '%5B',\n\t[CharCode.CloseSquareBracket]: '%5D',\n\t[CharCode.AtSign]: '%40',\n\n\t[CharCode.ExclamationMark]: '%21', // sub-delims\n\t[CharCode.DollarSign]: '%24',\n\t[CharCode.Ampersand]: '%26',\n\t[CharCode.SingleQuote]: '%27',\n\t[CharCode.OpenParen]: '%28',\n\t[CharCode.CloseParen]: '%29',\n\t[CharCode.Asterisk]: '%2A',\n\t[CharCode.Plus]: '%2B',\n\t[CharCode.Comma]: '%2C',\n\t[CharCode.Semicolon]: '%3B',\n\t[CharCode.Equals]: '%3D',\n\n\t[CharCode.Space]: '%20',\n};\n\nfunction encodeURIComponentFast(uriComponent: string, isPath: boolean, isAuthority: boolean): string {\n\tlet res: string | undefined = undefined;\n\tlet nativeEncodePos = -1;\n\n\tfor (let pos = 0; pos < uriComponent.length; pos++) {\n\t\tconst code = uriComponent.charCodeAt(pos);\n\n\t\t// unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3\n\t\tif (\n\t\t\t(code >= CharCode.a && code <= CharCode.z)\n\t\t\t|| (code >= CharCode.A && code <= CharCode.Z)\n\t\t\t|| (code >= CharCode.Digit0 && code <= CharCode.Digit9)\n\t\t\t|| code === CharCode.Dash\n\t\t\t|| code === CharCode.Period\n\t\t\t|| code === CharCode.Underline\n\t\t\t|| code === CharCode.Tilde\n\t\t\t|| (isPath && code === CharCode.Slash)\n\t\t\t|| (isAuthority && code === CharCode.OpenSquareBracket)\n\t\t\t|| (isAuthority && code === CharCode.CloseSquareBracket)\n\t\t\t|| (isAuthority && code === CharCode.Colon)\n\t\t) {\n\t\t\t// check if we are delaying native encode\n\t\t\tif (nativeEncodePos !== -1) {\n\t\t\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n\t\t\t\tnativeEncodePos = -1;\n\t\t\t}\n\t\t\t// check if we write into a new string (by default we try to return the param)\n\t\t\tif (res !== undefined) {\n\t\t\t\tres += uriComponent.charAt(pos);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// encoding needed, we need to allocate a new string\n\t\t\tif (res === undefined) {\n\t\t\t\tres = uriComponent.substr(0, pos);\n\t\t\t}\n\n\t\t\t// check with default table first\n\t\t\tconst escaped = encodeTable[code];\n\t\t\tif (escaped !== undefined) {\n\n\t\t\t\t// check if we are delaying native encode\n\t\t\t\tif (nativeEncodePos !== -1) {\n\t\t\t\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n\t\t\t\t\tnativeEncodePos = -1;\n\t\t\t\t}\n\n\t\t\t\t// append escaped variant to result\n\t\t\t\tres += escaped;\n\n\t\t\t} else if (nativeEncodePos === -1) {\n\t\t\t\t// use native encode only when needed\n\t\t\t\tnativeEncodePos = pos;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (nativeEncodePos !== -1) {\n\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos));\n\t}\n\n\treturn res !== undefined ? res : uriComponent;\n}\n\nfunction encodeURIComponentMinimal(path: string): string {\n\tlet res: string | undefined = undefined;\n\tfor (let pos = 0; pos < path.length; pos++) {\n\t\tconst code = path.charCodeAt(pos);\n\t\tif (code === CharCode.Hash || code === CharCode.QuestionMark) {\n\t\t\tif (res === undefined) {\n\t\t\t\tres = path.substr(0, pos);\n\t\t\t}\n\t\t\tres += encodeTable[code];\n\t\t} else {\n\t\t\tif (res !== undefined) {\n\t\t\t\tres += path[pos];\n\t\t\t}\n\t\t}\n\t}\n\treturn res !== undefined ? res : path;\n}\n\n/**\n * Compute `fsPath` for the given uri\n */\nexport function uriToFsPath(uri: URI, keepDriveLetterCasing: boolean): string {\n\n\tlet value: string;\n\tif (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {\n\t\t// unc path: file://shares/c$/far/boo\n\t\tvalue = `//${uri.authority}${uri.path}`;\n\t} else if (\n\t\turi.path.charCodeAt(0) === CharCode.Slash\n\t\t&& (uri.path.charCodeAt(1) >= CharCode.A && uri.path.charCodeAt(1) <= CharCode.Z || uri.path.charCodeAt(1) >= CharCode.a && uri.path.charCodeAt(1) <= CharCode.z)\n\t\t&& uri.path.charCodeAt(2) === CharCode.Colon\n\t) {\n\t\tif (!keepDriveLetterCasing) {\n\t\t\t// windows drive letter: file:///c:/far/boo\n\t\t\tvalue = uri.path[1].toLowerCase() + uri.path.substr(2);\n\t\t} else {\n\t\t\tvalue = uri.path.substr(1);\n\t\t}\n\t} else {\n\t\t// other path\n\t\tvalue = uri.path;\n\t}\n\tif (isWindows) {\n\t\tvalue = value.replace(/\\//g, '\\\\');\n\t}\n\treturn value;\n}\n\n/**\n * Create the external version of a uri\n */\nfunction _asFormatted(uri: URI, skipEncoding: boolean): string {\n\n\tconst encoder = !skipEncoding\n\t\t? encodeURIComponentFast\n\t\t: encodeURIComponentMinimal;\n\n\tlet res = '';\n\tlet { scheme, authority, path, query, fragment } = uri;\n\tif (scheme) {\n\t\tres += scheme;\n\t\tres += ':';\n\t}\n\tif (authority || scheme === 'file') {\n\t\tres += _slash;\n\t\tres += _slash;\n\t}\n\tif (authority) {\n\t\tlet idx = authority.indexOf('@');\n\t\tif (idx !== -1) {\n\t\t\t// @\n\t\t\tconst userinfo = authority.substr(0, idx);\n\t\t\tauthority = authority.substr(idx + 1);\n\t\t\tidx = userinfo.lastIndexOf(':');\n\t\t\tif (idx === -1) {\n\t\t\t\tres += encoder(userinfo, false, false);\n\t\t\t} else {\n\t\t\t\t// :@\n\t\t\t\tres += encoder(userinfo.substr(0, idx), false, false);\n\t\t\t\tres += ':';\n\t\t\t\tres += encoder(userinfo.substr(idx + 1), false, true);\n\t\t\t}\n\t\t\tres += '@';\n\t\t}\n\t\tauthority = authority.toLowerCase();\n\t\tidx = authority.lastIndexOf(':');\n\t\tif (idx === -1) {\n\t\t\tres += encoder(authority, false, true);\n\t\t} else {\n\t\t\t// :\n\t\t\tres += encoder(authority.substr(0, idx), false, true);\n\t\t\tres += authority.substr(idx);\n\t\t}\n\t}\n\tif (path) {\n\t\t// lower-case windows drive letters in /C:/fff or C:/fff\n\t\tif (path.length >= 3 && path.charCodeAt(0) === CharCode.Slash && path.charCodeAt(2) === CharCode.Colon) {\n\t\t\tconst code = path.charCodeAt(1);\n\t\t\tif (code >= CharCode.A && code <= CharCode.Z) {\n\t\t\t\tpath = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`; // \"/c:\".length === 3\n\t\t\t}\n\t\t} else if (path.length >= 2 && path.charCodeAt(1) === CharCode.Colon) {\n\t\t\tconst code = path.charCodeAt(0);\n\t\t\tif (code >= CharCode.A && code <= CharCode.Z) {\n\t\t\t\tpath = `${String.fromCharCode(code + 32)}:${path.substr(2)}`; // \"/c:\".length === 3\n\t\t\t}\n\t\t}\n\t\t// encode the rest of the path\n\t\tres += encoder(path, true, false);\n\t}\n\tif (query) {\n\t\tres += '?';\n\t\tres += encoder(query, false, false);\n\t}\n\tif (fragment) {\n\t\tres += '#';\n\t\tres += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment;\n\t}\n\treturn res;\n}\n\n// --- decode\n\nfunction decodeURIComponentGraceful(str: string): string {\n\ttry {\n\t\treturn decodeURIComponent(str);\n\t} catch {\n\t\tif (str.length > 3) {\n\t\t\treturn str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));\n\t\t} else {\n\t\t\treturn str;\n\t\t}\n\t}\n}\n\nconst _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;\n\nfunction percentDecode(str: string): string {\n\tif (!str.match(_rEncodedAsHex)) {\n\t\treturn str;\n\t}\n\treturn str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match));\n}\n\n/**\n * Mapped-type that replaces all occurrences of URI with UriComponents\n */\nexport type UriDto = { [K in keyof T]: T[K] extends URI\n\t? UriComponents\n\t: UriDto };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n'use strict';\n\nimport { CharCode } from './charCode';\nimport { URI } from './uri';\nimport * as nodePath from 'path';\n\nconst posixPath = nodePath.posix || nodePath;\nconst slash = '/';\n\nexport namespace Utils {\n\n /**\n * Joins one or more input paths to the path of URI. \n * '/' is used as the directory separation character. \n * \n * The resolved path will be normalized. That means:\n * - all '..' and '.' segments are resolved.\n * - multiple, sequential occurences of '/' are replaced by a single instance of '/'.\n * - trailing separators are preserved.\n * \n * @param uri The input URI.\n * @param paths The paths to be joined with the path of URI.\n * @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.\n */\n export function joinPath(uri: URI, ...paths: string[]): URI {\n return uri.with({ path: posixPath.join(uri.path, ...paths) });\n }\n\n\n /**\n * Resolves one or more paths against the path of a URI. \n * '/' is used as the directory separation character. \n * \n * The resolved path will be normalized. That means:\n * - all '..' and '.' segments are resolved. \n * - multiple, sequential occurences of '/' are replaced by a single instance of '/'.\n * - trailing separators are removed.\n * \n * @param uri The input URI.\n * @param paths The paths to resolve against the path of URI.\n * @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.\n */\n export function resolvePath(uri: URI, ...paths: string[]): URI {\n let path = uri.path; \n let slashAdded = false;\n if (path[0] !== slash) {\n path = slash + path; // make the path abstract: for posixPath.resolve the first segments has to be absolute or cwd is used.\n slashAdded = true;\n }\n let resolvedPath = posixPath.resolve(path, ...paths);\n if (slashAdded && resolvedPath[0] === slash && !uri.authority) {\n resolvedPath = resolvedPath.substring(1);\n }\n return uri.with({ path: resolvedPath });\n }\n\n /**\n * Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The orignal URI is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The last segment of the URIs path.\n */\n export function dirname(uri: URI): URI {\n if (uri.path.length === 0 || uri.path === slash) {\n return uri;\n }\n let path = posixPath.dirname(uri.path);\n if (path.length === 1 && path.charCodeAt(0) === CharCode.Period) {\n path = '';\n }\n return uri.with({ path });\n }\n\n /**\n * Returns the last segment of the path of a URI, similar to the Unix basename command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The empty string is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The base name of the URIs path.\n */\n export function basename(uri: URI): string {\n return posixPath.basename(uri.path);\n }\n\n /**\n * Returns the extension name of the path of a URI, similar to the Unix extname command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The empty string is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The extension name of the URIs path.\n */\n export function extname(uri: URI): string {\n return posixPath.extname(uri.path);\n }\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nimport { URI } from './uri';\nimport { Utils } from './utils';\n\nexport { URI, Utils }"],"names":["root","factory","exports","module","define","amd","a","i","this","assertPath","path","TypeError","JSON","stringify","normalizeStringPosix","allowAboveRoot","code","res","lastSegmentLength","lastSlash","dots","length","charCodeAt","lastSlashIndex","lastIndexOf","slice","posix","resolve","cwd","resolvedPath","resolvedAbsolute","arguments","undefined","process","normalize","isAbsolute","trailingSeparator","join","joined","arg","relative","from","to","fromStart","fromEnd","fromLen","toStart","toLen","lastCommonSep","fromCode","out","_makeLong","dirname","hasRoot","end","matchedSlash","basename","ext","start","extIdx","firstNonSlashEnd","extname","startDot","startPart","preDotState","format","pathObject","sep","dir","base","name","_format","parse","ret","delimiter","win32","isWindows","platform","navigator","userAgent","indexOf","_schemePattern","_singleSlashStart","_doubleSlashStart","_validateUri","_strict","scheme","Error","authority","query","fragment","test","_empty","_slash","_regexp","schemeOrData","_schemeFix","_referenceResolution","isUri","thing","URI","fsPath","with","toString","uriToFsPath","change","Uri","value","match","exec","percentDecode","file","replace","idx","substring","components","result","skipEncoding","_asFormatted","toJSON","revive","data","_formatted","external","_fsPath","_sep","_pathSepMarker","$mid","encodeTable","encodeURIComponentFast","uriComponent","isPath","isAuthority","nativeEncodePos","pos","encodeURIComponent","charAt","substr","escaped","encodeURIComponentMinimal","uri","keepDriveLetterCasing","toLowerCase","encoder","userinfo","String","fromCharCode","decodeURIComponentGraceful","str","decodeURIComponent","_rEncodedAsHex","Utils","posixPath","nodePath","slash","joinPath","paths","resolvePath","slashAdded","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","call"],"sourceRoot":""} \ No newline at end of file diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/platform.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/platform.d.ts" index d02698ab0fab6ff243c2549df4b5776de03d267d..1660688e2e46a06cb97e0ab573e55856c6775f96 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/platform.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/platform.d.ts" @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ab34bee45fe908c992964ac5f881e1c96140c04c2e4e6e7ad9b9a282bf4325de -size 39 +export declare let isWindows: boolean; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/platform.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/platform.js" index b6f1cd63dc0fb7fcf4d8039781566b8d1ef00440..bd667dc8f2e93f8e2681db95c3d13e33f7c308dd 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/platform.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/platform.js" @@ -1,3 +1,14 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7e19db0f9bdf5250a18d329fbb6d44ab6b4a89c42aa2c92d51f57d18e7304a80 -size 692 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isWindows = void 0; +if (typeof process === 'object') { + exports.isWindows = process.platform === 'win32'; +} +else if (typeof navigator === 'object') { + var userAgent = navigator.userAgent; + exports.isWindows = userAgent.indexOf('Windows') >= 0; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/uri.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/uri.d.ts" index de3393be077b5748da9543b8f89609906034d824..0b49a761c3bac8bddf77cc2964490c3d42696682 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/uri.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/uri.d.ts" @@ -1,3 +1,151 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ffc74ba4e0a78603af057e0e572a7bdd55e166258ea978811572121154dfd6f5 -size 5851 +/** + * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986. + * This class is a simple parser which creates the basic component parts + * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation + * and encoding. + * + * ```txt + * foo://example.com:8042/over/there?name=ferret#nose + * \_/ \______________/\_________/ \_________/ \__/ + * | | | | | + * scheme authority path query fragment + * | _____________________|__ + * / \ / \ + * urn:example:animal:ferret:nose + * ``` + */ +export declare class URI implements UriComponents { + static isUri(thing: any): thing is URI; + /** + * scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'. + * The part before the first colon. + */ + readonly scheme: string; + /** + * authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'. + * The part between the first double slashes and the next slash. + */ + readonly authority: string; + /** + * path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'. + */ + readonly path: string; + /** + * query is the 'query' part of 'http://www.example.com/some/path?query#fragment'. + */ + readonly query: string; + /** + * fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'. + */ + readonly fragment: string; + /** + * @internal + */ + protected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean); + /** + * @internal + */ + protected constructor(components: UriComponents); + /** + * Returns a string representing the corresponding file system path of this URI. + * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the + * platform specific path separator. + * + * * Will *not* validate the path for invalid characters and semantics. + * * Will *not* look at the scheme of this URI. + * * The result shall *not* be used for display purposes but for accessing a file on disk. + * + * + * The *difference* to `URI#path` is the use of the platform specific separator and the handling + * of UNC paths. See the below sample of a file-uri with an authority (UNC path). + * + * ```ts + const u = URI.parse('file://server/c$/folder/file.txt') + u.authority === 'server' + u.path === '/shares/c$/file.txt' + u.fsPath === '\\server\c$\folder\file.txt' + ``` + * + * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path, + * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working + * with URIs that represent files on disk (`file` scheme). + */ + get fsPath(): string; + with(change: { + scheme?: string; + authority?: string | null; + path?: string | null; + query?: string | null; + fragment?: string | null; + }): URI; + /** + * Creates a new URI from a string, e.g. `http://www.example.com/some/path`, + * `file:///usr/home`, or `scheme:with/path`. + * + * @param value A string which represents an URI (see `URI#toString`). + */ + static parse(value: string, _strict?: boolean): URI; + /** + * Creates a new URI from a file system path, e.g. `c:\my\files`, + * `/usr/home`, or `\\server\share\some\path`. + * + * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument + * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as** + * `URI.parse('file://' + path)` because the path might contain characters that are + * interpreted (# and ?). See the following sample: + * ```ts + const good = URI.file('/coding/c#/project1'); + good.scheme === 'file'; + good.path === '/coding/c#/project1'; + good.fragment === ''; + const bad = URI.parse('file://' + '/coding/c#/project1'); + bad.scheme === 'file'; + bad.path === '/coding/c'; // path is now broken + bad.fragment === '/project1'; + ``` + * + * @param path A file system path (see `URI#fsPath`) + */ + static file(path: string): URI; + static from(components: { + scheme: string; + authority?: string; + path?: string; + query?: string; + fragment?: string; + }): URI; + /** + * Creates a string representation for this URI. It's guaranteed that calling + * `URI.parse` with the result of this function creates an URI which is equal + * to this URI. + * + * * The result shall *not* be used for display purposes but for externalization or transport. + * * The result will be encoded using the percentage encoding and encoding happens mostly + * ignore the scheme-specific encoding rules. + * + * @param skipEncoding Do not encode the result, default is `false` + */ + toString(skipEncoding?: boolean): string; + toJSON(): UriComponents; + static revive(data: UriComponents | URI): URI; + static revive(data: UriComponents | URI | undefined): URI | undefined; + static revive(data: UriComponents | URI | null): URI | null; + static revive(data: UriComponents | URI | undefined | null): URI | undefined | null; +} +export interface UriComponents { + scheme: string; + authority: string; + path: string; + query: string; + fragment: string; +} +/** + * Compute `fsPath` for the given uri + */ +export declare function uriToFsPath(uri: URI, keepDriveLetterCasing: boolean): string; +/** + * Mapped-type that replaces all occurrences of URI with UriComponents + */ +export declare type UriDto = { + [K in keyof T]: T[K] extends URI ? UriComponents : UriDto; +}; diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/uri.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/uri.js" index f856dad1868c0827b91115afb69be63250145c7c..88d7752036333b2e7cb50f631821431c67cac731 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/uri.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/uri.js" @@ -1,3 +1,608 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:46c1479feb78bece3e8aebe3090dd331f47d31eb31cbeb57884e5a101696304e -size 23310 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var _a; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.uriToFsPath = exports.URI = void 0; +var platform_1 = require("./platform"); +var _schemePattern = /^\w[\w\d+.-]*$/; +var _singleSlashStart = /^\//; +var _doubleSlashStart = /^\/\//; +function _validateUri(ret, _strict) { + // scheme, must be set + if (!ret.scheme && _strict) { + throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"".concat(ret.authority, "\", path: \"").concat(ret.path, "\", query: \"").concat(ret.query, "\", fragment: \"").concat(ret.fragment, "\"}")); + } + // scheme, https://tools.ietf.org/html/rfc3986#section-3.1 + // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) + if (ret.scheme && !_schemePattern.test(ret.scheme)) { + throw new Error('[UriError]: Scheme contains illegal characters.'); + } + // path, http://tools.ietf.org/html/rfc3986#section-3.3 + // If a URI contains an authority component, then the path component + // must either be empty or begin with a slash ("/") character. If a URI + // does not contain an authority component, then the path cannot begin + // with two slash characters ("//"). + if (ret.path) { + if (ret.authority) { + if (!_singleSlashStart.test(ret.path)) { + 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'); + } + } + else { + if (_doubleSlashStart.test(ret.path)) { + throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'); + } + } + } +} +// for a while we allowed uris *without* schemes and this is the migration +// for them, e.g. an uri without scheme and without strict-mode warns and falls +// back to the file-scheme. that should cause the least carnage and still be a +// clear warning +function _schemeFix(scheme, _strict) { + if (!scheme && !_strict) { + return 'file'; + } + return scheme; +} +// implements a bit of https://tools.ietf.org/html/rfc3986#section-5 +function _referenceResolution(scheme, path) { + // the slash-character is our 'default base' as we don't + // support constructing URIs relative to other URIs. This + // also means that we alter and potentially break paths. + // see https://tools.ietf.org/html/rfc3986#section-5.1.4 + switch (scheme) { + case 'https': + case 'http': + case 'file': + if (!path) { + path = _slash; + } + else if (path[0] !== _slash) { + path = _slash + path; + } + break; + } + return path; +} +var _empty = ''; +var _slash = '/'; +var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; +/** + * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986. + * This class is a simple parser which creates the basic component parts + * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation + * and encoding. + * + * ```txt + * foo://example.com:8042/over/there?name=ferret#nose + * \_/ \______________/\_________/ \_________/ \__/ + * | | | | | + * scheme authority path query fragment + * | _____________________|__ + * / \ / \ + * urn:example:animal:ferret:nose + * ``` + */ +var URI = /** @class */ (function () { + /** + * @internal + */ + function URI(schemeOrData, authority, path, query, fragment, _strict) { + if (_strict === void 0) { _strict = false; } + if (typeof schemeOrData === 'object') { + this.scheme = schemeOrData.scheme || _empty; + this.authority = schemeOrData.authority || _empty; + this.path = schemeOrData.path || _empty; + this.query = schemeOrData.query || _empty; + this.fragment = schemeOrData.fragment || _empty; + // no validation because it's this URI + // that creates uri components. + // _validateUri(this); + } + else { + this.scheme = _schemeFix(schemeOrData, _strict); + this.authority = authority || _empty; + this.path = _referenceResolution(this.scheme, path || _empty); + this.query = query || _empty; + this.fragment = fragment || _empty; + _validateUri(this, _strict); + } + } + URI.isUri = function (thing) { + if (thing instanceof URI) { + return true; + } + if (!thing) { + return false; + } + return typeof thing.authority === 'string' + && typeof thing.fragment === 'string' + && typeof thing.path === 'string' + && typeof thing.query === 'string' + && typeof thing.scheme === 'string' + && typeof thing.fsPath === 'string' + && typeof thing.with === 'function' + && typeof thing.toString === 'function'; + }; + Object.defineProperty(URI.prototype, "fsPath", { + // ---- filesystem path ----------------------- + /** + * Returns a string representing the corresponding file system path of this URI. + * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the + * platform specific path separator. + * + * * Will *not* validate the path for invalid characters and semantics. + * * Will *not* look at the scheme of this URI. + * * The result shall *not* be used for display purposes but for accessing a file on disk. + * + * + * The *difference* to `URI#path` is the use of the platform specific separator and the handling + * of UNC paths. See the below sample of a file-uri with an authority (UNC path). + * + * ```ts + const u = URI.parse('file://server/c$/folder/file.txt') + u.authority === 'server' + u.path === '/shares/c$/file.txt' + u.fsPath === '\\server\c$\folder\file.txt' + ``` + * + * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path, + * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working + * with URIs that represent files on disk (`file` scheme). + */ + get: function () { + // if (this.scheme !== 'file') { + // console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`); + // } + return uriToFsPath(this, false); + }, + enumerable: false, + configurable: true + }); + // ---- modify to new ------------------------- + URI.prototype.with = function (change) { + if (!change) { + return this; + } + var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment; + if (scheme === undefined) { + scheme = this.scheme; + } + else if (scheme === null) { + scheme = _empty; + } + if (authority === undefined) { + authority = this.authority; + } + else if (authority === null) { + authority = _empty; + } + if (path === undefined) { + path = this.path; + } + else if (path === null) { + path = _empty; + } + if (query === undefined) { + query = this.query; + } + else if (query === null) { + query = _empty; + } + if (fragment === undefined) { + fragment = this.fragment; + } + else if (fragment === null) { + fragment = _empty; + } + if (scheme === this.scheme + && authority === this.authority + && path === this.path + && query === this.query + && fragment === this.fragment) { + return this; + } + return new Uri(scheme, authority, path, query, fragment); + }; + // ---- parse & validate ------------------------ + /** + * Creates a new URI from a string, e.g. `http://www.example.com/some/path`, + * `file:///usr/home`, or `scheme:with/path`. + * + * @param value A string which represents an URI (see `URI#toString`). + */ + URI.parse = function (value, _strict) { + if (_strict === void 0) { _strict = false; } + var match = _regexp.exec(value); + if (!match) { + return new Uri(_empty, _empty, _empty, _empty, _empty); + } + return new Uri(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict); + }; + /** + * Creates a new URI from a file system path, e.g. `c:\my\files`, + * `/usr/home`, or `\\server\share\some\path`. + * + * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument + * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as** + * `URI.parse('file://' + path)` because the path might contain characters that are + * interpreted (# and ?). See the following sample: + * ```ts + const good = URI.file('/coding/c#/project1'); + good.scheme === 'file'; + good.path === '/coding/c#/project1'; + good.fragment === ''; + const bad = URI.parse('file://' + '/coding/c#/project1'); + bad.scheme === 'file'; + bad.path === '/coding/c'; // path is now broken + bad.fragment === '/project1'; + ``` + * + * @param path A file system path (see `URI#fsPath`) + */ + URI.file = function (path) { + var authority = _empty; + // normalize to fwd-slashes on windows, + // on other systems bwd-slashes are valid + // filename character, eg /f\oo/ba\r.txt + if (platform_1.isWindows) { + path = path.replace(/\\/g, _slash); + } + // check for authority as used in UNC shares + // or use the path as given + if (path[0] === _slash && path[1] === _slash) { + var idx = path.indexOf(_slash, 2); + if (idx === -1) { + authority = path.substring(2); + path = _slash; + } + else { + authority = path.substring(2, idx); + path = path.substring(idx) || _slash; + } + } + return new Uri('file', authority, path, _empty, _empty); + }; + URI.from = function (components) { + var result = new Uri(components.scheme, components.authority, components.path, components.query, components.fragment); + _validateUri(result, true); + return result; + }; + // ---- printing/externalize --------------------------- + /** + * Creates a string representation for this URI. It's guaranteed that calling + * `URI.parse` with the result of this function creates an URI which is equal + * to this URI. + * + * * The result shall *not* be used for display purposes but for externalization or transport. + * * The result will be encoded using the percentage encoding and encoding happens mostly + * ignore the scheme-specific encoding rules. + * + * @param skipEncoding Do not encode the result, default is `false` + */ + URI.prototype.toString = function (skipEncoding) { + if (skipEncoding === void 0) { skipEncoding = false; } + return _asFormatted(this, skipEncoding); + }; + URI.prototype.toJSON = function () { + return this; + }; + URI.revive = function (data) { + if (!data) { + return data; + } + else if (data instanceof URI) { + return data; + } + else { + var result = new Uri(data); + result._formatted = data.external; + result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null; + return result; + } + }; + return URI; +}()); +exports.URI = URI; +var _pathSepMarker = platform_1.isWindows ? 1 : undefined; +// This class exists so that URI is compatible with vscode.Uri (API). +var Uri = /** @class */ (function (_super) { + __extends(Uri, _super); + function Uri() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this._formatted = null; + _this._fsPath = null; + return _this; + } + Object.defineProperty(Uri.prototype, "fsPath", { + get: function () { + if (!this._fsPath) { + this._fsPath = uriToFsPath(this, false); + } + return this._fsPath; + }, + enumerable: false, + configurable: true + }); + Uri.prototype.toString = function (skipEncoding) { + if (skipEncoding === void 0) { skipEncoding = false; } + if (!skipEncoding) { + if (!this._formatted) { + this._formatted = _asFormatted(this, false); + } + return this._formatted; + } + else { + // we don't cache that + return _asFormatted(this, true); + } + }; + Uri.prototype.toJSON = function () { + var res = { + $mid: 1 + }; + // cached state + if (this._fsPath) { + res.fsPath = this._fsPath; + res._sep = _pathSepMarker; + } + if (this._formatted) { + res.external = this._formatted; + } + // uri components + if (this.path) { + res.path = this.path; + } + if (this.scheme) { + res.scheme = this.scheme; + } + if (this.authority) { + res.authority = this.authority; + } + if (this.query) { + res.query = this.query; + } + if (this.fragment) { + res.fragment = this.fragment; + } + return res; + }; + return Uri; +}(URI)); +// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2 +var encodeTable = (_a = {}, + _a[58 /* CharCode.Colon */] = '%3A', + _a[47 /* CharCode.Slash */] = '%2F', + _a[63 /* CharCode.QuestionMark */] = '%3F', + _a[35 /* CharCode.Hash */] = '%23', + _a[91 /* CharCode.OpenSquareBracket */] = '%5B', + _a[93 /* CharCode.CloseSquareBracket */] = '%5D', + _a[64 /* CharCode.AtSign */] = '%40', + _a[33 /* CharCode.ExclamationMark */] = '%21', + _a[36 /* CharCode.DollarSign */] = '%24', + _a[38 /* CharCode.Ampersand */] = '%26', + _a[39 /* CharCode.SingleQuote */] = '%27', + _a[40 /* CharCode.OpenParen */] = '%28', + _a[41 /* CharCode.CloseParen */] = '%29', + _a[42 /* CharCode.Asterisk */] = '%2A', + _a[43 /* CharCode.Plus */] = '%2B', + _a[44 /* CharCode.Comma */] = '%2C', + _a[59 /* CharCode.Semicolon */] = '%3B', + _a[61 /* CharCode.Equals */] = '%3D', + _a[32 /* CharCode.Space */] = '%20', + _a); +function encodeURIComponentFast(uriComponent, isPath, isAuthority) { + var res = undefined; + var nativeEncodePos = -1; + for (var pos = 0; pos < uriComponent.length; pos++) { + var code = uriComponent.charCodeAt(pos); + // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3 + if ((code >= 97 /* CharCode.a */ && code <= 122 /* CharCode.z */) + || (code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */) + || (code >= 48 /* CharCode.Digit0 */ && code <= 57 /* CharCode.Digit9 */) + || code === 45 /* CharCode.Dash */ + || code === 46 /* CharCode.Period */ + || code === 95 /* CharCode.Underline */ + || code === 126 /* CharCode.Tilde */ + || (isPath && code === 47 /* CharCode.Slash */) + || (isAuthority && code === 91 /* CharCode.OpenSquareBracket */) + || (isAuthority && code === 93 /* CharCode.CloseSquareBracket */) + || (isAuthority && code === 58 /* CharCode.Colon */)) { + // check if we are delaying native encode + if (nativeEncodePos !== -1) { + res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos)); + nativeEncodePos = -1; + } + // check if we write into a new string (by default we try to return the param) + if (res !== undefined) { + res += uriComponent.charAt(pos); + } + } + else { + // encoding needed, we need to allocate a new string + if (res === undefined) { + res = uriComponent.substr(0, pos); + } + // check with default table first + var escaped = encodeTable[code]; + if (escaped !== undefined) { + // check if we are delaying native encode + if (nativeEncodePos !== -1) { + res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos)); + nativeEncodePos = -1; + } + // append escaped variant to result + res += escaped; + } + else if (nativeEncodePos === -1) { + // use native encode only when needed + nativeEncodePos = pos; + } + } + } + if (nativeEncodePos !== -1) { + res += encodeURIComponent(uriComponent.substring(nativeEncodePos)); + } + return res !== undefined ? res : uriComponent; +} +function encodeURIComponentMinimal(path) { + var res = undefined; + for (var pos = 0; pos < path.length; pos++) { + var code = path.charCodeAt(pos); + if (code === 35 /* CharCode.Hash */ || code === 63 /* CharCode.QuestionMark */) { + if (res === undefined) { + res = path.substr(0, pos); + } + res += encodeTable[code]; + } + else { + if (res !== undefined) { + res += path[pos]; + } + } + } + return res !== undefined ? res : path; +} +/** + * Compute `fsPath` for the given uri + */ +function uriToFsPath(uri, keepDriveLetterCasing) { + var value; + if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') { + // unc path: file://shares/c$/far/boo + value = "//".concat(uri.authority).concat(uri.path); + } + else if (uri.path.charCodeAt(0) === 47 /* CharCode.Slash */ + && (uri.path.charCodeAt(1) >= 65 /* CharCode.A */ && uri.path.charCodeAt(1) <= 90 /* CharCode.Z */ || uri.path.charCodeAt(1) >= 97 /* CharCode.a */ && uri.path.charCodeAt(1) <= 122 /* CharCode.z */) + && uri.path.charCodeAt(2) === 58 /* CharCode.Colon */) { + if (!keepDriveLetterCasing) { + // windows drive letter: file:///c:/far/boo + value = uri.path[1].toLowerCase() + uri.path.substr(2); + } + else { + value = uri.path.substr(1); + } + } + else { + // other path + value = uri.path; + } + if (platform_1.isWindows) { + value = value.replace(/\//g, '\\'); + } + return value; +} +exports.uriToFsPath = uriToFsPath; +/** + * Create the external version of a uri + */ +function _asFormatted(uri, skipEncoding) { + var encoder = !skipEncoding + ? encodeURIComponentFast + : encodeURIComponentMinimal; + var res = ''; + var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment; + if (scheme) { + res += scheme; + res += ':'; + } + if (authority || scheme === 'file') { + res += _slash; + res += _slash; + } + if (authority) { + var idx = authority.indexOf('@'); + if (idx !== -1) { + // @ + var userinfo = authority.substr(0, idx); + authority = authority.substr(idx + 1); + idx = userinfo.lastIndexOf(':'); + if (idx === -1) { + res += encoder(userinfo, false, false); + } + else { + // :@ + res += encoder(userinfo.substr(0, idx), false, false); + res += ':'; + res += encoder(userinfo.substr(idx + 1), false, true); + } + res += '@'; + } + authority = authority.toLowerCase(); + idx = authority.lastIndexOf(':'); + if (idx === -1) { + res += encoder(authority, false, true); + } + else { + // : + res += encoder(authority.substr(0, idx), false, true); + res += authority.substr(idx); + } + } + if (path) { + // lower-case windows drive letters in /C:/fff or C:/fff + if (path.length >= 3 && path.charCodeAt(0) === 47 /* CharCode.Slash */ && path.charCodeAt(2) === 58 /* CharCode.Colon */) { + var code = path.charCodeAt(1); + if (code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */) { + path = "/".concat(String.fromCharCode(code + 32), ":").concat(path.substr(3)); // "/c:".length === 3 + } + } + else if (path.length >= 2 && path.charCodeAt(1) === 58 /* CharCode.Colon */) { + var code = path.charCodeAt(0); + if (code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */) { + path = "".concat(String.fromCharCode(code + 32), ":").concat(path.substr(2)); // "/c:".length === 3 + } + } + // encode the rest of the path + res += encoder(path, true, false); + } + if (query) { + res += '?'; + res += encoder(query, false, false); + } + if (fragment) { + res += '#'; + res += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment; + } + return res; +} +// --- decode +function decodeURIComponentGraceful(str) { + try { + return decodeURIComponent(str); + } + catch (_a) { + if (str.length > 3) { + return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3)); + } + else { + return str; + } + } +} +var _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g; +function percentDecode(str) { + if (!str.match(_rEncodedAsHex)) { + return str; + } + return str.replace(_rEncodedAsHex, function (match) { return decodeURIComponentGraceful(match); }); +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/utils.d.ts" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/utils.d.ts" index 35a843864288a0ec3dc68953da034aac771c82f7..26ed5e6501878ef9c4440275fed08df1aca105a2 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/utils.d.ts" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/utils.d.ts" @@ -1,3 +1,58 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bad1bc59cf9ba7f2b8efc0f7342b141843cbf3d3d791fa13df4ff9b86db26df9 -size 2861 +import { URI } from './uri'; +export declare namespace Utils { + /** + * Joins one or more input paths to the path of URI. + * '/' is used as the directory separation character. + * + * The resolved path will be normalized. That means: + * - all '..' and '.' segments are resolved. + * - multiple, sequential occurences of '/' are replaced by a single instance of '/'. + * - trailing separators are preserved. + * + * @param uri The input URI. + * @param paths The paths to be joined with the path of URI. + * @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI. + */ + function joinPath(uri: URI, ...paths: string[]): URI; + /** + * Resolves one or more paths against the path of a URI. + * '/' is used as the directory separation character. + * + * The resolved path will be normalized. That means: + * - all '..' and '.' segments are resolved. + * - multiple, sequential occurences of '/' are replaced by a single instance of '/'. + * - trailing separators are removed. + * + * @param uri The input URI. + * @param paths The paths to resolve against the path of URI. + * @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI. + */ + function resolvePath(uri: URI, ...paths: string[]): URI; + /** + * Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The orignal URI is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The last segment of the URIs path. + */ + function dirname(uri: URI): URI; + /** + * Returns the last segment of the path of a URI, similar to the Unix basename command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The empty string is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The base name of the URIs path. + */ + function basename(uri: URI): string; + /** + * Returns the extension name of the path of a URI, similar to the Unix extname command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The empty string is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The extension name of the URIs path. + */ + function extname(uri: URI): string; +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/utils.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/utils.js" index fc9aea8a06dca2fcf0e5ec2223140390d15f3233..1f6816076f21bc5025b97b5a5994f8feb2b35984 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/utils.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/lib/umd/utils.js" @@ -1,3 +1,117 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a906625b2e49d498691f7d8619ef8d23bff770a998c215d1972f7a096fcc69f3 -size 5222 +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Utils = void 0; +var nodePath = require("path"); +var posixPath = nodePath.posix || nodePath; +var slash = '/'; +var Utils; +(function (Utils) { + /** + * Joins one or more input paths to the path of URI. + * '/' is used as the directory separation character. + * + * The resolved path will be normalized. That means: + * - all '..' and '.' segments are resolved. + * - multiple, sequential occurences of '/' are replaced by a single instance of '/'. + * - trailing separators are preserved. + * + * @param uri The input URI. + * @param paths The paths to be joined with the path of URI. + * @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI. + */ + function joinPath(uri) { + var paths = []; + for (var _i = 1; _i < arguments.length; _i++) { + paths[_i - 1] = arguments[_i]; + } + return uri.with({ path: posixPath.join.apply(posixPath, __spreadArray([uri.path], paths, false)) }); + } + Utils.joinPath = joinPath; + /** + * Resolves one or more paths against the path of a URI. + * '/' is used as the directory separation character. + * + * The resolved path will be normalized. That means: + * - all '..' and '.' segments are resolved. + * - multiple, sequential occurences of '/' are replaced by a single instance of '/'. + * - trailing separators are removed. + * + * @param uri The input URI. + * @param paths The paths to resolve against the path of URI. + * @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI. + */ + function resolvePath(uri) { + var paths = []; + for (var _i = 1; _i < arguments.length; _i++) { + paths[_i - 1] = arguments[_i]; + } + var path = uri.path; + var slashAdded = false; + if (path[0] !== slash) { + path = slash + path; // make the path abstract: for posixPath.resolve the first segments has to be absolute or cwd is used. + slashAdded = true; + } + var resolvedPath = posixPath.resolve.apply(posixPath, __spreadArray([path], paths, false)); + if (slashAdded && resolvedPath[0] === slash && !uri.authority) { + resolvedPath = resolvedPath.substring(1); + } + return uri.with({ path: resolvedPath }); + } + Utils.resolvePath = resolvePath; + /** + * Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The orignal URI is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The last segment of the URIs path. + */ + function dirname(uri) { + if (uri.path.length === 0 || uri.path === slash) { + return uri; + } + var path = posixPath.dirname(uri.path); + if (path.length === 1 && path.charCodeAt(0) === 46 /* CharCode.Period */) { + path = ''; + } + return uri.with({ path: path }); + } + Utils.dirname = dirname; + /** + * Returns the last segment of the path of a URI, similar to the Unix basename command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The empty string is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The base name of the URIs path. + */ + function basename(uri) { + return posixPath.basename(uri.path); + } + Utils.basename = basename; + /** + * Returns the extension name of the path of a URI, similar to the Unix extname command. + * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. + * The empty string is returned if the URIs path is empty or does not contain any path segments. + * + * @param uri The input URI. + * @return The extension name of the URIs path. + */ + function extname(uri) { + return posixPath.extname(uri.path); + } + Utils.extname = extname; +})(Utils = exports.Utils || (exports.Utils = {})); diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/package.json" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/package.json" index aca2a259e1e60c085717aa3f79ebb4070e84d47c..2b1a4cd93d4639f5216628d13963c33a1ce9a0c0 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/package.json" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/package.json" @@ -1,3 +1,38 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:38eea86a1088dda7c10a3a29508ff62e43c81237c2ab996da0690128def4ffbd -size 1080 +{ + "name": "vscode-uri", + "author": "Microsoft", + "version": "3.0.7", + "description": "The URI implementation that is used by VS Code and its extensions", + "main": "./lib/umd/index.js", + "typings": "./lib/umd/index", + "module": "./lib/esm/index.js", + "sideEffects": false, + "scripts": { + "clean": "rimraf lib", + "pack-production": "webpack --mode=production", + "pack-dev": "webpack", + "compile": "tsc -p ./src", + "prepublish": "npm run pack-production", + "test": "tsc -p ./src && npm run pack-dev && mocha" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/microsoft/vscode-uri.git" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/microsoft/vscode-uri/issues" + }, + "homepage": "https://github.com/microsoft/vscode-uri#readme", + "devDependencies": { + "@types/mocha": "^9.1.1", + "@types/node": "16.x", + "mocha": "^10.0.0", + "path-browserify": "^1.0.1", + "rimraf": "^3.0.2", + "ts-loader": "^9.3.1", + "typescript": "^4.8.3", + "webpack": "^5.74.0", + "webpack-cli": "^4.10.0" + } +} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/pipeline.yml" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/pipeline.yml" index 4e7c175cf50572f3ebed02bd514345788716cc3d..c8e56af4d26a0a6ccdb0f24a9dca90130c045482 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/pipeline.yml" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vscode-uri/pipeline.yml" @@ -1,3 +1,62 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:155efbf0e7138f8ec8fc9775848cab824dd4d126152be78072a251908c7fa521 -size 1450 +name: $(Date:yyyyMMdd)$(Rev:.r) + +trigger: + branches: + include: + - main +pr: none + +resources: + repositories: + - repository: templates + type: github + name: microsoft/vscode-engineering + ref: main + endpoint: Monaco + +parameters: + - name: publishPackage + displayName: 🚀 Publish vscode-uri + type: boolean + default: false + +extends: + template: azure-pipelines/npm-package/pipeline.yml@templates + parameters: + npmPackages: + - name: vscode-uri + + buildSteps: + - script: yarn --frozen-lockfile + displayName: Install dependencies + + - script: yarn compile + displayName: Compile npm package + + - script: yarn pack-production + displayName: Webpack for prod + + testPlatforms: + - name: Linux + nodeVersions: + - 16.x + + testSteps: + - script: yarn --frozen-lockfile + displayName: Install dependencies + + - script: yarn compile + displayName: Compile npm package + + - bash: | + /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & + echo ">>> Started xvfb" + displayName: Start xvfb + condition: eq(variables['Agent.OS'], 'Linux') + + - script: yarn test + displayName: Test npm package + env: + DISPLAY: ':99.0' + + publishPackage: ${{ parameters.publishPackage }} diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vue-template-compiler/LICENSE" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vue-template-compiler/LICENSE" index a21bb1ce8f43ed9c6b3b46492da7098180e8a1df..b65dd9e62e21646625f259b5d750dc04ad9779ef 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vue-template-compiler/LICENSE" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vue-template-compiler/LICENSE" @@ -1,3 +1,21 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:17fb24bc303763f3fe1911ee24e5225c7ad59f0e3a5d8123e9b730c100a306a6 -size 1091 +The MIT License (MIT) + +Copyright (c) 2013-present, Yuxi (Evan) You + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vue-template-compiler/README.md" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vue-template-compiler/README.md" index fd92de43bcb3a2c3c33dc08d887342b59d1095df..fa0a64bb78e880b520ca19fcd8e54f23cad25160 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vue-template-compiler/README.md" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vue-template-compiler/README.md" @@ -1,3 +1,162 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:886b025f93811b6a27cc32cc2063861d6d030d0223edb100fd12a520c16ceab7 -size 6524 +# vue-template-compiler + +> This package is auto-generated. For pull requests please see [src/platforms/web/entry-compiler.js](https://github.com/vuejs/vue/tree/dev/src/platforms/web/entry-compiler.js). + +This package can be used to pre-compile Vue 2.0 templates into render functions to avoid runtime-compilation overhead and CSP restrictions. In most cases you should be using it with [`vue-loader`](https://github.com/vuejs/vue-loader), you will only need it separately if you are writing build tools with very specific needs. + +## Installation + +``` bash +npm install vue-template-compiler +``` + +``` js +const compiler = require('vue-template-compiler') +``` + +## API + +### compiler.compile(template, [options]) + +Compiles a template string and returns compiled JavaScript code. The returned result is an object of the following format: + +``` js +{ + ast: ?ASTElement, // parsed template elements to AST + render: string, // main render function code + staticRenderFns: Array, // render code for static sub trees, if any + errors: Array // template syntax errors, if any +} +``` + +Note the returned function code uses `with` and thus cannot be used in strict mode code. + +#### Options + +- `outputSourceRange` *new in 2.6* + - Type: `boolean` + - Default: `false` + + Set this to true will cause the `errors` returned in the compiled result become objects in the form of `{ msg, start, end }`. The `start` and `end` properties are numbers that mark the code range of the error source in the template. This can be passed on to the `compiler.generateCodeFrame` API to generate a code frame for the error. + +- `whitespace` + - Type: `string` + - Valid values: `'preserve' | 'condense'` + - Default: `'preserve'` + + The default value `'preserve'` handles whitespaces as follows: + + - A whitespace-only text node between element tags is condensed into a single space. + - All other whitespaces are preserved as-is. + + If set to `'condense'`: + + - A whitespace-only text node between element tags is removed if it contains new lines. Otherwise, it is condensed into a single space. + - Consecutive whitespaces inside a non-whitespace-only text node are condensed into a single space. + + Using condense mode will result in smaller compiled code size and slightly improved performance. However, it will produce minor visual layout differences compared to plain HTML in certain cases. + + **This option does not affect the `

` tag.**
+
+  Example:
+
+  ``` html
+  
+  
+ + foo + bar +
+ + +
+ foo + bar
+ + +
foo bar
+ ``` + +- `modules` + + It's possible to hook into the compilation process to support custom template features. **However, beware that by injecting custom compile-time modules, your templates will not work with other build tools built on standard built-in modules, e.g `vue-loader` and `vueify`.** + + An array of compiler modules. For details on compiler modules, refer to the `ModuleOptions` type in [flow declarations](https://github.com/vuejs/vue/blob/dev/flow/compiler.js#L47-L59) and the [built-in modules](https://github.com/vuejs/vue/tree/dev/src/platforms/web/compiler/modules). + +- `directives` + + An object where the key is the directive name and the value is a function that transforms an template AST node. For example: + + ``` js + compiler.compile('
', { + directives: { + test (node, directiveMeta) { + // transform node based on directiveMeta + } + } + }) + ``` + + By default, a compile-time directive will extract the directive and the directive will not be present at runtime. If you want the directive to also be handled by a runtime definition, return `true` in the transform function. + + Refer to the implementation of some [built-in compile-time directives](https://github.com/vuejs/vue/tree/dev/src/platforms/web/compiler/directives). + +- `preserveWhitespace` **Deprecated since 2.6** + - Type: `boolean` + - Default: `true` + + By default, the compiled render function preserves all whitespace characters between HTML tags. If set to `false`, whitespace between tags will be ignored. This can result in slightly better performance but may affect layout for inline elements. + +--- + +### compiler.compileToFunctions(template) + +Similar to `compiler.compile`, but directly returns instantiated functions: + +``` js +{ + render: Function, + staticRenderFns: Array +} +``` + +This is only useful at runtime with pre-configured builds, so it doesn't accept any compile-time options. In addition, this method uses `new Function()` so it is not CSP-compliant. + +--- + +### compiler.ssrCompile(template, [options]) + +> 2.4.0+ + +Same as `compiler.compile` but generates SSR-specific render function code by optimizing parts of the template into string concatenation in order to improve SSR performance. + +This is used by default in `vue-loader@>=12` and can be disabled using the [`optimizeSSR`](https://vue-loader.vuejs.org/en/options.html#optimizessr) option. + +--- + +### compiler.ssrCompileToFunctions(template) + +> 2.4.0+ + +Same as `compiler.compileToFunction` but generates SSR-specific render function code by optimizing parts of the template into string concatenation in order to improve SSR performance. + +--- + +### compiler.parseComponent(file, [options]) + +Parse a SFC (single-file component, or `*.vue` file) into a descriptor (refer to the `SFCDescriptor` type in [flow declarations](https://github.com/vuejs/vue/blob/dev/flow/compiler.js)). This is used in SFC build tools like `vue-loader` and `vueify`. + +--- + +### compiler.generateCodeFrame(template, start, end) + +Generate a code frame that highlights the part in `template` defined by `start` and `end`. Useful for error reporting in higher-level tooling. + +#### Options + +#### `pad` + +`pad` is useful when you are piping the extracted content into other pre-processors, as you will get correct line numbers or character indices if there are any syntax errors. + +- with `{ pad: "line" }`, the extracted content for each block will be prefixed with one newline for each line in the leading content from the original file to ensure that the line numbers align with the original file. +- with `{ pad: "space" }`, the extracted content for each block will be prefixed with one space for each character in the leading content from the original file to ensure that the character count remains the same as the original file. diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vue-template-compiler/browser.js" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vue-template-compiler/browser.js" index d0732e5caa6b714732ccdc719bedd50c4120c086..8088782f8e4b230bb28e2457e1485ad5f907b53a 100644 --- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vue-template-compiler/browser.js" +++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/vue-template-compiler/browser.js" @@ -1,3 +1,7140 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2b96c17635eb017c7a9a7f04a1011f8f74068c14f5a4a59a48096c585005c195 -size 341229 +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.VueTemplateCompiler = {})); +})(this, (function (exports) { 'use strict'; + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + var splitRE$1 = /\r?\n/g; + var emptyRE = /^\s*$/; + var needFixRE = /^(\r?\n)*[\t\s]/; + + var deIndent = function deindent (str) { + if (!needFixRE.test(str)) { + return str + } + var lines = str.split(splitRE$1); + var min = Infinity; + var type, cur, c; + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + if (!emptyRE.test(line)) { + if (!type) { + c = line.charAt(0); + if (c === ' ' || c === '\t') { + type = c; + cur = count(line, type); + if (cur < min) { + min = cur; + } + } else { + return str + } + } else { + cur = count(line, type); + if (cur < min) { + min = cur; + } + } + } + } + return lines.map(function (line) { + return line.slice(min) + }).join('\n') + }; + + function count (line, type) { + var i = 0; + while (line.charAt(i) === type) { + i++; + } + return i + } + + var emptyObject = Object.freeze({}); + var isArray = Array.isArray; + // These helpers produce better VM code in JS engines due to their + // explicitness and function inlining. + function isUndef(v) { + return v === undefined || v === null; + } + function isDef(v) { + return v !== undefined && v !== null; + } + function isTrue(v) { + return v === true; + } + function isFalse(v) { + return v === false; + } + /** + * Check if value is primitive. + */ + function isPrimitive(value) { + return (typeof value === 'string' || + typeof value === 'number' || + // $flow-disable-line + typeof value === 'symbol' || + typeof value === 'boolean'); + } + function isFunction(value) { + return typeof value === 'function'; + } + /** + * Quick object check - this is primarily used to tell + * objects from primitive values when we know the value + * is a JSON-compliant type. + */ + function isObject(obj) { + return obj !== null && typeof obj === 'object'; + } + /** + * Get the raw type string of a value, e.g., [object Object]. + */ + var _toString = Object.prototype.toString; + function toRawType(value) { + return _toString.call(value).slice(8, -1); + } + /** + * Strict object type check. Only returns true + * for plain JavaScript objects. + */ + function isPlainObject(obj) { + return _toString.call(obj) === '[object Object]'; + } + /** + * Check if val is a valid array index. + */ + function isValidArrayIndex(val) { + var n = parseFloat(String(val)); + return n >= 0 && Math.floor(n) === n && isFinite(val); + } + function isPromise(val) { + return (isDef(val) && + typeof val.then === 'function' && + typeof val.catch === 'function'); + } + /** + * Convert a value to a string that is actually rendered. + */ + function toString(val) { + return val == null + ? '' + : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString) + ? JSON.stringify(val, replacer, 2) + : String(val); + } + function replacer(_key, val) { + // avoid circular deps from v3 + if (val && val.__v_isRef) { + return val.value; + } + return val; + } + /** + * Convert an input value to a number for persistence. + * If the conversion fails, return original string. + */ + function toNumber(val) { + var n = parseFloat(val); + return isNaN(n) ? val : n; + } + /** + * Make a map and return a function for checking if a key + * is in that map. + */ + function makeMap(str, expectsLowerCase) { + var map = Object.create(null); + var list = str.split(','); + for (var i = 0; i < list.length; i++) { + map[list[i]] = true; + } + return expectsLowerCase ? function (val) { return map[val.toLowerCase()]; } : function (val) { return map[val]; }; + } + /** + * Check if a tag is a built-in tag. + */ + var isBuiltInTag = makeMap('slot,component', true); + /** + * Check if an attribute is a reserved attribute. + */ + var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is'); + /** + * Check whether an object has the property. + */ + var hasOwnProperty = Object.prototype.hasOwnProperty; + function hasOwn(obj, key) { + return hasOwnProperty.call(obj, key); + } + /** + * Create a cached version of a pure function. + */ + function cached(fn) { + var cache = Object.create(null); + return function cachedFn(str) { + var hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; + } + /** + * Camelize a hyphen-delimited string. + */ + var camelizeRE = /-(\w)/g; + var camelize = cached(function (str) { + return str.replace(camelizeRE, function (_, c) { return (c ? c.toUpperCase() : ''); }); + }); + /** + * Capitalize a string. + */ + var capitalize = cached(function (str) { + return str.charAt(0).toUpperCase() + str.slice(1); + }); + /** + * Hyphenate a camelCase string. + */ + var hyphenateRE = /\B([A-Z])/g; + var hyphenate = cached(function (str) { + return str.replace(hyphenateRE, '-$1').toLowerCase(); + }); + /** + * Mix properties into target object. + */ + function extend(to, _from) { + for (var key in _from) { + to[key] = _from[key]; + } + return to; + } + /** + * Merge an Array of Objects into a single Object. + */ + function toObject(arr) { + var res = {}; + for (var i = 0; i < arr.length; i++) { + if (arr[i]) { + extend(res, arr[i]); + } + } + return res; + } + /* eslint-disable no-unused-vars */ + /** + * Perform no operation. + * Stubbing args to make Flow happy without leaving useless transpiled code + * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/). + */ + function noop(a, b, c) { } + /** + * Always return false. + */ + var no = function (a, b, c) { return false; }; + /* eslint-enable no-unused-vars */ + /** + * Return the same value. + */ + var identity = function (_) { return _; }; + /** + * Generate a string containing static keys from compiler modules. + */ + function genStaticKeys$1(modules) { + return modules + .reduce(function (keys, m) { return keys.concat(m.staticKeys || []); }, []) + .join(','); + } + /** + * Check if two values are loosely equal - that is, + * if they are plain objects, do they have the same shape? + */ + function looseEqual(a, b) { + if (a === b) + return true; + var isObjectA = isObject(a); + var isObjectB = isObject(b); + if (isObjectA && isObjectB) { + try { + var isArrayA = Array.isArray(a); + var isArrayB = Array.isArray(b); + if (isArrayA && isArrayB) { + return (a.length === b.length && + a.every(function (e, i) { + return looseEqual(e, b[i]); + })); + } + else if (a instanceof Date && b instanceof Date) { + return a.getTime() === b.getTime(); + } + else if (!isArrayA && !isArrayB) { + var keysA = Object.keys(a); + var keysB = Object.keys(b); + return (keysA.length === keysB.length && + keysA.every(function (key) { + return looseEqual(a[key], b[key]); + })); + } + else { + /* istanbul ignore next */ + return false; + } + } + catch (e) { + /* istanbul ignore next */ + return false; + } + } + else if (!isObjectA && !isObjectB) { + return String(a) === String(b); + } + else { + return false; + } + } + /** + * Return the first index at which a loosely equal value can be + * found in the array (if value is a plain object, the array must + * contain an object of the same shape), or -1 if it is not present. + */ + function looseIndexOf(arr, val) { + for (var i = 0; i < arr.length; i++) { + if (looseEqual(arr[i], val)) + return i; + } + return -1; + } + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#polyfill + function hasChanged(x, y) { + if (x === y) { + return x === 0 && 1 / x !== 1 / y; + } + else { + return x === x || y === y; + } + } + + var isUnaryTag = makeMap('area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' + + 'link,meta,param,source,track,wbr'); + // Elements that you can, intentionally, leave open + // (and which close themselves) + var canBeLeftOpenTag = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'); + // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3 + // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content + var isNonPhrasingTag = makeMap('address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' + + 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' + + 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' + + 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' + + 'title,tr,track'); + + /** + * unicode letters used for parsing html tags, component names and property paths. + * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname + * skipping \u10000-\uEFFFF due to it freezing up PhantomJS + */ + var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/; + /** + * Define a property. + */ + function def(obj, key, val, enumerable) { + Object.defineProperty(obj, key, { + value: val, + enumerable: !!enumerable, + writable: true, + configurable: true + }); + } + + /** + * Not type-checking this file because it's mostly vendor code. + */ + // Regular Expressions for parsing tags and attributes + var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; + var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; + var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z".concat(unicodeRegExp.source, "]*"); + var qnameCapture = "((?:".concat(ncname, "\\:)?").concat(ncname, ")"); + var startTagOpen = new RegExp("^<".concat(qnameCapture)); + var startTagClose = /^\s*(\/?)>/; + var endTag = new RegExp("^<\\/".concat(qnameCapture, "[^>]*>")); + var doctype = /^]+>/i; + // #7298: escape - to avoid being passed as HTML comment when inlined in page + var comment = /^', + '"': '"', + '&': '&', + ' ': '\n', + ' ': '\t', + ''': "'" + }; + var encodedAttr = /&(?:lt|gt|quot|amp|#39);/g; + var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g; + // #5992 + var isIgnoreNewlineTag = makeMap('pre,textarea', true); + var shouldIgnoreFirstNewline = function (tag, html) { + return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; + }; + function decodeAttr(value, shouldDecodeNewlines) { + var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr; + return value.replace(re, function (match) { return decodingMap[match]; }); + } + function parseHTML(html, options) { + var stack = []; + var expectHTML = options.expectHTML; + var isUnaryTag = options.isUnaryTag || no; + var canBeLeftOpenTag = options.canBeLeftOpenTag || no; + var index = 0; + var last, lastTag; + var _loop_1 = function () { + last = html; + // Make sure we're not in a plaintext content element like script/style + if (!lastTag || !isPlainTextElement(lastTag)) { + var textEnd = html.indexOf('<'); + if (textEnd === 0) { + // Comment: + if (comment.test(html)) { + var commentEnd = html.indexOf('-->'); + if (commentEnd >= 0) { + if (options.shouldKeepComment && options.comment) { + options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3); + } + advance(commentEnd + 3); + return "continue"; + } + } + // https://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment + if (conditionalComment.test(html)) { + var conditionalEnd = html.indexOf(']>'); + if (conditionalEnd >= 0) { + advance(conditionalEnd + 2); + return "continue"; + } + } + // Doctype: + var doctypeMatch = html.match(doctype); + if (doctypeMatch) { + advance(doctypeMatch[0].length); + return "continue"; + } + // End tag: + var endTagMatch = html.match(endTag); + if (endTagMatch) { + var curIndex = index; + advance(endTagMatch[0].length); + parseEndTag(endTagMatch[1], curIndex, index); + return "continue"; + } + // Start tag: + var startTagMatch = parseStartTag(); + if (startTagMatch) { + handleStartTag(startTagMatch); + if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) { + advance(1); + } + return "continue"; + } + } + var text = void 0, rest = void 0, next = void 0; + if (textEnd >= 0) { + rest = html.slice(textEnd); + while (!endTag.test(rest) && + !startTagOpen.test(rest) && + !comment.test(rest) && + !conditionalComment.test(rest)) { + // < in plain text, be forgiving and treat it as text + next = rest.indexOf('<', 1); + if (next < 0) + break; + textEnd += next; + rest = html.slice(textEnd); + } + text = html.substring(0, textEnd); + } + if (textEnd < 0) { + text = html; + } + if (text) { + advance(text.length); + } + if (options.chars && text) { + options.chars(text, index - text.length, index); + } + } + else { + var endTagLength_1 = 0; + var stackedTag_1 = lastTag.toLowerCase(); + var reStackedTag = reCache[stackedTag_1] || + (reCache[stackedTag_1] = new RegExp('([\\s\\S]*?)(]*>)', 'i')); + var rest = html.replace(reStackedTag, function (all, text, endTag) { + endTagLength_1 = endTag.length; + if (!isPlainTextElement(stackedTag_1) && stackedTag_1 !== 'noscript') { + text = text + .replace(//g, '$1') // #7298 + .replace(//g, '$1'); + } + if (shouldIgnoreFirstNewline(stackedTag_1, text)) { + text = text.slice(1); + } + if (options.chars) { + options.chars(text); + } + return ''; + }); + index += html.length - rest.length; + html = rest; + parseEndTag(stackedTag_1, index - endTagLength_1, index); + } + if (html === last) { + options.chars && options.chars(html); + if (!stack.length && options.warn) { + options.warn("Mal-formatted tag at end of template: \"".concat(html, "\""), { + start: index + html.length + }); + } + return "break"; + } + }; + while (html) { + var state_1 = _loop_1(); + if (state_1 === "break") + break; + } + // Clean up any remaining tags + parseEndTag(); + function advance(n) { + index += n; + html = html.substring(n); + } + function parseStartTag() { + var start = html.match(startTagOpen); + if (start) { + var match = { + tagName: start[1], + attrs: [], + start: index + }; + advance(start[0].length); + var end = void 0, attr = void 0; + while (!(end = html.match(startTagClose)) && + (attr = html.match(dynamicArgAttribute) || html.match(attribute))) { + attr.start = index; + advance(attr[0].length); + attr.end = index; + match.attrs.push(attr); + } + if (end) { + match.unarySlash = end[1]; + advance(end[0].length); + match.end = index; + return match; + } + } + } + function handleStartTag(match) { + var tagName = match.tagName; + var unarySlash = match.unarySlash; + if (expectHTML) { + if (lastTag === 'p' && isNonPhrasingTag(tagName)) { + parseEndTag(lastTag); + } + if (canBeLeftOpenTag(tagName) && lastTag === tagName) { + parseEndTag(tagName); + } + } + var unary = isUnaryTag(tagName) || !!unarySlash; + var l = match.attrs.length; + var attrs = new Array(l); + for (var i = 0; i < l; i++) { + var args = match.attrs[i]; + var value = args[3] || args[4] || args[5] || ''; + var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href' + ? options.shouldDecodeNewlinesForHref + : options.shouldDecodeNewlines; + attrs[i] = { + name: args[1], + value: decodeAttr(value, shouldDecodeNewlines) + }; + if (options.outputSourceRange) { + attrs[i].start = args.start + args[0].match(/^\s*/).length; + attrs[i].end = args.end; + } + } + if (!unary) { + stack.push({ + tag: tagName, + lowerCasedTag: tagName.toLowerCase(), + attrs: attrs, + start: match.start, + end: match.end + }); + lastTag = tagName; + } + if (options.start) { + options.start(tagName, attrs, unary, match.start, match.end); + } + } + function parseEndTag(tagName, start, end) { + var pos, lowerCasedTagName; + if (start == null) + start = index; + if (end == null) + end = index; + // Find the closest opened tag of the same type + if (tagName) { + lowerCasedTagName = tagName.toLowerCase(); + for (pos = stack.length - 1; pos >= 0; pos--) { + if (stack[pos].lowerCasedTag === lowerCasedTagName) { + break; + } + } + } + else { + // If no tag name is provided, clean shop + pos = 0; + } + if (pos >= 0) { + // Close all the open elements, up the stack + for (var i = stack.length - 1; i >= pos; i--) { + if ((i > pos || !tagName) && options.warn) { + options.warn("tag <".concat(stack[i].tag, "> has no matching end tag."), { + start: stack[i].start, + end: stack[i].end + }); + } + if (options.end) { + options.end(stack[i].tag, start, end); + } + } + // Remove the open elements from the stack + stack.length = pos; + lastTag = pos && stack[pos - 1].tag; + } + else if (lowerCasedTagName === 'br') { + if (options.start) { + options.start(tagName, [], true, start, end); + } + } + else if (lowerCasedTagName === 'p') { + if (options.start) { + options.start(tagName, [], false, start, end); + } + if (options.end) { + options.end(tagName, start, end); + } + } + } + } + + var DEFAULT_FILENAME = 'anonymous.vue'; + var splitRE = /\r?\n/g; + var replaceRE = /./g; + var isSpecialTag = makeMap('script,style,template', true); + /** + * Parse a single-file component (*.vue) file into an SFC Descriptor Object. + */ + function parseComponent(source, options) { + if (options === void 0) { options = {}; } + var sfc = { + source: source, + filename: DEFAULT_FILENAME, + template: null, + script: null, + scriptSetup: null, + styles: [], + customBlocks: [], + cssVars: [], + errors: [], + shouldForceReload: null // attached in parse() by compiler-sfc + }; + var depth = 0; + var currentBlock = null; + var warn = function (msg) { + sfc.errors.push(msg); + }; + if (options.outputSourceRange) { + warn = function (msg, range) { + var data = { msg: msg }; + if (range.start != null) { + data.start = range.start; + } + if (range.end != null) { + data.end = range.end; + } + sfc.errors.push(data); + }; + } + function start(tag, attrs, unary, start, end) { + if (depth === 0) { + currentBlock = { + type: tag, + content: '', + start: end, + end: 0, + attrs: attrs.reduce(function (cumulated, _a) { + var name = _a.name, value = _a.value; + cumulated[name] = value || true; + return cumulated; + }, {}) + }; + if (typeof currentBlock.attrs.src === 'string') { + currentBlock.src = currentBlock.attrs.src; + } + if (isSpecialTag(tag)) { + checkAttrs(currentBlock, attrs); + if (tag === 'script') { + var block = currentBlock; + if (block.attrs.setup) { + block.setup = currentBlock.attrs.setup; + sfc.scriptSetup = block; + } + else { + sfc.script = block; + } + } + else if (tag === 'style') { + sfc.styles.push(currentBlock); + } + else { + sfc[tag] = currentBlock; + } + } + else { + // custom blocks + sfc.customBlocks.push(currentBlock); + } + } + if (!unary) { + depth++; + } + } + function checkAttrs(block, attrs) { + for (var i = 0; i < attrs.length; i++) { + var attr = attrs[i]; + if (attr.name === 'lang') { + block.lang = attr.value; + } + if (attr.name === 'scoped') { + block.scoped = true; + } + if (attr.name === 'module') { + block.module = attr.value || true; + } + } + } + function end(tag, start) { + if (depth === 1 && currentBlock) { + currentBlock.end = start; + var text = source.slice(currentBlock.start, currentBlock.end); + if (options.deindent === true || + // by default, deindent unless it's script with default lang or (j/t)sx? + (options.deindent !== false && + !(currentBlock.type === 'script' && + (!currentBlock.lang || /^(j|t)sx?$/.test(currentBlock.lang))))) { + text = deIndent(text); + } + // pad content so that linters and pre-processors can output correct + // line numbers in errors and warnings + if (currentBlock.type !== 'template' && options.pad) { + text = padContent(currentBlock, options.pad) + text; + } + currentBlock.content = text; + currentBlock = null; + } + depth--; + } + function padContent(block, pad) { + if (pad === 'space') { + return source.slice(0, block.start).replace(replaceRE, ' '); + } + else { + var offset = source.slice(0, block.start).split(splitRE).length; + var padChar = block.type === 'script' && !block.lang ? '//\n' : '\n'; + return Array(offset).join(padChar); + } + } + parseHTML(source, { + warn: warn, + start: start, + end: end, + outputSourceRange: options.outputSourceRange + }); + return sfc; + } + + // can we use __proto__? + var hasProto = '__proto__' in {}; + // Browser environment sniffing + var inBrowser = typeof window !== 'undefined'; + var UA = inBrowser && window.navigator.userAgent.toLowerCase(); + var isIE = UA && /msie|trident/.test(UA); + UA && UA.indexOf('msie 9.0') > 0; + var isEdge = UA && UA.indexOf('edge/') > 0; + UA && UA.indexOf('android') > 0; + UA && /iphone|ipad|ipod|ios/.test(UA); + UA && /chrome\/\d+/.test(UA) && !isEdge; + UA && /phantomjs/.test(UA); + UA && UA.match(/firefox\/(\d+)/); + // Firefox has a "watch" function on Object.prototype... + // @ts-expect-error firebox support + var nativeWatch = {}.watch; + var supportsPassive = false; + if (inBrowser) { + try { + var opts = {}; + Object.defineProperty(opts, 'passive', { + get: function () { + /* istanbul ignore next */ + supportsPassive = true; + } + }); // https://github.com/facebook/flow/issues/285 + window.addEventListener('test-passive', null, opts); + } + catch (e) { } + } + // this needs to be lazy-evaled because vue may be required before + // vue-server-renderer can set VUE_ENV + var _isServer; + var isServerRendering = function () { + if (_isServer === undefined) { + /* istanbul ignore if */ + if (!inBrowser && typeof global !== 'undefined') { + // detect presence of vue-server-renderer and avoid + // Webpack shimming the process + _isServer = + global['process'] && global['process'].env.VUE_ENV === 'server'; + } + else { + _isServer = false; + } + } + return _isServer; + }; + /* istanbul ignore next */ + function isNative(Ctor) { + return typeof Ctor === 'function' && /native code/.test(Ctor.toString()); + } + var hasSymbol = typeof Symbol !== 'undefined' && + isNative(Symbol) && + typeof Reflect !== 'undefined' && + isNative(Reflect.ownKeys); + var _Set; // $flow-disable-line + /* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) { + // use native Set when available. + _Set = Set; + } + else { + // a non-standard Set polyfill that only works with primitive keys. + _Set = /** @class */ (function () { + function Set() { + this.set = Object.create(null); + } + Set.prototype.has = function (key) { + return this.set[key] === true; + }; + Set.prototype.add = function (key) { + this.set[key] = true; + }; + Set.prototype.clear = function () { + this.set = Object.create(null); + }; + return Set; + }()); + } + + var ASSET_TYPES = ['component', 'directive', 'filter']; + var LIFECYCLE_HOOKS = [ + 'beforeCreate', + 'created', + 'beforeMount', + 'mounted', + 'beforeUpdate', + 'updated', + 'beforeDestroy', + 'destroyed', + 'activated', + 'deactivated', + 'errorCaptured', + 'serverPrefetch', + 'renderTracked', + 'renderTriggered' + ]; + + var config = { + /** + * Option merge strategies (used in core/util/options) + */ + // $flow-disable-line + optionMergeStrategies: Object.create(null), + /** + * Whether to suppress warnings. + */ + silent: false, + /** + * Show production mode tip message on boot? + */ + productionTip: true, + /** + * Whether to enable devtools + */ + devtools: true, + /** + * Whether to record perf + */ + performance: false, + /** + * Error handler for watcher errors + */ + errorHandler: null, + /** + * Warn handler for watcher warns + */ + warnHandler: null, + /** + * Ignore certain custom elements + */ + ignoredElements: [], + /** + * Custom user key aliases for v-on + */ + // $flow-disable-line + keyCodes: Object.create(null), + /** + * Check if a tag is reserved so that it cannot be registered as a + * component. This is platform-dependent and may be overwritten. + */ + isReservedTag: no, + /** + * Check if an attribute is reserved so that it cannot be used as a component + * prop. This is platform-dependent and may be overwritten. + */ + isReservedAttr: no, + /** + * Check if a tag is an unknown element. + * Platform-dependent. + */ + isUnknownElement: no, + /** + * Get the namespace of an element + */ + getTagNamespace: noop, + /** + * Parse the real tag name for the specific platform. + */ + parsePlatformTagName: identity, + /** + * Check if an attribute must be bound using property, e.g. value + * Platform-dependent. + */ + mustUseProp: no, + /** + * Perform updates asynchronously. Intended to be used by Vue Test Utils + * This will significantly reduce performance if set to false. + */ + async: true, + /** + * Exposed for legacy reasons + */ + _lifecycleHooks: LIFECYCLE_HOOKS + }; + + var currentInstance = null; + /** + * @internal + */ + function setCurrentInstance(vm) { + if (vm === void 0) { vm = null; } + if (!vm) + currentInstance && currentInstance._scope.off(); + currentInstance = vm; + vm && vm._scope.on(); + } + + /** + * @internal + */ + var VNode = /** @class */ (function () { + function VNode(tag, data, children, text, elm, context, componentOptions, asyncFactory) { + this.tag = tag; + this.data = data; + this.children = children; + this.text = text; + this.elm = elm; + this.ns = undefined; + this.context = context; + this.fnContext = undefined; + this.fnOptions = undefined; + this.fnScopeId = undefined; + this.key = data && data.key; + this.componentOptions = componentOptions; + this.componentInstance = undefined; + this.parent = undefined; + this.raw = false; + this.isStatic = false; + this.isRootInsert = true; + this.isComment = false; + this.isCloned = false; + this.isOnce = false; + this.asyncFactory = asyncFactory; + this.asyncMeta = undefined; + this.isAsyncPlaceholder = false; + } + Object.defineProperty(VNode.prototype, "child", { + // DEPRECATED: alias for componentInstance for backwards compat. + /* istanbul ignore next */ + get: function () { + return this.componentInstance; + }, + enumerable: false, + configurable: true + }); + return VNode; + }()); + var createEmptyVNode = function (text) { + if (text === void 0) { text = ''; } + var node = new VNode(); + node.text = text; + node.isComment = true; + return node; + }; + function createTextVNode(val) { + return new VNode(undefined, undefined, undefined, String(val)); + } + // optimized shallow clone + // used for static nodes and slot nodes because they may be reused across + // multiple renders, cloning them avoids errors when DOM manipulations rely + // on their elm reference. + function cloneVNode(vnode) { + var cloned = new VNode(vnode.tag, vnode.data, + // #7975 + // clone children array to avoid mutating original in case of cloning + // a child. + vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory); + cloned.ns = vnode.ns; + cloned.isStatic = vnode.isStatic; + cloned.key = vnode.key; + cloned.isComment = vnode.isComment; + cloned.fnContext = vnode.fnContext; + cloned.fnOptions = vnode.fnOptions; + cloned.fnScopeId = vnode.fnScopeId; + cloned.asyncMeta = vnode.asyncMeta; + cloned.isCloned = true; + return cloned; + } + + /* not type checking this file because flow doesn't play well with Proxy */ + { + makeMap('Infinity,undefined,NaN,isFinite,isNaN,' + + 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + + 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' + + 'require' // for Webpack/Browserify + ); + var hasProxy_1 = typeof Proxy !== 'undefined' && isNative(Proxy); + if (hasProxy_1) { + var isBuiltInModifier_1 = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact'); + config.keyCodes = new Proxy(config.keyCodes, { + set: function (target, key, value) { + if (isBuiltInModifier_1(key)) { + warn$2("Avoid overwriting built-in modifier in config.keyCodes: .".concat(key)); + return false; + } + else { + target[key] = value; + return true; + } + } + }); + } + } + + /****************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + }; + + var uid = 0; + /** + * A dep is an observable that can have multiple + * directives subscribing to it. + * @internal + */ + var Dep = /** @class */ (function () { + function Dep() { + // pending subs cleanup + this._pending = false; + this.id = uid++; + this.subs = []; + } + Dep.prototype.addSub = function (sub) { + this.subs.push(sub); + }; + Dep.prototype.removeSub = function (sub) { + // #12696 deps with massive amount of subscribers are extremely slow to + // clean up in Chromium + // to workaround this, we unset the sub for now, and clear them on + // next scheduler flush. + this.subs[this.subs.indexOf(sub)] = null; + if (!this._pending) { + this._pending = true; + } + }; + Dep.prototype.depend = function (info) { + if (Dep.target) { + Dep.target.addDep(this); + if (info && Dep.target.onTrack) { + Dep.target.onTrack(__assign({ effect: Dep.target }, info)); + } + } + }; + Dep.prototype.notify = function (info) { + // stabilize the subscriber list first + var subs = this.subs.filter(function (s) { return s; }); + for (var i = 0, l = subs.length; i < l; i++) { + var sub = subs[i]; + if (info) { + sub.onTrigger && + sub.onTrigger(__assign({ effect: subs[i] }, info)); + } + sub.update(); + } + }; + return Dep; + }()); + // The current target watcher being evaluated. + // This is globally unique because only one watcher + // can be evaluated at a time. + Dep.target = null; + var targetStack = []; + function pushTarget(target) { + targetStack.push(target); + Dep.target = target; + } + function popTarget() { + targetStack.pop(); + Dep.target = targetStack[targetStack.length - 1]; + } + + /* + * not type checking this file because flow doesn't play well with + * dynamically accessing methods on Array prototype + */ + var arrayProto = Array.prototype; + var arrayMethods = Object.create(arrayProto); + var methodsToPatch = [ + 'push', + 'pop', + 'shift', + 'unshift', + 'splice', + 'sort', + 'reverse' + ]; + /** + * Intercept mutating methods and emit events + */ + methodsToPatch.forEach(function (method) { + // cache original method + var original = arrayProto[method]; + def(arrayMethods, method, function mutator() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var result = original.apply(this, args); + var ob = this.__ob__; + var inserted; + switch (method) { + case 'push': + case 'unshift': + inserted = args; + break; + case 'splice': + inserted = args.slice(2); + break; + } + if (inserted) + ob.observeArray(inserted); + // notify change + { + ob.dep.notify({ + type: "array mutation" /* TriggerOpTypes.ARRAY_MUTATION */, + target: this, + key: method + }); + } + return result; + }); + }); + + var arrayKeys = Object.getOwnPropertyNames(arrayMethods); + var NO_INITIAL_VALUE = {}; + /** + * In some cases we may want to disable observation inside a component's + * update computation. + */ + var shouldObserve = true; + function toggleObserving(value) { + shouldObserve = value; + } + // ssr mock dep + var mockDep = { + notify: noop, + depend: noop, + addSub: noop, + removeSub: noop + }; + /** + * Observer class that is attached to each observed + * object. Once attached, the observer converts the target + * object's property keys into getter/setters that + * collect dependencies and dispatch updates. + */ + var Observer = /** @class */ (function () { + function Observer(value, shallow, mock) { + if (shallow === void 0) { shallow = false; } + if (mock === void 0) { mock = false; } + this.value = value; + this.shallow = shallow; + this.mock = mock; + // this.value = value + this.dep = mock ? mockDep : new Dep(); + this.vmCount = 0; + def(value, '__ob__', this); + if (isArray(value)) { + if (!mock) { + if (hasProto) { + value.__proto__ = arrayMethods; + /* eslint-enable no-proto */ + } + else { + for (var i = 0, l = arrayKeys.length; i < l; i++) { + var key = arrayKeys[i]; + def(value, key, arrayMethods[key]); + } + } + } + if (!shallow) { + this.observeArray(value); + } + } + else { + /** + * Walk through all properties and convert them into + * getter/setters. This method should only be called when + * value type is Object. + */ + var keys = Object.keys(value); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + defineReactive(value, key, NO_INITIAL_VALUE, undefined, shallow, mock); + } + } + } + /** + * Observe a list of Array items. + */ + Observer.prototype.observeArray = function (value) { + for (var i = 0, l = value.length; i < l; i++) { + observe(value[i], false, this.mock); + } + }; + return Observer; + }()); + // helpers + /** + * Attempt to create an observer instance for a value, + * returns the new observer if successfully observed, + * or the existing observer if the value already has one. + */ + function observe(value, shallow, ssrMockReactivity) { + if (value && hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { + return value.__ob__; + } + if (shouldObserve && + (ssrMockReactivity || !isServerRendering()) && + (isArray(value) || isPlainObject(value)) && + Object.isExtensible(value) && + !value.__v_skip /* ReactiveFlags.SKIP */ && + !isRef(value) && + !(value instanceof VNode)) { + return new Observer(value, shallow, ssrMockReactivity); + } + } + /** + * Define a reactive property on an Object. + */ + function defineReactive(obj, key, val, customSetter, shallow, mock, observeEvenIfShallow) { + if (observeEvenIfShallow === void 0) { observeEvenIfShallow = false; } + var dep = new Dep(); + var property = Object.getOwnPropertyDescriptor(obj, key); + if (property && property.configurable === false) { + return; + } + // cater for pre-defined getter/setters + var getter = property && property.get; + var setter = property && property.set; + if ((!getter || setter) && + (val === NO_INITIAL_VALUE || arguments.length === 2)) { + val = obj[key]; + } + var childOb = shallow ? val && val.__ob__ : observe(val, false, mock); + Object.defineProperty(obj, key, { + enumerable: true, + configurable: true, + get: function reactiveGetter() { + var value = getter ? getter.call(obj) : val; + if (Dep.target) { + { + dep.depend({ + target: obj, + type: "get" /* TrackOpTypes.GET */, + key: key + }); + } + if (childOb) { + childOb.dep.depend(); + if (isArray(value)) { + dependArray(value); + } + } + } + return isRef(value) && !shallow ? value.value : value; + }, + set: function reactiveSetter(newVal) { + var value = getter ? getter.call(obj) : val; + if (!hasChanged(value, newVal)) { + return; + } + if (customSetter) { + customSetter(); + } + if (setter) { + setter.call(obj, newVal); + } + else if (getter) { + // #7981: for accessor properties without setter + return; + } + else if (!shallow && isRef(value) && !isRef(newVal)) { + value.value = newVal; + return; + } + else { + val = newVal; + } + childOb = shallow ? newVal && newVal.__ob__ : observe(newVal, false, mock); + { + dep.notify({ + type: "set" /* TriggerOpTypes.SET */, + target: obj, + key: key, + newValue: newVal, + oldValue: value + }); + } + } + }); + return dep; + } + function set(target, key, val) { + if ((isUndef(target) || isPrimitive(target))) { + warn$2("Cannot set reactive property on undefined, null, or primitive value: ".concat(target)); + } + if (isReadonly(target)) { + warn$2("Set operation on key \"".concat(key, "\" failed: target is readonly.")); + return; + } + var ob = target.__ob__; + if (isArray(target) && isValidArrayIndex(key)) { + target.length = Math.max(target.length, key); + target.splice(key, 1, val); + // when mocking for SSR, array methods are not hijacked + if (ob && !ob.shallow && ob.mock) { + observe(val, false, true); + } + return val; + } + if (key in target && !(key in Object.prototype)) { + target[key] = val; + return val; + } + if (target._isVue || (ob && ob.vmCount)) { + warn$2('Avoid adding reactive properties to a Vue instance or its root $data ' + + 'at runtime - declare it upfront in the data option.'); + return val; + } + if (!ob) { + target[key] = val; + return val; + } + defineReactive(ob.value, key, val, undefined, ob.shallow, ob.mock); + { + ob.dep.notify({ + type: "add" /* TriggerOpTypes.ADD */, + target: target, + key: key, + newValue: val, + oldValue: undefined + }); + } + return val; + } + /** + * Collect dependencies on array elements when the array is touched, since + * we cannot intercept array element access like property getters. + */ + function dependArray(value) { + for (var e = void 0, i = 0, l = value.length; i < l; i++) { + e = value[i]; + if (e && e.__ob__) { + e.__ob__.dep.depend(); + } + if (isArray(e)) { + dependArray(e); + } + } + } + + function isReadonly(value) { + return !!(value && value.__v_isReadonly); + } + + function isRef(r) { + return !!(r && r.__v_isRef === true); + } + + { + var perf_1 = inBrowser && window.performance; + /* istanbul ignore if */ + if (perf_1 && + // @ts-ignore + perf_1.mark && + // @ts-ignore + perf_1.measure && + // @ts-ignore + perf_1.clearMarks && + // @ts-ignore + perf_1.clearMeasures) ; + } + + var normalizeEvent = cached(function (name) { + var passive = name.charAt(0) === '&'; + name = passive ? name.slice(1) : name; + var once = name.charAt(0) === '~'; // Prefixed last, checked first + name = once ? name.slice(1) : name; + var capture = name.charAt(0) === '!'; + name = capture ? name.slice(1) : name; + return { + name: name, + once: once, + capture: capture, + passive: passive + }; + }); + function createFnInvoker(fns, vm) { + function invoker() { + var fns = invoker.fns; + if (isArray(fns)) { + var cloned = fns.slice(); + for (var i = 0; i < cloned.length; i++) { + invokeWithErrorHandling(cloned[i], null, arguments, vm, "v-on handler"); + } + } + else { + // return handler return value for single handlers + return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler"); + } + } + invoker.fns = fns; + return invoker; + } + function updateListeners(on, oldOn, add, remove, createOnceHandler, vm) { + var name, cur, old, event; + for (name in on) { + cur = on[name]; + old = oldOn[name]; + event = normalizeEvent(name); + if (isUndef(cur)) { + warn$2("Invalid handler for event \"".concat(event.name, "\": got ") + String(cur), vm); + } + else if (isUndef(old)) { + if (isUndef(cur.fns)) { + cur = on[name] = createFnInvoker(cur, vm); + } + if (isTrue(event.once)) { + cur = on[name] = createOnceHandler(event.name, cur, event.capture); + } + add(event.name, cur, event.capture, event.passive, event.params); + } + else if (cur !== old) { + old.fns = cur; + on[name] = old; + } + } + for (name in oldOn) { + if (isUndef(on[name])) { + event = normalizeEvent(name); + remove(event.name, oldOn[name], event.capture); + } + } + } + + function extractPropsFromVNodeData(data, Ctor, tag) { + // we are only extracting raw values here. + // validation and default values are handled in the child + // component itself. + var propOptions = Ctor.options.props; + if (isUndef(propOptions)) { + return; + } + var res = {}; + var attrs = data.attrs, props = data.props; + if (isDef(attrs) || isDef(props)) { + for (var key in propOptions) { + var altKey = hyphenate(key); + { + var keyInLowerCase = key.toLowerCase(); + if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) { + tip("Prop \"".concat(keyInLowerCase, "\" is passed to component ") + + "".concat(formatComponentName( + // @ts-expect-error tag is string + tag || Ctor), ", but the declared prop name is") + + " \"".concat(key, "\". ") + + "Note that HTML attributes are case-insensitive and camelCased " + + "props need to use their kebab-case equivalents when using in-DOM " + + "templates. You should probably use \"".concat(altKey, "\" instead of \"").concat(key, "\".")); + } + } + checkProp(res, props, key, altKey, true) || + checkProp(res, attrs, key, altKey, false); + } + } + return res; + } + function checkProp(res, hash, key, altKey, preserve) { + if (isDef(hash)) { + if (hasOwn(hash, key)) { + res[key] = hash[key]; + if (!preserve) { + delete hash[key]; + } + return true; + } + else if (hasOwn(hash, altKey)) { + res[key] = hash[altKey]; + if (!preserve) { + delete hash[altKey]; + } + return true; + } + } + return false; + } + + // The template compiler attempts to minimize the need for normalization by + // statically analyzing the template at compile time. + // + // For plain HTML markup, normalization can be completely skipped because the + // generated render function is guaranteed to return Array. There are + // two cases where extra normalization is needed: + // 1. When the children contains components - because a functional component + // may return an Array instead of a single root. In this case, just a simple + // normalization is needed - if any child is an Array, we flatten the whole + // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep + // because functional components already normalize their own children. + function simpleNormalizeChildren(children) { + for (var i = 0; i < children.length; i++) { + if (isArray(children[i])) { + return Array.prototype.concat.apply([], children); + } + } + return children; + } + // 2. When the children contains constructs that always generated nested Arrays, + // e.g.